org.apache.hadoop.io.compress.DoNotPool Java Examples
The following examples show how to use
org.apache.hadoop.io.compress.DoNotPool.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CodecPool.java From tajo with Apache License 2.0 | 5 votes |
/** * Return the {@link Compressor} to the pool. * * @param compressor * the <code>Compressor</code> to be returned to the pool */ public static void returnCompressor(Compressor compressor) { if (compressor == null) { return; } // if the compressor can't be reused, don't pool it. if (compressor.getClass().isAnnotationPresent(DoNotPool.class)) { return; } compressor.reset(); payback(COMPRESSOR_POOL, compressor); }
Example #2
Source File: CodecPool.java From tajo with Apache License 2.0 | 5 votes |
/** * Return the {@link Decompressor} to the pool. * * @param decompressor * the <code>Decompressor</code> to be returned to the pool */ public static void returnDecompressor(Decompressor decompressor) { if (decompressor == null) { return; } // if the decompressor can't be reused, don't pool it. if (decompressor.getClass().isAnnotationPresent(DoNotPool.class)) { return; } decompressor.reset(); payback(DECOMPRESSOR_POOL, decompressor); }
Example #3
Source File: Compression.java From hbase with Apache License 2.0 | 5 votes |
public void returnDecompressor(Decompressor decompressor) { if (decompressor != null) { if (LOG.isTraceEnabled()) LOG.trace("Returning decompressor " + decompressor + " to pool."); CodecPool.returnDecompressor(decompressor); if (decompressor.getClass().isAnnotationPresent(DoNotPool.class)) { if (LOG.isTraceEnabled()) LOG.trace("Ending decompressor " + decompressor); decompressor.end(); } } }
Example #4
Source File: CodecPool.java From incubator-tajo with Apache License 2.0 | 5 votes |
/** * Return the {@link Compressor} to the pool. * * @param compressor * the <code>Compressor</code> to be returned to the pool */ public static void returnCompressor(Compressor compressor) { if (compressor == null) { return; } // if the compressor can't be reused, don't pool it. if (compressor.getClass().isAnnotationPresent(DoNotPool.class)) { return; } compressor.reset(); payback(COMPRESSOR_POOL, compressor); }
Example #5
Source File: CodecPool.java From incubator-tajo with Apache License 2.0 | 5 votes |
/** * Return the {@link Decompressor} to the pool. * * @param decompressor * the <code>Decompressor</code> to be returned to the pool */ public static void returnDecompressor(Decompressor decompressor) { if (decompressor == null) { return; } // if the decompressor can't be reused, don't pool it. if (decompressor.getClass().isAnnotationPresent(DoNotPool.class)) { return; } decompressor.reset(); payback(DECOMPRESSOR_POOL, decompressor); }