<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.apache.orc.mapred (ORC MapReduce 1.9.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="org.apache.orc.mapred (ORC MapReduce 1.9.0 API)";
        }
    }
    catch(err) {
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Package</li>
<li><a href="../../../../org/apache/orc/mapreduce/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/orc/mapred/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Package" class="title">Package&nbsp;org.apache.orc.mapred</h1>
<div class="docSummary">
<div class="block">
 This package provides convenient access to ORC files using Hadoop's
 MapReduce InputFormat and OutputFormat.</div>
</div>
<p>See:&nbsp;<a href="#package.description">Description</a></p>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcInputFormat.html" title="class in org.apache.orc.mapred">OrcInputFormat</a>&lt;V extends <a href="https://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/io/WritableComparable.html?is-external=true" title="class or interface in org.apache.hadoop.io">WritableComparable</a>&gt;</td>
<td class="colLast">
<div class="block">A MapReduce/Hive input format for ORC files.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcKey.html" title="class in org.apache.orc.mapred">OrcKey</a></td>
<td class="colLast">
<div class="block">This type provides a wrapper for OrcStruct so that it can be sent through
 the MapReduce shuffle as a key.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcList.html" title="class in org.apache.orc.mapred">OrcList</a>&lt;E extends <a href="https://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/io/WritableComparable.html?is-external=true" title="class or interface in org.apache.hadoop.io">WritableComparable</a>&gt;</td>
<td class="colLast">
<div class="block">An ArrayList implementation that implements Writable.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcMap.html" title="class in org.apache.orc.mapred">OrcMap</a>&lt;K extends <a href="https://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/io/WritableComparable.html?is-external=true" title="class or interface in org.apache.hadoop.io">WritableComparable</a>,V extends <a href="https://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/io/WritableComparable.html?is-external=true" title="class or interface in org.apache.hadoop.io">WritableComparable</a>&gt;</td>
<td class="colLast">
<div class="block">A TreeMap implementation that implements Writable.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcMapredRecordReader.html" title="class in org.apache.orc.mapred">OrcMapredRecordReader</a>&lt;V extends <a href="https://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/io/WritableComparable.html?is-external=true" title="class or interface in org.apache.hadoop.io">WritableComparable</a>&gt;</td>
<td class="colLast">
<div class="block">This record reader implements the org.apache.hadoop.mapred API.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcMapredRecordWriter.html" title="class in org.apache.orc.mapred">OrcMapredRecordWriter</a>&lt;V extends <a href="https://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/io/Writable.html?is-external=true" title="class or interface in org.apache.hadoop.io">Writable</a>&gt;</td>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcOutputFormat.html" title="class in org.apache.orc.mapred">OrcOutputFormat</a>&lt;V extends <a href="https://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/io/Writable.html?is-external=true" title="class or interface in org.apache.hadoop.io">Writable</a>&gt;</td>
<td class="colLast">
<div class="block">An ORC output format that satisfies the org.apache.hadoop.mapred API.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcStruct.html" title="class in org.apache.orc.mapred">OrcStruct</a></td>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcTimestamp.html" title="class in org.apache.orc.mapred">OrcTimestamp</a></td>
<td class="colLast">
<div class="block">A Timestamp implementation that implements Writable.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcUnion.html" title="class in org.apache.orc.mapred">OrcUnion</a></td>
<td class="colLast">
<div class="block">An in-memory representation of a union type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../org/apache/orc/mapred/OrcValue.html" title="class in org.apache.orc.mapred">OrcValue</a></td>
<td class="colLast">
<div class="block">This type provides a wrapper for OrcStruct so that it can be sent through
 the MapReduce shuffle as a value.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
<a name="package.description">
<!--   -->
</a>
<h2 title="Package org.apache.orc.mapred Description">Package org.apache.orc.mapred Description</h2>
<div class="block"><p>
 This package provides convenient access to ORC files using Hadoop's
 MapReduce InputFormat and OutputFormat.
 </p>

 <p>
 For reading, set the InputFormat to OrcInputFormat and your map will
 receive a stream of OrcStruct objects for each row. (Note that ORC files
 may have any type as the root object instead of structs and then the
 object type will be the appropriate one.)
 </p>

 <p>The mapping of types is:</p>
 <table summary="Mapping of ORC types to Writable types"
        border="1">
   <thead>
     <tr><th>ORC Type</th><th>Writable Type</th></tr>
   </thead>
   <tbody>
     <tr><td>array</td><td>OrcList</td></tr>
     <tr><td>binary</td><td>BytesWritable</td></tr>
     <tr><td>bigint</td><td>LongWritable</td></tr>
     <tr><td>boolean</td><td>BooleanWritable</td></tr>
     <tr><td>char</td><td>Text</td></tr>
     <tr><td>date</td><td>DateWritable</td></tr>
     <tr><td>decimal</td><td>HiveDecimalWritable</td></tr>
     <tr><td>double</td><td>DoubleWritable</td></tr>
     <tr><td>float</td><td>FloatWritable</td></tr>
     <tr><td>int</td><td>IntWritable</td></tr>
     <tr><td>map</td><td>OrcMap</td></tr>
     <tr><td>smallint</td><td>ShortWritable</td></tr>
     <tr><td>string</td><td>Text</td></tr>
     <tr><td>struct</td><td>OrcStruct</td></tr>
     <tr><td>timestamp</td><td>OrcTimestamp</td></tr>
     <tr><td>tinyint</td><td>ByteWritable</td></tr>
     <tr><td>uniontype</td><td>OrcUnion</td></tr>
     <tr><td>varchar</td><td>Text</td></tr>
   </tbody>
 </table>

 <p>
 For writing, set the OutputFormat to OrcOutputFormat and define the
 property "orc.schema" in your configuration. The property defines the
 type of the file and uses the Hive type strings, such as
 "struct&lt;x:int,y:string,z:timestamp&gt;" for a row with an integer,
 string, and timestamp. You can create an example object using:</p>
<pre><code>
String typeStr = "struct&lt;x:int,y:string,z:timestamp&gt;";
OrcStruct row = (OrcStruct) OrcStruct.createValue(
    TypeDescription.fromString(typeStr));
</code></pre>

 <p>
 Please look at the OrcConf class for the configuration knobs that are
 available.
 </p></div>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Package</li>
<li><a href="../../../../org/apache/orc/mapreduce/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/orc/mapred/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2013&#x2013;2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
