[
https://issues.apache.org/jira/browse/HADOOP-18717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841314#comment-17841314
]
ASF GitHub Bot commented on HADOOP-18717:
-----------------------------------------
steveloughran commented on code in PR #6445:
URL: https://github.com/apache/hadoop/pull/6445#discussion_r1581316396
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/CodecPool.java:
##########
@@ -150,7 +150,9 @@ public static Compressor getCompressor(CompressionCodec
codec, Configuration con
Compressor compressor = borrow(compressorPool, codec.getCompressorType());
if (compressor == null) {
compressor = codec.createCompressor();
- LOG.info("Got brand-new compressor ["+codec.getDefaultExtension()+"]");
+ if(LOG.isDebugEnabled()) {
Review Comment:
actually we can move to full slf4j here, so
```
LOG.debug("Got brand-new compressor [{}]", codec.getDefaultExtension());
```
I've looked at the codecs and apart from one case, `PassthroughCodec`, this
is all a low cost invocation so no need to wrap. but that does log at info.
so there is a good argument for guarding the logging.
but: can you add a space between the `if` and the `(`
> Move CodecPool getCompressor/getDecompressor logs to DEBUG
> ----------------------------------------------------------
>
> Key: HADOOP-18717
> URL: https://issues.apache.org/jira/browse/HADOOP-18717
> Project: Hadoop Common
> Issue Type: Improvement
> Components: common
> Affects Versions: 3.3.6
> Reporter: Claire McGinty
> Priority: Trivial
> Labels: pull-request-available
>
> The "Got brand new compressor|decompressor" logs in CodecPool[0] can be quite
> noisy when reading thousands of blocks and aren't that illuminating for the
> end user. I'd like to propose moving them from log.info to log.debug if
> there's no objection.
>
> [0]
> https://github.com/apache/hadoop/blob/b737869e01fe3334b948a38fe3835e48873bf3a6/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/CodecPool.java#L149-L195
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]