blob: d6764536727c8c2f4c3bfb8aea58f8867eb10f56 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.2) on Sat Mar 07 16:07:59 KST 2020 -->
<title>DataUtil (Nemo Project 0.2 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-03-07">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DataUtil (Nemo Project 0.2 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DataUtil.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" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.nemo.runtime.executor.data</a></div>
<h2 title="Class DataUtil" class="title">Class DataUtil</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.nemo.runtime.executor.data.DataUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">DataUtil</span>
extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></pre>
<div class="block">Utility methods for data handling (e.g., (de)serialization).</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DataUtil.InputStreamIterator.html" title="class in org.apache.nemo.runtime.executor.data">DataUtil.InputStreamIterator</a>&lt;<a href="DataUtil.InputStreamIterator.html" title="type parameter in DataUtil.InputStreamIterator">T</a>&gt;</span></code></th>
<td class="colLast">
<div class="block">An iterator that emits objects from <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>InputStream</code></a> using the corresponding <a href="../../../common/coder/DecoderFactory.html" title="interface in org.apache.nemo.common.coder"><code>DecoderFactory</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DataUtil.IteratorWithNumBytes.html" title="interface in org.apache.nemo.runtime.executor.data">DataUtil.IteratorWithNumBytes</a>&lt;<a href="DataUtil.IteratorWithNumBytes.html" title="type parameter in DataUtil.IteratorWithNumBytes">T</a>&gt;</span></code></th>
<td class="colLast">
<div class="block"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Iterator</code></a> with interface to access to the number of bytes.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<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="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="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#blockIdToFilePath(java.lang.String,java.lang.String)">blockIdToFilePath</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;blockId,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fileDirectory)</code></th>
<td class="colLast">
<div class="block">Converts a block id to the corresponding file path.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#blockIdToMetaFilePath(java.lang.String,java.lang.String)">blockIdToMetaFilePath</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;blockId,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fileDirectory)</code></th>
<td class="colLast">
<div class="block">Converts a block id to the corresponding metadata file path.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildInputStream(java.io.InputStream,java.util.List)">buildInputStream</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;in,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="streamchainer/DecodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer">DecodeStreamChainer</a>&gt;&nbsp;decodeStreamChainers)</code></th>
<td class="colLast">
<div class="block">Chain <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>InputStream</code></a> with <a href="streamchainer/DecodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer"><code>DecodeStreamChainer</code></a>s.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildOutputStream(java.io.OutputStream,java.util.List)">buildOutputStream</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="streamchainer/EncodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer">EncodeStreamChainer</a>&gt;&nbsp;encodeStreamChainers)</code></th>
<td class="colLast">
<div class="block">Chain <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>OutputStream</code></a> with <a href="streamchainer/EncodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer"><code>EncodeStreamChainer</code></a>s.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#concatNonSerPartitions(java.lang.Iterable)">concatNonSerPartitions</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/NonSerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">NonSerializedPartition</a>&gt;&nbsp;partitionsToConcat)</code></th>
<td class="colLast">
<div class="block">Concatenates an iterable of non-serialized <a href="partition/Partition.html" title="interface in org.apache.nemo.runtime.executor.data.partition"><code>Partition</code></a>s
into a single iterable of elements.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static &lt;K extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>&gt;<br><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/NonSerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">NonSerializedPartition</a>&lt;K&gt;&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convertToNonSerPartitions(org.apache.nemo.runtime.executor.data.streamchainer.Serializer,java.lang.Iterable)">convertToNonSerPartitions</a></span>&#8203;(<a href="streamchainer/Serializer.html" title="class in org.apache.nemo.runtime.executor.data.streamchainer">Serializer</a>&nbsp;serializer,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/SerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">SerializedPartition</a>&lt;K&gt;&gt;&nbsp;partitionsToConvert)</code></th>
<td class="colLast">
<div class="block">Converts the serialized <a href="partition/Partition.html" title="interface in org.apache.nemo.runtime.executor.data.partition"><code>Partition</code></a>s
in an iterable to non-serialized partitions.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static &lt;K extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>&gt;<br><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/SerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">SerializedPartition</a>&lt;K&gt;&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convertToSerPartitions(org.apache.nemo.runtime.executor.data.streamchainer.Serializer,java.lang.Iterable,org.apache.nemo.runtime.executor.data.MemoryPoolAssigner)">convertToSerPartitions</a></span>&#8203;(<a href="streamchainer/Serializer.html" title="class in org.apache.nemo.runtime.executor.data.streamchainer">Serializer</a>&nbsp;serializer,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/NonSerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">NonSerializedPartition</a>&lt;K&gt;&gt;&nbsp;partitionsToConvert,
<a href="MemoryPoolAssigner.html" title="class in org.apache.nemo.runtime.executor.data">MemoryPoolAssigner</a>&nbsp;memoryPoolAssigner)</code></th>
<td class="colLast">
<div class="block">Converts the non-serialized <a href="partition/Partition.html" title="interface in org.apache.nemo.runtime.executor.data.partition"><code>Partition</code></a>s
in an iterable to serialized partitions.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static &lt;K extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>&gt;<br><a href="partition/NonSerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">NonSerializedPartition</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deserializePartition(int,org.apache.nemo.runtime.executor.data.streamchainer.Serializer,K,java.io.InputStream)">deserializePartition</a></span>&#8203;(int&nbsp;partitionSize,
<a href="streamchainer/Serializer.html" title="class in org.apache.nemo.runtime.executor.data.streamchainer">Serializer</a>&nbsp;serializer,
K&nbsp;key,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;inputStream)</code></th>
<td class="colLast">
<div class="block">Reads the data of a partition from an input stream and deserializes it.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="deserializePartition(int,org.apache.nemo.runtime.executor.data.streamchainer.Serializer,java.io.Serializable,java.io.InputStream)">
<!-- -->
</a><a id="deserializePartition(int,org.apache.nemo.runtime.executor.data.streamchainer.Serializer,K,java.io.InputStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deserializePartition</h4>
<pre class="methodSignature">public static&nbsp;&lt;K extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>&gt;&nbsp;<a href="partition/NonSerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">NonSerializedPartition</a>&nbsp;deserializePartition&#8203;(int&nbsp;partitionSize,
<a href="streamchainer/Serializer.html" title="class in org.apache.nemo.runtime.executor.data.streamchainer">Serializer</a>&nbsp;serializer,
K&nbsp;key,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;inputStream)
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Reads the data of a partition from an input stream and deserializes it.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the key type of the partitions.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>partitionSize</code> - the size of the partition to deserialize.</dd>
<dd><code>serializer</code> - the serializer to decode the bytes.</dd>
<dd><code>key</code> - the key value of the result partition.</dd>
<dd><code>inputStream</code> - the input stream which will return the data in the partition as bytes.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the list of deserialized elements.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if fail to deserialize.</dd>
</dl>
</li>
</ul>
<a id="convertToSerPartitions(org.apache.nemo.runtime.executor.data.streamchainer.Serializer,java.lang.Iterable,org.apache.nemo.runtime.executor.data.MemoryPoolAssigner)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertToSerPartitions</h4>
<pre class="methodSignature">public static&nbsp;&lt;K extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>&gt;&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/SerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">SerializedPartition</a>&lt;K&gt;&gt;&nbsp;convertToSerPartitions&#8203;(<a href="streamchainer/Serializer.html" title="class in org.apache.nemo.runtime.executor.data.streamchainer">Serializer</a>&nbsp;serializer,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/NonSerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">NonSerializedPartition</a>&lt;K&gt;&gt;&nbsp;partitionsToConvert,
<a href="MemoryPoolAssigner.html" title="class in org.apache.nemo.runtime.executor.data">MemoryPoolAssigner</a>&nbsp;memoryPoolAssigner)
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a>,
<a href="MemoryAllocationException.html" title="class in org.apache.nemo.runtime.executor.data">MemoryAllocationException</a></pre>
<div class="block">Converts the non-serialized <a href="partition/Partition.html" title="interface in org.apache.nemo.runtime.executor.data.partition"><code>Partition</code></a>s
in an iterable to serialized partitions.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the key type of the partitions.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serializer</code> - the serializer for serialization.</dd>
<dd><code>partitionsToConvert</code> - the partitions to convert.</dd>
<dd><code>memoryPoolAssigner</code> - the memory pool assigner for DirectByteBufferOutputStream.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the converted <a href="partition/SerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition"><code>SerializedPartition</code></a>s.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if fail to convert.</dd>
<dd><code><a href="MemoryAllocationException.html" title="class in org.apache.nemo.runtime.executor.data">MemoryAllocationException</a></code> - if fail to allocate memory.</dd>
</dl>
</li>
</ul>
<a id="convertToNonSerPartitions(org.apache.nemo.runtime.executor.data.streamchainer.Serializer,java.lang.Iterable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertToNonSerPartitions</h4>
<pre class="methodSignature">public static&nbsp;&lt;K extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>&gt;&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/NonSerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">NonSerializedPartition</a>&lt;K&gt;&gt;&nbsp;convertToNonSerPartitions&#8203;(<a href="streamchainer/Serializer.html" title="class in org.apache.nemo.runtime.executor.data.streamchainer">Serializer</a>&nbsp;serializer,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/SerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">SerializedPartition</a>&lt;K&gt;&gt;&nbsp;partitionsToConvert)
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Converts the serialized <a href="partition/Partition.html" title="interface in org.apache.nemo.runtime.executor.data.partition"><code>Partition</code></a>s
in an iterable to non-serialized partitions.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the key type of the partitions.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serializer</code> - the serializer for deserialization.</dd>
<dd><code>partitionsToConvert</code> - the partitions to convert.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the converted <a href="partition/NonSerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition"><code>NonSerializedPartition</code></a>s.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if fail to convert.</dd>
</dl>
</li>
</ul>
<a id="blockIdToFilePath(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blockIdToFilePath</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;blockIdToFilePath&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;blockId,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fileDirectory)</pre>
<div class="block">Converts a block id to the corresponding file path.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>blockId</code> - the ID of the block.</dd>
<dd><code>fileDirectory</code> - the directory of the target block file.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the file path of the partition.</dd>
</dl>
</li>
</ul>
<a id="blockIdToMetaFilePath(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blockIdToMetaFilePath</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;blockIdToMetaFilePath&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;blockId,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fileDirectory)</pre>
<div class="block">Converts a block id to the corresponding metadata file path.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>blockId</code> - the ID of the block.</dd>
<dd><code>fileDirectory</code> - the directory of the target block file.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the metadata file path of the partition.</dd>
</dl>
</li>
</ul>
<a id="concatNonSerPartitions(java.lang.Iterable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>concatNonSerPartitions</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&nbsp;concatNonSerPartitions&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="partition/NonSerializedPartition.html" title="class in org.apache.nemo.runtime.executor.data.partition">NonSerializedPartition</a>&gt;&nbsp;partitionsToConcat)
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Concatenates an iterable of non-serialized <a href="partition/Partition.html" title="interface in org.apache.nemo.runtime.executor.data.partition"><code>Partition</code></a>s
into a single iterable of elements.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>partitionsToConcat</code> - the partitions to concatenate.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the concatenated iterable of all elements.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if fail to concatenate.</dd>
</dl>
</li>
</ul>
<a id="buildInputStream(java.io.InputStream,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildInputStream</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;buildInputStream&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;in,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="streamchainer/DecodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer">DecodeStreamChainer</a>&gt;&nbsp;decodeStreamChainers)
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Chain <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>InputStream</code></a> with <a href="streamchainer/DecodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer"><code>DecodeStreamChainer</code></a>s.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>in</code> - the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>InputStream</code></a>.</dd>
<dd><code>decodeStreamChainers</code> - the list of <a href="streamchainer/DecodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer"><code>DecodeStreamChainer</code></a> to be applied on the stream.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>chained <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>InputStream</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if fail to create new stream.</dd>
</dl>
</li>
</ul>
<a id="buildOutputStream(java.io.OutputStream,java.util.List)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>buildOutputStream</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a>&nbsp;buildOutputStream&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="streamchainer/EncodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer">EncodeStreamChainer</a>&gt;&nbsp;encodeStreamChainers)
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Chain <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>OutputStream</code></a> with <a href="streamchainer/EncodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer"><code>EncodeStreamChainer</code></a>s.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>OutputStream</code></a>.</dd>
<dd><code>encodeStreamChainers</code> - the list of <a href="streamchainer/EncodeStreamChainer.html" title="interface in org.apache.nemo.runtime.executor.data.streamchainer"><code>EncodeStreamChainer</code></a> to be applied on the stream.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>chained <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>OutputStream</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if fail to create new stream.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DataUtil.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" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>