- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.getCompressionStrategy()
方法的一些代码示例,展示了ZlibFactory.getCompressionStrategy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZlibFactory.getCompressionStrategy()
方法的具体详情如下:
包路径:org.apache.hadoop.io.compress.zlib.ZlibFactory
类名称:ZlibFactory
方法名:getCompressionStrategy
暂无
代码示例来源:origin: org.apache.hadoop/hadoop-common
/**
* Creates a new compressor, taking settings from the configuration.
*/
public ZlibCompressor(Configuration conf) {
this(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
CompressionHeader.DEFAULT_HEADER,
DEFAULT_DIRECT_BUFFER_SIZE);
}
代码示例来源:origin: org.apache.hadoop/hadoop-common
public GzipZlibCompressor(Configuration conf) {
super(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
ZlibCompressor.CompressionHeader.GZIP_FORMAT,
64 * 1024);
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-common
/**
* 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");
}
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-common
/**
* Prepare the compressor to be used in a new stream with settings defined in
* the given Configuration. It will reset the compressor's compression level
* and compression strategy.
*
* @param conf Configuration storing new settings
*/
@Override
public void reinit(Configuration conf) {
reset();
if (conf == null) {
return;
}
end(stream);
level = ZlibFactory.getCompressionLevel(conf);
strategy = ZlibFactory.getCompressionStrategy(conf);
stream = init(level.compressionLevel(),
strategy.compressionStrategy(),
windowBits.windowBits());
if(LOG.isDebugEnabled()) {
LOG.debug("Reinit compressor with new compression configuration");
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
/**
* Creates a new compressor, taking settings from the configuration.
*/
public ZlibCompressor(Configuration conf) {
this(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
CompressionHeader.DEFAULT_HEADER,
DEFAULT_DIRECT_BUFFER_SIZE);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
public GzipZlibCompressor(Configuration conf) {
super(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
ZlibCompressor.CompressionHeader.GZIP_FORMAT,
64 * 1024);
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
public GzipZlibCompressor(Configuration conf) {
super(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
ZlibCompressor.CompressionHeader.GZIP_FORMAT,
64 * 1024);
}
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
public GzipZlibCompressor(Configuration conf) {
super(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
ZlibCompressor.CompressionHeader.GZIP_FORMAT,
64 * 1024);
}
}
代码示例来源:origin: io.hops/hadoop-common
public GzipZlibCompressor(Configuration conf) {
super(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
ZlibCompressor.CompressionHeader.GZIP_FORMAT,
64 * 1024);
}
}
代码示例来源:origin: io.hops/hadoop-common
/**
* Creates a new compressor, taking settings from the configuration.
*/
public ZlibCompressor(Configuration conf) {
this(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
CompressionHeader.DEFAULT_HEADER,
DEFAULT_DIRECT_BUFFER_SIZE);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
/**
* Creates a new compressor, taking settings from the configuration.
*/
public ZlibCompressor(Configuration conf) {
this(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
CompressionHeader.DEFAULT_HEADER,
DEFAULT_DIRECT_BUFFER_SIZE);
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Creates a new compressor, taking settings from the configuration.
*/
public ZlibCompressor(Configuration conf) {
this(ZlibFactory.getCompressionLevel(conf),
ZlibFactory.getCompressionStrategy(conf),
CompressionHeader.DEFAULT_HEADER,
DEFAULT_DIRECT_BUFFER_SIZE);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
/**
* 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");
}
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
/**
* Prepare the compressor to be used in a new stream with settings defined in
* the given Configuration. It will reset the compressor's compression level
* and compression strategy.
*
* @param conf Configuration storing new settings
*/
@Override
public void reinit(Configuration conf) {
reset();
if (conf == null) {
return;
}
end(stream);
level = ZlibFactory.getCompressionLevel(conf);
strategy = ZlibFactory.getCompressionStrategy(conf);
stream = init(level.compressionLevel(),
strategy.compressionStrategy(),
windowBits.windowBits());
if(LOG.isDebugEnabled()) {
LOG.debug("Reinit compressor with new compression configuration");
}
}
代码示例来源:origin: io.hops/hadoop-common
/**
* Prepare the compressor to be used in a new stream with settings defined in
* the given Configuration. It will reset the compressor's compression level
* and compression strategy.
*
* @param conf Configuration storing new settings
*/
@Override
public void reinit(Configuration conf) {
reset();
if (conf == null) {
return;
}
end(stream);
level = ZlibFactory.getCompressionLevel(conf);
strategy = ZlibFactory.getCompressionStrategy(conf);
stream = init(level.compressionLevel(),
strategy.compressionStrategy(),
windowBits.windowBits());
if(LOG.isDebugEnabled()) {
LOG.debug("Reinit compressor with new compression configuration");
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
/**
* Prepare the compressor to be used in a new stream with settings defined in
* the given Configuration. It will reset the compressor's compression level
* and compression strategy.
*
* @param conf Configuration storing new settings
*/
@Override
public void reinit(Configuration conf) {
reset();
if (conf == null) {
return;
}
end(stream);
level = ZlibFactory.getCompressionLevel(conf);
strategy = ZlibFactory.getCompressionStrategy(conf);
stream = init(level.compressionLevel(),
strategy.compressionStrategy(),
windowBits.windowBits());
if(LOG.isDebugEnabled()) {
LOG.debug("Reinit compressor with new compression configuration");
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
@Test
public void testZlibFactory() {
Configuration cfg = new Configuration();
assertTrue("testZlibFactory compression level error !!!",
CompressionLevel.DEFAULT_COMPRESSION == ZlibFactory
.getCompressionLevel(cfg));
assertTrue("testZlibFactory compression strategy error !!!",
CompressionStrategy.DEFAULT_STRATEGY == ZlibFactory
.getCompressionStrategy(cfg));
ZlibFactory.setCompressionLevel(cfg, CompressionLevel.BEST_COMPRESSION);
assertTrue("testZlibFactory compression strategy error !!!",
CompressionLevel.BEST_COMPRESSION == ZlibFactory
.getCompressionLevel(cfg));
ZlibFactory.setCompressionStrategy(cfg, CompressionStrategy.FILTERED);
assertTrue("testZlibFactory compression strategy error !!!",
CompressionStrategy.FILTERED == ZlibFactory.getCompressionStrategy(cfg));
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
@Test
public void testZlibFactory() {
Configuration cfg = new Configuration();
assertTrue("testZlibFactory compression level error !!!",
CompressionLevel.DEFAULT_COMPRESSION == ZlibFactory
.getCompressionLevel(cfg));
assertTrue("testZlibFactory compression strategy error !!!",
CompressionStrategy.DEFAULT_STRATEGY == ZlibFactory
.getCompressionStrategy(cfg));
ZlibFactory.setCompressionLevel(cfg, CompressionLevel.BEST_COMPRESSION);
assertTrue("testZlibFactory compression strategy error !!!",
CompressionLevel.BEST_COMPRESSION == ZlibFactory
.getCompressionLevel(cfg));
ZlibFactory.setCompressionStrategy(cfg, CompressionStrategy.FILTERED);
assertTrue("testZlibFactory compression strategy error !!!",
CompressionStrategy.FILTERED == ZlibFactory.getCompressionStrategy(cfg));
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Prepare the compressor to be used in a new stream with settings defined in
* the given Configuration. It will reset the compressor's compression level
* and compression strategy.
*
* @param conf Configuration storing new settings
*/
@Override
public void reinit(Configuration conf) {
reset();
if (conf == null) {
return;
}
end(stream);
level = ZlibFactory.getCompressionLevel(conf);
strategy = ZlibFactory.getCompressionStrategy(conf);
stream = init(level.compressionLevel(),
strategy.compressionStrategy(),
windowBits.windowBits());
if(LOG.isDebugEnabled()) {
LOG.debug("Reinit compressor with new compression configuration");
}
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* 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");
}
}
}
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.setCompressionLevel()方法的一些代码示例,展示了ZlibFacto
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.getZlibDecompressorType()方法的一些代码示例,展示了ZlibF
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.getZlibDirectDecompressor()方法的一些代码示例,展示了Zli
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.getZlibCompressorType()方法的一些代码示例,展示了ZlibFac
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.setCompressionStrategy()方法的一些代码示例,展示了ZlibFa
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.getCompressionStrategy()方法的一些代码示例,展示了ZlibFa
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.getZlibDecompressor()方法的一些代码示例,展示了ZlibFacto
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.getLibraryName()方法的一些代码示例,展示了ZlibFactory.ge
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.getZlibCompressor()方法的一些代码示例,展示了ZlibFactory
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.getCompressionLevel()方法的一些代码示例,展示了ZlibFacto
本文整理了Java中org.apache.hadoop.io.compress.zlib.ZlibFactory.isNativeZlibLoaded()方法的一些代码示例,展示了ZlibFactor
我是一名优秀的程序员,十分优秀!