|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.io.hbase.HBaseTarget org.apache.crunch.io.hbase.HBaseSourceTarget
public class HBaseSourceTarget
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.crunch.Target |
---|
Target.WriteMode |
Field Summary | |
---|---|
protected org.apache.hadoop.hbase.client.Scan |
scan
|
Fields inherited from class org.apache.crunch.io.hbase.HBaseTarget |
---|
table |
Constructor Summary | |
---|---|
HBaseSourceTarget(String table,
org.apache.hadoop.hbase.client.Scan scan)
|
Method Summary | |
---|---|
ReadableData<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> |
asReadable()
|
SourceTarget<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> |
conf(String key,
String value)
Adds the given key-value pair to the Configuration instance(s) that are used to
read and write this SourceTarget<T> . |
void |
configureSource(org.apache.hadoop.mapreduce.Job job,
int inputId)
Configure the given job to use this source as an input. |
static org.apache.hadoop.hbase.client.Scan |
convertStringToScan(String string)
|
boolean |
equals(Object other)
|
Converter<?,?,?,?> |
getConverter()
Returns the Converter used for mapping the inputs from this instance
into PCollection or PTable values. |
long |
getLastModifiedAt(org.apache.hadoop.conf.Configuration configuration)
Returns the time (in milliseconds) that this Source was most recently
modified (e.g., because an input file was edited or new files were added to
a directory.) |
long |
getSize(org.apache.hadoop.conf.Configuration conf)
Returns the number of bytes in this Source . |
PTableType<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result> |
getTableType()
|
PType<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> |
getType()
Returns the PType for this source. |
int |
hashCode()
|
Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> |
inputConf(String key,
String value)
Adds the given key-value pair to the Configuration instance that is used to read
this Source<T></T> . |
Iterable<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> |
read(org.apache.hadoop.conf.Configuration conf)
Returns an Iterable that contains the contents of this source. |
String |
toString()
|
Methods inherited from class org.apache.crunch.io.hbase.HBaseTarget |
---|
accept, asSourceTarget, configureForMapReduce, getConverter, handleExisting, outputConf |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.crunch.Target |
---|
accept, asSourceTarget, getConverter, handleExisting, outputConf |
Field Detail |
---|
protected org.apache.hadoop.hbase.client.Scan scan
Constructor Detail |
---|
public HBaseSourceTarget(String table, org.apache.hadoop.hbase.client.Scan scan)
Method Detail |
---|
public Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> inputConf(String key, String value)
Source
Configuration
instance that is used to read
this Source<T></T>
. Allows for multiple inputs to re-use the same config keys with
different values when necessary.
inputConf
in interface Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
public PType<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> getType()
Source
PType
for this source.
getType
in interface Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
public PTableType<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result> getTableType()
getTableType
in interface TableSource<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>
public boolean equals(Object other)
equals
in class HBaseTarget
public int hashCode()
hashCode
in class HBaseTarget
public String toString()
toString
in class HBaseTarget
public void configureSource(org.apache.hadoop.mapreduce.Job job, int inputId) throws IOException
Source
configureSource
in interface Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
job
- The job to configureinputId
- For a multi-input job, an identifier for this input to the job
IOException
public static org.apache.hadoop.hbase.client.Scan convertStringToScan(String string) throws IOException
IOException
public long getSize(org.apache.hadoop.conf.Configuration conf)
Source
Source
.
getSize
in interface Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
public long getLastModifiedAt(org.apache.hadoop.conf.Configuration configuration)
Source
Source
was most recently
modified (e.g., because an input file was edited or new files were added to
a directory.)
getLastModifiedAt
in interface Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
public Converter<?,?,?,?> getConverter()
Source
Converter
used for mapping the inputs from this instance
into PCollection
or PTable
values.
getConverter
in interface Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
public Iterable<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> read(org.apache.hadoop.conf.Configuration conf) throws IOException
ReadableSource
Iterable
that contains the contents of this source.
read
in interface ReadableSource<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
conf
- The current Configuration
instance
Source
as an Iterable
instance
IOException
public ReadableData<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> asReadable()
asReadable
in interface ReadableSource<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
ReadableData
instance containing the data referenced by this
ReadableSource
.public SourceTarget<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> conf(String key, String value)
SourceTarget
Configuration
instance(s) that are used to
read and write this SourceTarget<T>
. Allows for multiple inputs and outputs to
re-use the same config keys with different values when necessary.
conf
in interface SourceTarget<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |