blob: 39b1b383421f03e5897feaf0dda5da3098566afb [file] [log] [blame]
<!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 (1.8.0_252) on Sun Apr 26 20:47:06 PDT 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WriterImpl (ORC Core 1.6.3 API)</title>
<meta name="date" content="2020-04-26">
<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="WriterImpl (ORC Core 1.6.3 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":9,"i8":10,"i9":9,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</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><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/WriterImpl.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><a href="../../../../org/apache/orc/impl/Utf8Utils.html" title="class in org.apache.orc.impl"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/orc/impl/WriterInternal.html" title="interface in org.apache.orc.impl"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/orc/impl/WriterImpl.html" target="_top">Frames</a></li>
<li><a href="WriterImpl.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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.orc.impl</div>
<h2 title="Class WriterImpl" class="title">Class WriterImpl</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.orc.impl.WriterImpl</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a>, <a href="../../../../org/apache/orc/impl/WriterInternal.html" title="interface in org.apache.orc.impl">WriterInternal</a>, <a href="../../../../org/apache/orc/MemoryManager.Callback.html" title="interface in org.apache.orc">MemoryManager.Callback</a>, <a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../org/apache/orc/impl/writer/WriterImplV2.html" title="class in org.apache.orc.impl.writer">WriterImplV2</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">WriterImpl</span>
extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../org/apache/orc/impl/WriterInternal.html" title="interface in org.apache.orc.impl">WriterInternal</a>, <a href="../../../../org/apache/orc/MemoryManager.Callback.html" title="interface in org.apache.orc">MemoryManager.Callback</a></pre>
<div class="block">An ORC file writer. The file is divided into stripes, which is the natural
unit of work when reading. Each stripe is buffered in memory until the
memory reaches the stripe size and then it is written out broken down by
columns. Each column is written by a TreeWriter that is specific to that
type of column. TreeWriters may have children TreeWriters that handle the
sub-types. Each of the TreeWriters writes the column's data as a set of
streams.
This class is unsynchronized like most Stream objects, so from the creation
of an OrcFile and all access to a single instance has to be from a single
thread.
There are no known cases where these happen between different threads today.
Caveat: the MemoryManager is created during WriterOptions create, that has
to be confined to a single thread as well.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#WriterImpl-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.orc.OrcFile.WriterOptions-">WriterImpl</a></span>(<a href="http://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/fs/FileSystem.html?is-external=true" title="class or interface in org.apache.hadoop.fs">FileSystem</a>&nbsp;fs,
<a href="http://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/fs/Path.html?is-external=true" title="class or interface in org.apache.hadoop.fs">Path</a>&nbsp;path,
<a href="../../../../org/apache/orc/OrcFile.WriterOptions.html" title="class in org.apache.orc">OrcFile.WriterOptions</a>&nbsp;opts)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#addRowBatch-org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch-">addRowBatch</a></span>(<a href="http://orc.apache.org/api/hive-storage-api/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatch.html?is-external=true" title="class or interface in org.apache.hadoop.hive.ql.exec.vector">VectorizedRowBatch</a>&nbsp;batch)</code>
<div class="block">Add a row batch to the ORC file.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#addUserMetadata-java.lang.String-java.nio.ByteBuffer-">addUserMetadata</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;value)</code>
<div class="block">Add arbitrary meta-data to the ORC file.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#appendStripe-byte:A-int-int-org.apache.orc.StripeInformation-org.apache.orc.OrcProto.StripeStatistics-">appendStripe</a></span>(byte[]&nbsp;stripe,
int&nbsp;offset,
int&nbsp;length,
<a href="../../../../org/apache/orc/StripeInformation.html" title="interface in org.apache.orc">StripeInformation</a>&nbsp;stripeInfo,
<a href="http://orc.apache.org/api/orc-core/org/apache/orc/OrcProto.StripeStatistics.html?is-external=true" title="class or interface in org.apache.orc">OrcProto.StripeStatistics</a>&nbsp;stripeStatistics)</code>
<div class="block">Fast stripe append to ORC file.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#appendStripe-byte:A-int-int-org.apache.orc.StripeInformation-org.apache.orc.StripeStatistics:A-">appendStripe</a></span>(byte[]&nbsp;stripe,
int&nbsp;offset,
int&nbsp;length,
<a href="../../../../org/apache/orc/StripeInformation.html" title="interface in org.apache.orc">StripeInformation</a>&nbsp;stripeInfo,
<a href="../../../../org/apache/orc/StripeStatistics.html" title="class in org.apache.orc">StripeStatistics</a>[]&nbsp;stripeStatistics)</code>
<div class="block">Fast stripe append to ORC file.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#appendUserMetadata-java.util.List-">appendUserMetadata</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://orc.apache.org/api/orc-core/org/apache/orc/OrcProto.UserMetadataItem.html?is-external=true" title="class or interface in org.apache.orc">OrcProto.UserMetadataItem</a>&gt;&nbsp;userMetadata)</code>
<div class="block">Update the current user metadata with a list of new values.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#checkMemory-double-">checkMemory</a></span>(double&nbsp;newScale)</code>
<div class="block">The scale factor for the stripe size has changed and thus the
writer should adjust their desired size appropriately.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#close--">close</a></span>()</code>
<div class="block">Flush all of the buffers and close the file.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/orc/CompressionCodec.html" title="interface in org.apache.orc">CompressionCodec</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#createCodec-org.apache.orc.CompressionKind-">createCodec</a></span>(<a href="../../../../org/apache/orc/CompressionKind.html" title="enum in org.apache.orc">CompressionKind</a>&nbsp;kind)</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/orc/CompressionCodec.html" title="interface in org.apache.orc">CompressionCodec</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#getCompressionCodec--">getCompressionCodec</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#getEstimatedBufferSize-long-int-int-">getEstimatedBufferSize</a></span>(long&nbsp;stripeSize,
int&nbsp;numColumns,
int&nbsp;bs)</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#getNumberOfRows--">getNumberOfRows</a></span>()</code>
<div class="block">Row count gets updated when flushing the stripes.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#getRawDataSize--">getRawDataSize</a></span>()</code>
<div class="block">Raw data size will be compute when writing the file footer.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/orc/TypeDescription.html" title="class in org.apache.orc">TypeDescription</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#getSchema--">getSchema</a></span>()</code>
<div class="block">Get the schema for this writer</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/orc/ColumnStatistics.html" title="interface in org.apache.orc">ColumnStatistics</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#getStatistics--">getStatistics</a></span>()</code>
<div class="block">Get the statistics about the columns in the file.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#increaseCompressionSize-int-">increaseCompressionSize</a></span>(int&nbsp;newSize)</code>
<div class="block">Increase the buffer size for this writer.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/orc/impl/WriterImpl.html#writeIntermediateFooter--">writeIntermediateFooter</a></span>()</code>
<div class="block">Write an intermediate footer on the file such that if the file is
truncated to the returned offset, it would be a valid ORC file.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/8/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://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="WriterImpl-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.orc.OrcFile.WriterOptions-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>WriterImpl</h4>
<pre>public&nbsp;WriterImpl(<a href="http://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/fs/FileSystem.html?is-external=true" title="class or interface in org.apache.hadoop.fs">FileSystem</a>&nbsp;fs,
<a href="http://hadoop.apache.org/docs/r2.7.3/api/org/apache/hadoop/fs/Path.html?is-external=true" title="class or interface in org.apache.hadoop.fs">Path</a>&nbsp;path,
<a href="../../../../org/apache/orc/OrcFile.WriterOptions.html" title="class in org.apache.orc">OrcFile.WriterOptions</a>&nbsp;opts)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getEstimatedBufferSize-long-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEstimatedBufferSize</h4>
<pre>public static&nbsp;int&nbsp;getEstimatedBufferSize(long&nbsp;stripeSize,
int&nbsp;numColumns,
int&nbsp;bs)</pre>
</li>
</ul>
<a name="increaseCompressionSize-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>increaseCompressionSize</h4>
<pre>public&nbsp;void&nbsp;increaseCompressionSize(int&nbsp;newSize)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/impl/WriterInternal.html#increaseCompressionSize-int-">WriterInternal</a></code></span></div>
<div class="block">Increase the buffer size for this writer.
This function is internal only and should only be called by the
ORC file merger.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/impl/WriterInternal.html#increaseCompressionSize-int-">increaseCompressionSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/impl/WriterInternal.html" title="interface in org.apache.orc.impl">WriterInternal</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newSize</code> - the new buffer size.</dd>
</dl>
</li>
</ul>
<a name="createCodec-org.apache.orc.CompressionKind-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createCodec</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/orc/CompressionCodec.html" title="interface in org.apache.orc">CompressionCodec</a>&nbsp;createCodec(<a href="../../../../org/apache/orc/CompressionKind.html" title="enum in org.apache.orc">CompressionKind</a>&nbsp;kind)</pre>
</li>
</ul>
<a name="checkMemory-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkMemory</h4>
<pre>public&nbsp;boolean&nbsp;checkMemory(double&nbsp;newScale)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/MemoryManager.Callback.html#checkMemory-double-">MemoryManager.Callback</a></code></span></div>
<div class="block">The scale factor for the stripe size has changed and thus the
writer should adjust their desired size appropriately.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/MemoryManager.Callback.html#checkMemory-double-">checkMemory</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/MemoryManager.Callback.html" title="interface in org.apache.orc">MemoryManager.Callback</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newScale</code> - the current scale factor for memory allocations</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the writer was over the limit</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="getSchema--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSchema</h4>
<pre>public&nbsp;<a href="../../../../org/apache/orc/TypeDescription.html" title="class in org.apache.orc">TypeDescription</a>&nbsp;getSchema()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/Writer.html#getSchema--">Writer</a></code></span></div>
<div class="block">Get the schema for this writer</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#getSchema--">getSchema</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the file schema</dd>
</dl>
</li>
</ul>
<a name="addUserMetadata-java.lang.String-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addUserMetadata</h4>
<pre>public&nbsp;void&nbsp;addUserMetadata(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/Writer.html#addUserMetadata-java.lang.String-java.nio.ByteBuffer-">Writer</a></code></span></div>
<div class="block">Add arbitrary meta-data to the ORC file. This may be called at any point
until the Writer is closed. If the same key is passed a second time, the
second value will replace the first.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#addUserMetadata-java.lang.String-java.nio.ByteBuffer-">addUserMetadata</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a key to label the data with.</dd>
<dd><code>value</code> - the contents of the metadata.</dd>
</dl>
</li>
</ul>
<a name="addRowBatch-org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addRowBatch</h4>
<pre>public&nbsp;void&nbsp;addRowBatch(<a href="http://orc.apache.org/api/hive-storage-api/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatch.html?is-external=true" title="class or interface in org.apache.hadoop.hive.ql.exec.vector">VectorizedRowBatch</a>&nbsp;batch)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/Writer.html#addRowBatch-org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch-">Writer</a></code></span></div>
<div class="block">Add a row batch to the ORC file.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#addRowBatch-org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch-">addRowBatch</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>batch</code> - the rows to add</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/Writer.html#close--">Writer</a></code></span></div>
<div class="block">Flush all of the buffers and close the file. No methods on this writer
should be called afterwards.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#close--">close</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="getRawDataSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRawDataSize</h4>
<pre>public&nbsp;long&nbsp;getRawDataSize()</pre>
<div class="block">Raw data size will be compute when writing the file footer. Hence raw data
size value will be available only after closing the writer.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#getRawDataSize--">getRawDataSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>raw data size</dd>
</dl>
</li>
</ul>
<a name="getNumberOfRows--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumberOfRows</h4>
<pre>public&nbsp;long&nbsp;getNumberOfRows()</pre>
<div class="block">Row count gets updated when flushing the stripes. To get accurate row
count call this method after writer is closed.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#getNumberOfRows--">getNumberOfRows</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>row count</dd>
</dl>
</li>
</ul>
<a name="writeIntermediateFooter--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeIntermediateFooter</h4>
<pre>public&nbsp;long&nbsp;writeIntermediateFooter()
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/Writer.html#writeIntermediateFooter--">Writer</a></code></span></div>
<div class="block">Write an intermediate footer on the file such that if the file is
truncated to the returned offset, it would be a valid ORC file.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#writeIntermediateFooter--">writeIntermediateFooter</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the offset that would be a valid end location for an ORC file</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="appendStripe-byte:A-int-int-org.apache.orc.StripeInformation-org.apache.orc.OrcProto.StripeStatistics-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>appendStripe</h4>
<pre>public&nbsp;void&nbsp;appendStripe(byte[]&nbsp;stripe,
int&nbsp;offset,
int&nbsp;length,
<a href="../../../../org/apache/orc/StripeInformation.html" title="interface in org.apache.orc">StripeInformation</a>&nbsp;stripeInfo,
<a href="http://orc.apache.org/api/orc-core/org/apache/orc/OrcProto.StripeStatistics.html?is-external=true" title="class or interface in org.apache.orc">OrcProto.StripeStatistics</a>&nbsp;stripeStatistics)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/Writer.html#appendStripe-byte:A-int-int-org.apache.orc.StripeInformation-org.apache.orc.OrcProto.StripeStatistics-">Writer</a></code></span></div>
<div class="block">Fast stripe append to ORC file. This interface is used for fast ORC file
merge with other ORC files. When merging, the file to be merged should pass
stripe in binary form along with stripe information and stripe statistics.
After appending last stripe of a file, use appendUserMetadata() to append
any user metadata.
This form only supports files with no column encryption. Use <a href="../../../../org/apache/orc/Writer.html#appendStripe-byte:A-int-int-org.apache.orc.StripeInformation-org.apache.orc.StripeStatistics:A-"><code>Writer.appendStripe(byte[], int, int, StripeInformation, StripeStatistics[])</code></a>
for files with encryption.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#appendStripe-byte:A-int-int-org.apache.orc.StripeInformation-org.apache.orc.OrcProto.StripeStatistics-">appendStripe</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>stripe</code> - - stripe as byte array</dd>
<dd><code>offset</code> - - offset within byte array</dd>
<dd><code>length</code> - - length of stripe within byte array</dd>
<dd><code>stripeInfo</code> - - stripe information</dd>
<dd><code>stripeStatistics</code> - - unencrypted stripe statistics</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="appendStripe-byte:A-int-int-org.apache.orc.StripeInformation-org.apache.orc.StripeStatistics:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>appendStripe</h4>
<pre>public&nbsp;void&nbsp;appendStripe(byte[]&nbsp;stripe,
int&nbsp;offset,
int&nbsp;length,
<a href="../../../../org/apache/orc/StripeInformation.html" title="interface in org.apache.orc">StripeInformation</a>&nbsp;stripeInfo,
<a href="../../../../org/apache/orc/StripeStatistics.html" title="class in org.apache.orc">StripeStatistics</a>[]&nbsp;stripeStatistics)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/Writer.html#appendStripe-byte:A-int-int-org.apache.orc.StripeInformation-org.apache.orc.StripeStatistics:A-">Writer</a></code></span></div>
<div class="block">Fast stripe append to ORC file. This interface is used for fast ORC file
merge with other ORC files. When merging, the file to be merged should pass
stripe in binary form along with stripe information and stripe statistics.
After appending last stripe of a file, use <a href="../../../../org/apache/orc/Writer.html#addUserMetadata-java.lang.String-java.nio.ByteBuffer-"><code>Writer.addUserMetadata(String,
ByteBuffer)</code></a> to append any user metadata.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#appendStripe-byte:A-int-int-org.apache.orc.StripeInformation-org.apache.orc.StripeStatistics:A-">appendStripe</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>stripe</code> - - stripe as byte array</dd>
<dd><code>offset</code> - - offset within byte array</dd>
<dd><code>length</code> - - length of stripe within byte array</dd>
<dd><code>stripeInfo</code> - - stripe information</dd>
<dd><code>stripeStatistics</code> - - stripe statistics with the last one being
for the unencrypted data and the others being for
each encryption variant.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="appendUserMetadata-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>appendUserMetadata</h4>
<pre>public&nbsp;void&nbsp;appendUserMetadata(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://orc.apache.org/api/orc-core/org/apache/orc/OrcProto.UserMetadataItem.html?is-external=true" title="class or interface in org.apache.orc">OrcProto.UserMetadataItem</a>&gt;&nbsp;userMetadata)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/Writer.html#appendUserMetadata-java.util.List-">Writer</a></code></span></div>
<div class="block">Update the current user metadata with a list of new values.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#appendUserMetadata-java.util.List-">appendUserMetadata</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>userMetadata</code> - - user metadata</dd>
</dl>
</li>
</ul>
<a name="getStatistics--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatistics</h4>
<pre>public&nbsp;<a href="../../../../org/apache/orc/ColumnStatistics.html" title="interface in org.apache.orc">ColumnStatistics</a>[]&nbsp;getStatistics()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/orc/Writer.html#getStatistics--">Writer</a></code></span></div>
<div class="block">Get the statistics about the columns in the file. The output of this is
based on the time at which it is called. It shall use all of the currently
written data to provide the statistics.
Please note there are costs involved with invoking this method and should
be used judiciously.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/orc/Writer.html#getStatistics--">getStatistics</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/orc/Writer.html" title="interface in org.apache.orc">Writer</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the information about the column</dd>
</dl>
</li>
</ul>
<a name="getCompressionCodec--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getCompressionCodec</h4>
<pre>public&nbsp;<a href="../../../../org/apache/orc/CompressionCodec.html" title="interface in org.apache.orc">CompressionCodec</a>&nbsp;getCompressionCodec()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= 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><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/WriterImpl.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><a href="../../../../org/apache/orc/impl/Utf8Utils.html" title="class in org.apache.orc.impl"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/orc/impl/WriterInternal.html" title="interface in org.apache.orc.impl"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/orc/impl/WriterImpl.html" target="_top">Frames</a></li>
<li><a href="WriterImpl.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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2013&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>