kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject kylin git commit: KYLIN-2137 add check for 'kylin.job.mr.lib.dir'
Date Fri, 28 Oct 2016 14:17:49 GMT
Repository: kylin
Updated Branches:
  refs/heads/master 8314e744f -> c5af44353


KYLIN-2137 add check for 'kylin.job.mr.lib.dir'


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

Branch: refs/heads/master
Commit: c5af44353d5904ddb8e9107a160872164f0e5f4d
Parents: 8314e74
Author: shaofengshi <shaofengshi@apache.org>
Authored: Fri Oct 28 22:17:04 2016 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Fri Oct 28 22:17:34 2016 +0800

----------------------------------------------------------------------
 .../apache/kylin/engine/mr/common/AbstractHadoopJob.java    | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/c5af4435/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java
index 417d63d..a97a8c7 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java
@@ -245,7 +245,14 @@ public abstract class AbstractHadoopJob extends Configured implements
Tool {
 
         // for KylinJobMRLibDir
         String mrLibDir = kylinConf.getKylinJobMRLibDir();
-        StringUtil.appendWithSeparator(kylinDependency, mrLibDir);
+        if (!StringUtils.isBlank(mrLibDir)) {
+            File dirFileMRLIB = new File(mrLibDir);
+            if (dirFileMRLIB.exists()) {
+                StringUtil.appendWithSeparator(kylinDependency, mrLibDir);
+            } else {
+                logger.info("The directory '" + mrLibDir + "' for 'kylin.job.mr.lib.dir'
does not exist!!!");
+            }
+        }
 
         setJobTmpJarsAndFiles(job, kylinDependency.toString());
 


Mime
View raw message