lw309637554 commented on a change in pull request #2136:
URL: https://github.com/apache/hudi/pull/2136#discussion_r527747000



##########
File path: 
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/SparkRDDWriteClient.java
##########
@@ -88,7 +91,18 @@ public static SparkConf registerClasses(SparkConf conf) {
 
   @Override
   protected HoodieIndex<T, JavaRDD<HoodieRecord<T>>, JavaRDD<HoodieKey>, 
JavaRDD<WriteStatus>> createIndex(HoodieWriteConfig writeConfig) {
-    return SparkHoodieIndex.createIndex(config);
+    String persistIndexType = null;
+    try {
+      persistIndexType = 
this.createMetaClient(true).getTableConfig().getProperties().getProperty(HoodieIndexConfig.INDEX_TYPE_PROP);

Review comment:
       can not get a general metaClient in caller  AbstractHoodieWriteClient. 
otherwise we can move the createMetaClient to AbstractHoodieWriteClient , then 
introduct metaclient to createIndex, and modify the abstract method from  
createIndex(HoodieWriteConfig writeConfig)  to createIndex(HoodieWriteConfig 
writeConfig, HoodieTableMetaClient metaClient).
   @vinothchandar  what do you think about?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to