public class LevelDBTable extends BufferingTable
AbstractTable.TableScannerDELETE_MARKEREMPTY_ROW_MAP| Constructor and Description |
|---|
LevelDBTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
String tableName,
co.cask.cdap.api.dataset.table.ConflictDetection level,
LevelDBTableService service,
CConfiguration cConf,
co.cask.cdap.api.data.schema.Schema schema,
String schemaRowField) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
increment(byte[] row,
byte[][] columns,
long[] amounts) |
protected void |
persist(NavigableMap<byte[],NavigableMap<byte[],Update>> changes)
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) |
protected void |
undo(NavigableMap<byte[],NavigableMap<byte[],Update>> persisted)
Undos previously persisted changes.
|
close, commitTx, compareAndSwap, delete, delete, get, get, get, get, getNameAsTxChangePrefix, getPersisted, getRange, getSplits, getTableName, getTransactionAwareName, getTxChanges, head, 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 LevelDBTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
String tableName,
co.cask.cdap.api.dataset.table.ConflictDetection level,
LevelDBTableService service,
CConfiguration cConf,
co.cask.cdap.api.data.schema.Schema schema,
String schemaRowField)
throws IOException
IOExceptionpublic void startTx(co.cask.tephra.Transaction tx)
startTx in interface co.cask.tephra.TransactionAwarestartTx in class BufferingTablepublic void increment(byte[] row,
byte[][] columns,
long[] amounts)
increment in interface co.cask.cdap.api.dataset.table.Tableincrement in class BufferingTableprotected void persist(NavigableMap<byte[],NavigableMap<byte[],Update>> changes) throws Exception
BufferingTablepersist in class BufferingTablechanges - 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, @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 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 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.