Example usage for org.apache.hadoop.mapreduce.lib.input NLineInputFormat LINES_PER_MAP

List of usage examples for org.apache.hadoop.mapreduce.lib.input NLineInputFormat LINES_PER_MAP

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce.lib.input NLineInputFormat LINES_PER_MAP.

Prototype

String LINES_PER_MAP

To view the source code for org.apache.hadoop.mapreduce.lib.input NLineInputFormat LINES_PER_MAP.

Click Source Link

Usage

From source file:org.apache.crunch.io.text.NLineFileSource.java

License:Apache License

private static FormatBundle getBundle(int linesPerTask) {
    FormatBundle bundle = FormatBundle.forInput(NLineInputFormat.class);
    bundle.set(NLineInputFormat.LINES_PER_MAP, String.valueOf(linesPerTask));
    bundle.set(RuntimeParameters.DISABLE_COMBINE_FILE, "true");
    return bundle;
}

From source file:org.apache.jena.hadoop.rdf.io.input.AbstractNodeTupleInputFormatTests.java

License:Apache License

/**
 * Tests for input splitting//from  w w  w.j  a va 2s .  c o m
 * 
 * @throws IOException
 * @throws InterruptedException
 */
@Test
public final void split_input_02() throws IOException, InterruptedException {
    Assume.assumeTrue(this.canSplitInputs());

    Configuration config = this.prepareConfiguration();
    config.setBoolean(RdfIOConstants.INPUT_IGNORE_BAD_TUPLES, false);
    config.setLong(NLineInputFormat.LINES_PER_MAP, 10);
    Assert.assertEquals(Integer.MAX_VALUE, config.getInt(HadoopIOConstants.MAX_LINE_LENGTH, Integer.MAX_VALUE));
    this.testSplitInputs(config, new File[] { small }, 10, SMALL_SIZE);
}

From source file:org.apache.jena.hadoop.rdf.io.input.AbstractNodeTupleInputFormatTests.java

License:Apache License

/**
 * Tests for input splitting//from  www.  j av a2s . co  m
 * 
 * @throws IOException
 * @throws InterruptedException
 */
@Test
public final void split_input_03() throws IOException, InterruptedException {
    Assume.assumeTrue(this.canSplitInputs());

    Configuration config = this.prepareConfiguration();
    config.setBoolean(RdfIOConstants.INPUT_IGNORE_BAD_TUPLES, false);
    config.setLong(NLineInputFormat.LINES_PER_MAP, 100);
    Assert.assertEquals(Integer.MAX_VALUE, config.getInt(HadoopIOConstants.MAX_LINE_LENGTH, Integer.MAX_VALUE));
    this.testSplitInputs(config, new File[] { large }, 100, LARGE_SIZE);
}