public final class HBaseStreamConsumerStateStore extends StreamConsumerStateStore
streamConfig, streamId| Constructor and Description |
|---|
HBaseStreamConsumerStateStore(StreamConfig streamConfig,
org.apache.hadoop.hbase.client.HTable hTable)
Constructor to create an instance for a given stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
delete(byte[] row,
Set<byte[]> columns)
Deletes the set of columns from the given row.
|
protected byte[] |
fetch(byte[] row,
byte[] column)
Fetches the cell value for the given row and column.
|
protected void |
fetchAll(byte[] row,
byte[] columnPrefix,
Map<byte[],byte[]> result)
Fetches all values for the given row.
|
protected void |
fetchAll(byte[] row,
Map<byte[],byte[]> result)
Fetches all values for the given row.
|
protected void |
store(byte[] row,
byte[] column,
byte[] value)
Stores the given value to cell identified by the given row and column.
|
protected void |
store(byte[] row,
Map<byte[],byte[]> values)
Stores all the values to the given row.
|
get, getAll, getByGroup, remove, save, savepublic HBaseStreamConsumerStateStore(StreamConfig streamConfig, org.apache.hadoop.hbase.client.HTable hTable)
streamConfig - configuration information of the stream.hTable - for communicating with HBase for backing store.public void close()
throws IOException
IOExceptionprotected byte[] fetch(byte[] row,
byte[] column)
throws IOException
StreamConsumerStateStorenull should be returned.fetch in class StreamConsumerStateStoreIOExceptionprotected void fetchAll(byte[] row,
Map<byte[],byte[]> result)
throws IOException
StreamConsumerStateStorefetchAll in class StreamConsumerStateStorerow - the row to fetch from.result - a map from column to value.IOExceptionprotected void fetchAll(byte[] row,
byte[] columnPrefix,
Map<byte[],byte[]> result)
throws IOException
StreamConsumerStateStorefetchAll in class StreamConsumerStateStorerow - the row to fetch from.columnPrefix - the column prefix.result - a map from column to value. It's valid to contains columns that don't start with columnPrefix.IOExceptionprotected void store(byte[] row,
byte[] column,
byte[] value)
throws IOException
StreamConsumerStateStorestore in class StreamConsumerStateStoreIOExceptionprotected void store(byte[] row,
Map<byte[],byte[]> values)
throws IOException
StreamConsumerStateStorestore in class StreamConsumerStateStorerow - the row to store to.values - Map from column name to value.IOExceptionprotected void delete(byte[] row,
Set<byte[]> columns)
throws IOException
StreamConsumerStateStoredelete in class StreamConsumerStateStorerow - the row to act on.columns - columns to get deleted.IOExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.