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 StreamsOperation
public void write(StreamsDatum streamsDatum)
write
in interface StreamsPersistWriter
public void flush() throws IOException
flush
in interface Flushable
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void prepare(Object configurationObject)
prepare
in interface StreamsOperation
public void cleanUp()
cleanUp
in interface StreamsOperation
Copyright © 2018 The Apache Software Foundation. All rights reserved.