kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lid...@apache.org
Subject [05/28] kylin git commit: KYLIN-1614 Add more logs about diagnosis
Date Thu, 12 May 2016 07:12:46 GMT
KYLIN-1614 Add more logs about diagnosis


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

Branch: refs/heads/1.5.x-HBase1.x
Commit: 548f5a433ccf8bd0406204cff8d968f172e7f5e1
Parents: f65e7d1
Author: lidongsjtu <lidong@apache.org>
Authored: Mon May 9 17:04:51 2016 +0800
Committer: lidongsjtu <lidong@apache.org>
Committed: Mon May 9 17:06:54 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/rest/service/DiagnosisService.java  | 7 ++++---
 .../src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java | 5 +++++
 .../main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java  | 7 ++++++-
 3 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/548f5a43/server/src/main/java/org/apache/kylin/rest/service/DiagnosisService.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/kylin/rest/service/DiagnosisService.java b/server/src/main/java/org/apache/kylin/rest/service/DiagnosisService.java
index b530586..c59f7ac 100644
--- a/server/src/main/java/org/apache/kylin/rest/service/DiagnosisService.java
+++ b/server/src/main/java/org/apache/kylin/rest/service/DiagnosisService.java
@@ -20,6 +20,7 @@ package org.apache.kylin.rest.service;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Arrays;
 
 import org.apache.kylin.metadata.badquery.BadQueryHistory;
 import org.apache.kylin.rest.constant.Constant;
