@Internal public class HBaseRowInputFormat extends AbstractTableInputFormat<org.apache.flink.types.Row> implements org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.types.Row>
InputFormat subclass that wraps the access for HTables. Returns the result as Rowconnection, currentRow, endReached, regionLocator, resultScanner, scan, scannedRows, serializedConfig, table| Constructor and Description |
|---|
HBaseRowInputFormat(org.apache.hadoop.conf.Configuration conf,
String tableName,
org.apache.flink.connector.hbase.util.HBaseTableSchema schema) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> |
getProducedType() |
protected org.apache.hadoop.hbase.client.Scan |
getScanner()
Returns an instance of Scan that retrieves the required subset of records from the HBase
table.
|
String |
getTableName()
What table is to be read.
|
void |
initTable()
Creates a
Scan object and opens the HTable connection to initialize the HBase
table. |
protected org.apache.flink.types.Row |
mapResultToOutType(org.apache.hadoop.hbase.client.Result res)
HBase returns an instance of
Result. |
close, closeTable, configure, createInputSplits, getConnection, getHadoopConfiguration, getInputSplitAssigner, getStatistics, includeRegionInScan, nextRecord, open, reachedEndpublic HBaseRowInputFormat(org.apache.hadoop.conf.Configuration conf,
String tableName,
org.apache.flink.connector.hbase.util.HBaseTableSchema schema)
public void initTable()
throws IOException
AbstractTableInputFormatScan object and opens the HTable connection to initialize the HBase
table.initTable in class AbstractTableInputFormat<org.apache.flink.types.Row>IOException - Thrown, if the connection could not be opened due to an I/O problem.protected org.apache.hadoop.hbase.client.Scan getScanner()
AbstractTableInputFormatgetScanner in class AbstractTableInputFormat<org.apache.flink.types.Row>public String getTableName()
AbstractTableInputFormatPer instance of a TableInputFormat derivative only a single table name is possible.
getTableName in class AbstractTableInputFormat<org.apache.flink.types.Row>protected org.apache.flink.types.Row mapResultToOutType(org.apache.hadoop.hbase.client.Result res)
AbstractTableInputFormatResult.
This method maps the returned Result instance into the output type T.
mapResultToOutType in class AbstractTableInputFormat<org.apache.flink.types.Row>res - The Result instance from HBase that needs to be convertedT that contains the data of Result.public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> getProducedType()
getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.types.Row>Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.