/** * reinit the compressor with the given configuration. It will reset the * compressor's compression level and compression strategy. Different from * <tt>ZlibCompressor</tt>, <tt>BuiltInZlibDeflater</tt> only support three * kind of compression strategy: FILTERED, HUFFMAN_ONLY and DEFAULT_STRATEGY. * It will use DEFAULT_STRATEGY as default if the configured compression * strategy is not supported. */ @Override public void reinit(Configuration conf) { reset(); if (conf == null) { return; } setLevel(ZlibFactory.getCompressionLevel(conf).compressionLevel()); final ZlibCompressor.CompressionStrategy strategy = ZlibFactory.getCompressionStrategy(conf); try { setStrategy(strategy.compressionStrategy()); } catch (IllegalArgumentException ill) { LOG.warn(strategy + " not supported by BuiltInZlibDeflater."); setStrategy(DEFAULT_STRATEGY); } if(LOG.isDebugEnabled()) { LOG.debug("Reinit compressor with new compression configuration"); } } }
/** * reinit the compressor with the given configuration. It will reset the * compressor's compression level and compression strategy. Different from * <tt>ZlibCompressor</tt>, <tt>BuiltInZlibDeflater</tt> only support three * kind of compression strategy: FILTERED, HUFFMAN_ONLY and DEFAULT_STRATEGY. * It will use DEFAULT_STRATEGY as default if the configured compression * strategy is not supported. */ @Override public void reinit(Configuration conf) { reset(); if (conf == null) { return; } setLevel(ZlibFactory.getCompressionLevel(conf).compressionLevel()); final ZlibCompressor.CompressionStrategy strategy = ZlibFactory.getCompressionStrategy(conf); try { setStrategy(strategy.compressionStrategy()); } catch (IllegalArgumentException ill) { LOG.warn(strategy + " not supported by BuiltInZlibDeflater."); setStrategy(DEFAULT_STRATEGY); } if(LOG.isDebugEnabled()) { LOG.debug("Reinit compressor with new compression configuration"); } } }
/** * reinit the compressor with the given configuration. It will reset the * compressor's compression level and compression strategy. Different from * <tt>ZlibCompressor</tt>, <tt>BuiltInZlibDeflater</tt> only support three * kind of compression strategy: FILTERED, HUFFMAN_ONLY and DEFAULT_STRATEGY. * It will use DEFAULT_STRATEGY as default if the configured compression * strategy is not supported. */ @Override public void reinit(Configuration conf) { reset(); if (conf == null) { return; } setLevel(ZlibFactory.getCompressionLevel(conf).compressionLevel()); final ZlibCompressor.CompressionStrategy strategy = ZlibFactory.getCompressionStrategy(conf); try { setStrategy(strategy.compressionStrategy()); } catch (IllegalArgumentException ill) { LOG.warn(strategy + " not supported by BuiltInZlibDeflater."); setStrategy(DEFAULT_STRATEGY); } if(LOG.isDebugEnabled()) { LOG.debug("Reinit compressor with new compression configuration"); } } }
/** * reinit the compressor with the given configuration. It will reset the * compressor's compression level and compression strategy. Different from * <tt>ZlibCompressor</tt>, <tt>BuiltInZlibDeflater</tt> only support three * kind of compression strategy: FILTERED, HUFFMAN_ONLY and DEFAULT_STRATEGY. * It will use DEFAULT_STRATEGY as default if the configured compression * strategy is not supported. */ @Override public void reinit(Configuration conf) { reset(); if (conf == null) { return; } setLevel(ZlibFactory.getCompressionLevel(conf).compressionLevel()); final ZlibCompressor.CompressionStrategy strategy = ZlibFactory.getCompressionStrategy(conf); try { setStrategy(strategy.compressionStrategy()); } catch (IllegalArgumentException ill) { LOG.warn(strategy + " not supported by BuiltInZlibDeflater."); setStrategy(DEFAULT_STRATEGY); } if(LOG.isDebugEnabled()) { LOG.debug("Reinit compressor with new compression configuration"); } } }
/** * reinit the compressor with the given configuration. It will reset the * compressor's compression level and compression strategy. Different from * <tt>ZlibCompressor</tt>, <tt>BuiltInZlibDeflater</tt> only support three * kind of compression strategy: FILTERED, HUFFMAN_ONLY and DEFAULT_STRATEGY. * It will use DEFAULT_STRATEGY as default if the configured compression * strategy is not supported. */ @Override public void reinit(Configuration conf) { reset(); if (conf == null) { return; } setLevel(ZlibFactory.getCompressionLevel(conf).compressionLevel()); final ZlibCompressor.CompressionStrategy strategy = ZlibFactory.getCompressionStrategy(conf); try { setStrategy(strategy.compressionStrategy()); } catch (IllegalArgumentException ill) { LOG.warn(strategy + " not supported by BuiltInZlibDeflater."); setStrategy(DEFAULT_STRATEGY); } if(LOG.isDebugEnabled()) { LOG.debug("Reinit compressor with new compression configuration"); } } }