com.cloudera.crunch.io.seq
Class SeqFileTableSourceTarget<K,V>

java.lang.Object
  extended by com.cloudera.crunch.io.impl.FileTargetImpl
      extended by com.cloudera.crunch.io.seq.SeqFileTarget
          extended by com.cloudera.crunch.io.seq.SeqFileTableSourceTarget<K,V>
All Implemented Interfaces:
MapReduceTarget, PathTarget, ReadableSource<Pair<K,V>>, ReadableSourceTarget<Pair<K,V>>, Source<Pair<K,V>>, SourceTarget<Pair<K,V>>, TableSource<K,V>, Target

public class SeqFileTableSourceTarget<K,V>
extends SeqFileTarget
implements TableSource<K,V>, ReadableSourceTarget<Pair<K,V>>, PathTarget


Field Summary
 
Fields inherited from class com.cloudera.crunch.io.impl.FileTargetImpl
path
 
Constructor Summary
SeqFileTableSourceTarget(org.apache.hadoop.fs.Path path, PTableType<K,V> tableType)
           
SeqFileTableSourceTarget(String path, PTableType<K,V> tableType)
           
 
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)
           
 org.apache.hadoop.fs.Path getPath()
           
 long getSize(org.apache.hadoop.conf.Configuration configuration)
          Returns the number of bytes in this Source.
 PTableType<K,V> getTableType()
           
 PType<Pair<K,V>> getType()
          Returns the PType for this source.
 int hashCode()
           
 Iterable<Pair<K,V>> read(org.apache.hadoop.conf.Configuration conf)
           
 String toString()
           
 
Methods inherited from class com.cloudera.crunch.io.seq.SeqFileTarget
asSourceTarget
 
Methods inherited from class com.cloudera.crunch.io.impl.FileTargetImpl
accept, configureForMapReduce, configureForMapReduce
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.cloudera.crunch.io.MapReduceTarget
configureForMapReduce
 
Methods inherited from interface com.cloudera.crunch.Target
accept, asSourceTarget
 

Constructor Detail

SeqFileTableSourceTarget

public SeqFileTableSourceTarget(String path,
                                PTableType<K,V> tableType)

SeqFileTableSourceTarget

public SeqFileTableSourceTarget(org.apache.hadoop.fs.Path path,
                                PTableType<K,V> tableType)
Method Detail

equals

public boolean equals(Object other)
Overrides:
equals in class FileTargetImpl

hashCode

public int hashCode()
Overrides:
hashCode in class FileTargetImpl

toString

public String toString()
Overrides:
toString in class SeqFileTarget

getPath

public org.apache.hadoop.fs.Path getPath()
Specified by:
getPath in interface PathTarget
Overrides:
getPath in class FileTargetImpl

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<K,V>>
Parameters:
job - The job to configure
inputId - For a multi-input job, an identifier for this input to the job
Throws:
IOException

getType

public PType<Pair<K,V>> getType()
Description copied from interface: Source
Returns the PType for this source.

Specified by:
getType in interface Source<Pair<K,V>>

getTableType

public PTableType<K,V> getTableType()
Specified by:
getTableType in interface TableSource<K,V>

getSize

public long getSize(org.apache.hadoop.conf.Configuration configuration)
Description copied from interface: Source
Returns the number of bytes in this Source.

Specified by:
getSize in interface Source<Pair<K,V>>

read

public Iterable<Pair<K,V>> read(org.apache.hadoop.conf.Configuration conf)
                         throws IOException
Specified by:
read in interface ReadableSource<Pair<K,V>>
Throws:
IOException


Copyright © 2012. All Rights Reserved.