lamber-ken commented on a change in pull request #1210: [HUDI-458] Redo
hudi-hadoop-mr log statements using SLF4J
URL: https://github.com/apache/incubator-hudi/pull/1210#discussion_r365573198
##########
File path:
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieHiveUtil.java
##########
@@ -43,20 +43,20 @@ public static Integer readMaxCommits(JobContext job,
String tableName) {
if (maxCommits == MAX_COMMIT_ALL) {
maxCommits = Integer.MAX_VALUE;
}
- LOG.info("Read max commits - " + maxCommits);
+ LOG.info("Read max commits - {}", maxCommits);
return maxCommits;
}
public static String readStartCommitTime(JobContext job, String tableName) {
String startCommitTimestampName =
String.format(HOODIE_START_COMMIT_PATTERN, tableName);
- LOG.info("Read start commit time - " +
job.getConfiguration().get(startCommitTimestampName));
+ LOG.info("Read start commit time - {}",
job.getConfiguration().get(startCommitTimestampName));
return job.getConfiguration().get(startCommitTimestampName);
}
public static String readMode(JobContext job, String tableName) {
String modePropertyName = String.format(HOODIE_CONSUME_MODE_PATTERN,
tableName);
String mode = job.getConfiguration().get(modePropertyName,
DEFAULT_SCAN_MODE);
- LOG.info(modePropertyName + ": " + mode);
+ LOG.info("{} : {}", modePropertyName, mode);
Review comment:
😃 May be bellow is better:
```
LOG.info("Hoodie consume mode pattern is : {}, mode is : {}",
modePropertyName, mode);
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services