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

yiguolei pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.2 by this push:
     new f00f171d468 branch-4.2: [fix](fe) Fix FE compile failure in 
HdfsStorageVault after #70418 (#70945)
f00f171d468 is described below

commit f00f171d46846903a8ba8d49a25caef2ebb020b4
Author: Chenyang Sun <[email protected]>
AuthorDate: Tue Nov 24 18:11:03 2026 +0800

    branch-4.2: [fix](fe) Fix FE compile failure in HdfsStorageVault after 
#70418 (#70945)
    
    Related PR: #70418, #70320
    
    Problem Summary:
    
    The auto-pick PR #70418 (`6f8c62a428c`, cherry-picked from master
    #70320) broke FE compilation and FE UT compilation on `branch-4.2`:
    
    1. `HdfsStorageVault.java:194` uses `Locale.ROOT`, but
    `java.util.Locale` was not imported on `branch-4.2` (master already
    imported it via an earlier commit).
    2. `HdfsStorageVaultTest.java` uses `Locale.ROOT` and Java 9
    `List.of(...)` without importing `java.util.Locale` or `java.util.List`,
    and `branch-4.2` compiles FE against Java 8 APIs where `List.of(...)`
    does not exist.
    
    This PR adds the missing `java.util.Locale` imports in
    `HdfsStorageVault.java` and `HdfsStorageVaultTest.java`, and replaces
    `List.of(...)` with `Collections.singletonList(...)` in
    `HdfsStorageVaultTest.java`.
---
 .../src/main/java/org/apache/doris/catalog/HdfsStorageVault.java      | 1 +
 .../java/org/apache/doris/cloud/catalog/HdfsStorageVaultTest.java     | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/catalog/HdfsStorageVault.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/HdfsStorageVault.java
index a96c3614194..f8f3d99aaa5 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/HdfsStorageVault.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/HdfsStorageVault.java
@@ -39,6 +39,7 @@ import org.apache.logging.log4j.Logger;
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/cloud/catalog/HdfsStorageVaultTest.java
 
b/fe/fe-core/src/test/java/org/apache/doris/cloud/catalog/HdfsStorageVaultTest.java
index 9b226f05575..e7376b47832 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/cloud/catalog/HdfsStorageVaultTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/cloud/catalog/HdfsStorageVaultTest.java
@@ -44,7 +44,9 @@ import org.junit.jupiter.api.Assumptions;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 
+import java.util.Collections;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -75,7 +77,7 @@ public class HdfsStorageVaultTest {
 
         Assertions.assertEquals("hdfs/[email protected]", 
buildConf.getHdfsKerberosPrincipal());
         Assertions.assertEquals("/etc/krb5.keytab", 
buildConf.getHdfsKerberosKeytab());
-        
Assertions.assertEquals(List.of(Cloud.HdfsBuildConf.HdfsConfKVPair.newBuilder()
+        
Assertions.assertEquals(Collections.singletonList(Cloud.HdfsBuildConf.HdfsConfKVPair.newBuilder()
                 .setKey(authKey)
                 .setValue("kerberos").build()), buildConf.getHdfsConfsList());
     }


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

Reply via email to