T
- reference to the table instance class itself for type safety.public abstract class BaseTableRW<T extends org.apache.hadoop.yarn.server.timelineservice.storage.common.BaseTable<T>> extends Object
Modifier | Constructor and Description |
---|---|
protected |
BaseTableRW(String tableNameConfName,
String defaultTableName) |
Modifier and Type | Method and Description |
---|---|
abstract void |
createTable(org.apache.hadoop.hbase.client.Admin admin,
org.apache.hadoop.conf.Configuration hbaseConf)
Used to create the table in HBase.
|
org.apache.hadoop.hbase.client.Result |
getResult(org.apache.hadoop.conf.Configuration hbaseConf,
org.apache.hadoop.hbase.client.Connection conn,
org.apache.hadoop.hbase.client.Get get) |
org.apache.hadoop.hbase.client.ResultScanner |
getResultScanner(org.apache.hadoop.conf.Configuration hbaseConf,
org.apache.hadoop.hbase.client.Connection conn,
org.apache.hadoop.hbase.client.Scan scan) |
TypedBufferedMutator<T> |
getTableMutator(org.apache.hadoop.conf.Configuration hbaseConf,
org.apache.hadoop.hbase.client.Connection conn)
Used to create a type-safe mutator for this table.
|
org.apache.hadoop.hbase.TableName |
getTableName(org.apache.hadoop.conf.Configuration conf)
Get the table name for this table.
|
static org.apache.hadoop.hbase.TableName |
getTableName(org.apache.hadoop.conf.Configuration conf,
String tableName)
Get the table name for the input table.
|
static org.apache.hadoop.hbase.TableName |
getTableName(org.apache.hadoop.conf.Configuration conf,
String tableNameInConf,
String defaultTableName)
Get the table name based on the input config parameters.
|
public TypedBufferedMutator<T> getTableMutator(org.apache.hadoop.conf.Configuration hbaseConf, org.apache.hadoop.hbase.client.Connection conn) throws IOException
hbaseConf
- used to read table name.conn
- used to create a table from.BufferedMutator
for the entity table.IOException
- if any exception occurs while creating mutator for the
table.public org.apache.hadoop.hbase.client.ResultScanner getResultScanner(org.apache.hadoop.conf.Configuration hbaseConf, org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.client.Scan scan) throws IOException
hbaseConf
- used to read settings that override defaultsconn
- used to create table fromscan
- that specifies what you want to read from this table.IOException
- if any exception occurs while getting the scanner.public org.apache.hadoop.hbase.client.Result getResult(org.apache.hadoop.conf.Configuration hbaseConf, org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.client.Get get) throws IOException
hbaseConf
- used to read settings that override defaultsconn
- used to create table fromget
- that specifies what single row you want to get from this tableIOException
- if any exception occurs while getting the result.public static org.apache.hadoop.hbase.TableName getTableName(org.apache.hadoop.conf.Configuration conf, String tableName)
conf
- HBase configuration from which table name will be fetched.tableName
- name of the table to be fetchedTableName
object.public org.apache.hadoop.hbase.TableName getTableName(org.apache.hadoop.conf.Configuration conf)
conf
- HBase configuration from which table name will be fetched.TableName
object.public static org.apache.hadoop.hbase.TableName getTableName(org.apache.hadoop.conf.Configuration conf, String tableNameInConf, String defaultTableName)
conf
- HBase configuration from which table name will be fetched.tableNameInConf
- the table name parameter in conf.defaultTableName
- the default table name.TableName
object.public abstract void createTable(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.conf.Configuration hbaseConf) throws IOException
admin
- Used for doing HBase table operations.hbaseConf
- Hbase configuration.IOException
- if any exception occurs while creating the table.Copyright © 2022 Apache Software Foundation. All rights reserved.