public final class ColumnRWHelper extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
readResult(org.apache.hadoop.hbase.client.Result result,
byte[] columnFamilyBytes,
byte[] columnQualifierBytes,
org.apache.hadoop.yarn.server.timelineservice.storage.common.ValueConverter converter)
Get the latest version of this specified column.
|
static Object |
readResult(org.apache.hadoop.hbase.client.Result result,
org.apache.hadoop.yarn.server.timelineservice.storage.common.Column<?> column)
Get the latest version of this specified column.
|
static Object |
readResult(org.apache.hadoop.hbase.client.Result result,
org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix,
String qualifier)
Get the latest version of this specified column.
|
static <K> Map<K,Object> |
readResults(org.apache.hadoop.hbase.client.Result result,
byte[] columnFamilyBytes,
byte[] columnPrefixBytes,
org.apache.hadoop.yarn.server.timelineservice.storage.common.KeyConverter<K> keyConverter,
org.apache.hadoop.yarn.server.timelineservice.storage.common.ValueConverter valueConverter) |
static <K> Map<K,Object> |
readResults(org.apache.hadoop.hbase.client.Result result,
org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix,
org.apache.hadoop.yarn.server.timelineservice.storage.common.KeyConverter<K> keyConverter) |
static <K,V> NavigableMap<K,NavigableMap<Long,V>> |
readResultsWithTimestamps(org.apache.hadoop.hbase.client.Result result,
byte[] columnFamilyBytes,
byte[] columnPrefixBytes,
org.apache.hadoop.yarn.server.timelineservice.storage.common.KeyConverter<K> keyConverter,
org.apache.hadoop.yarn.server.timelineservice.storage.common.ValueConverter valueConverter,
boolean supplementTs) |
static <K,V> NavigableMap<K,NavigableMap<Long,V>> |
readResultsWithTimestamps(org.apache.hadoop.hbase.client.Result result,
org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix,
org.apache.hadoop.yarn.server.timelineservice.storage.common.KeyConverter<K> keyConverter) |
static void |
store(byte[] rowKey,
TypedBufferedMutator<?> tableMutator,
byte[] columnFamilyBytes,
byte[] columnQualifier,
Long timestamp,
boolean supplementTs,
Object inputValue,
org.apache.hadoop.yarn.server.timelineservice.storage.common.ValueConverter converter,
org.apache.hadoop.yarn.server.timelineservice.storage.flow.Attribute... attributes)
Sends a Mutation to the table.
|
static void |
store(byte[] rowKey,
TypedBufferedMutator<?> tableMutator,
org.apache.hadoop.yarn.server.timelineservice.storage.common.Column<?> column,
Long timestamp,
Object inputValue,
org.apache.hadoop.yarn.server.timelineservice.storage.flow.Attribute... attributes)
Sends a Mutation to the table.
|
static void |
store(byte[] rowKey,
TypedBufferedMutator<?> tableMutator,
org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix,
byte[] qualifier,
Long timestamp,
Object inputValue,
org.apache.hadoop.yarn.server.timelineservice.storage.flow.Attribute... attributes)
Sends a Mutation to the table.
|
static void |
store(byte[] rowKey,
TypedBufferedMutator<?> tableMutator,
org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix,
String qualifier,
Long timestamp,
Object inputValue,
org.apache.hadoop.yarn.server.timelineservice.storage.flow.Attribute... attributes)
Sends a Mutation to the table.
|
public static void store(byte[] rowKey, TypedBufferedMutator<?> tableMutator, org.apache.hadoop.yarn.server.timelineservice.storage.common.Column<?> column, Long timestamp, Object inputValue, org.apache.hadoop.yarn.server.timelineservice.storage.flow.Attribute... attributes) throws IOException
rowKey
- identifying the row to write. Nothing gets written when null.tableMutator
- used to modify the underlying HBase tablecolumn
- the column that is to be modifiedtimestamp
- version timestamp. When null the current timestamp multiplied with
TimestampGenerator.TS_MULTIPLIER and added with last 3 digits of
app id will be usedinputValue
- the value to write to the rowKey and column qualifier. Nothing
gets written when null.attributes
- Attributes to be set for HBase Put.IOException
- if any problem occurs during store operation(sending
mutation to table).public static void store(byte[] rowKey, TypedBufferedMutator<?> tableMutator, byte[] columnFamilyBytes, byte[] columnQualifier, Long timestamp, boolean supplementTs, Object inputValue, org.apache.hadoop.yarn.server.timelineservice.storage.common.ValueConverter converter, org.apache.hadoop.yarn.server.timelineservice.storage.flow.Attribute... attributes) throws IOException
rowKey
- identifying the row to write. Nothing gets written when null.tableMutator
- used to modify the underlying HBase tablecolumnFamilyBytes
- columnQualifier
- column qualifier. Nothing gets written when null.timestamp
- version timestamp. When null the current timestamp multiplied with
TimestampGenerator.TS_MULTIPLIER and added with last 3 digits of
app id will be usedinputValue
- the value to write to the rowKey and column qualifier. Nothing
gets written when null.converter
- attributes
- Attributes to be set for HBase Put.IOException
- if any problem occurs during store operation(sending
mutation to table).public static Object readResult(org.apache.hadoop.hbase.client.Result result, byte[] columnFamilyBytes, byte[] columnQualifierBytes, org.apache.hadoop.yarn.server.timelineservice.storage.common.ValueConverter converter) throws IOException
Cell
.result
- from which to read the value. Cannot be nullcolumnFamilyBytes
- columnQualifierBytes
- referring to the column to be read.converter
- IOException
- if any problem occurs while reading result.public static Object readResult(org.apache.hadoop.hbase.client.Result result, org.apache.hadoop.yarn.server.timelineservice.storage.common.Column<?> column) throws IOException
Cell
.result
- from which to read the value. Cannot be nullcolumn
- the column that the result can be parsed toIOException
- if any problem occurs while reading result.public static Object readResult(org.apache.hadoop.hbase.client.Result result, org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix, String qualifier) throws IOException
Cell
.result
- Cannot be nullcolumnPrefix
- column prefix to read fromqualifier
- column qualifier. Nothing gets read when null.IOException
- if there is any exception encountered while reading
result.public static <K> Map<K,Object> readResults(org.apache.hadoop.hbase.client.Result result, org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix, org.apache.hadoop.yarn.server.timelineservice.storage.common.KeyConverter<K> keyConverter) throws IOException
K
- identifies the type of key converter.result
- from which to read columns.keyConverter
- used to convert column bytes to the appropriate key
typeIOException
- if there is any exception encountered while reading
results.public static <K,V> NavigableMap<K,NavigableMap<Long,V>> readResultsWithTimestamps(org.apache.hadoop.hbase.client.Result result, org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix, org.apache.hadoop.yarn.server.timelineservice.storage.common.KeyConverter<K> keyConverter) throws IOException
K
- identifies the type of key converter.V
- the type of the values. The values will be cast into that type.result
- from which to reads data with timestamps.keyConverter
- used to convert column bytes to the appropriate key
type.IOException
- if there is any exception encountered while reading
result.public static <K,V> NavigableMap<K,NavigableMap<Long,V>> readResultsWithTimestamps(org.apache.hadoop.hbase.client.Result result, byte[] columnFamilyBytes, byte[] columnPrefixBytes, org.apache.hadoop.yarn.server.timelineservice.storage.common.KeyConverter<K> keyConverter, org.apache.hadoop.yarn.server.timelineservice.storage.common.ValueConverter valueConverter, boolean supplementTs) throws IOException
K
- identifies the type of column name(indicated by type of key
converter).V
- the type of the values. The values will be cast into that type.result
- from which to reads data with timestampscolumnPrefixBytes
- optional prefix to limit columns. If null all
columns are returned.keyConverter
- used to convert column bytes to the appropriate key
type.IOException
- if any problem occurs while reading results.public static <K> Map<K,Object> readResults(org.apache.hadoop.hbase.client.Result result, byte[] columnFamilyBytes, byte[] columnPrefixBytes, org.apache.hadoop.yarn.server.timelineservice.storage.common.KeyConverter<K> keyConverter, org.apache.hadoop.yarn.server.timelineservice.storage.common.ValueConverter valueConverter) throws IOException
K
- identifies the type of column name(indicated by type of key
converter).result
- from which to read columnscolumnPrefixBytes
- optional prefix to limit columns. If null all
columns are returned.keyConverter
- used to convert column bytes to the appropriate key
type.IOException
- if any problem occurs while reading results.public static void store(byte[] rowKey, TypedBufferedMutator<?> tableMutator, org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix, byte[] qualifier, Long timestamp, Object inputValue, org.apache.hadoop.yarn.server.timelineservice.storage.flow.Attribute... attributes) throws IOException
rowKey
- identifying the row to write. Nothing gets written when null.tableMutator
- used to modify the underlying HBase table. Caller is
responsible to pass a mutator for the table that actually has this
column.qualifier
- column qualifier. Nothing gets written when null.timestamp
- version timestamp. When null the server timestamp will be
used.attributes
- attributes for the mutation that are used by the
coprocessor to set/read the cell tags.inputValue
- the value to write to the rowKey and column qualifier.
Nothing gets written when null.IOException
- if there is any exception encountered while doing
store operation(sending mutation to the table).public static void store(byte[] rowKey, TypedBufferedMutator<?> tableMutator, org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnPrefix<?> columnPrefix, String qualifier, Long timestamp, Object inputValue, org.apache.hadoop.yarn.server.timelineservice.storage.flow.Attribute... attributes) throws IOException
rowKey
- identifying the row to write. Nothing gets written when null.tableMutator
- used to modify the underlying HBase table. Caller is
responsible to pass a mutator for the table that actually has this
column.qualifier
- column qualifier. Nothing gets written when null.timestamp
- version timestamp. When null the server timestamp will be
used.attributes
- attributes for the mutation that are used by the
coprocessor to set/read the cell tags.inputValue
- the value to write to the rowKey and column qualifier.
Nothing gets written when null.IOException
- if there is any exception encountered while doing
store operation(sending mutation to the table).Copyright © 2020 Apache Software Foundation. All rights reserved.