com.cloudera.crunch.tool
Class CrunchTool

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by com.cloudera.crunch.tool.CrunchTool
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public abstract class CrunchTool
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

An extension of the Tool interface that creates a Pipeline instance and provides methods for working with the Pipeline from inside of the Tool's run method.


Field Summary
protected static At at
           
protected static From from
           
protected static To to
           
 
Constructor Summary
CrunchTool()
           
CrunchTool(boolean inMemory)
           
 
Method Summary
 void done()
           
 void enableDebug()
           
 org.apache.hadoop.conf.Configuration getConf()
           
<T> PCollection<T>
read(Source<T> source)
           
<K,V> PTable<K,V>
read(TableSource<K,V> tableSource)
           
 PCollection<String> readTextFile(String pathName)
           
 void run()
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 void write(PCollection<?> pcollection, Target target)
           
 void writeTextFile(PCollection<?> pcollection, String pathName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.util.Tool
run
 

Field Detail

from

protected static final From from

to

protected static final To to

at

protected static final At at
Constructor Detail

CrunchTool

public CrunchTool()
           throws IOException
Throws:
IOException

CrunchTool

public CrunchTool(boolean inMemory)
           throws IOException
Throws:
IOException
Method Detail

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable
Overrides:
setConf in class org.apache.hadoop.conf.Configured

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable
Overrides:
getConf in class org.apache.hadoop.conf.Configured

enableDebug

public void enableDebug()

read

public <T> PCollection<T> read(Source<T> source)

read

public <K,V> PTable<K,V> read(TableSource<K,V> tableSource)

readTextFile

public PCollection<String> readTextFile(String pathName)

write

public void write(PCollection<?> pcollection,
                  Target target)

writeTextFile

public void writeTextFile(PCollection<?> pcollection,
                          String pathName)

run

public void run()

done

public void done()


Copyright © 2012. All Rights Reserved.