public abstract class TableInputFormat<T extends org.apache.flink.api.java.tuple.Tuple> extends org.apache.flink.api.common.io.RichInputFormat<T,TableInputSplit>
InputFormat subclass that wraps the access for HTables.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.hbase.client.Scan |
scan |
protected org.apache.hadoop.hbase.client.HTable |
table |
| Constructor and Description |
|---|
TableInputFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(org.apache.flink.configuration.Configuration parameters)
creates a
Scan object and a HTable connection |
TableInputSplit[] |
createInputSplits(int minNumSplits) |
org.apache.flink.core.io.InputSplitAssigner |
getInputSplitAssigner(TableInputSplit[] inputSplits) |
protected abstract org.apache.hadoop.hbase.client.Scan |
getScanner() |
org.apache.flink.api.common.io.statistics.BaseStatistics |
getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics) |
protected abstract String |
getTableName() |
protected abstract T |
mapResultToTuple(org.apache.hadoop.hbase.client.Result r) |
T |
nextRecord(T reuse) |
void |
open(TableInputSplit split) |
boolean |
reachedEnd() |
protected transient org.apache.hadoop.hbase.client.HTable table
protected transient org.apache.hadoop.hbase.client.Scan scan
protected abstract org.apache.hadoop.hbase.client.Scan getScanner()
protected abstract String getTableName()
protected abstract T mapResultToTuple(org.apache.hadoop.hbase.client.Result r)
public void configure(org.apache.flink.configuration.Configuration parameters)
Scan object and a HTable connectionparameters - Configurationpublic boolean reachedEnd()
throws IOException
IOExceptionpublic T nextRecord(T reuse) throws IOException
IOExceptionpublic void open(TableInputSplit split) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic TableInputSplit[] createInputSplits(int minNumSplits) throws IOException
IOExceptionpublic org.apache.flink.core.io.InputSplitAssigner getInputSplitAssigner(TableInputSplit[] inputSplits)
public org.apache.flink.api.common.io.statistics.BaseStatistics getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics)
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.