You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gobblin.apache.org by hu...@apache.org on 2018/01/19 04:41:39 UTC

incubator-gobblin git commit: Log job child process exit status

Repository: incubator-gobblin
Updated Branches:
  refs/heads/master d63141a03 -> bbf2c6ab6


Log job child process exit status

Also

log the cmd line in one line for the child process.

ignore temp directory under the project root.

Testing:

Manually checked the log messages in the log of an integration test.

Closes #2252 from HappyRay/log-child-job-process-
exit-status


Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/bbf2c6ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/bbf2c6ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/bbf2c6ab

Branch: refs/heads/master
Commit: bbf2c6ab6fd9d2097b40414caad2fb8f33e2d053
Parents: d63141a
Author: Ray Yang <ru...@gmail.com>
Authored: Thu Jan 18 20:40:09 2018 -0800
Committer: Hung Tran <hu...@linkedin.com>
Committed: Thu Jan 18 20:40:14 2018 -0800

----------------------------------------------------------------------
 .gitignore                                                       | 2 ++
 .../main/java/org/apache/gobblin/cluster/SingleHelixTask.java    | 3 +++
 .../main/java/org/apache/gobblin/cluster/SingleTaskLauncher.java | 4 +++-
 3 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/bbf2c6ab/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 4738da5..b23aa66 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,3 +61,5 @@ package-lock.json
 
 # generated config files by tests
 **/generated-gobblin-cluster.conf
+
+temp/

http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/bbf2c6ab/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java
----------------------------------------------------------------------
diff --git a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java
index 0d20e44..8a49f76 100644
--- a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java
+++ b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java
@@ -61,8 +61,11 @@ public class SingleHelixTask implements Task {
               this.jobName, this.jobId));
       int exitCode = this.taskProcess.waitFor();
       if (exitCode == 0) {
+        logger.info("Task process finished. job name: {}. job id: {}", this.jobName, this.jobId);
         return new TaskResult(TaskResult.Status.COMPLETED, "");
       } else {
+        logger.warn("Task process failed with exitcode ({}). job name: {}. job id: {}", exitCode,
+            this.jobName, this.jobId);
         return new TaskResult(TaskResult.Status.FAILED, "Exit code: " + exitCode);
       }
     } catch (final Throwable t) {

http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/bbf2c6ab/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleTaskLauncher.java
----------------------------------------------------------------------
diff --git a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleTaskLauncher.java b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleTaskLauncher.java
index 97f6880..10bad09 100644
--- a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleTaskLauncher.java
+++ b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleTaskLauncher.java
@@ -55,7 +55,9 @@ class SingleTaskLauncher {
     logger.info("Launching a task process.");
 
     // The -cp parameter list can be very long.
-    logger.debug("cmd: " + command);
+    final String completeCmdLine = String.join(" ", command);
+    logger.debug("cmd line:\n{}", completeCmdLine);
+
     final Process taskProcess = this.processBuilder.start(command);
 
     return taskProcess;