@Deprecated public interface Table extends BatchReadable<byte[],Row>, BatchWritable<byte[],Put>, Dataset, RecordScannable<StructuredRecord>, RecordWritable<StructuredRecord>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_COLUMN_FAMILY
Deprecated.
The default column family.
|
static String |
PROPERTY_COLUMN_FAMILY
Deprecated.
Property set to configure name of the column family.
|
static String |
PROPERTY_CONFLICT_LEVEL
Deprecated.
Property set to configure transaction conflict detection level.
|
static String |
PROPERTY_READLESS_INCREMENT
Deprecated.
Property set to configure read-less increment support for a dataset.
|
static String |
PROPERTY_SCHEMA
Deprecated.
Property set to configure schema for the table.
|
static String |
PROPERTY_SCHEMA_ROW_FIELD
Deprecated.
Property set to configure which field in the schema is the row key.
|
static String |
PROPERTY_TTL
Deprecated.
Property set to configure time-to-live on data within this dataset.
|
static String |
TYPE
Deprecated.
Type name
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSwap(byte[] key,
byte[] keyColumn,
byte[] oldValue,
byte[] newValue)
Deprecated.
Compares-and-swaps (atomically) the value of the specified row and column by looking for an
expected value and, if found, replacing it with the new value.
|
void |
delete(byte[] row)
Deprecated.
Deletes all columns of the specified row.
|
void |
delete(byte[] row,
byte[] column)
Deprecated.
Deletes specified column of the specified row.
|
void |
delete(byte[] row,
byte[][] columns)
Deprecated.
Deletes specified columns of the specified row.
|
void |
delete(Delete delete)
Deprecated.
Deletes columns of a row as defined by the
Delete parameter. |
Row |
get(byte[] row)
Deprecated.
Reads values of all columns of the specified row.
|
byte[] |
get(byte[] row,
byte[] column)
Deprecated.
Reads the value of the specified column of the specified row.
|
Row |
get(byte[] row,
byte[][] columns)
Deprecated.
Reads the values of the specified columns of the specified row.
|
Row |
get(byte[] row,
byte[] startColumn,
byte[] stopColumn,
int limit)
Deprecated.
Reads the values of all columns in the specified row that are between the specified start
(inclusive) and stop (exclusive) columns.
|
Row |
get(Get get)
Deprecated.
Reads values of columns as defined by
Get parameter. |
List<Row> |
get(List<Get> gets)
Deprecated.
Reads values for the rows and columns defined by the
Get parameters. |
List<Split> |
getSplits(int numSplits,
byte[] start,
byte[] stop)
Deprecated.
Returns splits for a range of keys in the table.
|
void |
increment(byte[] row,
byte[][] columns,
long[] amounts)
Deprecated.
Increments (atomically) the specified row and columns by the specified amounts, without
returning the new values.
|
void |
increment(byte[] row,
byte[] column,
long amount)
Deprecated.
Increments (atomically) the specified row and columns by the specified amounts, without
returning the new value.
|
void |
increment(Increment increment)
Deprecated.
Increments (atomically) the specified row and columns by the specified amounts, without
returning the new values.
|
Row |
incrementAndGet(byte[] row,
byte[][] columns,
long[] amounts)
Deprecated.
Increments the specified columns of the row by the specified amounts and returns the new
values.
|
long |
incrementAndGet(byte[] row,
byte[] column,
long amount)
Deprecated.
Increments the specified column of the row by the specified amount and returns the new value.
|
Row |
incrementAndGet(Increment increment)
Deprecated.
Increments the specified columns of a row by the specified amounts defined by the
Increment parameter and returns the new values |
void |
put(byte[] row,
byte[][] columns,
byte[][] values)
Deprecated.
Writes the specified values for the specified columns of the specified row.
|
void |
put(byte[] row,
byte[] column,
byte[] value)
Deprecated.
Writes the specified value for the specified column of the specified row.
|
void |
put(Put put)
Deprecated.
Writes values into a column of a row as defined by the
Put parameter. |
Scanner |
scan(byte[] startRow,
byte[] stopRow)
Deprecated.
Scans table.
|
Scanner |
scan(Scan scan)
Deprecated.
|
void |
write(byte[] key,
Put value)
Deprecated.
Writes the {key, value} record into a dataset.
|
createSplitReader, getSplits
createSplitRecordScanner, getRecordType, getSplits
getRecordType, write
static final String TYPE
static final String PROPERTY_TTL
static final String PROPERTY_READLESS_INCREMENT
increment(byte[], byte[], long)
method will result in a normal read-modify-write
operation.static final String PROPERTY_COLUMN_FAMILY
static final String DEFAULT_COLUMN_FAMILY
static final String PROPERTY_CONFLICT_LEVEL
Enum.name()
.ConflictDetection
,
Constant Field Valuesstatic final String PROPERTY_SCHEMA
static final String PROPERTY_SCHEMA_ROW_FIELD
@Nonnull Row get(byte[] row)
NOTE: Depending on the implementation of this interface and use-case, calling this method can be less efficient than calling the same method with columns as parameters because it can require making a round trip to the persistent store.
NOTE: objects that are passed in parameters can be re-used by underlying implementation and present in returned data structures from this method.
row
- row to read fromRow
: never null
; returns an empty Row if nothing readbyte[] get(byte[] row, byte[] column)
row
- row to read fromcolumn
- column to read value fornull
if the value is absent@Nonnull Row get(byte[] row, byte[][] columns)
NOTE: objects that are passed in parameters can be re-used by underlying implementation and present in returned data structures from this method.
row
- row to read fromcolumns
- collection of columns to read; if empty, will return an empty Row.Row
: never null
; returns an empty Row if nothing read@Nonnull Row get(byte[] row, byte[] startColumn, byte[] stopColumn, int limit)
NOTE: objects that are passed in parameters can be re-used by underlying implementation and present in returned data structures from this method.
startColumn
- beginning of range of columns, inclusivestopColumn
- end of range of columns, exclusivelimit
- maximum number of columns to returnRow
; never null
; returns an empty Row if nothing read@Nonnull Row get(Get get)
Get
parameter.
NOTE: objects that are passed in parameters can be re-used by underlying implementation and present in returned data structures from this method.
get
- defines read selectionRow
: never null
; returns an empty Row if nothing readList<Row> get(List<Get> gets)
Get
parameters. When running in
distributed mode, and retrieving multiple rows at the same time, this method should be
preferred to multiple get(Get)
calls, as the operations will be batched into a
single remote call per server.gets
- defines the rows and columns to readRow
instancesvoid put(byte[] row, byte[] column, byte[] value)
row
- row to write tocolumn
- column to write tovalue
- to writevoid put(byte[] row, byte[][] columns, byte[][] values)
NOTE: Depending on the implementation, this can work faster than calling put(byte[],
byte[], byte[])
multiple times (especially in transactions that alter many columns of one
row).
row
- row to write tocolumns
- columns to write tovalues
- array of values to write (same order as values)void put(Put put)
Put
parameter.put
- defines values to writevoid delete(byte[] row)
NOTE: Depending on the implementation of this interface and use-case, calling this method can be less efficient than calling the same method with columns as parameters because it can require a round trip to the persistent store.
row
- row to deletevoid delete(byte[] row, byte[] column)
row
- row to delete fromcolumn
- column name to deletevoid delete(byte[] row, byte[][] columns)
NOTE: Depending on the implementation, this can work faster than calling delete(byte[],
byte[])
multiple times (especially in transactions that delete many columns of the same
rows).
row
- row to delete fromcolumns
- names of columns to delete; if empty, nothing will be deletedvoid delete(Delete delete)
Delete
parameter.delete
- defines what to deletelong incrementAndGet(byte[] row, byte[] column, long amount)
row
- row which value to incrementcolumn
- column to incrementamount
- amount to increment byNumberFormatException
- if stored value for the column is not in the serialized long
value formatRow incrementAndGet(byte[] row, byte[][] columns, long[] amounts)
NOTE: Depending on the implementation, this can work faster than calling incrementAndGet(byte[], byte[], long)
multiple times (especially in a transaction that
increments multiple columns of the same rows)
NOTE: objects that are passed in parameters can be re-used by underlying implementation and present in returned data structures from this method.
row
- row whose values to incrementcolumns
- columns to incrementamounts
- amounts to increment columns by (in the same order as the columns)Row
with a subset of changed columnsNumberFormatException
- if stored value for the column is not in the serialized long
value formatRow incrementAndGet(Increment increment)
Increment
parameter and returns the new values
NOTE: objects that are passed in parameters can be re-used by underlying implementation and present in returned data structures from this method.
increment
- defines changesRow
with a subset of changed columnsNumberFormatException
- if stored value for the column is not in the serialized long
value formatvoid increment(byte[] row, byte[] column, long amount)
row
- row which values to incrementcolumn
- column to incrementamount
- amount to increment byvoid increment(byte[] row, byte[][] columns, long[] amounts)
increment(byte[], byte[], long)
multiple times (esp. in transaction that changes a lot of
rows)row
- row which values to incrementcolumns
- columns to incrementamounts
- amounts to increment columns by (same order as columns)void increment(Increment increment)
increment(byte[], byte[], long)
multiple times (esp. in transaction that changes a lot of
rows)increment
- the row and column increment amountsScanner scan(@Nullable byte[] startRow, @Nullable byte[] stopRow)
startRow
- start row inclusive; null
means start from first row of the tablestopRow
- stop row exclusive; null
means scan all rows to the end of the
tableScanner
List<Split> getSplits(int numSplits, @Nullable byte[] start, @Nullable byte[] stop)
numSplits
- Desired number of splits. If greater than zero, at most this many splits
will be returned. If less than or equal to zero, any number of splits can be returned.start
- if non-null, the returned splits will only cover keys that are greater or
equalstop
- if non-null, the returned splits will only cover keys that are lessSplit
boolean compareAndSwap(byte[] key, byte[] keyColumn, byte[] oldValue, byte[] newValue)
key
- row to modifykeyColumn
- column to modifyoldValue
- expected value before changenewValue
- value to setvoid write(byte[] key, Put value)
write
in interface BatchWritable<byte[],Put>
key
- always ignored, and it is safe to write null as the key.value
- a Put for one row of the table.Copyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.