热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.hadoop.io.compress.CompressionCodec.getDecompressorType()方法的使用及代码示例

本文整理了Java中org.apache.hadoop.io.compress.CompressionCodec.getDecompressorType()方法的一些代

本文整理了Java中org.apache.hadoop.io.compress.CompressionCodec.getDecompressorType()方法的一些代码示例,展示了CompressionCodec.getDecompressorType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CompressionCodec.getDecompressorType()方法的具体详情如下:
包路径:org.apache.hadoop.io.compress.CompressionCodec
类名称:CompressionCodec
方法名:getDecompressorType

CompressionCodec.getDecompressorType介绍

[英]Get the type of Decompressor needed by this CompressionCodec.
[中]获取此压缩编解码器所需的解压缩器类型。

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-common

/**
* Return the number of leased {@link Decompressor}s for this
* {@link CompressionCodec}
*/
public static int getLeasedDecompressorsCount(CompressionCodec codec) {
return (codec == null) ? 0 : getLeaseCount(decompressorCounts,
codec.getDecompressorType());
}
}

代码示例来源:origin: apache/hive

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec
* the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(DECOMPRESSOR_POOL, codec
.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor");
} else {
LOG.debug("Got recycled decompressor");
}
return decompressor;
}

代码示例来源:origin: apache/drill

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec
* the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(DECOMPRESSOR_POOL, codec
.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor");
} else {
LOG.debug("Got recycled decompressor");
}
return decompressor;
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(decompressorPool, codec.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor ["+codec.getDefaultExtension()+"]");
} else {
if(LOG.isDebugEnabled()) {
LOG.debug("Got recycled decompressor");
}
}
if (decompressor != null &&
!decompressor.getClass().isAnnotationPresent(DoNotPool.class)) {
updateLeaseCount(decompressorCounts, decompressor, 1);
}
return decompressor;
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

/**
* Return the number of leased {@link Decompressor}s for this
* {@link CompressionCodec}
*/
public static int getLeasedDecompressorsCount(CompressionCodec codec) {
return (codec == null) ? 0 : getLeaseCount(decompressorCounts,
codec.getDecompressorType());
}
}

代码示例来源:origin: io.hops/hadoop-common

/**
* Return the number of leased {@link Decompressor}s for this
* {@link CompressionCodec}
*/
public static int getLeasedDecompressorsCount(CompressionCodec codec) {
return (codec == null) ? 0 : getLeaseCount(decompressorCounts,
codec.getDecompressorType());
}
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
* Return the number of leased {@link Decompressor}s for this
* {@link CompressionCodec}
*/
public static int getLeasedDecompressorsCount(CompressionCodec codec) {
return (codec == null) ? 0 : getLeaseCount(decompressorCounts,
codec.getDecompressorType());
}
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

/**
* Return the number of leased {@link Decompressor}s for this
* {@link CompressionCodec}
*/
public static int getLeasedDecompressorsCount(CompressionCodec codec) {
return (codec == null) ? 0 : getLeaseCount(decompressorCounts,
codec.getDecompressorType());
}
}

代码示例来源:origin: com.facebook.presto.hadoop/hadoop-apache1

private static void loadAllCodecs()
{
Configuration cOnf= new Configuration();
CompressionCodecFactory factory = new CompressionCodecFactory(conf);
for (Class clazz : getCodecClasses(conf)) {
CompressionCodec codec = factory.getCodecByClassName(clazz.getName());
if (codec == null) {
throw new RuntimeException("failed to load codec: " + clazz.getName());
}
codec.getDecompressorType();
}
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

private static void loadAllCodecs()
{
Configuration cOnf= new Configuration();
CompressionCodecFactory factory = new CompressionCodecFactory(conf);
for (Class clazz : getCodecClasses(conf)) {
CompressionCodec codec = factory.getCodecByClassName(clazz.getName());
if (codec == null) {
throw new RuntimeException("failed to load codec: " + clazz.getName());
}
codec.getDecompressorType();
}
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(decompressorPool, codec.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor");
} else {
LOG.debug("Got recycled decompressor");
}
return decompressor;
}

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(decompressorPool, codec.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor");
} else {
LOG.debug("Got recycled decompressor");
}
return decompressor;
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec
* the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(DECOMPRESSOR_POOL, codec
.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor");
} else {
LOG.debug("Got recycled decompressor");
}
return decompressor;
}

代码示例来源:origin: apache/asterixdb

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec
* the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(DECOMPRESSOR_POOL, codec
.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor");
} else {
LOG.debug("Got recycled decompressor");
}
return decompressor;
}

代码示例来源:origin: apache/tajo

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec
* the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(DECOMPRESSOR_POOL, codec
.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor ["+codec.getDefaultExtension()+"]");
} else {
if(LOG.isDebugEnabled()) {
LOG.debug("Got recycled decompressor");
}
}
return decompressor;
}

代码示例来源:origin: org.apache.tajo/tajo-storage

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec
* the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(DECOMPRESSOR_POOL, codec
.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor ["+codec.getDefaultExtension()+"]");
} else {
if(LOG.isDebugEnabled()) {
LOG.debug("Got recycled decompressor");
}
}
return decompressor;
}

代码示例来源:origin: org.apache.tajo/tajo-storage-common

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec
* the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(DECOMPRESSOR_POOL, codec
.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor ["+codec.getDefaultExtension()+"]");
} else {
if(LOG.isDebugEnabled()) {
LOG.debug("Got recycled decompressor");
}
}
return decompressor;
}

代码示例来源:origin: io.hops/hadoop-common

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(decompressorPool, codec.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor ["+codec.getDefaultExtension()+"]");
} else {
if(LOG.isDebugEnabled()) {
LOG.debug("Got recycled decompressor");
}
}
updateLeaseCount(decompressorCounts, decompressor, 1);
return decompressor;
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

/**
* Get a {@link Decompressor} for the given {@link CompressionCodec} from the
* pool or a new one.
*
* @param codec the CompressionCodec for which to get the
* Decompressor
* @return Decompressor for the given
* CompressionCodec the pool or a new one
*/
public static Decompressor getDecompressor(CompressionCodec codec) {
Decompressor decompressor = borrow(decompressorPool, codec.getDecompressorType());
if (decompressor == null) {
decompressor = codec.createDecompressor();
LOG.info("Got brand-new decompressor ["+codec.getDefaultExtension()+"]");
} else {
if(LOG.isDebugEnabled()) {
LOG.debug("Got recycled decompressor");
}
}
updateLeaseCount(decompressorCounts, decompressor, 1);
return decompressor;
}

代码示例来源:origin: airlift/aircompressor

private static void loadAllCodecs()
{
Configuration cOnf= new Configuration();
CompressionCodecFactory factory = new CompressionCodecFactory(conf);
for (Class clazz : getCodecClasses(conf)) {
CompressionCodec codec = factory.getCodecByClassName(clazz.getName());
if (codec == null) {
throw new RuntimeException("failed to load codec: " + clazz.getName());
}
codec.getDecompressorType();
}
}

推荐阅读
author-avatar
手机用户2502896757
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有