You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/01/11 09:31:59 UTC

[GitHub] [incubator-hudi] wangxianghu opened a new pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J

wangxianghu opened a new pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J
URL: https://github.com/apache/incubator-hudi/pull/1210
 
 
   ##  What is the purpose of the pull request
   
   *Redo hudi-hadoop-mr log statements using SLF4J*
   
   ## Brief change log
   
   *Redo hudi-hadoop-mr log statements using SLF4J*
   
   ## Verify this pull request
   
   This pull request should be covered by existing tests.
   
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] sev7e0 commented on a change in pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J

Posted by GitBox <gi...@apache.org>.
sev7e0 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_r365631955
 
 

 ##########
 File path: hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieROTablePathFilter.java
 ##########
 @@ -144,30 +144,32 @@ public boolean accept(Path path) {
           if (!hoodiePathCache.containsKey(folder.toString())) {
             hoodiePathCache.put(folder.toString(), new HashSet<>());
           }
-          LOG.info("Based on hoodie metadata from base path: " + baseDir.toString() + ", caching " + latestFiles.size()
-              + " files under " + folder);
+          LOG.info("Based on hoodie metadata from base path: {}, caching {} files under {}",
+                  baseDir,
+                  latestFiles.size(),
+                  folder);
 
 Review comment:
   :star2: Two lines is better, attention to auto indent.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] lamber-ken commented on a change in pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] wangxianghu commented on a change in pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J

Posted by GitBox <gi...@apache.org>.
wangxianghu 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_r365633056
 
 

 ##########
 File path: hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieROTablePathFilter.java
 ##########
 @@ -144,30 +144,32 @@ public boolean accept(Path path) {
           if (!hoodiePathCache.containsKey(folder.toString())) {
             hoodiePathCache.put(folder.toString(), new HashSet<>());
           }
-          LOG.info("Based on hoodie metadata from base path: " + baseDir.toString() + ", caching " + latestFiles.size()
-              + " files under " + folder);
+          LOG.info("Based on hoodie metadata from base path: {}, caching {} files under {}",
+                  baseDir,
+                  latestFiles.size(),
+                  folder);
 
 Review comment:
   fixed

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] leesf merged pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J

Posted by GitBox <gi...@apache.org>.
leesf merged pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J
URL: https://github.com/apache/incubator-hudi/pull/1210
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] sev7e0 commented on a change in pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J

Posted by GitBox <gi...@apache.org>.
sev7e0 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_r365631918
 
 

 ##########
 File path: hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/HoodieParquetRealtimeInputFormat.java
 ##########
 @@ -226,9 +226,9 @@ private static Configuration cleanProjectionColumnIds(Configuration conf) {
     // actual heavy lifting of reading the parquet files happen.
     if (job.get(HOODIE_READ_COLUMNS_PROP) == null) {
       synchronized (job) {
-        LOG.info(
-            "Before adding Hoodie columns, Projections :" + job.get(ColumnProjectionUtils.READ_COLUMN_NAMES_CONF_STR)
-                + ", Ids :" + job.get(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR));
+        LOG.info("Before adding Hoodie columns, Projections : {}, Ids : {}",
+                job.get(ColumnProjectionUtils.READ_COLUMN_NAMES_CONF_STR),
+                job.get(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR));
 
 Review comment:
   I think the auto indent was brought by `idea`. drop it.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] lamber-ken commented on a change in pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J

Posted by GitBox <gi...@apache.org>.
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_r365572725
 
 

 ##########
 File path: hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/HoodieParquetRealtimeInputFormat.java
 ##########
 @@ -210,7 +210,7 @@ private static Configuration cleanProjectionColumnIds(Configuration conf) {
     if (!columnIds.isEmpty() && columnIds.charAt(0) == ',') {
       conf.set(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR, columnIds.substring(1));
       if (LOG.isDebugEnabled()) {
-        LOG.debug("The projection Ids: {" + columnIds + "} start with ','. First comma is removed");
+        LOG.debug("The projection Ids: {{}} start with ','. First comma is removed", columnIds);
 
 Review comment:
   Hi @wangxianghu, may is `[` `]` is better, example:
   ```
   LOG.debug("The projection Ids: [{}] start with ','. First comma is removed", columnIds);
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] wangxianghu commented on a change in pull request #1210: [HUDI-458] Redo hudi-hadoop-mr log statements using SLF4J

Posted by GitBox <gi...@apache.org>.
wangxianghu 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_r365629885
 
 

 ##########
 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:
   Hi @lamber-ken  It is better, I'll fix it

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services