kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lid...@apache.org
Subject kylin git commit: minor, bug fix for job diagnosis
Date Fri, 13 May 2016 08:20:11 GMT
Repository: kylin
Updated Branches:
  refs/heads/master 78e709b5a -> 74fc2d9c5


minor, bug fix for job diagnosis


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/74fc2d9c
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/74fc2d9c
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/74fc2d9c

Branch: refs/heads/master
Commit: 74fc2d9c57825770fa736e89e8119a17d53b63c0
Parents: 78e709b
Author: lidongsjtu <lidong@apache.org>
Authored: Fri May 13 15:55:45 2016 +0800
Committer: lidongsjtu <lidong@apache.org>
Committed: Fri May 13 15:55:56 2016 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/tool/JobDiagnosisInfoCLI.java   | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/74fc2d9c/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
----------------------------------------------------------------------
diff --git a/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java b/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
index c644f46..8ba3a33 100644
--- a/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
@@ -163,7 +163,11 @@ public class JobDiagnosisInfoCLI extends AbstractInfoExtractor {
                 File destFile = new File(destDir, applicationId + ".log");
                 String yarnCmd = "yarn logs -applicationId " + applicationId + " > " +
destFile.getAbsolutePath();
                 logger.debug(yarnCmd);
-                kylinConfig.getCliCommandExecutor().execute(yarnCmd);
+                try {
+                    kylinConfig.getCliCommandExecutor().execute(yarnCmd);
+                } catch (Exception ex) {
+                    logger.warn("Failed to get yarn logs. ", ex);
+                }
             }
         }
     }
@@ -175,11 +179,18 @@ public class JobDiagnosisInfoCLI extends AbstractInfoExtractor {
         final String[] cmdOutputLines = cmdOutput.split("\n");
         for (String cmdOutputLine : cmdOutputLines) {
             String[] pair = cmdOutputLine.split(":");
-            params.put(pair[0].trim(), pair[1].trim());
+            if (pair.length >= 2) {
+                params.put(pair[0].trim(), pair[1].trim());
+            }
         }
         for (Map.Entry<String, String> e : params.entrySet()) {
             logger.info(e.getKey() + ":" + e.getValue());
         }
+
+        if (params.containsKey("State") && params.get("State").equals("RUNNING"))
{
+            return true;
+        }
+
         if (params.containsKey("Final-State") && params.get("Final-State").equals("SUCCEEDED"))
{
             return true;
         }


Mime
View raw message