本文整理了Java中org.apache.hadoop.io.compress.CompressionCodec.getDecompressorType()
方法的一些代码示例,展示了CompressionCodec.getDecompressorType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CompressionCodec.getDecompressorType()
方法的具体详情如下:
包路径:org.apache.hadoop.io.compress.CompressionCodec
类名称: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 extends CompressionCodec> 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 extends CompressionCodec> 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 extends CompressionCodec> clazz : getCodecClasses(conf)) {
CompressionCodec codec = factory.getCodecByClassName(clazz.getName());
if (codec == null) {
throw new RuntimeException("failed to load codec: " + clazz.getName());
}
codec.getDecompressorType();
}
}