hudi-agent commented on code in PR #19155:
URL: https://github.com/apache/hudi/pull/19155#discussion_r3519664769


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/versioning/v1/TimelineArchiverV1.java:
##########
@@ -463,7 +463,7 @@ private boolean deleteArchivedInstants(List<HoodieInstant> 
archivedInstants, Hoo
   public void archive(HoodieEngineContext context, List<HoodieInstant> 
instants) throws HoodieCommitException {
     try {
       Schema wrapperSchema = HoodieArchivedMetaEntry.getClassSchema();
-      log.info("Wrapper schema " + wrapperSchema.toString());
+      log.info("Wrapper schema {}", wrapperSchema.toString());

Review Comment:
   🤖 nit: now that you're using parameterized logging, the explicit 
`.toString()` call is redundant — SLF4J will call it lazily only if the log 
level is enabled. Could you drop it here (and the same pattern in 
`LSMTimelineWriter.java` and `HoodieCompactionPlanGenerator.java`)? 
`log.info("Wrapper schema {}", wrapperSchema)` is enough.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/plan/generators/HoodieCompactionPlanGenerator.java:
##########
@@ -47,7 +47,7 @@ public HoodieCompactionPlanGenerator(HoodieTable table, 
HoodieEngineContext engi
                                        BaseTableServicePlanActionExecutor 
executor) {
     super(table, engineContext, writeConfig, executor);
     this.compactionStrategy = writeConfig.getCompactionStrategy();
-    log.info("Compaction Strategy used is: " + compactionStrategy.toString());
+    log.info("Compaction Strategy used is: {}", compactionStrategy.toString());

Review Comment:
   🤖 nit: `compactionStrategy.toString()` is redundant here too — 
`log.info("Compaction Strategy used is: {}", compactionStrategy)` is all you 
need.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/versioning/v2/LSMTimelineWriter.java:
##########
@@ -136,8 +137,9 @@ public void write(
       throw new HoodieIOException("Failed to check archiving file before 
write: " + filePath, ioe);
     }
     try (HoodieFileWriter writer = openWriter(filePath)) {
-      HoodieSchema schema = 
HoodieSchema.fromAvroSchema(HoodieLSMTimelineInstant.getClassSchema());
-      log.info("Writing schema {}", schema);
+      Schema wrapperSchema = HoodieLSMTimelineInstant.getClassSchema();
+      log.info("Writing schema {}", wrapperSchema.toString());

Review Comment:
   🤖 nit: same as above — `wrapperSchema.toString()` is redundant with `{}`; 
`log.info("Writing schema {}", wrapperSchema)` would be sufficient.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to