bvaradar commented on a change in pull request #2048:
URL: https://github.com/apache/hudi/pull/2048#discussion_r495700438
##########
File path:
hudi-client/src/main/java/org/apache/hudi/client/HoodieWriteClient.java
##########
@@ -586,24 +602,39 @@ public String startCommit() {
* @param instantTime Instant time to be generated
*/
public void startCommitWithTime(String instantTime) {
+ HoodieTableMetaClient metaClient = createMetaClient(true);
+ startCommitWithTime(instantTime, metaClient.getCommitActionType(),
metaClient);
+ }
+
+ /**
+ * Completes a new commit time for a write operation (insert/update/delete)
with specified action.
+ */
+ public void startCommitWithTime(String instantTime, String actionType) {
+ HoodieTableMetaClient metaClient = createMetaClient(true);
+ startCommitWithTime(instantTime, actionType, metaClient);
+ }
+
+ /**
+ * Completes a new commit time for a write operation (insert/update/delete)
with specified action.
+ */
+ private void startCommitWithTime(String instantTime, String actionType,
HoodieTableMetaClient metaClient) {
// NOTE : Need to ensure that rollback is done before a new commit is
started
if (rollbackPending) {
// Only rollback inflight commit/delta-commits. Do not touch compaction
commits
rollbackPendingCommits();
}
- startCommit(instantTime);
+ startCommit(instantTime, actionType, metaClient);
}
- private void startCommit(String instantTime) {
- LOG.info("Generate a new instant time " + instantTime);
- HoodieTableMetaClient metaClient = createMetaClient(true);
+ private void startCommit(String instantTime, String actionType,
HoodieTableMetaClient metaClient) {
Review comment:
Lets leave it for now If needed, we can refactor later.
----------------------------------------------------------------
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]