blob: 0a088d7e031d0ca5988f353dbd5da64bc6389fe0 [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:27 PDT 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
PType (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="PType (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/PType.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/type/PTableType.html" title="interface in com.cloudera.crunch.type"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/cloudera/crunch/type/PTypeFamily.html" title="interface in com.cloudera.crunch.type"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/cloudera/crunch/type/PType.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PType.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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.type</FONT>
<BR>
Interface PType&lt;T&gt;</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../com/cloudera/crunch/type/PTableType.html" title="interface in com.cloudera.crunch.type">PTableType</A>&lt;K,V&gt;</DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../com/cloudera/crunch/type/avro/AvroGroupedTableType.html" title="class in com.cloudera.crunch.type.avro">AvroGroupedTableType</A>, <A HREF="../../../../com/cloudera/crunch/type/avro/AvroTableType.html" title="class in com.cloudera.crunch.type.avro">AvroTableType</A>, <A HREF="../../../../com/cloudera/crunch/type/avro/AvroType.html" title="class in com.cloudera.crunch.type.avro">AvroType</A>, <A HREF="../../../../com/cloudera/crunch/type/PGroupedTableType.html" title="class in com.cloudera.crunch.type">PGroupedTableType</A>, <A HREF="../../../../com/cloudera/crunch/type/writable/WritableGroupedTableType.html" title="class in com.cloudera.crunch.type.writable">WritableGroupedTableType</A>, <A HREF="../../../../com/cloudera/crunch/type/writable/WritableType.html" title="class in com.cloudera.crunch.type.writable">WritableType</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>PType&lt;T&gt;</B></DL>
</PRE>
<P>
A <code>PType</code> defines a mapping between a data type that is used in a
Crunch pipeline and a serialization and storage format that is used to
read/write data from/to HDFS. Every <CODE>PCollection</CODE> has an associated
<code>PType</code> that tells Crunch how to read/write data from that
<code>PCollection</code>.
<P>
<P>
<HR>
<P>
<!-- ========== 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;<A HREF="../../../../com/cloudera/crunch/type/Converter.html" title="interface in com.cloudera.crunch.type">Converter</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/cloudera/crunch/type/PType.html#getConverter()">getConverter</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;<A HREF="../../../../com/cloudera/crunch/SourceTarget.html" title="interface in com.cloudera.crunch">SourceTarget</A>&lt;<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="type parameter in PType">T</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/cloudera/crunch/type/PType.html#getDefaultFileSource(org.apache.hadoop.fs.Path)">getDefaultFileSource</A></B>(org.apache.hadoop.fs.Path&nbsp;path)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>SourceTarget</code> that is able to read/write data using the
serialization format specified by this <code>PType</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/cloudera/crunch/type/PTypeFamily.html" title="interface in com.cloudera.crunch.type">PTypeFamily</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/cloudera/crunch/type/PType.html#getFamily()">getFamily</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <code>PTypeFamily</code> that this <code>PType</code> belongs to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/cloudera/crunch/MapFn.html" title="class in com.cloudera.crunch">MapFn</A>&lt;<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>,<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="type parameter in PType">T</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/cloudera/crunch/type/PType.html#getInputMapFn()">getInputMapFn</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;<A HREF="../../../../com/cloudera/crunch/MapFn.html" title="class in com.cloudera.crunch">MapFn</A>&lt;<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="type parameter in PType">T</A>,<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>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/cloudera/crunch/type/PType.html#getOutputMapFn()">getOutputMapFn</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;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="interface in com.cloudera.crunch.type">PType</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/cloudera/crunch/type/PType.html#getSubTypes()">getSubTypes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sub-types that make up this PType if it is a composite instance,
such as a tuple.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="type parameter in PType">T</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/cloudera/crunch/type/PType.html#getTypeClass()">getTypeClass</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Java type represented by this <code>PType</code>.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ 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="getTypeClass()"><!-- --></A><H3>
getTypeClass</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="type parameter in PType">T</A>&gt; <B>getTypeClass</B>()</PRE>
<DL>
<DD>Returns the Java type represented by this <code>PType</code>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getFamily()"><!-- --></A><H3>
getFamily</H3>
<PRE>
<A HREF="../../../../com/cloudera/crunch/type/PTypeFamily.html" title="interface in com.cloudera.crunch.type">PTypeFamily</A> <B>getFamily</B>()</PRE>
<DL>
<DD>Returns the <code>PTypeFamily</code> that this <code>PType</code> belongs to.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getInputMapFn()"><!-- --></A><H3>
getInputMapFn</H3>
<PRE>
<A HREF="../../../../com/cloudera/crunch/MapFn.html" title="class in com.cloudera.crunch">MapFn</A>&lt;<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>,<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="type parameter in PType">T</A>&gt; <B>getInputMapFn</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getOutputMapFn()"><!-- --></A><H3>
getOutputMapFn</H3>
<PRE>
<A HREF="../../../../com/cloudera/crunch/MapFn.html" title="class in com.cloudera.crunch">MapFn</A>&lt;<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="type parameter in PType">T</A>,<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>&gt; <B>getOutputMapFn</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getConverter()"><!-- --></A><H3>
getConverter</H3>
<PRE>
<A HREF="../../../../com/cloudera/crunch/type/Converter.html" title="interface in com.cloudera.crunch.type">Converter</A> <B>getConverter</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getDefaultFileSource(org.apache.hadoop.fs.Path)"><!-- --></A><H3>
getDefaultFileSource</H3>
<PRE>
<A HREF="../../../../com/cloudera/crunch/SourceTarget.html" title="interface in com.cloudera.crunch">SourceTarget</A>&lt;<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="type parameter in PType">T</A>&gt; <B>getDefaultFileSource</B>(org.apache.hadoop.fs.Path&nbsp;path)</PRE>
<DL>
<DD>Returns a <code>SourceTarget</code> that is able to read/write data using the
serialization format specified by this <code>PType</code>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getSubTypes()"><!-- --></A><H3>
getSubTypes</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../com/cloudera/crunch/type/PType.html" title="interface in com.cloudera.crunch.type">PType</A>&gt; <B>getSubTypes</B>()</PRE>
<DL>
<DD>Returns the sub-types that make up this PType if it is a composite instance,
such as a tuple.
<P>
<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/PType.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/type/PTableType.html" title="interface in com.cloudera.crunch.type"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/cloudera/crunch/type/PTypeFamily.html" title="interface in com.cloudera.crunch.type"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/cloudera/crunch/type/PType.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PType.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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>