public class HBaseTable extends BufferingTable
AbstractTable.TableScanner| Modifier and Type | Field and Description |
|---|---|
static String |
DELTA_WRITE |
DELETE_MARKEREMPTY_ROW_MAP| Constructor and Description |
|---|
HBaseTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
co.cask.cdap.api.dataset.DatasetSpecification spec,
CConfiguration cConf,
Configuration hConf,
HBaseTableUtil tableUtil) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
byte[] |
getNameAsTxChangePrefix()
Generates a byte array to be used as the transaction change prefix.
|
protected NavigableMap<byte[],byte[]> |
getPersisted(byte[] row,
byte[][] columns)
Fetches column->value pairs for set of columns from persistent store.
|
protected NavigableMap<byte[],byte[]> |
getPersisted(byte[] row,
byte[] startColumn,
byte[] stopColumn,
int limit)
Fetches column->value pairs for range of columns from persistent store.
|
List<Map<byte[],byte[]>> |
getPersisted(List<co.cask.cdap.api.dataset.table.Get> gets)
Fetches a list of rows from persistent store.
|
protected void |
persist(NavigableMap<byte[],NavigableMap<byte[],Update>> buff)
Persists in-memory buffer.
|
protected co.cask.cdap.api.dataset.table.Scanner |
scanPersisted(co.cask.cdap.api.dataset.table.Scan scan)
Scans range of rows from persistent store for a given
Scan. |
void |
startTx(co.cask.tephra.Transaction tx) |
String |
toString() |
protected void |
undo(NavigableMap<byte[],NavigableMap<byte[],Update>> persisted)
Undos previously persisted changes.
|
commitTx, compareAndSwap, delete, delete, get, get, get, get, getRange, getSplits, getTableName, getTransactionAwareName, getTxChanges, head, increment, incrementAndGet, postTxCommit, put, rollbackTx, scan, scan, setMetricsCollector, unwrapDeleteIfNeeded, unwrapDeletes, unwrapDeletesForRows, updateTx, wrapDeleteIfNeededcreateSplitReader, createSplitRecordScanner, delete, delete, get, get, getRecordType, getSplits, increment, increment, incrementAndGet, incrementAndGet, put, put, write, writepublic static final String DELTA_WRITE
public HBaseTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
co.cask.cdap.api.dataset.DatasetSpecification spec,
CConfiguration cConf,
Configuration hConf,
HBaseTableUtil tableUtil)
throws IOException
IOExceptionpublic void startTx(co.cask.tephra.Transaction tx)
startTx in interface co.cask.tephra.TransactionAwarestartTx in class BufferingTablepublic List<Map<byte[],byte[]>> getPersisted(List<co.cask.cdap.api.dataset.table.Get> gets)
BufferingTableBufferingTable.getPersisted(byte[], byte[][]) on each get.
NOTE: persisted store can also be in-memory, it is called "persisted" to distinguish from in-memory buffer.getPersisted in class BufferingTablegets - list of gets to performpublic byte[] getNameAsTxChangePrefix()
BufferingTablegetNameAsTxChangePrefix in class BufferingTablepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class BufferingTableIOExceptionprotected void persist(NavigableMap<byte[],NavigableMap<byte[],Update>> buff) throws Exception
BufferingTablepersist in class BufferingTablebuff - in-memory buffer to persist. Map is described as row->(column->value). Map can contain null values
which means that the corresponded column was deletedExceptionprotected void undo(NavigableMap<byte[],NavigableMap<byte[],Update>> persisted) throws Exception
BufferingTableundo in class BufferingTablepersisted - previously persisted changes. Map is described as row->(column->value). Map can contain null
values which means that the corresponded column was deletedExceptionprotected NavigableMap<byte[],byte[]> getPersisted(byte[] row, byte[] startColumn, byte[] stopColumn, int limit) throws Exception
BufferingTablegetPersisted in class BufferingTablerow - row key defines the row to fetch columns fromstartColumn - first column in a range, inclusivestopColumn - last column in a range, exclusivelimit - max number of columns to fetchExceptionprotected NavigableMap<byte[],byte[]> getPersisted(byte[] row, @Nullable byte[][] columns) throws Exception
BufferingTablegetPersisted in class BufferingTablerow - row key defines the row to fetch columns fromcolumns - set of columns to fetch. null means fetch everything; empty array which means fetch nothing.Exceptionprotected co.cask.cdap.api.dataset.table.Scanner scanPersisted(co.cask.cdap.api.dataset.table.Scan scan)
throws Exception
BufferingTableScan.
NOTE: persisted store can also be in-memory, it is called "persisted" to distinguish from in-memory buffer.scanPersisted in class BufferingTablescan - scan configurationScanner, never nullExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.