Examples of ZlibCodec


Examples of com.facebook.hive.orc.compression.ZlibCodec

  public void testNoOverflow() throws Exception {
    ByteBuffer in = ByteBuffer.allocate(10);
    ByteBuffer out = ByteBuffer.allocate(10);
    in.put(new byte[]{1,2,3,4,5,6,7,10});
    in.flip();
    CompressionCodec codec = new ZlibCodec();
    assertEquals(false, codec.compress(in, out, null));
  }
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec

  @Test
  public void testCorrupt() throws Exception {
    ByteBuffer buf = ByteBuffer.allocate(1000);
    buf.put(new byte[]{127,-128,0,99,98,-1});
    buf.flip();
    CompressionCodec codec = new ZlibCodec();
    ByteBuffer out = ByteBuffer.allocate(1000);
    try {
      codec.decompress(buf, out);
      fail();
    } catch (IOException ioe) {
      // EXPECTED
    }
  }
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec

    runSeekTest(null);
  }

  @Test
  public void testCompressedSeek() throws Exception {
    runSeekTest(new ZlibCodec());
  }
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec

  static CompressionCodec createCodec(CompressionKind kind, Configuration conf) {
    switch (kind) {
      case NONE:
        return null;
      case ZLIB:
        return new ZlibCodec(conf);
      case SNAPPY:
        return new SnappyCodec();
      case LZO:
        try {
          Class<? extends CompressionCodec> lzo =
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec

  }

  @Test
  public void testCompressedSeek() throws Exception {
    ReaderWriterProfiler.setProfilerOptions(null);
    runSeekTest(new ZlibCodec());
  }
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec

  @Test
  public void testCompressedSeekReadAllAvailable() throws Exception {
    // Prepare an output stream
    ReaderWriterProfiler.setProfilerOptions(null);
    OutputCollector collect = new OutputCollector();
    CompressionCodec codec = new ZlibCodec();
    OutStream out = new OutStream("test", 300, codec, collect, new MemoryEstimate());
    RowIndex.Builder rowIndex = OrcProto.RowIndex.newBuilder();
    RowIndexEntry.Builder rowIndexEntry = OrcProto.RowIndexEntry.newBuilder();
    WriterImpl.RowIndexPositionRecorder rowIndexPosition =
        new RowIndexPositionRecorder(rowIndexEntry);
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec

  @Test
  public void testCompressed() throws Exception {
    ReaderWriterProfiler.setProfilerOptions(null);
    OutputCollector collect = new OutputCollector();
    CompressionCodec codec = new ZlibCodec();
    OutStream out = new OutStream("test", 300, codec, collect, new MemoryEstimate());
    RowIndex.Builder rowIndex = OrcProto.RowIndex.newBuilder();
    RowIndexEntry.Builder rowIndexEntry = OrcProto.RowIndexEntry.newBuilder();
    WriterImpl.RowIndexPositionRecorder rowIndexPosition = new RowIndexPositionRecorder(rowIndexEntry);
    for(int i=0; i < 1024; ++i) {
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec

  @Test
  public void testCorruptStream() throws Exception {
    ReaderWriterProfiler.setProfilerOptions(null);
    OutputCollector collect = new OutputCollector();
    CompressionCodec codec = new ZlibCodec();
    OutStream out = new OutStream("test", 500, codec, collect, new MemoryEstimate());
    for(int i=0; i < 1024; ++i) {
      out.write(i);
    }
    out.flush();
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec

    runSeekTest(null);
  }

  @Test
  public void testCompressedSeek() throws Exception {
    runSeekTest(new ZlibCodec());
  }
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec

  }

  @Test
  public void testCompressedSeek() throws Exception {
    ReaderWriterProfiler.setProfilerOptions(null);
    runSeekTest(new ZlibCodec());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.