This is an automated email from the ASF dual-hosted git repository.

suvasude pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git


The following commit(s) were added to refs/heads/master by this push:
     new 3863601  [GOBBLIN-1276] Emit additional logs from Gobblin task 
execution for improved debuggability[]
3863601 is described below

commit 3863601eec025054ff05f827344ab040cfa032ad
Author: suvasude <[email protected]>
AuthorDate: Sun Oct 4 14:21:27 2020 -0700

    [GOBBLIN-1276] Emit additional logs from Gobblin task execution for 
improved debuggability[]
    
    Closes #3116 from sv2000/taskLoggingImprovement
---
 .../src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java | 1 +
 .../src/main/java/org/apache/gobblin/runtime/fork/Fork.java        | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java
 
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java
index 48bd152..f2e236b 100644
--- 
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java
+++ 
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java
@@ -169,6 +169,7 @@ public class GobblinHelixTask implements Task {
       this.taskMetrics.helixTaskTotalCompleted.incrementAndGet();
       return new TaskResult(TaskResult.Status.COMPLETED, "");
     } catch (InterruptedException ie) {
+      log.error("Interrupting task {}", this.taskId);
       Thread.currentThread().interrupt();
       log.error("Actual task {} interrupted.", this.taskId);
       this.taskMetrics.helixTaskTotalFailed.incrementAndGet();
diff --git 
a/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/fork/Fork.java 
b/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/fork/Fork.java
index 706d8f2..05b40e9 100644
--- a/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/fork/Fork.java
+++ b/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/fork/Fork.java
@@ -365,17 +365,16 @@ public class Fork<S, D> implements Closeable, FinalState, 
RecordStreamConsumer<S
   /**
    * Commit data of this {@link Fork}.
    *
-   * @throws Exception if there is anything wrong committing the data
    */
-  public boolean commit()
-      throws Exception {
+  public boolean commit() {
     try {
       if (checkDataQuality(this.convertedSchema)) {
         // Commit data if all quality checkers pass. Again, not to catch the 
exception
         // it may throw so the exception gets propagated to the caller of this 
method.
-        this.logger.debug(String.format("Committing data for fork %d of task 
%s", this.index, this.taskId));
+        this.logger.info(String.format("Committing data for fork %d of task 
%s", this.index, this.taskId));
         commitData();
         verifyAndSetForkState(ForkState.SUCCEEDED, ForkState.COMMITTED);
+        this.logger.info(String.format("Fork %d of task %s successfully 
committed data", this.index, this.taskId));
         return true;
       }
       this.logger.error(String.format("Fork %d of task %s failed to pass 
quality checking", this.index, this.taskId));

Reply via email to