You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by vh...@apache.org on 2026/08/05 17:30:49 UTC
(hudi) 19/40: refactor(examples): use SLF4J parameterized logging instead of string concatenation (#19187)
This is an automated email from the ASF dual-hosted git repository.
voonhous pushed a commit to branch release-1.2.1
in repository https://gitbox.apache.org/repos/asf/hudi.git
commit 6f8b046e137d96dcc262a07a788dd13a8e1a9d73
Author: voonhous <vo...@gmail.com>
AuthorDate: Sun Jul 5 04:37:30 2026 +0800
refactor(examples): use SLF4J parameterized logging instead of string concatenation (#19187)
(cherry picked from commit 51b57330a8e93c30b39a721e5da8aa9dec7619b3)
---
.../org/apache/hudi/examples/spark/HoodieWriteClientExample.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hudi-examples/hudi-examples-spark/src/main/java/org/apache/hudi/examples/spark/HoodieWriteClientExample.java b/hudi-examples/hudi-examples-spark/src/main/java/org/apache/hudi/examples/spark/HoodieWriteClientExample.java
index e4300af3c5ef..1f431563aa5f 100644
--- a/hudi-examples/hudi-examples-spark/src/main/java/org/apache/hudi/examples/spark/HoodieWriteClientExample.java
+++ b/hudi-examples/hudi-examples-spark/src/main/java/org/apache/hudi/examples/spark/HoodieWriteClientExample.java
@@ -101,7 +101,7 @@ public class HoodieWriteClientExample {
// inserts
String newCommitTime = client.startCommit();
- log.info("Starting commit " + newCommitTime);
+ log.info("Starting commit {}", newCommitTime);
List<HoodieRecord<HoodieAvroPayload>> records = dataGen.generateInserts(newCommitTime, 10);
List<HoodieRecord<HoodieAvroPayload>> recordsSoFar = new ArrayList<>(records);
@@ -110,7 +110,7 @@ public class HoodieWriteClientExample {
// updates
newCommitTime = client.startCommit();
- log.info("Starting commit " + newCommitTime);
+ log.info("Starting commit {}", newCommitTime);
List<HoodieRecord<HoodieAvroPayload>> toBeUpdated = dataGen.generateUpdates(newCommitTime, 2);
records.addAll(toBeUpdated);
recordsSoFar.addAll(toBeUpdated);
@@ -119,7 +119,7 @@ public class HoodieWriteClientExample {
// Delete
newCommitTime = client.startCommit();
- log.info("Starting commit " + newCommitTime);
+ log.info("Starting commit {}", newCommitTime);
// just delete half of the records
int numToDelete = recordsSoFar.size() / 2;
List<HoodieKey> toBeDeleted = recordsSoFar.stream().map(HoodieRecord::getKey).limit(numToDelete).collect(Collectors.toList());
@@ -128,7 +128,7 @@ public class HoodieWriteClientExample {
// Delete by partition
newCommitTime = client.startCommit(HoodieTimeline.REPLACE_COMMIT_ACTION);
- log.info("Starting commit " + newCommitTime);
+ log.info("Starting commit {}", newCommitTime);
// The partition where the data needs to be deleted
List<String> partitionList = toBeDeleted.stream().map(s -> s.getPartitionPath()).distinct().collect(Collectors.toList());
List<String> deleteList = recordsSoFar.stream().filter(f -> !partitionList.contains(f.getPartitionPath()))