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


##########
hudi-common/src/main/java/org/apache/hudi/common/model/PartitionBucketIndexHashingConfig.java:
##########
@@ -221,20 +244,19 @@ private static Option<String> 
getHashingConfigInstantToLoadBeforeOrOn(List<Strin
   }
 
   public static PartitionBucketIndexHashingConfig 
loadingLatestHashingConfig(HoodieTableMetaClient metaClient) {
-    Option<String> instantToLoad = getHashingConfigInstantToLoad(metaClient, 
Option.empty());
-    ValidationUtils.checkArgument(instantToLoad.isPresent(), "Can not load 
latest hashing config " + instantToLoad);
-    Option<PartitionBucketIndexHashingConfig> latestHashingConfig = 
loadHashingConfig(metaClient.getStorage(), 
getHashingConfigPath(metaClient.getBasePath().toString(), instantToLoad.get()));
-    ValidationUtils.checkArgument(latestHashingConfig.isPresent(), "Can not 
load latest hashing config " + instantToLoad);
+    Option<StoragePath> hashingConfigToLoad = 
getHashingConfigToLoad(metaClient, Option.empty());

Review Comment:
   hashingConfigPathToLoad



##########
hudi-common/src/main/java/org/apache/hudi/common/model/PartitionBucketIndexHashingConfig.java:
##########
@@ -221,20 +244,19 @@ private static Option<String> 
getHashingConfigInstantToLoadBeforeOrOn(List<Strin
   }
 
   public static PartitionBucketIndexHashingConfig 
loadingLatestHashingConfig(HoodieTableMetaClient metaClient) {
-    Option<String> instantToLoad = getHashingConfigInstantToLoad(metaClient, 
Option.empty());
-    ValidationUtils.checkArgument(instantToLoad.isPresent(), "Can not load 
latest hashing config " + instantToLoad);
-    Option<PartitionBucketIndexHashingConfig> latestHashingConfig = 
loadHashingConfig(metaClient.getStorage(), 
getHashingConfigPath(metaClient.getBasePath().toString(), instantToLoad.get()));
-    ValidationUtils.checkArgument(latestHashingConfig.isPresent(), "Can not 
load latest hashing config " + instantToLoad);
+    Option<StoragePath> hashingConfigToLoad = 
getHashingConfigToLoad(metaClient, Option.empty());
+    ValidationUtils.checkArgument(hashingConfigToLoad.isPresent(), "Can not 
load latest hashing config " + hashingConfigToLoad);
+    Option<PartitionBucketIndexHashingConfig> latestHashingConfig = 
loadHashingConfig(metaClient.getStorage(), hashingConfigToLoad.get());
+    ValidationUtils.checkArgument(latestHashingConfig.isPresent(), "Can not 
load latest hashing config " + hashingConfigToLoad);
 
     return latestHashingConfig.get();
   }
 
   public static Option<PartitionBucketIndexHashingConfig> 
loadingLatestHashingConfigBeforeOrOn(HoodieTableMetaClient metaClient, String 
instant) {
-    Option<String> hashingConfigInstantToLoad = 
getHashingConfigInstantToLoad(metaClient, Option.of(instant));
-    if (hashingConfigInstantToLoad.isPresent()) {
-      Option<PartitionBucketIndexHashingConfig> latestHashingConfig = 
loadHashingConfig(metaClient.getStorage(),
-          getHashingConfigPath(metaClient.getBasePath().toString(), 
hashingConfigInstantToLoad.get()));
-      ValidationUtils.checkArgument(latestHashingConfig.isPresent(), "Can not 
load hashing config " + hashingConfigInstantToLoad + " based on " + instant);
+    Option<StoragePath> hashingConfigToLoad = 
getHashingConfigToLoad(metaClient, Option.of(instant));

Review Comment:
   hashingConfigPathToLoad



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