public class Table<T> extends Object
| Constructor and Description |
|---|
Table(Class<T> clazz) |
Table(org.apache.hadoop.hbase.client.HTable hTable,
String columns,
Converter<T> converter) |
Table(String name,
String columns,
Converter<T> converter) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(Object key)
Deletes the object with the specified key.
|
void |
deleteAll() |
T |
get(Object key)
Retrieve the object with the specified key.
|
<I> Mapped<I> |
map(SerializableFunction<T,I> f)
Transform the data using the given function.
|
<P> Partitioned<P,T> |
partitionBy(PartitionFunction<T,P> f)
Partition the data according to a partitioning function.
|
void |
put(T t)
Store the object into HBase.
|
<R extends Serializable> |
reduce(SerializableFunction<Iterable<T>,R> f)
Applies a function over all the data.
|
public Table(String name, String columns, Converter<T> converter)
name - the name of the tablecolumns - a comma separated list of columns (e.g. "fam1:col1,fam1:col2,fam2:col1")converter - the converter for the domain objectspublic T get(Object key) throws IOException
key - the key of this objectIOException - if there is a communication problem with HBasepublic void put(T t) throws IOException
t - the object to storeIOException - if there is a communication problem with HBasepublic void delete(Object key) throws IOException
key - the key of the object to deleteIOException - if there is a communication problem with HBasepublic <P> Partitioned<P,T> partitionBy(PartitionFunction<T,P> f) throws IOException
P - type of partition idf - the function that determines the partitionIOException - if there is a communication problem with HBasepublic <I> Mapped<I> map(SerializableFunction<T,I> f) throws IOException
I - the type of the output dataf - the function to transform the dataIOException - if there is a communication problem with HBasepublic <R extends Serializable> R reduce(SerializableFunction<Iterable<T>,R> f) throws IOException
R - the type of the resultf - the function to be applied.IOException - if there is a communication problem with HBasepublic void deleteAll()
throws IOException
IOExceptionCopyright © 2015. All rights reserved.