leesf commented on a change in pull request #2096:
URL: https://github.com/apache/hudi/pull/2096#discussion_r493515328



##########
File path: 
hudi-client/src/main/java/org/apache/hudi/client/HoodieWriteClient.java
##########
@@ -190,15 +190,27 @@ protected void rollBackInflightBootstrap() {
     table.validateUpsertSchema();
     setOperationType(WriteOperationType.UPSERT);
     this.asyncCleanerService = 
AsyncCleanerService.startAsyncCleaningIfEnabled(this, instantTime);
-    HoodieWriteMetadata result = table.upsert(jsc, instantTime, records);
+    HoodieWriteMetadata result = table.upsert(jsc, instantTime, records, null);
+    if (result.getIndexLookupDuration().isPresent()) {
+      metrics.updateIndexMetrics(LOOKUP_STR, 
result.getIndexLookupDuration().get().toMillis());
+    }
+    return postWrite(result, instantTime, table);
+  }
+
+  public JavaRDD<WriteStatus> upsert(JavaRDD<HoodieRecord<T>> records, final 
String instantTime, String schema) {
+    HoodieTable<T> table = getTableAndInitCtx(WriteOperationType.UPSERT, 
instantTime);
+    table.validateUpsertSchema();
+    setOperationType(WriteOperationType.UPSERT);
+    this.asyncCleanerService = 
AsyncCleanerService.startAsyncCleaningIfEnabled(this, instantTime);
+    HoodieWriteMetadata result = table.upsert(jsc, instantTime, records, 
schema);
     if (result.getIndexLookupDuration().isPresent()) {
       metrics.updateIndexMetrics(LOOKUP_STR, 
result.getIndexLookupDuration().get().toMillis());
     }
     return postWrite(result, instantTime, table);
   }
 
   /**
-   * Upserts the given prepared records into the Hoodie table, at the supplied 
instantTime.
+   * Upserts the given prepared records into the Hoodie 
table,/TestHoodieClientOnCopyOnWriteStorage at the supplied instantTime.

Review comment:
       ditto




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