blob: b045504133931a74db7c147b49324a914f0686bc [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_31) on Thu Apr 05 22:07:23 PDT 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
DoFn (crunch 0.2.0 API)
</TITLE>
<META NAME="date" CONTENT="2012-04-05">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DoFn (crunch 0.2.0 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DoFn.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/cloudera/crunch/CombineFn.TupleNAggregator.html" title="class in com.cloudera.crunch"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/cloudera/crunch/Emitter.html" title="interface in com.cloudera.crunch"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/cloudera/crunch/DoFn.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DoFn.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.cloudera.crunch</FONT>
<BR>
Class DoFn&lt;S,T&gt;</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.cloudera.crunch.DoFn&lt;S,T&gt;</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/cloudera/crunch/lib/Aggregate.TopKFn.html" title="class in com.cloudera.crunch.lib">Aggregate.TopKFn</A>, <A HREF="../../../com/cloudera/crunch/CombineFn.html" title="class in com.cloudera.crunch">CombineFn</A>, <A HREF="../../../com/cloudera/crunch/FilterFn.html" title="class in com.cloudera.crunch">FilterFn</A>, <A HREF="../../../com/cloudera/crunch/MapFn.html" title="class in com.cloudera.crunch">MapFn</A>, <A HREF="../../../com/cloudera/crunch/fn/MapKeysFn.html" title="class in com.cloudera.crunch.fn">MapKeysFn</A>, <A HREF="../../../com/cloudera/crunch/fn/MapValuesFn.html" title="class in com.cloudera.crunch.fn">MapValuesFn</A>, <A HREF="../../../com/cloudera/crunch/lib/Sample.SamplerFn.html" title="class in com.cloudera.crunch.lib">Sample.SamplerFn</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public abstract class <B>DoFn&lt;S,T&gt;</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL>
</PRE>
<P>
Base class for all data processing functions in Crunch.
<p>Note that all <code>DoFn</code> instances implement <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><CODE>Serializable</CODE></A>,
and thus all of their non-transient member variables must implement
<code>Serializable</code> as well. If your DoFn depends on non-serializable
classes for data processing, they may be declared as <code>transient</code>
and initialized in the DoFn's <code>initialize</code> method.
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#com.cloudera.crunch.DoFn">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#DoFn()">DoFn</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#cleanup(com.cloudera.crunch.Emitter)">cleanup</A></B>(<A HREF="../../../com/cloudera/crunch/Emitter.html" title="interface in com.cloudera.crunch">Emitter</A>&lt;<A HREF="../../../com/cloudera/crunch/DoFn.html" title="type parameter in DoFn">T</A>&gt;&nbsp;emitter)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called during the cleanup of the MapReduce job this <code>DoFn</code>
is associated with.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#configure(org.apache.hadoop.conf.Configuration)">configure</A></B>(org.apache.hadoop.conf.Configuration&nbsp;conf)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called during the job planning phase.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;org.apache.hadoop.conf.Configuration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#getConfiguration()">getConfiguration</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;org.apache.hadoop.mapreduce.Counter</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#getCounter(java.lang.Enum)">getCounter</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;?&gt;&nbsp;counterName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;org.apache.hadoop.mapreduce.Counter</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#getCounter(java.lang.String, java.lang.String)">getCounter</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;groupName,
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;counterName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#getStatus()">getStatus</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;org.apache.hadoop.mapreduce.TaskAttemptID</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#getTaskAttemptID()">getTaskAttemptID</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#initialize()">initialize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called during the setup of the MapReduce job this <code>DoFn</code>
is associated with.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#process(S, com.cloudera.crunch.Emitter)">process</A></B>(<A HREF="../../../com/cloudera/crunch/DoFn.html" title="type parameter in DoFn">S</A>&nbsp;input,
<A HREF="../../../com/cloudera/crunch/Emitter.html" title="interface in com.cloudera.crunch">Emitter</A>&lt;<A HREF="../../../com/cloudera/crunch/DoFn.html" title="type parameter in DoFn">T</A>&gt;&nbsp;emitter)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Processes the records from a <A HREF="../../../com/cloudera/crunch/PCollection.html" title="interface in com.cloudera.crunch"><CODE>PCollection</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#progress()">progress</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#scaleFactor()">scaleFactor</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an estimate of how applying this function to a <A HREF="../../../com/cloudera/crunch/PCollection.html" title="interface in com.cloudera.crunch"><CODE>PCollection</CODE></A>
will cause it to change in side.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#setConfigurationForTest(org.apache.hadoop.conf.Configuration)">setConfigurationForTest</A></B>(org.apache.hadoop.conf.Configuration&nbsp;conf)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a <code>Configuration</code> instance to be used during unit tests.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#setContext(org.apache.hadoop.mapreduce.TaskInputOutputContext)">setContext</A></B>(org.apache.hadoop.mapreduce.TaskInputOutputContext&lt;?,?,?,?&gt;&nbsp;context)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called during setup to pass the <CODE>TaskInputOutputContext</CODE> to
this <code>DoFn</code> instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/cloudera/crunch/DoFn.html#setStatus(java.lang.String)">setStatus</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;status)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DoFn()"><!-- --></A><H3>
DoFn</H3>
<PRE>
public <B>DoFn</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="configure(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
configure</H3>
<PRE>
public void <B>configure</B>(org.apache.hadoop.conf.Configuration&nbsp;conf)</PRE>
<DL>
<DD>Called during the job planning phase. Subclasses may override
this method in order to modify the configuration of the Job
that this DoFn instance belongs to.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>conf</CODE> - The Configuration instance for the Job.</DL>
</DD>
</DL>
<HR>
<A NAME="process(java.lang.Object,com.cloudera.crunch.Emitter)"><!-- --></A><A NAME="process(S, com.cloudera.crunch.Emitter)"><!-- --></A><H3>
process</H3>
<PRE>
public abstract void <B>process</B>(<A HREF="../../../com/cloudera/crunch/DoFn.html" title="type parameter in DoFn">S</A>&nbsp;input,
<A HREF="../../../com/cloudera/crunch/Emitter.html" title="interface in com.cloudera.crunch">Emitter</A>&lt;<A HREF="../../../com/cloudera/crunch/DoFn.html" title="type parameter in DoFn">T</A>&gt;&nbsp;emitter)</PRE>
<DL>
<DD>Processes the records from a <A HREF="../../../com/cloudera/crunch/PCollection.html" title="interface in com.cloudera.crunch"><CODE>PCollection</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>input</CODE> - The input record<DD><CODE>emitter</CODE> - The emitter to send the output to</DL>
</DD>
</DL>
<HR>
<A NAME="initialize()"><!-- --></A><H3>
initialize</H3>
<PRE>
public void <B>initialize</B>()</PRE>
<DL>
<DD>Called during the setup of the MapReduce job this <code>DoFn</code>
is associated with. Subclasses may override this method to
do appropriate initialization.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="cleanup(com.cloudera.crunch.Emitter)"><!-- --></A><H3>
cleanup</H3>
<PRE>
public void <B>cleanup</B>(<A HREF="../../../com/cloudera/crunch/Emitter.html" title="interface in com.cloudera.crunch">Emitter</A>&lt;<A HREF="../../../com/cloudera/crunch/DoFn.html" title="type parameter in DoFn">T</A>&gt;&nbsp;emitter)</PRE>
<DL>
<DD>Called during the cleanup of the MapReduce job this <code>DoFn</code>
is associated with. Subclasses may override this method to do
appropriate cleanup.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>emitter</CODE> - The emitter that was used for output</DL>
</DD>
</DL>
<HR>
<A NAME="setContext(org.apache.hadoop.mapreduce.TaskInputOutputContext)"><!-- --></A><H3>
setContext</H3>
<PRE>
public void <B>setContext</B>(org.apache.hadoop.mapreduce.TaskInputOutputContext&lt;?,?,?,?&gt;&nbsp;context)</PRE>
<DL>
<DD>Called during setup to pass the <CODE>TaskInputOutputContext</CODE> to
this <code>DoFn</code> instance.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setConfigurationForTest(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
setConfigurationForTest</H3>
<PRE>
public void <B>setConfigurationForTest</B>(org.apache.hadoop.conf.Configuration&nbsp;conf)</PRE>
<DL>
<DD>Sets a <code>Configuration</code> instance to be used during unit tests.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>conf</CODE> - The Configuration instance.</DL>
</DD>
</DL>
<HR>
<A NAME="scaleFactor()"><!-- --></A><H3>
scaleFactor</H3>
<PRE>
public float <B>scaleFactor</B>()</PRE>
<DL>
<DD>Returns an estimate of how applying this function to a <A HREF="../../../com/cloudera/crunch/PCollection.html" title="interface in com.cloudera.crunch"><CODE>PCollection</CODE></A>
will cause it to change in side. The optimizer uses these estimates to
decide where to break up dependent MR jobs into separate Map and Reduce
phases in order to minimize I/O.
<p>
Subclasses of <code>DoFn</code> that will substantially alter the size of the
resulting <code>PCollection</code> should override this method.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getConfiguration()"><!-- --></A><H3>
getConfiguration</H3>
<PRE>
protected org.apache.hadoop.conf.Configuration <B>getConfiguration</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCounter(java.lang.Enum)"><!-- --></A><H3>
getCounter</H3>
<PRE>
protected org.apache.hadoop.mapreduce.Counter <B>getCounter</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;?&gt;&nbsp;counterName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCounter(java.lang.String, java.lang.String)"><!-- --></A><H3>
getCounter</H3>
<PRE>
protected org.apache.hadoop.mapreduce.Counter <B>getCounter</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;groupName,
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;counterName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="progress()"><!-- --></A><H3>
progress</H3>
<PRE>
protected void <B>progress</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTaskAttemptID()"><!-- --></A><H3>
getTaskAttemptID</H3>
<PRE>
protected org.apache.hadoop.mapreduce.TaskAttemptID <B>getTaskAttemptID</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setStatus(java.lang.String)"><!-- --></A><H3>
setStatus</H3>
<PRE>
protected void <B>setStatus</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;status)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getStatus()"><!-- --></A><H3>
getStatus</H3>
<PRE>
protected <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getStatus</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DoFn.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/cloudera/crunch/CombineFn.TupleNAggregator.html" title="class in com.cloudera.crunch"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/cloudera/crunch/Emitter.html" title="interface in com.cloudera.crunch"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/cloudera/crunch/DoFn.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DoFn.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2012. All Rights Reserved.
</BODY>
</HTML>