maheshk114 commented on a change in pull request #949: HIVE-22990 Add file
based ack for replication
URL: https://github.com/apache/hive/pull/949#discussion_r392090433
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java
##########
@@ -97,19 +98,40 @@ public StageType getType() {
@Override
public int execute() {
- Task<?> rootTask = work.getRootTask();
- if (rootTask != null) {
- rootTask.setChildTasks(null);
- }
- work.setRootTask(this);
- this.parentTasks = null;
- if (work.isIncrementalLoad()) {
- return executeIncrementalLoad();
- } else {
- return executeBootStrapLoad();
+ try {
+ Task<?> rootTask = work.getRootTask();
+ if (rootTask != null) {
+ rootTask.setChildTasks(null);
+ }
+ work.setRootTask(this);
+ this.parentTasks = null;
+ int status = 0;
+ if (work.isIncrementalLoad()) {
+ status = executeIncrementalLoad();
+ //All repl load tasks are executed and status is 0, write the load ack
+ if (status == 0 && !work.incrementalLoadTasksBuilder().hasMoreWork()) {
+ writeLoadCompleteAck(work.dumpDirectory);
+ }
+ } else {
+ status = executeBootStrapLoad();
+ //All repl load tasks are executed and status is 0, write the load ack
+ if (status == 0 && !work.hasBootstrapLoadTasks()) {
Review comment:
This can be common code ..
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]