This project has retired. For details please refer to its Attic page.
HBaseData (Apache Crunch 0.9.0 API)

org.apache.crunch.io.hbase
Class HBaseData

java.lang.Object
  extended by org.apache.crunch.io.hbase.HBaseData
All Implemented Interfaces:
Serializable, ReadableData<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>

public class HBaseData
extends Object
implements ReadableData<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>

See Also:
Serialized Form

Constructor Summary
HBaseData(String table, String scanAsString, SourceTarget<?> parent)
           
 
Method Summary
 void configure(org.apache.hadoop.conf.Configuration conf)
          Allows this instance to specify any additional configuration settings that may be needed by the job that it is launched in.
 Set<SourceTarget<?>> getSourceTargets()
           
 Iterable<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> read(org.apache.hadoop.mapreduce.TaskInputOutputContext<?,?,?,?> ctxt)
          Read the data referenced by this instance within the given context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HBaseData

public HBaseData(String table,
                 String scanAsString,
                 SourceTarget<?> parent)
Method Detail

getSourceTargets

public Set<SourceTarget<?>> getSourceTargets()
Specified by:
getSourceTargets in interface ReadableData<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
Returns:
Any SourceTarget instances that must exist before the data in this instance can be read. Used by the planner in sequencing job processing.

configure

public void configure(org.apache.hadoop.conf.Configuration conf)
Description copied from interface: ReadableData
Allows this instance to specify any additional configuration settings that may be needed by the job that it is launched in.

Specified by:
configure in interface ReadableData<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
Parameters:
conf - The Configuration object for the job

read

public Iterable<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>> read(org.apache.hadoop.mapreduce.TaskInputOutputContext<?,?,?,?> ctxt)
                                                                                                             throws IOException
Description copied from interface: ReadableData
Read the data referenced by this instance within the given context.

Specified by:
read in interface ReadableData<Pair<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result>>
Parameters:
ctxt - The context of the task that is reading the data
Returns:
An iterable reference to the data in this instance
Throws:
IOException - If the data cannot be read


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.