public RBlockState(Algorithm compressionAlgo, FSDataInputStream fsin, BlockRegion region, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.region = region; this.decompressor = compressionAlgo.getDecompressor(); try { this.in = compressAlgo .createDecompressionStream(new BoundedRangeFileInputStream( fsin, this.region.getOffset(), this.region .getCompressedSize()), decompressor, TFile .getFSInputBufferSize(conf)); } catch (IOException e) { compressAlgo.returnDecompressor(decompressor); throw e; } }
@Override public int read() throws IOException { int ret = read(oneByte); if (ret == 1) return oneByte[0] & 0xff; return -1; }
public RBlockState(Algorithm compressionAlgo, FSDataInputStream fsin, BlockRegion region, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.region = region; this.decompressor = compressionAlgo.getDecompressor(); try { this.in = compressAlgo .createDecompressionStream(new BoundedRangeFileInputStream( fsin, this.region.getOffset(), this.region .getCompressedSize()), decompressor, TFile .getFSInputBufferSize(conf)); } catch (IOException e) { compressAlgo.returnDecompressor(decompressor); throw e; } }
@Override public int read(byte[] b) throws IOException { return read(b, 0, b.length); }
public RBlockState(Algorithm compressionAlgo, FSDataInputStream fsin, BlockRegion region, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.region = region; this.decompressor = compressionAlgo.getDecompressor(); try { this.in = compressAlgo .createDecompressionStream(new BoundedRangeFileInputStream( fsin, this.region.getOffset(), this.region .getCompressedSize()), decompressor, TFile .getFSInputBufferSize(conf)); } catch (IOException e) { compressAlgo.returnDecompressor(decompressor); throw e; } }
@Override public int read() throws IOException { int ret = read(oneByte); if (ret == 1) return oneByte[0] & 0xff; return -1; }
public RBlockState(Algorithm compressionAlgo, FSDataInputStream fsin, BlockRegion region, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.region = region; this.decompressor = compressionAlgo.getDecompressor(); try { this.in = compressAlgo .createDecompressionStream(new BoundedRangeFileInputStream( fsin, this.region.getOffset(), this.region .getCompressedSize()), decompressor, TFile .getFSInputBufferSize(conf)); } catch (IOException e) { compressAlgo.returnDecompressor(decompressor); throw e; } }
@Override public int read() throws IOException { int ret = read(oneByte); if (ret == 1) return oneByte[0] & 0xff; return -1; }
public RBlockState(Algorithm compressionAlgo, FSDataInputStream fsin, BlockRegion region, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.region = region; this.decompressor = compressionAlgo.getDecompressor(); try { this.in = compressAlgo .createDecompressionStream(new BoundedRangeFileInputStream( fsin, this.region.getOffset(), this.region .getCompressedSize()), decompressor, TFile .getFSInputBufferSize(conf)); } catch (IOException e) { compressAlgo.returnDecompressor(decompressor); throw e; } }
@Override public int read() throws IOException { int ret = read(oneByte); if (ret == 1) return oneByte[0] & 0xff; return -1; }
public RBlockState(Algorithm compressionAlgo, FSDataInputStream fsin, BlockRegion region, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.region = region; this.decompressor = compressionAlgo.getDecompressor(); try { this.in = compressAlgo .createDecompressionStream(new BoundedRangeFileInputStream( fsin, this.region.getOffset(), this.region .getCompressedSize()), decompressor, TFile .getFSInputBufferSize(conf)); } catch (IOException e) { compressAlgo.returnDecompressor(decompressor); throw e; } }
@Override public int read() throws IOException { int ret = read(oneByte); if (ret == 1) return oneByte[0] & 0xff; return -1; }
try { in = compressName.createDecompressionStream( new BoundedRangeFileInputStream(fsin, candidate.getStartIndex(), candidate.getFileCompressedSize()),
@Override public int read() throws IOException { int ret = read(oneByte); if (ret == 1) return oneByte[0] & 0xff; return -1; }
public RBlockState(Algorithm compressionAlgo, FSDataInputStream fsin, BlockRegion region, Configuration conf, Reader r) throws IOException { this.compressAlgo = compressionAlgo; Decompressor decompressor = compressionAlgo.getDecompressor(); this.region = region; try { InputStream in = compressAlgo.createDecompressionStream(new BoundedRangeFileInputStream(fsin, region.getOffset(), region.getCompressedSize()), decompressor, DTFile.getFSInputBufferSize(conf)); int l = 1; r.baos.reset(); byte[] buf = new byte[DTFile.getFSInputBufferSize(conf)]; while (l >= 0) { l = in.read(buf); if (l > 0) { r.baos.write(buf, 0, l); } } // keep decompressed data into cache byte[] blockData = r.baos.toByteArray(); rbain = new ReusableByteArrayInputStream(blockData); } catch (IOException e) { compressAlgo.returnDecompressor(decompressor); throw e; } }
@Override public int read(byte[] b) throws IOException { return read(b, 0, b.length); }
try { in = compressName.createDecompressionStream( new BoundedRangeFileInputStream(fsin, candidate.getStartIndex(), candidate.getFileCompressedSize()), decompressor, LogAggregationIndexedFileController.getFSInputBufferSize(conf));
@Override public int read(byte[] b) throws IOException { return read(b, 0, b.length); }
@Override public int read(byte[] b) throws IOException { return read(b, 0, b.length); }
@Override public int read(byte[] b) throws IOException { return read(b, 0, b.length); }