This project has retired. For details please refer to its
Attic page.
HBaseSourceTarget (Apache Crunch 0.3.0-incubating API)
org.apache.crunch.io.hbase
Class HBaseSourceTarget
java.lang.Object
org.apache.crunch.io.hbase.HBaseTarget
org.apache.crunch.io.hbase.HBaseSourceTarget
- All Implemented Interfaces:
- MapReduceTarget, Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>, SourceTarget<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>, TableSource<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>, Target
public class HBaseSourceTarget
- extends HBaseTarget
- implements SourceTarget<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>, TableSource<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>
Method Summary |
void |
configureSource(org.apache.hadoop.mapreduce.Job job,
int inputId)
Configure the given job to use this source as an input. |
boolean |
equals(Object other)
|
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()
|
String |
toString()
|
HBaseSourceTarget
public HBaseSourceTarget(String table,
org.apache.hadoop.hbase.client.Scan scan)
getType
public PType<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> getType()
- Description copied from interface:
Source
- Returns the
PType
for this source.
- Specified by:
getType
in interface Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
getTableType
public PTableType<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result> getTableType()
- Specified by:
getTableType
in interface TableSource<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>
equals
public boolean equals(Object other)
- Overrides:
equals
in class HBaseTarget
hashCode
public int hashCode()
- Overrides:
hashCode
in class HBaseTarget
toString
public String toString()
- Overrides:
toString
in class HBaseTarget
configureSource
public void configureSource(org.apache.hadoop.mapreduce.Job job,
int inputId)
throws IOException
- Description copied from interface:
Source
- Configure the given job to use this source as an input.
- Specified by:
configureSource
in interface Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
- Parameters:
job
- The job to configureinputId
- For a multi-input job, an identifier for this input to the job
- Throws:
IOException
getSize
public long getSize(org.apache.hadoop.conf.Configuration conf)
- Description copied from interface:
Source
- Returns the number of bytes in this
Source
.
- Specified by:
getSize
in interface Source<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.