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

org.apache.crunch.io.text
Class TextFileTarget

java.lang.Object
  extended by org.apache.crunch.io.impl.FileTargetImpl
      extended by org.apache.crunch.io.text.TextFileTarget
All Implemented Interfaces:
MapReduceTarget, PathTarget, Target

public class TextFileTarget
extends FileTargetImpl


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.crunch.Target
Target.WriteMode
 
Field Summary
 
Fields inherited from class org.apache.crunch.io.impl.FileTargetImpl
path
 
Constructor Summary
TextFileTarget(org.apache.hadoop.fs.Path path)
           
TextFileTarget(org.apache.hadoop.fs.Path path, FileNamingScheme fileNamingScheme)
           
TextFileTarget(String path)
           
 
Method Summary
<T> SourceTarget<T>
asSourceTarget(PType<T> ptype)
          Attempt to create the SourceTarget type that corresponds to this Target for the given PType, if possible.
 void configureForMapReduce(org.apache.hadoop.mapreduce.Job job, PType<?> ptype, org.apache.hadoop.fs.Path outputPath, String name)
           
 org.apache.hadoop.fs.Path getPath()
           
 String toString()
           
 
Methods inherited from class org.apache.crunch.io.impl.FileTargetImpl
accept, configureForMapReduce, configureForMapReduce, equals, extractPartitionNumber, getConverter, getDestFile, getFileNamingScheme, getSourcePattern, getSuccessIndicator, handleExisting, handleOutputs, hashCode, isCompatible, outputConf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextFileTarget

public TextFileTarget(String path)

TextFileTarget

public TextFileTarget(org.apache.hadoop.fs.Path path)

TextFileTarget

public TextFileTarget(org.apache.hadoop.fs.Path path,
                      FileNamingScheme fileNamingScheme)
Method Detail

getPath

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

toString

public String toString()
Overrides:
toString in class FileTargetImpl

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
Overrides:
configureForMapReduce in class FileTargetImpl

asSourceTarget

public <T> SourceTarget<T> asSourceTarget(PType<T> ptype)
Description copied from interface: Target
Attempt to create the SourceTarget type that corresponds to this Target for the given PType, if possible. If it is not possible, return null.

Specified by:
asSourceTarget in interface Target
Overrides:
asSourceTarget in class FileTargetImpl
Parameters:
ptype - The PType to use in constructing the SourceTarget
Returns:
A new SourceTarget or null if such a SourceTarget does not exist


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