This is an automated email from the ASF dual-hosted git repository.

stevel pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.4 by this push:
     new 9d71e97e990 HDFS-17874. Followup: Fix java8 and a typo in the test 
case (#8238)
9d71e97e990 is described below

commit 9d71e97e990e045ee7a3b576700184abfa5a9c0f
Author: Steve Loughran <[email protected]>
AuthorDate: Sun Feb 8 18:23:42 2026 +0000

    HDFS-17874. Followup: Fix java8 and a typo in the test case (#8238)
    
    
    This is part of the branch-3.4 backport of #8196
---
 .../org/apache/hadoop/hdfs/server/diskbalancer/planner/NodePlan.java | 5 +++--
 .../apache/hadoop/hdfs/server/diskbalancer/planner/TestNodePlan.java | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/NodePlan.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/NodePlan.java
index 127456bd7e3..ab71f67c5bf 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/NodePlan.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/NodePlan.java
@@ -32,6 +32,7 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 import static 
org.apache.hadoop.hdfs.DFSConfigKeys.SUPPORTED_PACKAGES_CONFIG_NAME;
 
@@ -194,7 +195,7 @@ private static void checkNodes(JsonNode node) throws 
IOException {
         Map.Entry<String, JsonNode> entry = fieldsIterator.next();
         if ("@class".equals(entry.getKey())) {
           String textValue = entry.getValue().asText();
-          if (textValue != null && !textValue.isBlank() && 
!stepClassIsAllowed(textValue)) {
+          if (textValue != null && !textValue.isEmpty() && 
!stepClassIsAllowed(textValue)) {
             throw new IOException("Invalid @class value in NodePlan JSON: " + 
textValue);
           }
         }
@@ -249,6 +250,6 @@ private static Collection<String> getAllowedPackages() {
         .stream()
         .map(String::trim)
         .filter(s -> !s.isEmpty())
-        .toList();
+        .collect(Collectors.toList());
   }
 }
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/TestNodePlan.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/TestNodePlan.java
index efa732d8bf7..383c98fbc58 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/TestNodePlan.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/TestNodePlan.java
@@ -18,7 +18,7 @@
 
 import java.io.IOException;
 
-timport org.junit.Test;
+import org.junit.Test;
 import sample.SampleStep;
 
 import com.fasterxml.jackson.annotation.JsonProperty;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to