Package org.apache.hadoop.io.simpleseekableformat

Examples of org.apache.hadoop.io.simpleseekableformat.DataSegmentReader$EmptyDataSegmentException


    ByteArrayInputStream dataSegmentInput =
      new ByteArrayInputStream(dataSegmentOutput.toByteArray());
    Configuration conf = new Configuration();
    HashMap<Text, Decompressor> decompressorCache = new HashMap<Text, Decompressor>();
    for (int s = 0; s < segments; s++) {
      DataSegmentReader reader = new DataSegmentReader(
          new DataInputStream(dataSegmentInput), conf, decompressorCache);
      newData[s] = IOUtils.toByteArray(reader.getInputStream());
    }

    // Compare data and newData
    for (int s = 0; s < segments; s++) {
      UtilsForTests.assertArrayEquals("Segment[" + s + "]", data[s].toByteArray(), newData[s]);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.io.simpleseekableformat.DataSegmentReader$EmptyDataSegmentException

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.