nsivabalan commented on code in PR #13229:
URL: https://github.com/apache/hudi/pull/13229#discussion_r2103609181


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/BaseCommitActionExecutor.java:
##########
@@ -97,9 +96,15 @@ public BaseCommitActionExecutor(HoodieEngineContext context, 
HoodieWriteConfig c
     this.operationType = operationType;
     this.extraMetadata = extraMetadata;
     this.taskContextSupplier = context.getTaskContextSupplier();
-    // TODO : Remove this once we refactor and move out autoCommit method from 
here, since the TxnManager is held in {@link BaseHoodieWriteClient}.
-    this.txnManagerOption = config.shouldAutoCommit()
-        ? Option.of(new TransactionManager(config, table.getStorage())) : 
Option.empty();
+    this.txnManagerOption = Option.empty();
+    initializeTransactionSupportingCast();
+    if (!table.getStorageLayout().writeOperationSupported(operationType)) {
+      throw new UnsupportedOperationException("Executor " + 
this.getClass().getSimpleName()
+          + " is not compatible with table layout " + 
table.getStorageLayout().getClass().getSimpleName());
+    }
+  }
+
+  private void initializeTransactionSupportingCast() {

Review Comment:
   we need to re-use those for SparkAutocommitActionExecutor flows and hence 
this change. 



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