public class HBaseStore<K,T extends org.apache.gora.persistency.impl.PersistentBase>
extends org.apache.gora.store.impl.DataStoreBase<K,T>
implements org.apache.hadoop.conf.Configurable
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_MAPPING_FILE |
static org.slf4j.Logger |
LOG |
static String |
PARSE_MAPPING_FILE_KEY |
| Constructor and Description |
|---|
HBaseStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.hadoop.hbase.client.ResultScanner |
createScanner(org.apache.gora.query.Query<K,T> query) |
void |
createSchema() |
boolean |
delete(K key)
Deletes the object with the given key.
|
void |
delete(T obj) |
long |
deleteByQuery(org.apache.gora.query.Query<K,T> query) |
void |
deleteSchema() |
org.apache.gora.query.Result<K,T> |
execute(org.apache.gora.query.Query<K,T> query) |
void |
flush() |
T |
get(K key,
String[] fields) |
org.apache.hadoop.conf.Configuration |
getConf() |
HBaseMapping |
getMapping() |
List<org.apache.gora.query.PartitionQuery<K,T>> |
getPartitions(org.apache.gora.query.Query<K,T> query) |
int |
getScannerCaching()
Gets the Scanner Caching optimization value
|
String |
getSchemaName() |
void |
initialize(Class<K> keyClass,
Class<T> persistentClass,
Properties properties) |
T |
newInstance(org.apache.hadoop.hbase.client.Result result,
String[] fields)
Creates a new Persistent instance with the values in 'result' for the fields listed.
|
org.apache.gora.query.Query<K,T> |
newQuery() |
void |
put(K key,
T persistent)
Serializes the Persistent data and saves in HBase.
|
boolean |
schemaExists() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
HBaseStore<K,T> |
setScannerCaching(int numRows)
Sets the value for Scanner Caching optimization
|
public static final org.slf4j.Logger LOG
public static final String PARSE_MAPPING_FILE_KEY
public static final String DEFAULT_MAPPING_FILE
public void initialize(Class<K> keyClass, Class<T> persistentClass, Properties properties)
public String getSchemaName()
public HBaseMapping getMapping()
public void createSchema()
public void deleteSchema()
public boolean schemaExists()
public void put(K key, T persistent)
public void delete(T obj)
public boolean delete(K key)
public void flush()
public List<org.apache.gora.query.PartitionQuery<K,T>> getPartitions(org.apache.gora.query.Query<K,T> query) throws IOException
getPartitions in interface org.apache.gora.store.DataStore<K,T extends org.apache.gora.persistency.impl.PersistentBase>IOExceptionpublic org.apache.hadoop.hbase.client.ResultScanner createScanner(org.apache.gora.query.Query<K,T> query) throws IOException
IOExceptionpublic T newInstance(org.apache.hadoop.hbase.client.Result result, String[] fields) throws IOException
result - result form a HTable#get()fields - List of fields queried, or null for allIOExceptionpublic void close()
public org.apache.hadoop.conf.Configuration getConf()
public void setConf(org.apache.hadoop.conf.Configuration conf)
public int getScannerCaching()
Scan.setCaching(int)public HBaseStore<K,T> setScannerCaching(int numRows)
numRows - the number of rows for caching >= 0Scan.setCaching(int)Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.