kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luke...@apache.org
Subject [03/50] [abbrv] incubator-kylin git commit: KYLIN-926
Date Fri, 14 Aug 2015 03:21:08 GMT
KYLIN-926


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

Branch: refs/heads/0.7
Commit: 043fe721e333fd426685cb9f3cd5326a889a35c9
Parents: 08acfaa
Author: honma <honma@ebay.com>
Authored: Wed Aug 5 12:25:21 2015 +0800
Committer: honma <honma@ebay.com>
Committed: Thu Aug 6 12:34:23 2015 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/common/persistence/ResourceTool.java | 6 ++++--
 .../java/org/apache/kylin/job/dataGen/FactTableGenerator.java  | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/043fe721/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java b/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
index cfde05c..e5c135a 100644
--- a/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
+++ b/common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
@@ -105,10 +105,12 @@ public class ResourceTool {
             if (matchExclude(path) == false) {
                 InputStream content = src.getResource(path);
                 long ts = src.getResourceTimestamp(path);
-                if (content != null)
+                if (content != null) {
                     dst.putResource(path, content, ts);
-                else
+                    content.close();
+                } else {
                     System.out.println("Null inputstream for " + path);
+                }
             }
         }
         // case of folder

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/043fe721/job/src/test/java/org/apache/kylin/job/dataGen/FactTableGenerator.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/dataGen/FactTableGenerator.java b/job/src/test/java/org/apache/kylin/job/dataGen/FactTableGenerator.java
index 5550f0f..831de19 100644
--- a/job/src/test/java/org/apache/kylin/job/dataGen/FactTableGenerator.java
+++ b/job/src/test/java/org/apache/kylin/job/dataGen/FactTableGenerator.java
@@ -153,8 +153,8 @@ public class FactTableGenerator {
             }
 
             // reopen the stream
-            tableStream.close();
             tableReader.close();
+            tableStream.close();
             tableStream = null;
             tableReader = null;
 


Mime
View raw message