com.cloudera.crunch.io.hbase
Class HBaseSourceTarget

java.lang.Object
  extended by com.cloudera.crunch.io.hbase.HBaseTarget
      extended by com.cloudera.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>


Field Summary
protected  org.apache.hadoop.hbase.client.Scan scan
           
 
Fields inherited from class com.cloudera.crunch.io.hbase.HBaseTarget
table
 
Constructor Summary
HBaseSourceTarget(String table, org.apache.hadoop.hbase.client.Scan scan)
           
 
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()
           
 
Methods inherited from class com.cloudera.crunch.io.hbase.HBaseTarget
accept, asSourceTarget, configureForMapReduce
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cloudera.crunch.Target
accept, asSourceTarget
 

Field Detail

scan

protected org.apache.hadoop.hbase.client.Scan scan
Constructor Detail

HBaseSourceTarget

public HBaseSourceTarget(String table,
                         org.apache.hadoop.hbase.client.Scan scan)
Method Detail

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

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 configure
inputId - 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. All Rights Reserved.