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 5650a4e  HOTFIX Fix the issue of closing FileSystem
5650a4e is described below

commit 5650a4e98d1ca02f1a1163c74d8756835a75c443
Author: Zhichao Zhang <441586...@qq.com>
AuthorDate: Tue Jan 26 00:41:47 2021 +0800

    HOTFIX Fix the issue of closing FileSystem
---
 build/bin/find-hadoop-conf-dir.sh                                    | 5 +++++
 .../java/org/apache/kylin/metrics/lib/impl/hive/HiveProducer.java    | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/build/bin/find-hadoop-conf-dir.sh 
b/build/bin/find-hadoop-conf-dir.sh
index 559ca7c..002de4a 100755
--- a/build/bin/find-hadoop-conf-dir.sh
+++ b/build/bin/find-hadoop-conf-dir.sh
@@ -89,8 +89,13 @@ function find_hadoop_conf_dir() {
             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
 
+            # For CDH
             checkAndLinkFile $hadoop_conf_dir/topology.py 
$kylin_hadoop_conf_dir/topology.py
             checkAndLinkFile $hadoop_conf_dir/topology.map 
$kylin_hadoop_conf_dir/topology.map
+            # For HDP
+            checkAndLinkFile $hadoop_conf_dir/topology_script.py 
$kylin_hadoop_conf_dir/topology_script.py
+            checkAndLinkFile $hadoop_conf_dir/topology_mappings.data 
$kylin_hadoop_conf_dir/topology_mappings.data
+
             checkAndLinkFile $hadoop_conf_dir/ssl-client.xml 
$kylin_hadoop_conf_dir/ssl-client.xml
             checkAndLinkFile $hadoop_conf_dir/hadoop-env.sh 
$kylin_hadoop_conf_dir/hadoop-env.sh
 
diff --git 
a/metrics-reporter-hive/src/main/java/org/apache/kylin/metrics/lib/impl/hive/HiveProducer.java
 
b/metrics-reporter-hive/src/main/java/org/apache/kylin/metrics/lib/impl/hive/HiveProducer.java
index 8bc7a43..200b7f3 100644
--- 
a/metrics-reporter-hive/src/main/java/org/apache/kylin/metrics/lib/impl/hive/HiveProducer.java
+++ 
b/metrics-reporter-hive/src/main/java/org/apache/kylin/metrics/lib/impl/hive/HiveProducer.java
@@ -176,7 +176,8 @@ public class HiveProducer {
         Path partitionPath = new Path(sb.toString());
         //for hdfs router-based federation,  authority is different with hive 
table location path and defaultFs
         if (partitionPath.toUri().getScheme() != null && 
!partitionPath.toUri().toString().startsWith(fs.getUri().toString())) {
-            fs.close();
+            logger.info("Change HDFS scheme from {} to {}.", 
fs.getUri().toString(),
+                    partitionPath.toUri().toString());
             fs = partitionPath.getFileSystem(hiveConf);
         }
 

Reply via email to