com.cloudera.crunch.io.impl
Class FileTargetImpl

java.lang.Object
  extended by com.cloudera.crunch.io.impl.FileTargetImpl
All Implemented Interfaces:
MapReduceTarget, PathTarget, Target
Direct Known Subclasses:
AvroFileTarget, SeqFileTarget, TextFileTarget

public class FileTargetImpl
extends Object
implements PathTarget


Field Summary
protected  org.apache.hadoop.fs.Path path
           
 
Constructor Summary
FileTargetImpl(org.apache.hadoop.fs.Path path, Class<? extends org.apache.hadoop.mapreduce.lib.output.FileOutputFormat> outputFormatClass)
           
 
Method Summary
 boolean accept(OutputHandler handler, PType<?> ptype)
           
<T> SourceTarget<T>
asSourceTarget(PType<T> ptype)
           
protected  void configureForMapReduce(org.apache.hadoop.mapreduce.Job job, Class keyClass, Class valueClass, org.apache.hadoop.fs.Path outputPath, String name)
           
 void configureForMapReduce(org.apache.hadoop.mapreduce.Job job, PType<?> ptype, org.apache.hadoop.fs.Path outputPath, String name)
           
 boolean equals(Object other)
           
 org.apache.hadoop.fs.Path getPath()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

path

protected final org.apache.hadoop.fs.Path path
Constructor Detail

FileTargetImpl

public FileTargetImpl(org.apache.hadoop.fs.Path path,
                      Class<? extends org.apache.hadoop.mapreduce.lib.output.FileOutputFormat> outputFormatClass)
Method Detail

configureForMapReduce

public void configureForMapReduce(org.apache.hadoop.mapreduce.Job job,
                                  PType<?> ptype,
                                  org.apache.hadoop.fs.Path outputPath,
                                  String name)
Specified by:
configureForMapReduce in interface MapReduceTarget

configureForMapReduce

protected void configureForMapReduce(org.apache.hadoop.mapreduce.Job job,
                                     Class keyClass,
                                     Class valueClass,
                                     org.apache.hadoop.fs.Path outputPath,
                                     String name)

accept

public boolean accept(OutputHandler handler,
                      PType<?> ptype)
Specified by:
accept in interface Target

getPath

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

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

asSourceTarget

public <T> SourceTarget<T> asSourceTarget(PType<T> ptype)
Specified by:
asSourceTarget in interface Target


Copyright © 2012. All Rights Reserved.