kylin git commit: KYLIN-1356 increase memory settings for failsafe

2016-01-26 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 5511f2609 -> cd5e21b4c


KYLIN-1356 increase memory settings for failsafe


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

Branch: refs/heads/2.x-staging
Commit: cd5e21b4c077a0df5714a427c1cbd34b54a14d13
Parents: 5511f26
Author: honma 
Authored: Wed Jan 27 12:45:34 2016 +0800
Committer: honma 
Committed: Wed Jan 27 12:45:34 2016 +0800

--
 kylin-it/pom.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/cd5e21b4/kylin-it/pom.xml
--
diff --git a/kylin-it/pom.xml b/kylin-it/pom.xml
index 3f38d16..6cb44a5 100644
--- a/kylin-it/pom.xml
+++ b/kylin-it/pom.xml
@@ -282,6 +282,7 @@
 true
 
 
+-Xms1G -Xmx4G -XX:PermSize=128M 
-XX:MaxPermSize=512M
 
 
 



[03/17] kylin git commit: minor, update version in pom

2016-01-26 Thread mahongbin
minor, update version in pom


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

Branch: refs/heads/2.x-staging
Commit: 0d29d63e7415f69182334bdb5dbea07f519a4829
Parents: 30c9fd6
Author: honma 
Authored: Mon Jan 25 17:42:24 2016 +0800
Committer: honma 
Committed: Tue Jan 26 21:40:48 2016 +0800

--
 assembly/pom.xml |   3 +-
 atopcalcite/pom.xml  |   2 +-
 core-common/pom.xml  |   3 +-
 core-cube/pom.xml|   3 +-
 core-dictionary/pom.xml  |   3 +-
 core-job/pom.xml |   3 +-
 core-metadata/pom.xml|   3 +-
 core-storage/pom.xml |   3 +-
 engine-mr/pom.xml|   3 +-
 engine-spark/pom.xml |   3 +-
 engine-streaming/pom.xml |   3 +-
 invertedindex/pom.xml|   3 +-
 jdbc/pom.xml | 144 +-
 pom.xml  |   3 +-
 query/pom.xml|   3 +-
 server/pom.xml   |   3 +-
 source-hive/pom.xml  |   3 +-
 source-kafka/pom.xml |   3 +-
 storage-hbase/pom.xml|   3 +-
 19 files changed, 108 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/0d29d63e/assembly/pom.xml
--
diff --git a/assembly/pom.xml b/assembly/pom.xml
index cd7fc2b..999226a 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -5,7 +5,8 @@
 
 kylin
 org.apache.kylin
-2.0-incubating-SNAPSHOT
+2.1-SNAPSHOT
+
 
 4.0.0
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d29d63e/atopcalcite/pom.xml
--
diff --git a/atopcalcite/pom.xml b/atopcalcite/pom.xml
index 45cca31..9c296d0 100644
--- a/atopcalcite/pom.xml
+++ b/atopcalcite/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-2.0-incubating-SNAPSHOT
+2.1-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d29d63e/core-common/pom.xml
--
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 8c7edb1..28566d6 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -28,7 +28,8 @@
 
 org.apache.kylin
 kylin
-2.0-incubating-SNAPSHOT
+2.1-SNAPSHOT
+
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d29d63e/core-cube/pom.xml
--
diff --git a/core-cube/pom.xml b/core-cube/pom.xml
index 58c1a14..3757a8b 100644
--- a/core-cube/pom.xml
+++ b/core-cube/pom.xml
@@ -27,7 +27,8 @@
 
 org.apache.kylin
 kylin
-2.0-incubating-SNAPSHOT
+2.1-SNAPSHOT
+
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d29d63e/core-dictionary/pom.xml
--
diff --git a/core-dictionary/pom.xml b/core-dictionary/pom.xml
index 2ea09fb..4add5e8 100644
--- a/core-dictionary/pom.xml
+++ b/core-dictionary/pom.xml
@@ -27,7 +27,8 @@
 
 org.apache.kylin
 kylin
-2.0-incubating-SNAPSHOT
+2.1-SNAPSHOT
+
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d29d63e/core-job/pom.xml
--
diff --git a/core-job/pom.xml b/core-job/pom.xml
index 97c8f2e..32f149e 100644
--- a/core-job/pom.xml
+++ b/core-job/pom.xml
@@ -27,7 +27,8 @@
 
 org.apache.kylin
 kylin
-2.0-incubating-SNAPSHOT
+2.1-SNAPSHOT
+
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d29d63e/core-metadata/pom.xml
--
diff --git a/core-metadata/pom.xml b/core-metadata/pom.xml
index 8abf02e..f0bbd40 100644
--- a/core-metadata/pom.xml
+++ b/core-metadata/pom.xml
@@ -27,7 +27,8 @@
 
 org.apache.kylin
 kylin
-2.0-incubating-SNAPSHOT
+2.1-SNAPSHOT
+
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d29d63e/core-storage/pom.xml
--
diff --git a/core-storage/pom.xml b/core-storage/pom.xml
index ad440da..2f6fbbb 100644
--- a/core-storage/pom.xml
+++ b/core-storage/pom.xml
@@ -27,7 +27,8 @@
 
 org.apache.kylin
 kylin
-2.0-incubating-SNAPSHOT
+2.1-SNAPSHOT
+
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d29d63e/engine-mr/pom.xml
--
diff --git 

[16/17] kylin git commit: KYLIN-1356 move all it to a seprate module

2016-01-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/assembly/src/test/java/org/apache/kylin/source/hive/ITHiveSourceTableLoaderTest.java
--
diff --git 
a/assembly/src/test/java/org/apache/kylin/source/hive/ITHiveSourceTableLoaderTest.java
 
b/assembly/src/test/java/org/apache/kylin/source/hive/ITHiveSourceTableLoaderTest.java
deleted file mode 100644
index 23780cf..000
--- 
a/assembly/src/test/java/org/apache/kylin/source/hive/ITHiveSourceTableLoaderTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.apache.kylin.source.hive;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.Set;
-
-import org.apache.kylin.common.KylinConfig;
-import org.apache.kylin.storage.hbase.steps.HBaseMetadataTestCase;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ITHiveSourceTableLoaderTest extends HBaseMetadataTestCase {
-
-@Before
-public void setup() throws Exception {
-super.createTestMetadata();
-}
-
-@After
-public void after() throws Exception {
-super.cleanupTestMetadata();
-}
-
-@Test
-public void test() throws IOException {
-KylinConfig config = getTestConfig();
-String[] toLoad = new String[] { "DEFAULT.TEST_KYLIN_FACT", 
"EDW.TEST_CAL_DT" };
-Set loaded = HiveSourceTableLoader.reloadHiveTables(toLoad, 
config);
-
-assertTrue(loaded.size() == toLoad.length);
-for (String str : toLoad)
-assertTrue(loaded.contains(str));
-}
-
-}

http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/assembly/src/test/java/org/apache/kylin/source/hive/ITHiveTableReaderTest.java
--
diff --git 
a/assembly/src/test/java/org/apache/kylin/source/hive/ITHiveTableReaderTest.java
 
b/assembly/src/test/java/org/apache/kylin/source/hive/ITHiveTableReaderTest.java
deleted file mode 100644
index 57c0be3..000
--- 
a/assembly/src/test/java/org/apache/kylin/source/hive/ITHiveTableReaderTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.apache.kylin.source.hive;
-
-import java.io.IOException;
-
-import org.apache.kylin.storage.hbase.steps.HBaseMetadataTestCase;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * This test case need the hive runtime; Please run it with sandbox;
- * @author shaoshi
- *
- * It is in the exclude list of default profile in pom.xml
- */
-public class ITHiveTableReaderTest extends HBaseMetadataTestCase {
-
-@Test
-public void test() throws IOException {
-HiveTableReader reader = new HiveTableReader("default", 
"test_kylin_fact");
-int rowNumber = 0;
-while (reader.next()) {
-String[] row = reader.getRow();
-Assert.assertEquals(9, row.length);
-//System.out.println(ArrayUtils.toString(row));
-rowNumber++;
-}
-
-reader.close();
-Assert.assertEquals(1, rowNumber);
-}
-}

http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/assembly/src/test/java/org/apache/kylin/source/hive/ITSnapshotManagerTest.java
--
diff --git 

[06/17] kylin git commit: KYLIN-1356 move all it to a seprate module

2016-01-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql_distinct_precisely/query07.sql
--
diff --git a/query/src/test/resources/query/sql_distinct_precisely/query07.sql 
b/query/src/test/resources/query/sql_distinct_precisely/query07.sql
deleted file mode 100644
index 41252c4..000
--- a/query/src/test/resources/query/sql_distinct_precisely/query07.sql
+++ /dev/null
@@ -1,24 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-select lstg_format_name,
- sum(price) as GMV,
- count(1) as TRANS_CNT,
- count(distinct leaf_categ_id) as LEAF_CATEG_CNT
- from test_kylin_fact
- group by lstg_format_name

http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql_dynamic/query01.dat
--
diff --git a/query/src/test/resources/query/sql_dynamic/query01.dat 
b/query/src/test/resources/query/sql_dynamic/query01.dat
deleted file mode 100644
index a72c741..000
--- a/query/src/test/resources/query/sql_dynamic/query01.dat
+++ /dev/null
@@ -1,2 +0,0 @@
-FP-GTC
-Collectibles

http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql_dynamic/query01.sql
--
diff --git a/query/src/test/resources/query/sql_dynamic/query01.sql 
b/query/src/test/resources/query/sql_dynamic/query01.sql
deleted file mode 100644
index d777fdf..000
--- a/query/src/test/resources/query/sql_dynamic/query01.sql
+++ /dev/null
@@ -1,28 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-select test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name, 
test_category_groupings.meta_categ_name, sum(test_kylin_fact.price) as gmv, 
count(*) as trans_cnt 
- from test_kylin_fact 
- inner JOIN edw.test_cal_dt as test_cal_dt 
- ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt 
- inner JOIN test_category_groupings 
- ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id 
- where test_kylin_fact.lstg_format_name = ? 
- and test_category_groupings.meta_categ_name = ? 
- and test_cal_dt.week_beg_dt between DATE '2013-05-01' and DATE '2013-10-01' 
- group by test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name, 
test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql_dynamic/query02.dat
--
diff --git a/query/src/test/resources/query/sql_dynamic/query02.dat 
b/query/src/test/resources/query/sql_dynamic/query02.dat
deleted file mode 100644
index a72c741..000
--- a/query/src/test/resources/query/sql_dynamic/query02.dat
+++ /dev/null
@@ -1,2 +0,0 @@
-FP-GTC
-Collectibles

http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql_dynamic/query02.sql
--
diff --git a/query/src/test/resources/query/sql_dynamic/query02.sql 
b/query/src/test/resources/query/sql_dynamic/query02.sql
deleted file mode 100644
index eaeccdd..000
--- a/query/src/test/resources/query/sql_dynamic/query02.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or 

[09/17] kylin git commit: KYLIN-1356 move all it to a seprate module

2016-01-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java
--
diff --git a/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java 
b/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java
deleted file mode 100644
index 680acee..000
--- a/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java
+++ /dev/null
@@ -1,506 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.apache.kylin.query.test;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.Charset;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.sql.Timestamp;
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.logging.LogManager;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.kylin.common.KylinConfig;
-import org.dbunit.Assertion;
-import org.dbunit.database.DatabaseConfig;
-import org.dbunit.database.DatabaseConnection;
-import org.dbunit.database.IDatabaseConnection;
-import org.dbunit.dataset.DataSetException;
-import org.dbunit.dataset.ITable;
-import org.dbunit.dataset.SortedTable;
-import org.dbunit.dataset.datatype.DataType;
-import org.dbunit.dataset.datatype.DataTypeException;
-import org.dbunit.ext.h2.H2Connection;
-import org.dbunit.ext.h2.H2DataTypeFactory;
-import org.junit.Assert;
-
-import com.google.common.io.Files;
-
-/**
- */
-public class KylinTestBase {
-
-// Hack for the different constant integer type between optiq (INTEGER) and
-// h2 (BIGINT)
-public static class TestH2DataTypeFactory extends H2DataTypeFactory {
-@Override
-public DataType createDataType(int sqlType, String sqlTypeName, String 
tableName, String columnName) throws DataTypeException {
-
-if ((columnName.startsWith("COL") || columnName.startsWith("col")) 
&& sqlType == Types.BIGINT) {
-return DataType.INTEGER;
-}
-return super.createDataType(sqlType, sqlTypeName);
-}
-}
-
-protected static final String resultTableName = "query result of ";
-protected static KylinConfig config = null;
-protected static Connection cubeConnection = null;
-protected static Connection h2Connection = null;
-protected static String joinType = "default";
-protected static int h2InstanceCount = 0;
-
-protected static int compQueryCount = 0;
-protected static ArrayList zeroResultQueries = new 
ArrayList();
-
-protected static void closeConnection(Connection connection) {
-if (connection != null) {
-try {
-connection.close();
-} catch (SQLException e) {
-e.printStackTrace();
-}
-}
-}
-
-/**
- * @param folder
- * @param fileType
- *specify the interested file type by file extension
- * @return
- */
-protected static List getFilesFromFolder(final File folder, final 
String fileType) {
-List files = new ArrayList();
-for (final File fileEntry : folder.listFiles()) {
-if 
(fileEntry.getName().toLowerCase().endsWith(fileType.toLowerCase())) {
-files.add(fileEntry);
-}
-}
-return files;
-}
-
-protected static void getFilesFromFolderR(final String directoryStr, 
List files, final String fileType) {
-File folder = new File(directoryStr);
-for (final File fileEntry : folder.listFiles()) {
-if (fileEntry.isDirectory()) {
-getFilesFromFolderR(fileEntry.getAbsolutePath(), files, 
fileType);
-} else if (fileEntry.isFile()) {
-if 

[10/17] kylin git commit: KYLIN-1356 move all it to a seprate module

2016-01-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/kylin-it/src/test/resources/query/sql_tableau/query21.sql
--
diff --git a/kylin-it/src/test/resources/query/sql_tableau/query21.sql 
b/kylin-it/src/test/resources/query/sql_tableau/query21.sql
new file mode 100644
index 000..3e3208b
--- /dev/null
+++ b/kylin-it/src/test/resources/query/sql_tableau/query21.sql
@@ -0,0 +1,27 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+ select test_kylin_fact.lstg_format_name, 
test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV
+ , count(*) as TRANS_CNT 
+ from test_kylin_fact 
+ inner JOIN EDW.TEST_CAL_DT AS TEST_CAL_DT 
+ ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt 
+ where test_cal_dt.week_beg_dt between DATE '2013-05-01' and DATE '2013-08-01' 
+ group by test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt 
+ having sum(price)>500
+ limit 1

http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/kylin-it/src/test/resources/query/sql_tableau/query22.sql.disabled
--
diff --git a/kylin-it/src/test/resources/query/sql_tableau/query22.sql.disabled 
b/kylin-it/src/test/resources/query/sql_tableau/query22.sql.disabled
new file mode 100644
index 000..17ec731
--- /dev/null
+++ b/kylin-it/src/test/resources/query/sql_tableau/query22.sql.disabled
@@ -0,0 +1,28 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+select fact.cal_dt, sum(fact.price) from test_kylin_fact fact 
+left join test_cal_dt cal 
+   on fact.cal_dt=cal.cal_dt
+inner join
+(
+   select test_kylin_fact.cal_dt, count(1) from test_kylin_fact left join 
test_cal_dt 
+   on test_kylin_fact.cal_dt=test_cal_dt.cal_dt group by 
test_kylin_fact.cal_dt order by 2 desc limit 2
+) cal_2 
+   on fact.cal_dt = cal_2.cal_dt 
+group by fact.cal_dt

http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/kylin-it/src/test/resources/query/sql_tableau/query23.sql
--
diff --git a/kylin-it/src/test/resources/query/sql_tableau/query23.sql 
b/kylin-it/src/test/resources/query/sql_tableau/query23.sql
new file mode 100644
index 000..10430ab
--- /dev/null
+++ b/kylin-it/src/test/resources/query/sql_tableau/query23.sql
@@ -0,0 +1,23 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+
+select fact.cal_dt, sum(fact.price) from test_kylin_fact fact 
+left join EDW.TEST_CAL_DT cal on fact.cal_dt=cal.cal_dt
+where cal.cal_dt  = date '2012-05-17' or cal.cal_dt  = date '2013-05-17'
+group by fact.cal_dt


[11/17] kylin git commit: KYLIN-1356 move all it to a seprate module

2016-01-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/kylin-it/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
--
diff --git 
a/kylin-it/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql 
b/kylin-it/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
new file mode 100644
index 000..229d198
--- /dev/null
+++ b/kylin-it/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
@@ -0,0 +1,54 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+SELECT 
+ test_cal_dt.week_beg_dt_test 
+ ,test_cal_dt.retail_year 
+ ,test_cal_dt.rtl_month_of_rtl_year_id 
+ ,test_cal_dt.retail_week 
+ ,test_category_groupings.meta_categ_name 
+ ,test_category_groupings.categ_lvl2_name 
+ ,test_category_groupings.categ_lvl3_name 
+ ,test_kylin_fact.lstg_format_name 
+ ,test_sites.site_name 
+ ,test_seller_type_dim.seller_type_desc 
+ ,sum(test_kylin_fact.price) as gmv 
+ , count(*) as trans_cnt 
+ FROM test_kylin_fact 
+ inner JOIN test_cal_dt 
+ ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt 
+ inner JOIN test_category_groupings 
+ ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id 
+ inner JOIN test_sites 
+ ON test_kylin_fact.lstg_site_id = test_sites.site_id 
+ inner JOIN test_seller_type_dim 
+ ON test_kylin_fact.slr_segment_cd = test_seller_type_dim.seller_type_cd 
+ where test_cal_dt.retail_year='2013' 
+ and retail_week in(1,2,3,4,5,6,7,7,7) 
+ and (test_category_groupings.meta_categ_name='Collectibles' or 
test_category_groupings.categ_lvl3_name='Dresses') 
+ and test_sites.site_name='Ebay' 
+ and test_cal_dt.retail_year not in ('2014') 
+ group by test_cal_dt.week_beg_dt 
+ ,test_cal_dt.retail_year 
+ ,test_cal_dt.rtl_month_of_rtl_year_id 
+ ,test_cal_dt.retail_week 
+ ,test_category_groupings.meta_categ_name 
+ ,test_category_groupings.categ_lvl2_name 
+ ,test_category_groupings.categ_lvl3_name 
+ ,test_kylin_fact.lstg_format_name 
+ ,test_sites.site_name 

http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/kylin-it/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
--
diff --git 
a/kylin-it/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql 
b/kylin-it/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
new file mode 100644
index 000..8fac5a6
--- /dev/null
+++ b/kylin-it/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
@@ -0,0 +1,55 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+SELECT 
+ test_cal_dt.week_beg_dt_test 
+ ,test_cal_dt.retail_year 
+ ,test_cal_dt.rtl_month_of_rtl_year_id 
+ ,test_cal_dt.retail_week 
+ ,test_category_groupings.meta_categ_name 
+ ,test_category_groupings.categ_lvl2_name 
+ ,test_category_groupings.categ_lvl3_name 
+ ,test_kylin_fact.lstg_format_name 
+ ,test_sites.site_name 
+ ,test_seller_type_dim.seller_type_desc 
+ ,sum(test_kylin_fact.price_amt) as gmv 
+ , count(*) as trans_cnt 
+ FROM test_kylin_fact 
+ inner JOIN test_cal_dt 
+ ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt 
+ inner JOIN test_category_groupings 
+ ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id 
+ inner JOIN test_sites 
+ ON test_kylin_fact.lstg_site_id = test_sites.site_id 
+ inner 

[02/17] kylin git commit: minor, avoid verbose logging in Serializer

2016-01-26 Thread mahongbin
minor, avoid verbose logging in Serializer


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

Branch: refs/heads/2.x-staging
Commit: d2673969fb40436d1c55f359b2b709c55cfab8da
Parents: 0d29d63
Author: honma 
Authored: Tue Jan 26 09:54:57 2016 +0800
Committer: honma 
Committed: Tue Jan 26 21:40:48 2016 +0800

--
 .../java/org/apache/kylin/cube/gridtable/FixLenSerializer.java  | 5 -
 .../apache/kylin/metadata/datatype/BigDecimalSerializer.java| 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/d2673969/core-cube/src/main/java/org/apache/kylin/cube/gridtable/FixLenSerializer.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/gridtable/FixLenSerializer.java 
b/core-cube/src/main/java/org/apache/kylin/cube/gridtable/FixLenSerializer.java
index 2b70e79..24c4a19 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/gridtable/FixLenSerializer.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/gridtable/FixLenSerializer.java
@@ -36,6 +36,7 @@ public class FixLenSerializer extends DataTypeSerializer {
 private ThreadLocal current = new ThreadLocal();
 
 private int fixLen;
+transient int avoidVerbose = 0;
 
 FixLenSerializer(int fixLen) {
 this.fixLen = fixLen;
@@ -59,7 +60,9 @@ public class FixLenSerializer extends DataTypeSerializer {
 } else {
 byte[] bytes = Bytes.toBytes(value.toString());
 if (bytes.length > fixLen) {
-logger.warn("Expect at most " + fixLen + " bytes, but got " + 
bytes.length + ", will truncate, value string: " + value.toString());
+if (avoidVerbose++ % 1 == 0) {
+logger.warn("Expect at most " + fixLen + " bytes, but got 
" + bytes.length + ", will truncate, value string: " + value.toString() + " 
times:" + avoidVerbose);
+}
 }
 out.put(bytes, 0, Math.min(bytes.length, fixLen));
 for (int i = bytes.length; i < fixLen; i++) {

http://git-wip-us.apache.org/repos/asf/kylin/blob/d2673969/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
index 25b4e07..64968b8 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
@@ -48,8 +48,8 @@ public class BigDecimalSerializer extends 
DataTypeSerializer {
 @Override
 public void serialize(BigDecimal value, ByteBuffer out) {
 if (value.scale() > type.getScale()) {
-if (avoidVerbose % 1 == 0) {
-logger.warn("value's scale has exceeded the " + 
type.getScale() + ", cut it off, to ensure encoded value do not exceed 
maxLength " + maxLength + " times:" + (avoidVerbose++));
+if (avoidVerbose++ % 1 == 0) {
+logger.warn("value's scale has exceeded the " + 
type.getScale() + ", cut it off, to ensure encoded value do not exceed 
maxLength " + maxLength + " times:" + (avoidVerbose));
 }
 value = value.setScale(type.getScale(), 
BigDecimal.ROUND_HALF_EVEN);
 }



kylin git commit: KYLIN-1356 fix bug

2016-01-26 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 0b676d5bf -> 5511f2609


KYLIN-1356 fix bug


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

Branch: refs/heads/2.x-staging
Commit: 5511f26095982a4e3b021414cd21bba3378772e4
Parents: 0b676d5
Author: honma 
Authored: Wed Jan 27 11:02:36 2016 +0800
Committer: honma 
Committed: Wed Jan 27 11:02:56 2016 +0800

--
 kylin-it/pom.xml | 1 -
 pom.xml  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/5511f260/kylin-it/pom.xml
--
diff --git a/kylin-it/pom.xml b/kylin-it/pom.xml
index 3fc867d..3f38d16 100644
--- a/kylin-it/pom.xml
+++ b/kylin-it/pom.xml
@@ -31,7 +31,6 @@
 kylin-it
 Kylin:IT
 
-
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/5511f260/pom.xml
--
diff --git a/pom.xml b/pom.xml
index ba87d90..21fd8aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -168,7 +168,7 @@
 
scm:git:https://git-wip-us.apache.org/repos/asf/kylin.git
 
scm:git:https://git-wip-us.apache.org/repos/asf/kylin.git
 https://git-wip-us.apache.org/repos/asf/kylin.git
-apache-kylin-2.0-incubating
+apache-kylin-2.1