@@ -49,7 +50,7 @@ public class DiagnosisService extends BasicService {
     @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN)
     public String dumpProjectDiagnosisInfo(String project) throws IOException {
         String[] args = { "-project", project, "-destDir", getDumpDir().getAbsolutePath()
};
-        logger.info("DiagnosisInfoCLI args: " + args);
+        logger.info("DiagnosisInfoCLI args: " + Arrays.toString(args));
         DiagnosisInfoCLI diagnosisInfoCli = new DiagnosisInfoCLI();
         diagnosisInfoCli.execute(args);
         return diagnosisInfoCli.getExportDest();
@@ -58,7 +59,7 @@ public class DiagnosisService extends BasicService {
     @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN)
     public String dumpJobDiagnosisInfo(String jobId) throws IOException {
         String[] args = { "-jobId", jobId, "-destDir", getDumpDir().getAbsolutePath() };
-        logger.info("JobDiagnosisInfoCLI args: " + args);
+        logger.info("JobDiagnosisInfoCLI args: " + Arrays.toString(args));
         JobDiagnosisInfoCLI jobInfoExtractor = new JobDiagnosisInfoCLI();
         jobInfoExtractor.execute(args);
         return jobInfoExtractor.getExportDest();
@@ -66,7 +67,7 @@ public class DiagnosisService extends BasicService {
 
     public static void main(String args1[]) {
         String[] args = { "-project", "learn_kylin", "-destDir", Files.createTempDir().getAbsolutePath()
};
-        logger.info("DiagnosisInfoCLI args: " + args);
+        logger.info("DiagnosisInfoCLI args: " + Arrays.toString(args));
         DiagnosisInfoCLI diagnosisInfoCli = new DiagnosisInfoCLI();
         diagnosisInfoCli.execute(args);
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/548f5a43/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java
----------------------------------------------------------------------
diff --git a/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java b/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java
index be41e74..7e85c17 100644
--- a/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java
@@ -20,6 +20,7 @@ package org.apache.kylin.tool;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Arrays;
 
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionBuilder;
@@ -70,12 +71,14 @@ public class DiagnosisInfoCLI extends AbstractInfoExtractor {
         // export cube metadata
         String[] cubeMetaArgs = { "-destDir", new File(exportDir, "metadata").getAbsolutePath(),
"-project", project, "-compress", "false", "-submodule", "true" };
         CubeMetaExtractor cubeMetaExtractor = new CubeMetaExtractor();
+        logger.info("CubeMetaExtractor args: " + Arrays.toString(cubeMetaArgs));
         cubeMetaExtractor.execute(cubeMetaArgs);
 
         // export HBase
         if (includeHBase) {
             String[] hbaseArgs = { "-destDir", new File(exportDir, "hbase").getAbsolutePath(),
"-project", project, "-compress", "false", "-submodule", "true" };
             HBaseUsageExtractor hBaseUsageExtractor = new HBaseUsageExtractor();
+            logger.info("HBaseUsageExtractor args: " + Arrays.toString(hbaseArgs));
             hBaseUsageExtractor.execute(hbaseArgs);
         }
 
@@ -93,12 +96,14 @@ public class DiagnosisInfoCLI extends AbstractInfoExtractor {
         if (includeClient) {
             String[] clientArgs = { "-destDir", new File(exportDir, "client").getAbsolutePath(),
"-compress", "false", "-submodule", "true" };
             ClientEnvExtractor clientEnvExtractor = new ClientEnvExtractor();
+            logger.info("ClientEnvExtractor args: " + Arrays.toString(clientArgs));
             clientEnvExtractor.execute(clientArgs);
         }
 
         // export logs
         String[] logsArgs = { "-destDir", new File(exportDir, "logs").getAbsolutePath(),
"-compress", "false", "-submodule", "true" };
         KylinLogExtractor logExtractor = new KylinLogExtractor();
+        logger.info("KylinLogExtractor args: " + Arrays.toString(logsArgs));
         logExtractor.execute(logsArgs);
     }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/548f5a43/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 6dfb291..b5c5b03 100644
--- a/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
@@ -20,6 +20,7 @@ package org.apache.kylin.tool;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
@@ -85,6 +86,7 @@ public class JobDiagnosisInfoCLI extends AbstractInfoExtractor {
         boolean includeClient = optionsHelper.hasOption(OPTION_INCLUDE_CLIENT) ? Boolean.valueOf(optionsHelper.getOptionValue(OPTION_INCLUDE_CLIENT))
: true;
 
         // dump job output
+        logger.info("Start to dump job output");
         ExecutablePO executablePO = executableDao.getJob(jobId);
         addRequired(ExecutableDao.pathOfJob(jobId));
         addRequired(ExecutableDao.pathOfJobOutput(jobId));
@@ -107,13 +109,14 @@ public class JobDiagnosisInfoCLI extends AbstractInfoExtractor {
 
                 logger.info("Start to extract related cube: " + StringUtils.join(cubeMetaArgs));
                 CubeMetaExtractor cubeMetaExtractor = new CubeMetaExtractor();
+                logger.info("CubeMetaExtractor args: " + Arrays.toString(cubeMetaArgs));
                 cubeMetaExtractor.execute(cubeMetaArgs);
             }
         }
 
         // dump yarn logs
         if (includeYarnLogs) {
-            logger.info("Start to related yarn job logs: " + jobId);
+            logger.info("Start to dump yarn job logs: " + jobId);
             File yarnLogDir = new File(exportDir, "yarn");
             FileUtils.forceMkdir(yarnLogDir);
             for (String taskId : yarnLogsResources) {
@@ -124,12 +127,14 @@ public class JobDiagnosisInfoCLI extends AbstractInfoExtractor {
         if (includeClient) {
             String[] clientArgs = { "-destDir", new File(exportDir, "client").getAbsolutePath(),
"-compress", "false", "-submodule", "true" };
             ClientEnvExtractor clientEnvExtractor = new ClientEnvExtractor();
+            logger.info("ClientEnvExtractor args: " + Arrays.toString(clientArgs));
             clientEnvExtractor.execute(clientArgs);
         }
 
         // export kylin logs
         String[] logsArgs = { "-destDir", new File(exportDir, "logs").getAbsolutePath(),
"-compress", "false", "-submodule", "true" };
         KylinLogExtractor logExtractor = new KylinLogExtractor();
+        logger.info("KylinLogExtractor args: " + Arrays.toString(logsArgs));
         logExtractor.execute(logsArgs);
     }
 


Mime
View raw message