This project has retired. For details please refer to its
Attic page.
HFileSource (Apache Crunch 0.9.0 API)
org.apache.crunch.io.hbase
Class HFileSource
java.lang.Object
org.apache.crunch.io.impl.FileSourceImpl<org.apache.hadoop.hbase.KeyValue>
org.apache.crunch.io.hbase.HFileSource
- All Implemented Interfaces:
- ReadableSource<org.apache.hadoop.hbase.KeyValue>, Source<org.apache.hadoop.hbase.KeyValue>
public class HFileSource
- extends FileSourceImpl<org.apache.hadoop.hbase.KeyValue>
- implements ReadableSource<org.apache.hadoop.hbase.KeyValue>
Method Summary |
ReadableData<org.apache.hadoop.hbase.KeyValue> |
asReadable()
|
void |
configureSource(org.apache.hadoop.mapreduce.Job job,
int inputId)
Configure the given job to use this source as an input. |
Converter<?,?,?,?> |
getConverter()
Returns the Converter used for mapping the inputs from this instance
into PCollection or PTable values. |
long |
getSize(org.apache.hadoop.conf.Configuration conf)
Returns the number of bytes in this Source . |
Iterable<org.apache.hadoop.hbase.KeyValue> |
read(org.apache.hadoop.conf.Configuration conf)
Returns an Iterable that contains the contents of this source. |
String |
toString()
|
HFileSource
public HFileSource(org.apache.hadoop.fs.Path path)
HFileSource
public HFileSource(List<org.apache.hadoop.fs.Path> paths)
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<org.apache.hadoop.hbase.KeyValue>
- Overrides:
configureSource
in class FileSourceImpl<org.apache.hadoop.hbase.KeyValue>
- Parameters:
job
- The job to configureinputId
- For a multi-input job, an identifier for this input to the job
- Throws:
IOException
read
public Iterable<org.apache.hadoop.hbase.KeyValue> read(org.apache.hadoop.conf.Configuration conf)
throws IOException
- Description copied from interface:
ReadableSource
- Returns an
Iterable
that contains the contents of this source.
- Specified by:
read
in interface ReadableSource<org.apache.hadoop.hbase.KeyValue>
- Parameters:
conf
- The current Configuration
instance
- Returns:
- the contents of this
Source
as an Iterable
instance
- Throws:
IOException
asReadable
public ReadableData<org.apache.hadoop.hbase.KeyValue> asReadable()
- Specified by:
asReadable
in interface ReadableSource<org.apache.hadoop.hbase.KeyValue>
- Returns:
- a
ReadableData
instance containing the data referenced by this
ReadableSource
.
getConverter
public Converter<?,?,?,?> getConverter()
- Description copied from interface:
Source
- Returns the
Converter
used for mapping the inputs from this instance
into PCollection
or PTable
values.
- Specified by:
getConverter
in interface Source<org.apache.hadoop.hbase.KeyValue>
- Overrides:
getConverter
in class FileSourceImpl<org.apache.hadoop.hbase.KeyValue>
toString
public String toString()
- Overrides:
toString
in class FileSourceImpl<org.apache.hadoop.hbase.KeyValue>
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<org.apache.hadoop.hbase.KeyValue>
- Overrides:
getSize
in class FileSourceImpl<org.apache.hadoop.hbase.KeyValue>
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.