public class InMemoryTable extends BufferingTable
AbstractTable.TableScannerDELETE_MARKEREMPTY_ROW_MAP| Constructor and Description |
|---|
InMemoryTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
String name,
CConfiguration cConf)
To be used in tests that need namespaces
|
InMemoryTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
String name,
co.cask.cdap.api.dataset.table.ConflictDetection level,
CConfiguration cConf)
To be used in tests that need namespaces
|
InMemoryTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
String name,
co.cask.cdap.api.dataset.table.ConflictDetection level,
CConfiguration cConf,
co.cask.cdap.api.data.schema.Schema schema,
String schemaRowField) |
InMemoryTable(String name)
To be used in tests which do not need namespaces
|
InMemoryTable(String name,
co.cask.cdap.api.dataset.table.ConflictDetection level)
To be used in tests that do not need namespaces
|
| Modifier and Type | Method and Description |
|---|---|
protected static NavigableMap<byte[],byte[]> |
getLatestNotExcluded(NavigableMap<byte[],NavigableMap<Long,byte[]>> rowMap,
co.cask.tephra.Transaction tx) |
protected static NavigableMap<byte[],NavigableMap<byte[],byte[]>> |
getLatestNotExcludedRows(NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>> rows,
co.cask.tephra.Transaction tx) |
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>> 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) |
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 InMemoryTable(String name)
public InMemoryTable(String name, co.cask.cdap.api.dataset.table.ConflictDetection level)
public InMemoryTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
String name,
CConfiguration cConf)
public InMemoryTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
String name,
co.cask.cdap.api.dataset.table.ConflictDetection level,
CConfiguration cConf)
public InMemoryTable(co.cask.cdap.api.dataset.DatasetContext datasetContext,
String name,
co.cask.cdap.api.dataset.table.ConflictDetection level,
CConfiguration cConf,
co.cask.cdap.api.data.schema.Schema schema,
String schemaRowField)
public 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>> buff)
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 deletedprotected void undo(NavigableMap<byte[],NavigableMap<byte[],Update>> persisted)
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 deletedprotected 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)
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 nullprotected static NavigableMap<byte[],byte[]> getLatestNotExcluded(NavigableMap<byte[],NavigableMap<Long,byte[]>> rowMap, co.cask.tephra.Transaction tx)
protected static NavigableMap<byte[],NavigableMap<byte[],byte[]>> getLatestNotExcludedRows(NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>> rows, co.cask.tephra.Transaction tx)
Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.