kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject [10/32] kylin git commit: KYLIN-2137 add check for 'kylin.job.mr.lib.dir'
Date Wed, 02 Nov 2016 08:38:32 GMT
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/a37ac46a
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a37ac46a
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a37ac46a

Branch: refs/heads/v1.6.0-rc1-hbase1.x
Commit: a37ac46ace9fceda9780121d97348d6eb620f008
Parents: e419681
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:04 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/a37ac46a/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