T
- the type of objects in the table@Deprecated public interface ObjectMappedTable<T> extends Dataset, BatchReadable<byte[],T>, BatchWritable<byte[],T>, RecordScannable<StructuredRecord>, RecordWritable<StructuredRecord>
RecordScannable
, which means it can be explored through Hive. The Hive
table for this Dataset will contain one column for each object field and one column for the row
key. For example, if you are storing an Object of three fields ("id", "name", and "price"), the
corresponding Hive table will have four columns: "rowkey", "id", "name", and "price". If you wish
to change the name of the "rowkey" column you can do so by setting a property on the Dataset. See
ObjectMappedTableProperties
for more information on properties for this Dataset.Modifier and Type | Field and Description |
---|---|
static String |
TYPE
Deprecated.
Type name
|
Modifier and Type | Method and Description |
---|---|
void |
delete(byte[] key)
Deprecated.
Delete the object for the specified key.
|
void |
delete(String key)
Deprecated.
Delete the object for the specified key.
|
List<Split> |
getSplits(int numSplits,
byte[] start,
byte[] stop)
Deprecated.
Returns splits for a range of keys in the table.
|
T |
read(byte[] key)
Deprecated.
Read an object with a given key.
|
T |
read(String key)
Deprecated.
Read an object with a given key.
|
CloseableIterator<KeyValue<byte[],T>> |
scan(byte[] startRow,
byte[] stopRow)
Deprecated.
Scans table.
|
CloseableIterator<KeyValue<byte[],T>> |
scan(Scan scan)
Deprecated.
Scans table.
|
CloseableIterator<KeyValue<byte[],T>> |
scan(String startRow,
String stopRow)
Deprecated.
Scans table.
|
void |
write(byte[] key,
T object)
Deprecated.
Write an object with a given key.
|
void |
write(String key,
T object)
Deprecated.
Write an object with a given key.
|
createSplitReader, getSplits
createSplitRecordScanner, getRecordType, getSplits
getRecordType, write
static final String TYPE
void write(String key, T object)
key
- the key of the objectobject
- the object to be storedvoid write(byte[] key, T object)
write
in interface BatchWritable<byte[],T>
key
- the key of the objectobject
- the object to be storedT read(String key)
key
- the key of the objectT read(byte[] key)
key
- the key of the objectCloseableIterator<KeyValue<byte[],T>> scan(@Nullable String startRow, @Nullable String 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
tableCloseableIterator
over KeyValue<byte[], T>
CloseableIterator<KeyValue<byte[],T>> 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
tableCloseableIterator
over KeyValue<byte[], T>
CloseableIterator<KeyValue<byte[],T>> scan(Scan scan)
scan
- Scan object to scan the table with.CloseableIterator
over KeyValue<byte[], T>
void delete(String key)
key
- key of the object to be deletedvoid delete(byte[] key)
key
- key of the object to be deletedList<Split> getSplits(int numSplits, byte[] start, 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
Copyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.