| <!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_292) on Tue Jun 15 06:00:54 GMT 2021 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>NLineInputFormat (Apache Hadoop Main 3.3.1 API)</title> |
| <meta name="date" content="2021-06-15"> |
| <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="NLineInputFormat (Apache Hadoop Main 3.3.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":10,"i2":9,"i3":10,"i4":9,"i5":9}; |
| 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/NLineInputFormat.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/hadoop/mapreduce/lib/input/MultipleInputs.html" title="class in org.apache.hadoop.mapreduce.lib.input"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/SequenceFileAsBinaryInputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.input"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/hadoop/mapreduce/lib/input/NLineInputFormat.html" target="_top">Frames</a></li> |
| <li><a href="NLineInputFormat.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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.hadoop.mapreduce.lib.input</div> |
| <h2 title="Class NLineInputFormat" class="title">Class NLineInputFormat</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://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><a href="../../../../../../org/apache/hadoop/mapreduce/InputFormat.html" title="class in org.apache.hadoop.mapreduce">org.apache.hadoop.mapreduce.InputFormat</a><K,V></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.input">org.apache.hadoop.mapreduce.lib.input.FileInputFormat</a><<a href="../../../../../../org/apache/hadoop/io/LongWritable.html" title="class in org.apache.hadoop.io">LongWritable</a>,<a href="../../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a>></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.hadoop.mapreduce.lib.input.NLineInputFormat</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Stable |
| public class <span class="typeNameLabel">NLineInputFormat</span> |
| extends <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.input">FileInputFormat</a><<a href="../../../../../../org/apache/hadoop/io/LongWritable.html" title="class in org.apache.hadoop.io">LongWritable</a>,<a href="../../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a>></pre> |
| <div class="block">NLineInputFormat which splits N lines of input as one split. |
| |
| In many "pleasantly" parallel applications, each process/mapper |
| processes the same input file (s), but with computations are |
| controlled by different parameters.(Referred to as "parameter sweeps"). |
| One way to achieve this, is to specify a set of parameters |
| (one set per line) as input in a control file |
| (which is the input path to the map-reduce application, |
| where as the input dataset is specified |
| via a config variable in JobConf.). |
| |
| The NLineInputFormat can be used in such applications, that splits |
| the input file such that by default, one line is fed as |
| a value to one map task, and key is the offset. |
| i.e. (k,v) is (LongWritable, Text). |
| The location hints will span the whole mapred cluster.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/NLineInputFormat.html#LINES_PER_MAP">LINES_PER_MAP</a></span></code> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.hadoop.mapreduce.lib.input.FileInputFormat"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.hadoop.mapreduce.lib.input.<a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.input">FileInputFormat</a></h3> |
| <code><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#DEFAULT_LIST_STATUS_NUM_THREADS">DEFAULT_LIST_STATUS_NUM_THREADS</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#INPUT_DIR">INPUT_DIR</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#INPUT_DIR_NONRECURSIVE_IGNORE_SUBDIRS">INPUT_DIR_NONRECURSIVE_IGNORE_SUBDIRS</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#INPUT_DIR_RECURSIVE">INPUT_DIR_RECURSIVE</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#LIST_STATUS_NUM_THREADS">LIST_STATUS_NUM_THREADS</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#NUM_INPUT_FILES">NUM_INPUT_FILES</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#PATHFILTER_CLASS">PATHFILTER_CLASS</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#SPLIT_MAXSIZE">SPLIT_MAXSIZE</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#SPLIT_MINSIZE">SPLIT_MINSIZE</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== 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"> </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/hadoop/mapreduce/lib/input/NLineInputFormat.html#NLineInputFormat--">NLineInputFormat</a></span>()</code> </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"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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>protected static <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileSplit.html" title="class in org.apache.hadoop.mapreduce.lib.input">FileSplit</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/NLineInputFormat.html#createFileSplit-org.apache.hadoop.fs.Path-long-long-">createFileSplit</a></span>(<a href="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</a> fileName, |
| long begin, |
| long length)</code> |
| <div class="block">NLineInputFormat uses LineRecordReader, which always reads |
| (and consumes) at least one character out of its upper split |
| boundary.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/mapreduce/RecordReader.html" title="class in org.apache.hadoop.mapreduce">RecordReader</a><<a href="../../../../../../org/apache/hadoop/io/LongWritable.html" title="class in org.apache.hadoop.io">LongWritable</a>,<a href="../../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/NLineInputFormat.html#createRecordReader-org.apache.hadoop.mapreduce.InputSplit-org.apache.hadoop.mapreduce.TaskAttemptContext-">createRecordReader</a></span>(<a href="../../../../../../org/apache/hadoop/mapreduce/InputSplit.html" title="class in org.apache.hadoop.mapreduce">InputSplit</a> genericSplit, |
| <a href="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="interface in org.apache.hadoop.mapreduce">TaskAttemptContext</a> context)</code> |
| <div class="block">Create a record reader for a given split.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/NLineInputFormat.html#getNumLinesPerSplit-org.apache.hadoop.mapreduce.JobContext-">getNumLinesPerSplit</a></span>(<a href="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="interface in org.apache.hadoop.mapreduce">JobContext</a> job)</code> |
| <div class="block">Get the number of lines per split</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/hadoop/mapreduce/InputSplit.html" title="class in org.apache.hadoop.mapreduce">InputSplit</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/NLineInputFormat.html#getSplits-org.apache.hadoop.mapreduce.JobContext-">getSplits</a></span>(<a href="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="interface in org.apache.hadoop.mapreduce">JobContext</a> job)</code> |
| <div class="block">Logically splits the set of input files for the job, splits N lines |
| of the input as one split.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileSplit.html" title="class in org.apache.hadoop.mapreduce.lib.input">FileSplit</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/NLineInputFormat.html#getSplitsForFile-org.apache.hadoop.fs.FileStatus-org.apache.hadoop.conf.Configuration-int-">getSplitsForFile</a></span>(<a href="../../../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</a> status, |
| <a href="../../../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf, |
| int numLinesPerSplit)</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/NLineInputFormat.html#setNumLinesPerSplit-org.apache.hadoop.mapreduce.Job-int-">setNumLinesPerSplit</a></span>(<a href="../../../../../../org/apache/hadoop/mapreduce/Job.html" title="class in org.apache.hadoop.mapreduce">Job</a> job, |
| int numLines)</code> |
| <div class="block">Set the number of lines per split</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.hadoop.mapreduce.lib.input.FileInputFormat"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.hadoop.mapreduce.lib.input.<a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.input">FileInputFormat</a></h3> |
| <code><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#addInputPath-org.apache.hadoop.mapreduce.Job-org.apache.hadoop.fs.Path-">addInputPath</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#addInputPathRecursively-java.util.List-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.PathFilter-">addInputPathRecursively</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#addInputPaths-org.apache.hadoop.mapreduce.Job-java.lang.String-">addInputPaths</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#computeSplitSize-long-long-long-">computeSplitSize</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#getBlockIndex-org.apache.hadoop.fs.BlockLocation:A-long-">getBlockIndex</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#getFormatMinSplitSize--">getFormatMinSplitSize</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#getInputDirRecursive-org.apache.hadoop.mapreduce.JobContext-">getInputDirRecursive</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#getInputPathFilter-org.apache.hadoop.mapreduce.JobContext-">getInputPathFilter</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#getInputPaths-org.apache.hadoop.mapreduce.JobContext-">getInputPaths</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#getMaxSplitSize-org.apache.hadoop.mapreduce.JobContext-">getMaxSplitSize</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#getMinSplitSize-org.apache.hadoop.mapreduce.JobContext-">getMinSplitSize</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#isSplitable-org.apache.hadoop.mapreduce.JobContext-org.apache.hadoop.fs.Path-">isSplitable</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#listStatus-org.apache.hadoop.mapreduce.JobContext-">listStatus</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#makeSplit-org.apache.hadoop.fs.Path-long-long-java.lang.String:A-">makeSplit</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#makeSplit-org.apache.hadoop.fs.Path-long-long-java.lang.String:A-java.lang.String:A-">makeSplit</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#setInputDirRecursive-org.apache.hadoop.mapreduce.Job-boolean-">setInputDirRecursive</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#setInputPathFilter-org.apache.hadoop.mapreduce.Job-java.lang.Class-">setInputPathFilter</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#setInputPaths-org.apache.hadoop.mapreduce.Job-org.apache.hadoop.fs.Path...-">setInputPaths</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#setInputPaths-org.apache.hadoop.mapreduce.Job-java.lang.String-">setInputPaths</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#setMaxInputSplitSize-org.apache.hadoop.mapreduce.Job-long-">setMaxInputSplitSize</a>, <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#setMinInputSplitSize-org.apache.hadoop.mapreduce.Job-long-">setMinInputSplitSize</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="LINES_PER_MAP"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>LINES_PER_MAP</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> LINES_PER_MAP</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.mapreduce.lib.input.NLineInputFormat.LINES_PER_MAP">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="NLineInputFormat--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>NLineInputFormat</h4> |
| <pre>public NLineInputFormat()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="createRecordReader-org.apache.hadoop.mapreduce.InputSplit-org.apache.hadoop.mapreduce.TaskAttemptContext-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createRecordReader</h4> |
| <pre>public <a href="../../../../../../org/apache/hadoop/mapreduce/RecordReader.html" title="class in org.apache.hadoop.mapreduce">RecordReader</a><<a href="../../../../../../org/apache/hadoop/io/LongWritable.html" title="class in org.apache.hadoop.io">LongWritable</a>,<a href="../../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a>> createRecordReader(<a href="../../../../../../org/apache/hadoop/mapreduce/InputSplit.html" title="class in org.apache.hadoop.mapreduce">InputSplit</a> genericSplit, |
| <a href="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="interface in org.apache.hadoop.mapreduce">TaskAttemptContext</a> context) |
| throws <a href="https://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 class: <code><a href="../../../../../../org/apache/hadoop/mapreduce/InputFormat.html#createRecordReader-org.apache.hadoop.mapreduce.InputSplit-org.apache.hadoop.mapreduce.TaskAttemptContext-">InputFormat</a></code></span></div> |
| <div class="block">Create a record reader for a given split. The framework will call |
| <a href="../../../../../../org/apache/hadoop/mapreduce/RecordReader.html#initialize-org.apache.hadoop.mapreduce.InputSplit-org.apache.hadoop.mapreduce.TaskAttemptContext-"><code>RecordReader.initialize(InputSplit, TaskAttemptContext)</code></a> before |
| the split is used.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/hadoop/mapreduce/InputFormat.html#createRecordReader-org.apache.hadoop.mapreduce.InputSplit-org.apache.hadoop.mapreduce.TaskAttemptContext-">createRecordReader</a></code> in class <code><a href="../../../../../../org/apache/hadoop/mapreduce/InputFormat.html" title="class in org.apache.hadoop.mapreduce">InputFormat</a><<a href="../../../../../../org/apache/hadoop/io/LongWritable.html" title="class in org.apache.hadoop.io">LongWritable</a>,<a href="../../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>genericSplit</code> - the split to be read</dd> |
| <dd><code>context</code> - the information about the task</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new record reader</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://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="getSplits-org.apache.hadoop.mapreduce.JobContext-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSplits</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/hadoop/mapreduce/InputSplit.html" title="class in org.apache.hadoop.mapreduce">InputSplit</a>> getSplits(<a href="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="interface in org.apache.hadoop.mapreduce">JobContext</a> job) |
| throws <a href="https://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">Logically splits the set of input files for the job, splits N lines |
| of the input as one split.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#getSplits-org.apache.hadoop.mapreduce.JobContext-">getSplits</a></code> in class <code><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.input">FileInputFormat</a><<a href="../../../../../../org/apache/hadoop/io/LongWritable.html" title="class in org.apache.hadoop.io">LongWritable</a>,<a href="../../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>job</code> - the job context</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an array of <a href="../../../../../../org/apache/hadoop/mapreduce/InputSplit.html" title="class in org.apache.hadoop.mapreduce"><code>InputSplit</code></a>s for the job.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://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> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileInputFormat.html#getSplits-org.apache.hadoop.mapreduce.JobContext-"><code>FileInputFormat.getSplits(JobContext)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSplitsForFile-org.apache.hadoop.fs.FileStatus-org.apache.hadoop.conf.Configuration-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSplitsForFile</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileSplit.html" title="class in org.apache.hadoop.mapreduce.lib.input">FileSplit</a>> getSplitsForFile(<a href="../../../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</a> status, |
| <a href="../../../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf, |
| int numLinesPerSplit) |
| throws <a href="https://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="https://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="createFileSplit-org.apache.hadoop.fs.Path-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createFileSplit</h4> |
| <pre>protected static <a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/FileSplit.html" title="class in org.apache.hadoop.mapreduce.lib.input">FileSplit</a> createFileSplit(<a href="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</a> fileName, |
| long begin, |
| long length)</pre> |
| <div class="block">NLineInputFormat uses LineRecordReader, which always reads |
| (and consumes) at least one character out of its upper split |
| boundary. So to make sure that each mapper gets N lines, we |
| move back the upper split limits of each split |
| by one character here.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fileName</code> - Path of file</dd> |
| <dd><code>begin</code> - the position of the first byte in the file to process</dd> |
| <dd><code>length</code> - number of bytes in InputSplit</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>FileSplit</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setNumLinesPerSplit-org.apache.hadoop.mapreduce.Job-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setNumLinesPerSplit</h4> |
| <pre>public static void setNumLinesPerSplit(<a href="../../../../../../org/apache/hadoop/mapreduce/Job.html" title="class in org.apache.hadoop.mapreduce">Job</a> job, |
| int numLines)</pre> |
| <div class="block">Set the number of lines per split</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>job</code> - the job to modify</dd> |
| <dd><code>numLines</code> - the number of lines per split</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNumLinesPerSplit-org.apache.hadoop.mapreduce.JobContext-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getNumLinesPerSplit</h4> |
| <pre>public static int getNumLinesPerSplit(<a href="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="interface in org.apache.hadoop.mapreduce">JobContext</a> job)</pre> |
| <div class="block">Get the number of lines per split</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>job</code> - the job</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the number of lines per split</dd> |
| </dl> |
| </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/NLineInputFormat.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/hadoop/mapreduce/lib/input/MultipleInputs.html" title="class in org.apache.hadoop.mapreduce.lib.input"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/hadoop/mapreduce/lib/input/SequenceFileAsBinaryInputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.input"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/hadoop/mapreduce/lib/input/NLineInputFormat.html" target="_top">Frames</a></li> |
| <li><a href="NLineInputFormat.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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 © 2021 <a href="https://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |