/** * Finishing up the current block. */ public void finish() throws IOException { try { if (out != null) { out.flush(); out = null; } } finally { compressAlgo.returnCompressor(compressor); compressor = null; } } }
/** * @param compressionAlgo * The compression algorithm to be used to for compression. * @throws IOException */ public WBlockState(Algorithm compressionAlgo, FSDataOutputStream fsOut, BytesWritable fsOutputBuffer, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.fsOut = fsOut; this.posStart = fsOut.getPos(); fsOutputBuffer.setCapacity(TFile.getFSOutputBufferSize(conf)); this.fsBufferedOutput = new SimpleBufferedOutputStream(this.fsOut, fsOutputBuffer.getBytes()); this.compressor = compressAlgo.getCompressor(); try { this.out = compressionAlgo.createCompressionStream(fsBufferedOutput, compressor, 0); } catch (IOException e) { compressAlgo.returnCompressor(compressor); throw e; } }
void finish() throws IOException { try { if (out != null) { out.flush(); out = null; } } finally { compressAlgo.returnCompressor(compressor); compressor = null; } } }
/** * @param compressionAlgo * The compression algorithm to be used to for compression. * @throws IOException */ public WBlockState(Algorithm compressionAlgo, FSDataOutputStream fsOut, BytesWritable fsOutputBuffer, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.fsOut = fsOut; this.posStart = fsOut.getPos(); fsOutputBuffer.setCapacity(TFile.getFSOutputBufferSize(conf)); this.fsBufferedOutput = new SimpleBufferedOutputStream(this.fsOut, fsOutputBuffer.getBytes()); this.compressor = compressAlgo.getCompressor(); try { this.out = compressionAlgo.createCompressionStream(fsBufferedOutput, compressor, 0); } catch (IOException e) { compressAlgo.returnCompressor(compressor); throw e; } }
/** * @param compressionAlgo * The compression algorithm to be used to for compression. * @throws IOException */ public WBlockState(Algorithm compressionAlgo, FSDataOutputStream fsOut, BytesWritable fsOutputBuffer, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.fsOut = fsOut; this.posStart = fsOut.getPos(); fsOutputBuffer.setCapacity(DTFile.getFSOutputBufferSize(conf)); this.fsBufferedOutput = new SimpleBufferedOutputStream(this.fsOut, fsOutputBuffer.getBytes()); this.compressor = compressAlgo.getCompressor(); try { this.out = compressionAlgo.createCompressionStream(fsBufferedOutput, compressor, 0); } catch (IOException e) { compressAlgo.returnCompressor(compressor); throw e; } }
/** * @param compressionAlgo * The compression algorithm to be used to for compression. * @throws IOException */ public WBlockState(Algorithm compressionAlgo, FSDataOutputStream fsOut, BytesWritable fsOutputBuffer, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.fsOut = fsOut; this.posStart = fsOut.getPos(); fsOutputBuffer.setCapacity(TFile.getFSOutputBufferSize(conf)); this.fsBufferedOutput = new SimpleBufferedOutputStream(this.fsOut, fsOutputBuffer.get()); this.compressor = compressAlgo.getCompressor(); try { this.out = compressionAlgo.createCompressionStream(fsBufferedOutput, compressor, 0); } catch (IOException e) { compressAlgo.returnCompressor(compressor); throw e; } }
/** * @param compressionAlgo * The compression algorithm to be used to for compression. * @throws IOException */ public WBlockState(Algorithm compressionAlgo, FSDataOutputStream fsOut, BytesWritable fsOutputBuffer, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.fsOut = fsOut; this.posStart = fsOut.getPos(); fsOutputBuffer.setCapacity(TFile.getFSOutputBufferSize(conf)); this.fsBufferedOutput = new SimpleBufferedOutputStream(this.fsOut, fsOutputBuffer.getBytes()); this.compressor = compressAlgo.getCompressor(); try { this.out = compressionAlgo.createCompressionStream(fsBufferedOutput, compressor, 0); } catch (IOException e) { compressAlgo.returnCompressor(compressor); throw e; } }
/** * @param compressionAlgo * The compression algorithm to be used to for compression. * @throws IOException */ public WBlockState(Algorithm compressionAlgo, FSDataOutputStream fsOut, BytesWritable fsOutputBuffer, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.fsOut = fsOut; this.posStart = fsOut.getPos(); fsOutputBuffer.setCapacity(TFile.getFSOutputBufferSize(conf)); this.fsBufferedOutput = new SimpleBufferedOutputStream(this.fsOut, fsOutputBuffer.getBytes()); this.compressor = compressAlgo.getCompressor(); try { this.out = compressionAlgo.createCompressionStream(fsBufferedOutput, compressor, 0); } catch (IOException e) { compressAlgo.returnCompressor(compressor); throw e; } }
IndexedFileOutputStreamState(Algorithm compressionName, FSDataOutputStream fsOut, Configuration conf, long offset) throws IOException { this.compressAlgo = compressionName; this.fsOut = fsOut; this.offset = offset; this.posStart = fsOut.getPos(); BytesWritable fsOutputBuffer = new BytesWritable(); fsOutputBuffer.setCapacity(LogAggregationIndexedFileController .getFSOutputBufferSize(conf)); this.fsBufferedOutput = new SimpleBufferedOutputStream(this.fsOut, fsOutputBuffer.getBytes()); this.compressor = compressAlgo.getCompressor(); try { this.out = compressAlgo.createCompressionStream( fsBufferedOutput, compressor, 0); } catch (IOException e) { LOG.warn(e.getMessage()); compressAlgo.returnCompressor(compressor); throw e; } }
/** * @param compressionAlgo * The compression algorithm to be used to for compression. * @throws IOException */ public WBlockState(Algorithm compressionAlgo, FSDataOutputStream fsOut, BytesWritable fsOutputBuffer, Configuration conf) throws IOException { this.compressAlgo = compressionAlgo; this.fsOut = fsOut; this.posStart = fsOut.getPos(); fsOutputBuffer.setCapacity(TFile.getFSOutputBufferSize(conf)); this.fsBufferedOutput = new SimpleBufferedOutputStream(this.fsOut, fsOutputBuffer.getBytes()); this.compressor = compressAlgo.getCompressor(); try { this.out = compressionAlgo.createCompressionStream(fsBufferedOutput, compressor, 0); } catch (IOException e) { compressAlgo.returnCompressor(compressor); throw e; } }
/** * Finishing up the current block. */ public void finish() throws IOException { try { if (out != null) { out.flush(); out = null; } } finally { compressAlgo.returnCompressor(compressor); compressor = null; } } }
/** * Finishing up the current block. */ public void finish() throws IOException { try { if (out != null) { out.flush(); out = null; } } finally { compressAlgo.returnCompressor(compressor); compressor = null; } } }
/** * Finishing up the current block. */ public void finish() throws IOException { try { if (out != null) { out.flush(); out = null; } } finally { compressAlgo.returnCompressor(compressor); compressor = null; } } }
/** * Finishing up the current block. */ public void finish() throws IOException { try { if (out != null) { out.flush(); out = null; } } finally { compressAlgo.returnCompressor(compressor); compressor = null; } } }
/** * Finishing up the current block. */ public void finish() throws IOException { try { if (out != null) { out.flush(); out = null; } } finally { compressAlgo.returnCompressor(compressor); compressor = null; } } }
/** * Finishing up the current block. */ public void finish() throws IOException { try { if (out != null) { out.flush(); out = null; } } finally { compressAlgo.returnCompressor(compressor); compressor = null; } } }