public static class HBaseIO.Read extends PTransform<PBegin,PCollection<org.apache.hadoop.hbase.client.Result>>
PTransform
that reads from HBase. See the class-level Javadoc on
HBaseIO
for more information.HBaseIO
,
Serialized Formname
Modifier and Type | Method and Description |
---|---|
PCollection<org.apache.hadoop.hbase.client.Result> |
expand(PBegin input)
Applies this
PTransform on the given InputT , and returns its
Output . |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
ByteKeyRange |
getKeyRange()
Returns the range of keys that will be read from the table.
|
java.lang.String |
getTableId() |
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
void |
validate(PipelineOptions options)
Called before running the Pipeline to verify this transform is fully and correctly
specified.
|
HBaseIO.Read |
withConfiguration(org.apache.hadoop.conf.Configuration configuration)
Returns a new
HBaseIO.Read that will read from the HBase instance
indicated by the given configuration. |
HBaseIO.Read |
withFilter(org.apache.hadoop.hbase.filter.Filter filter)
Returns a new
HBaseIO.Read that will filter the rows read from HBase
using the given row filter. |
HBaseIO.Read |
withKeyRange(byte[] startRow,
byte[] stopRow)
Returns a new
HBaseIO.Read that will read only rows in the specified range. |
HBaseIO.Read |
withKeyRange(ByteKeyRange keyRange)
Returns a new
HBaseIO.Read that will read only rows in the specified range. |
HBaseIO.Read |
withScan(org.apache.hadoop.hbase.client.Scan scan)
Returns a new
HBaseIO.Read that will filter the rows read from HBase
using the given scan. |
HBaseIO.Read |
withTableId(java.lang.String tableId)
Returns a new
HBaseIO.Read that will read from the specified table. |
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, toString
public HBaseIO.Read withConfiguration(org.apache.hadoop.conf.Configuration configuration)
HBaseIO.Read
that will read from the HBase instance
indicated by the given configuration.public HBaseIO.Read withTableId(java.lang.String tableId)
HBaseIO.Read
that will read from the specified table.
Does not modify this object.
public HBaseIO.Read withScan(org.apache.hadoop.hbase.client.Scan scan)
HBaseIO.Read
that will filter the rows read from HBase
using the given scan.
Does not modify this object.
public HBaseIO.Read withFilter(org.apache.hadoop.hbase.filter.Filter filter)
HBaseIO.Read
that will filter the rows read from HBase
using the given row filter.
Does not modify this object.
public HBaseIO.Read withKeyRange(ByteKeyRange keyRange)
HBaseIO.Read
that will read only rows in the specified range.
Does not modify this object.
public HBaseIO.Read withKeyRange(byte[] startRow, byte[] stopRow)
HBaseIO.Read
that will read only rows in the specified range.
Does not modify this object.
public PCollection<org.apache.hadoop.hbase.client.Result> expand(PBegin input)
PTransform
PTransform
on the given InputT
, and returns its
Output
.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand
in class PTransform<PBegin,PCollection<org.apache.hadoop.hbase.client.Result>>
public void validate(PipelineOptions options)
PTransform
By default, does nothing.
validate
in class PTransform<PBegin,PCollection<org.apache.hadoop.hbase.client.Result>>
public void populateDisplayData(DisplayData.Builder builder)
PTransform
populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData)
. Implementations may call
super.populateDisplayData(builder)
in order to register display data in the current
namespace, but should otherwise use subcomponent.populateDisplayData(builder)
to use
the namespace of the subcomponent.
By default, does not register any display data. Implementors may override this method to provide their own display data.
populateDisplayData
in interface HasDisplayData
populateDisplayData
in class PTransform<PBegin,PCollection<org.apache.hadoop.hbase.client.Result>>
builder
- The builder to populate with display data.HasDisplayData
public java.lang.String getTableId()
public org.apache.hadoop.conf.Configuration getConfiguration()
public ByteKeyRange getKeyRange()