danny0405 commented on code in PR #13106:
URL: https://github.com/apache/hudi/pull/13106#discussion_r2038586739


##########
hudi-common/src/main/java/org/apache/hudi/common/model/PartitionBucketIndexHashingConfig.java:
##########
@@ -198,21 +198,44 @@ public static Option<PartitionBucketIndexHashingConfig> 
loadHashingConfig(Hoodie
    * Get Latest committed hashing config instant to load.
    * If instant is empty, then return latest hashing config instant
    */
-  public static Option<String> 
getHashingConfigInstantToLoad(HoodieTableMetaClient metaClient, Option<String> 
instant) {
+  public static Option<StoragePath> 
getHashingConfigToLoad(HoodieTableMetaClient metaClient, Option<String> 
instant) {
     try {
+      String basePath = metaClient.getBasePath().toString();
       List<String> allCommittedHashingConfig = 
getCommittedHashingConfigInstants(metaClient);
       if (instant.isPresent()) {
-        Option<String> res = 
getHashingConfigInstantToLoadBeforeOrOn(allCommittedHashingConfig, 
instant.get());
+        Option<StoragePath> res = 
getHashingConfigInstantToLoadBeforeOrOn(allCommittedHashingConfig, 
instant.get()).map(i -> {
+          return getHashingConfigPath(basePath, i);
+        });
         // fall back to look up archived hashing config instant before return 
empty
-        return res.isPresent() ? res : 
getHashingConfigInstantToLoadBeforeOrOn(getArchiveHashingConfigInstants(metaClient),
 instant.get());
+        return res.isPresent() ? res : 
getHashingConfigInstantToLoadBeforeOrOn(getArchiveHashingConfigInstants(metaClient),
 instant.get()).map(i -> {
+          return getArchiveHashingConfigPath(basePath, i);
+        });
       } else {
-        return 
Option.of(allCommittedHashingConfig.get(allCommittedHashingConfig.size() - 1));
+        return 
Option.of(allCommittedHashingConfig.get(allCommittedHashingConfig.size() - 
1)).map(i -> {
+          return getHashingConfigPath(basePath, i);
+        });
       }
     } catch (Exception e) {
       throw new HoodieException("Failed to get hashing config instant to 
load.", e);
     }
   }
 
+  public static List<PartitionBucketIndexHashingConfig> 
getAllHashingConfig(HoodieTableMetaClient metaClient) throws IOException {
+    String basePath = metaClient.getBasePath().toString();
+    List<StoragePath> allHashingConfig = 
getCommittedHashingConfigInstants(metaClient).stream().map(instant -> {

Review Comment:
   allHashingConfig -> allHashingConfigPaths



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