You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2016/06/04 08:22:49 UTC
[1/4] kylin git commit: KYLIN-1739 Do not cache and reuse hadoop
configuration in HadoopUtil
Repository: kylin
Updated Branches:
refs/heads/v1.5.2.1-release-rc1 [created] a1d17e215
KYLIN-1739 Do not cache and reuse hadoop configuration in HadoopUtil
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/0860934f
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/0860934f
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/0860934f
Branch: refs/heads/v1.5.2.1-release-rc1
Commit: 0860934f8bf7e30256d2c59c862c63d6b77d87ed
Parents: af2646b
Author: Li Yang <li...@apache.org>
Authored: Thu May 26 14:00:01 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Fri Jun 3 18:30:47 2016 +0800
----------------------------------------------------------------------
.../src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java | 3 +--
.../apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/0860934f/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java
index 9ce2bab..c638d99 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java
@@ -41,8 +41,7 @@ public class HadoopUtil {
public static Configuration getCurrentConfiguration() {
if (hadoopConfig.get() == null) {
Configuration conf = healSickConfig(new Configuration());
-
- hadoopConfig.set(conf);
+ return conf;
}
return hadoopConfig.get();
}
http://git-wip-us.apache.org/repos/asf/kylin/blob/0860934f/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
index 12b1fa8..f04d46e 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
@@ -90,7 +90,7 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
this.expectedSize = expectedSize;
this.queue = new ArrayBlockingQueue<byte[]>(expectedSize);
- this.timeout = HadoopUtil.getCurrentConfiguration().getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
+ this.timeout = HBaseConnection.getCurrentHBaseConfiguration().getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
this.timeout *= KylinConfig.getInstanceFromEnv().getCubeVisitTimeoutTimes();
if (BackdoorToggles.getQueryTimeout() != -1) {
[2/4] kylin git commit: KYLIN-1758 should check fact table
Posted by sh...@apache.org.
KYLIN-1758 should check fact table
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6688d645
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6688d645
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6688d645
Branch: refs/heads/v1.5.2.1-release-rc1
Commit: 6688d6452103e4c7dfb71f36b096469c14c9904e
Parents: 0860934
Author: shaofengshi <sh...@apache.org>
Authored: Fri Jun 3 18:18:04 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Fri Jun 3 18:31:28 2016 +0800
----------------------------------------------------------------------
.../src/main/java/org/apache/kylin/source/hive/HiveMRInput.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/6688d645/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
----------------------------------------------------------------------
diff --git a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
index 9997b09..16642fa 100644
--- a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
+++ b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
@@ -156,7 +156,8 @@ public class HiveMRInput implements IMRInput {
final Set<TableDesc> lookupViewsTables = Sets.newHashSet();
for(DimensionDesc dimensionDesc : cubeDesc.getDimensions()) {
TableDesc tableDesc = dimensionDesc.getTableDesc();
- if (TableDesc.TABLE_TYPE_VIRTUAL_VIEW.equalsIgnoreCase(tableDesc.getTableType())) {
+ if (TableDesc.TABLE_TYPE_VIRTUAL_VIEW.equalsIgnoreCase(tableDesc.getTableType())
+ && !cubeDesc.getModel().getFactTableDesc().equals(tableDesc)) {
lookupViewsTables.add(tableDesc);
}
}
[3/4] kylin git commit: update version number
Posted by sh...@apache.org.
update version number
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ef1d13f8
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ef1d13f8
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ef1d13f8
Branch: refs/heads/v1.5.2.1-release-rc1
Commit: ef1d13f8482b755b59c077c5b1ae1898e2e05e66
Parents: 6688d64
Author: shaofengshi <sh...@apache.org>
Authored: Sat Jun 4 08:24:38 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Sat Jun 4 08:24:38 2016 +0800
----------------------------------------------------------------------
assembly/pom.xml | 2 +-
atopcalcite/pom.xml | 2 +-
core-common/pom.xml | 2 +-
core-cube/pom.xml | 2 +-
core-dictionary/pom.xml | 2 +-
core-job/pom.xml | 2 +-
core-metadata/pom.xml | 2 +-
core-storage/pom.xml | 2 +-
engine-mr/pom.xml | 2 +-
engine-spark/pom.xml | 2 +-
engine-streaming/pom.xml | 2 +-
invertedindex/pom.xml | 2 +-
jdbc/pom.xml | 2 +-
kylin-it/pom.xml | 2 +-
pom.xml | 4 ++--
query/pom.xml | 2 +-
server/pom.xml | 2 +-
source-hive/pom.xml | 2 +-
source-kafka/pom.xml | 2 +-
storage-hbase/pom.xml | 2 +-
tool/pom.xml | 2 +-
21 files changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/assembly/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/pom.xml b/assembly/pom.xml
index b6e3675..204035b 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>kylin</artifactId>
<groupId>org.apache.kylin</groupId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/atopcalcite/pom.xml
----------------------------------------------------------------------
diff --git a/atopcalcite/pom.xml b/atopcalcite/pom.xml
index 7c70df3..7779201 100644
--- a/atopcalcite/pom.xml
+++ b/atopcalcite/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
<properties>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/core-common/pom.xml
----------------------------------------------------------------------
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 7647621..5030d5a 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/core-cube/pom.xml
----------------------------------------------------------------------
diff --git a/core-cube/pom.xml b/core-cube/pom.xml
index 2309872..f4e0c71 100644
--- a/core-cube/pom.xml
+++ b/core-cube/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/core-dictionary/pom.xml
----------------------------------------------------------------------
diff --git a/core-dictionary/pom.xml b/core-dictionary/pom.xml
index 1af0091..a6cd19c 100644
--- a/core-dictionary/pom.xml
+++ b/core-dictionary/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/core-job/pom.xml
----------------------------------------------------------------------
diff --git a/core-job/pom.xml b/core-job/pom.xml
index 864bf1b..383303c 100644
--- a/core-job/pom.xml
+++ b/core-job/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/core-metadata/pom.xml
----------------------------------------------------------------------
diff --git a/core-metadata/pom.xml b/core-metadata/pom.xml
index f65129d..184dc5a 100644
--- a/core-metadata/pom.xml
+++ b/core-metadata/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/core-storage/pom.xml
----------------------------------------------------------------------
diff --git a/core-storage/pom.xml b/core-storage/pom.xml
index 2f08dd9..4948e59 100644
--- a/core-storage/pom.xml
+++ b/core-storage/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/engine-mr/pom.xml
----------------------------------------------------------------------
diff --git a/engine-mr/pom.xml b/engine-mr/pom.xml
index 379eaa6..dcd3e2f 100644
--- a/engine-mr/pom.xml
+++ b/engine-mr/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/engine-spark/pom.xml
----------------------------------------------------------------------
diff --git a/engine-spark/pom.xml b/engine-spark/pom.xml
index eda0513..2cc4d5f 100644
--- a/engine-spark/pom.xml
+++ b/engine-spark/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/engine-streaming/pom.xml
----------------------------------------------------------------------
diff --git a/engine-streaming/pom.xml b/engine-streaming/pom.xml
index 3613cfe..31cacac 100644
--- a/engine-streaming/pom.xml
+++ b/engine-streaming/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/invertedindex/pom.xml
----------------------------------------------------------------------
diff --git a/invertedindex/pom.xml b/invertedindex/pom.xml
index 95fa443..ed286c9 100644
--- a/invertedindex/pom.xml
+++ b/invertedindex/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>kylin</artifactId>
<groupId>org.apache.kylin</groupId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/jdbc/pom.xml b/jdbc/pom.xml
index 3de7817..fbf0718 100644
--- a/jdbc/pom.xml
+++ b/jdbc/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/kylin-it/pom.xml
----------------------------------------------------------------------
diff --git a/kylin-it/pom.xml b/kylin-it/pom.xml
index dec032d..171e84c 100644
--- a/kylin-it/pom.xml
+++ b/kylin-it/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>kylin</artifactId>
<groupId>org.apache.kylin</groupId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 12d9eb2..fb8606b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
<packaging>pom</packaging>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
<name>Kylin:HadoopOLAPEngine</name>
<url>http://kylin.apache.org</url>
@@ -169,7 +169,7 @@
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/kylin.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/kylin.git</developerConnection>
<url>https://git-wip-us.apache.org/repos/asf/kylin.git</url>
- <tag>kylin-1.5.2</tag>
+ <tag>kylin-1.5.2.1</tag>
</scm>
<dependencyManagement>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/query/pom.xml
----------------------------------------------------------------------
diff --git a/query/pom.xml b/query/pom.xml
index 17f8169..d6c7f83 100644
--- a/query/pom.xml
+++ b/query/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index 36d7b83..9ba9d5f 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/source-hive/pom.xml
----------------------------------------------------------------------
diff --git a/source-hive/pom.xml b/source-hive/pom.xml
index 2cb5581..2bd6349 100644
--- a/source-hive/pom.xml
+++ b/source-hive/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/source-kafka/pom.xml
----------------------------------------------------------------------
diff --git a/source-kafka/pom.xml b/source-kafka/pom.xml
index 398409b..65f7566 100644
--- a/source-kafka/pom.xml
+++ b/source-kafka/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/storage-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/storage-hbase/pom.xml b/storage-hbase/pom.xml
index f067bf6..b03a7ed 100644
--- a/storage-hbase/pom.xml
+++ b/storage-hbase/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.kylin</groupId>
<artifactId>kylin</artifactId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef1d13f8/tool/pom.xml
----------------------------------------------------------------------
diff --git a/tool/pom.xml b/tool/pom.xml
index d5b35f4..3c8033d 100644
--- a/tool/pom.xml
+++ b/tool/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>kylin</artifactId>
<groupId>org.apache.kylin</groupId>
- <version>1.5.2</version>
+ <version>1.5.2.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
[4/4] kylin git commit: KYLIN-1758 add the hive set statements
Posted by sh...@apache.org.
KYLIN-1758 add the hive set statements
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a1d17e21
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a1d17e21
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a1d17e21
Branch: refs/heads/v1.5.2.1-release-rc1
Commit: a1d17e215561089bb5958b84e876a74fc60f092f
Parents: ef1d13f
Author: shaofengshi <sh...@apache.org>
Authored: Sat Jun 4 16:22:38 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Sat Jun 4 16:22:38 2016 +0800
----------------------------------------------------------------------
.../org/apache/kylin/job/JoinedFlatTable.java | 56 +++++++++++---------
.../apache/kylin/source/hive/HiveMRInput.java | 14 +++++
2 files changed, 44 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/a1d17e21/core-job/src/main/java/org/apache/kylin/job/JoinedFlatTable.java
----------------------------------------------------------------------
diff --git a/core-job/src/main/java/org/apache/kylin/job/JoinedFlatTable.java b/core-job/src/main/java/org/apache/kylin/job/JoinedFlatTable.java
index 5886325..f13a48c 100644
--- a/core-job/src/main/java/org/apache/kylin/job/JoinedFlatTable.java
+++ b/core-job/src/main/java/org/apache/kylin/job/JoinedFlatTable.java
@@ -55,6 +55,36 @@ public class JoinedFlatTable {
return storageDfsDir + "/" + intermediateTableDesc.getTableName();
}
+ public static String generateHiveSetStatements(JobEngineConfig engineConfig) throws IOException {
+ StringBuilder buffer = new StringBuilder();
+ File hadoopPropertiesFile = new File(engineConfig.getHiveConfFilePath());
+
+ if (hadoopPropertiesFile.exists()) {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder;
+ Document doc;
+ try {
+ builder = factory.newDocumentBuilder();
+ doc = builder.parse(hadoopPropertiesFile);
+ NodeList nl = doc.getElementsByTagName("property");
+ for (int i = 0; i < nl.getLength(); i++) {
+ String name = doc.getElementsByTagName("name").item(i).getFirstChild().getNodeValue();
+ String value = doc.getElementsByTagName("value").item(i).getFirstChild().getNodeValue();
+ if (!name.equals("tmpjars")) {
+ buffer.append("SET " + name + "=" + value + ";\n");
+ }
+ }
+
+ } catch (ParserConfigurationException e) {
+ throw new IOException(e);
+ } catch (SAXException e) {
+ throw new IOException(e);
+ }
+ }
+
+ return buffer.toString();
+ }
+
public static String generateCreateTableStatement(IJoinedFlatTableDesc intermediateTableDesc, String storageDfsDir) {
StringBuilder ddl = new StringBuilder();
@@ -86,32 +116,6 @@ public class JoinedFlatTable {
public static String generateInsertDataStatement(IJoinedFlatTableDesc intermediateTableDesc, JobEngineConfig engineConfig) throws IOException {
StringBuilder sql = new StringBuilder();
-
- File hadoopPropertiesFile = new File(engineConfig.getHiveConfFilePath());
-
- if (hadoopPropertiesFile.exists()) {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder;
- Document doc;
- try {
- builder = factory.newDocumentBuilder();
- doc = builder.parse(hadoopPropertiesFile);
- NodeList nl = doc.getElementsByTagName("property");
- for (int i = 0; i < nl.getLength(); i++) {
- String name = doc.getElementsByTagName("name").item(i).getFirstChild().getNodeValue();
- String value = doc.getElementsByTagName("value").item(i).getFirstChild().getNodeValue();
- if (name.equals("tmpjars") == false) {
- sql.append("SET " + name + "=" + value + ";").append("\n");
- }
- }
-
- } catch (ParserConfigurationException e) {
- throw new IOException(e);
- } catch (SAXException e) {
- throw new IOException(e);
- }
- }
-
sql.append("INSERT OVERWRITE TABLE " + intermediateTableDesc.getTableName() + " " + generateSelectDataStatement(intermediateTableDesc) + ";").append("\n");
return sql.toString();
http://git-wip-us.apache.org/repos/asf/kylin/blob/a1d17e21/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
----------------------------------------------------------------------
diff --git a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
index 16642fa..4026006 100644
--- a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
+++ b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
@@ -117,6 +117,12 @@ public class HiveMRInput implements IMRInput {
}
public static AbstractExecutable createFlatHiveTableStep(JobEngineConfig conf, IJoinedFlatTableDesc flatTableDesc, String jobId) {
+ String setHql = "";
+ try {
+ setHql = JoinedFlatTable.generateHiveSetStatements(conf);
+ } catch (IOException e) {
+ throw new RuntimeException("Failed to generate hive set statements for createFlatHiveTableStep", e);
+ }
final String useDatabaseHql = "USE " + conf.getConfig().getHiveDatabaseForIntermediateTable() + ";";
final String dropTableHql = JoinedFlatTable.generateDropTableStatement(flatTableDesc);
@@ -134,6 +140,7 @@ public class HiveMRInput implements IMRInput {
hiveCmdBuilder.addStatement(useDatabaseHql);
hiveCmdBuilder.addStatement(dropTableHql);
hiveCmdBuilder.addStatement(createTableHql);
+ hiveCmdBuilder.addStatement(setHql);
hiveCmdBuilder.addStatement(insertDataHqls);
step.setCmd(hiveCmdBuilder.build());
@@ -164,8 +171,15 @@ public class HiveMRInput implements IMRInput {
if(lookupViewsTables.size() == 0) {
return null;
}
+ String setHql = "";
+ try {
+ setHql = JoinedFlatTable.generateHiveSetStatements(conf);
+ } catch (IOException e) {
+ throw new RuntimeException("Failed to generate hive set statements for createFlatHiveTableStep", e);
+ }
final String useDatabaseHql = "USE " + conf.getConfig().getHiveDatabaseForIntermediateTable() + ";";
hiveCmdBuilder.addStatement(useDatabaseHql);
+ hiveCmdBuilder.addStatement(setHql);
for(TableDesc lookUpTableDesc : lookupViewsTables) {
if (TableDesc.TABLE_TYPE_VIRTUAL_VIEW.equalsIgnoreCase(lookUpTableDesc.getTableType())) {
StringBuilder createIntermediateTableHql = new StringBuilder();