virajjasani commented on a change in pull request #1913:
URL: https://github.com/apache/hbase/pull/1913#discussion_r441750599
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/BoundedRecoveredHFilesOutputSink.java
##########
@@ -99,12 +102,13 @@ public void append(RegionEntryBuffer buffer) throws
IOException {
}
}
- // The key point is create a new writer for each column family, write
edits then close writer.
+ // Create a new hfile writer for each column family, write edits then
close writer.
String regionName = Bytes.toString(buffer.encodedRegionName);
for (Map.Entry<String, CellSet> cellsEntry : familyCells.entrySet()) {
String familyName = cellsEntry.getKey();
StoreFileWriter writer = createRecoveredHFileWriter(buffer.tableName,
regionName,
familySeqIds.get(familyName), familyName, isMetaTable);
+ LOG.trace("Created {}", writer.getPath());
Review comment:
You are right, I just looked into one of the implementors of slf4j
(Log4jLoggerAdapter) and it already covers `isTraceEnabled` check:
```
public void trace(String format, Object arg) {
if (isTraceEnabled()) {
FormattingTuple ft = MessageFormatter.format(format, arg);
logger.log(FQCN, traceCapable ? Level.TRACE : Level.DEBUG,
ft.getMessage(), ft.getThrowable());
}
}
```
We are following explicit guarding for the cases of Trace and Debug level
log at multiple places, all are redundant checks since library already does it
for us.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]