Package org.springframework.data.hadoop.store.split

Examples of org.springframework.data.hadoop.store.split.Splitter


    TextFileWriter writer = new TextFileWriter(getConfiguration(), testDefaultPath, null);
    TestUtils.writeData(writer, DATA09ARRAY, false);
    TestUtils.writeData(writer, DATA09ARRAY, false);
    TestUtils.writeData(writer, DATA09ARRAY, true);

    Splitter splitter = new StaticLengthSplitter(getConfiguration(), 110l);
    List<Split> inputSplits = splitter.getSplits(testDefaultPath);
    assertNotNull(inputSplits);
    assertThat(inputSplits.size(), is(3));

    TextFileReader reader1 = new TextFileReader(getConfiguration(), testDefaultPath, null, inputSplits.get(0), null);
    List<String> readData1 = TestUtils.readData(reader1);
View Full Code Here


    TextFileWriter writer = new TextFileWriter(getConfiguration(), testDefaultPath, Codecs.BZIP2.getCodecInfo());
    TestUtils.writeData(writer, DATA09ARRAY, false);
    TestUtils.writeData(writer, DATA09ARRAY, false);
    TestUtils.writeData(writer, DATA09ARRAY, true);

    Splitter splitter = new StaticLengthSplitter(getConfiguration(), 30l);
    List<Split> inputSplits = splitter.getSplits(testDefaultPath);
    assertNotNull(inputSplits);
    assertThat(inputSplits.size(), is(3));

    TextFileReader reader1 = new TextFileReader(getConfiguration(), testDefaultPath, Codecs.BZIP2.getCodecInfo(), inputSplits.get(0), null);
    List<String> readData1 = TestUtils.readData(reader1);
View Full Code Here

TOP

Related Classes of org.springframework.data.hadoop.store.split.Splitter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.