public class HbasePersistWriter extends Object implements StreamsPersistWriter, Flushable, Closeable
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.hbase.client.HConnection |
connection |
protected org.apache.hadoop.hbase.HTableDescriptor |
descriptor |
protected Queue<StreamsDatum> |
persistQueue |
protected org.apache.hadoop.hbase.client.HTablePool |
pool |
static String |
STREAMS_ID |
protected org.apache.hadoop.hbase.client.HTableInterface |
table |
| Constructor and Description |
|---|
HbasePersistWriter()
HbasePersistWriter constructor - resolve HbaseConfiguration from JVM 'hbase'.
|
HbasePersistWriter(HbaseConfiguration hbaseConfiguration)
HbasePersistWriter constructor - use supplied persistQueue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp() |
void |
close() |
void |
flush() |
String |
getId() |
void |
prepare(Object configurationObject) |
void |
write(StreamsDatum streamsDatum) |
public static final String STREAMS_ID
protected org.apache.hadoop.hbase.client.HConnection connection
protected org.apache.hadoop.hbase.client.HTablePool pool
protected org.apache.hadoop.hbase.client.HTableInterface table
protected org.apache.hadoop.hbase.HTableDescriptor descriptor
protected volatile Queue<StreamsDatum> persistQueue
public HbasePersistWriter()
public HbasePersistWriter(HbaseConfiguration hbaseConfiguration)
hbaseConfiguration - HbaseConfigurationpublic String getId()
getId in interface StreamsOperationpublic void write(StreamsDatum streamsDatum)
write in interface StreamsPersistWriterpublic void flush()
throws IOException
flush in interface FlushableIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void prepare(Object configurationObject)
prepare in interface StreamsOperationpublic void cleanUp()
cleanUp in interface StreamsOperationCopyright © 2018 The Apache Software Foundation. All rights reserved.