You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by xx...@apache.org on 2020/11/10 01:54:20 UTC

[kylin] branch kylin-on-parquet-v2 updated: KYLIN-4808 Return after finding the correct hadoop_conf to avoid continue scanning other directories

This is an automated email from the ASF dual-hosted git repository.

xxyu pushed a commit to branch kylin-on-parquet-v2
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/kylin-on-parquet-v2 by this push:
     new 0894c0d  KYLIN-4808 Return after finding the correct hadoop_conf to avoid continue scanning other directories
0894c0d is described below

commit 0894c0d3754ea0cb591d7b50d26f9b8b5c4f1aa5
Author: yaqian.zhang <59...@qq.com>
AuthorDate: Mon Nov 9 15:41:33 2020 +0800

    KYLIN-4808 Return after finding the correct hadoop_conf to avoid continue scanning other directories
---
 build/bin/find-hadoop-conf-dir.sh | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/build/bin/find-hadoop-conf-dir.sh b/build/bin/find-hadoop-conf-dir.sh
index fcaa06c..d32130b 100755
--- a/build/bin/find-hadoop-conf-dir.sh
+++ b/build/bin/find-hadoop-conf-dir.sh
@@ -74,25 +74,26 @@ function find_hadoop_conf_dir() {
 
                 verbose "hadoop_conf_dir is $result"
                 export hadoop_conf_dir=$result
-            fi
-        done
-        fi
 
-        if [ -d "$hadoop_conf_dir" ]
-        then
-            mkdir -p ${KYLIN_HOME}/hadoop_conf
+                if [ -d "$hadoop_conf_dir" ]
+                then
+                    mkdir -p ${KYLIN_HOME}/hadoop_conf
 
-            checkAndLinkFile $hadoop_conf_dir/core-site.xml $kylin_hadoop_conf_dir/core-site.xml
-            checkAndLinkFile $hadoop_conf_dir/hdfs-site.xml $kylin_hadoop_conf_dir/hdfs-site.xml
-            checkAndLinkFile $hadoop_conf_dir/yarn-site.xml $kylin_hadoop_conf_dir/yarn-site.xml
-            checkAndLinkFile $hadoop_conf_dir/mapred-site.xml $kylin_hadoop_conf_dir/mapred-site.xml
+                    checkAndLinkFile $hadoop_conf_dir/core-site.xml $kylin_hadoop_conf_dir/core-site.xml
+                    checkAndLinkFile $hadoop_conf_dir/hdfs-site.xml $kylin_hadoop_conf_dir/hdfs-site.xml
+                    checkAndLinkFile $hadoop_conf_dir/yarn-site.xml $kylin_hadoop_conf_dir/yarn-site.xml
+                    checkAndLinkFile $hadoop_conf_dir/mapred-site.xml $kylin_hadoop_conf_dir/mapred-site.xml
 
-            checkAndLinkFile /etc/hadoop/conf/topology.py $kylin_hadoop_conf_dir/topology.py
-            checkAndLinkFile /etc/hadoop/conf/topology.map $kylin_hadoop_conf_dir/topology.map
-            checkAndLinkFile /etc/hadoop/conf/ssl-client.xml $kylin_hadoop_conf_dir/ssl-client.xml
-            checkAndLinkFile /etc/hadoop/conf/hadoop-env.sh $kylin_hadoop_conf_dir/hadoop-env.sh
+                    checkAndLinkFile /etc/hadoop/conf/topology.py $kylin_hadoop_conf_dir/topology.py
+                    checkAndLinkFile /etc/hadoop/conf/topology.map $kylin_hadoop_conf_dir/topology.map
+                    checkAndLinkFile /etc/hadoop/conf/ssl-client.xml $kylin_hadoop_conf_dir/ssl-client.xml
+                    checkAndLinkFile /etc/hadoop/conf/hadoop-env.sh $kylin_hadoop_conf_dir/hadoop-env.sh
 
-            copyHiveSite
+                    copyHiveSite
+                fi
+                return
+            fi
+        done
         fi
 }