jonvex commented on code in PR #8666:
URL: https://github.com/apache/hudi/pull/8666#discussion_r1194322685


##########
hudi-common/src/test/java/org/apache/hudi/common/testutils/HoodieTestUtils.java:
##########
@@ -71,13 +71,21 @@ public static HoodieTableMetaClient init(String basePath, 
HoodieTableType tableT
     return init(getDefaultHadoopConf(), basePath, tableType, properties);
   }
 
-  public static HoodieTableMetaClient init(String basePath, HoodieTableType 
tableType, String bootstrapBasePath, boolean bootstrapIndexEnable) throws 
IOException {
+  public static HoodieTableMetaClient init(String basePath, HoodieTableType 
tableType, String bootstrapBasePath, boolean bootstrapIndexEnable, String 
keyGenerator) throws IOException {
     Properties props = new Properties();
     props.setProperty(HoodieTableConfig.BOOTSTRAP_BASE_PATH.key(), 
bootstrapBasePath);
     props.put(HoodieTableConfig.BOOTSTRAP_INDEX_ENABLE.key(), 
bootstrapIndexEnable);
+    if (keyGenerator != null) {
+      props.put("hoodie.datasource.write.keygenerator.class", keyGenerator);
+      props.put("hoodie.datasource.write.partitionpath.field", "datestr");
+    }

Review Comment:
   1. I needed to do this because https://github.com/apache/hudi/pull/6016 sets 
the partitionpath incorrectly. I made the change this way so that it doesn't 
affect other tests. 
   2. This is in hoodie common and writeconfigs are in hoodie client common so 
we can't add that dependency. And again, I wouldn't need to do this in the 
first place if that other pr didn't modify the test utils to set configs



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