public DirectDecompressor borrowDirectDecompressor(){ Preconditions.checkArgument(supportDirectDecompressor, "Tried to get a direct Decompressor from a non-direct codec."); try { return (DirectDecompressor) directDecompressorPool.borrowObject(); } catch (Exception e) { throw new DrillRuntimeException(e); } }
public void returnDecompressor(DirectDecompressor decompressor) { returnToPool(decompressor, directDePools); }
@Override public DirectDecompressor createDirectDecompressor() { return new BloscDecompressor(conf); }
/** * Return the appropriate implementation of the zlib direct decompressor. * * @param conf configuration * @return the appropriate implementation of the zlib decompressor. */ public static DirectDecompressor getZlibDirectDecompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibDecompressor.ZlibDirectDecompressor() : null; }