kylin git commit: minor, add filterPushdown setter in GTScanRequest
Repository: kylin Updated Branches: refs/heads/master 4047e8dc5 -> ef0fc8687 minor, add filterPushdown setter in GTScanRequest Signed-off-by: Hongbin Ma Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ef0fc868 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ef0fc868 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ef0fc868 Branch: refs/heads/master Commit: ef0fc86876db488bf65353ec50e5f29411835b82 Parents: 4047e8d Author: Roger Shi Authored: Mon Feb 6 15:40:56 2017 +0800 Committer: Hongbin Ma Committed: Mon Feb 6 15:46:26 2017 +0800 -- .../src/main/java/org/apache/kylin/gridtable/GTScanRequest.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/ef0fc868/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java index dc90ed6..c45f90c 100644 --- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java +++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java @@ -253,6 +253,10 @@ public class GTScanRequest { return filterPushDown; } +public void setFilterPushDown(TupleFilter filter) { +filterPushDown = filter; +} + public ImmutableBitSet getDimensions() { return this.getColumns().andNot(this.getAggrMetrics()); }
[kylin] Git Push Summary
Repository: kylin Updated Branches: refs/heads/KYLIN-2361 [deleted] 9a3bd71c8
[2/3] kylin git commit: KYLIN-2361 Upgrade Tomcat 8.5.9
KYLIN-2361 Upgrade Tomcat 8.5.9 Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/2b60ac6a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/2b60ac6a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/2b60ac6a Branch: refs/heads/master Commit: 2b60ac6a42741ca70d63e6680a0fbe9aeed7d46e Parents: a058bfb Author: Billy Liu Authored: Wed Jan 18 17:19:04 2017 +0800 Committer: Billy Liu Committed: Sat Feb 4 11:42:02 2017 +0800 -- build/script/download-tomcat.sh | 8 pom.xml | 2 +- .../java/org/apache/kylin/rest/DebugTomcat.java | 16 +--- .../kylin/ext/CustomizedWebappClassloader.java | 5 ++--- 4 files changed, 16 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/2b60ac6a/build/script/download-tomcat.sh -- diff --git a/build/script/download-tomcat.sh b/build/script/download-tomcat.sh index b3aa509..bdfe351 100755 --- a/build/script/download-tomcat.sh +++ b/build/script/download-tomcat.sh @@ -27,19 +27,19 @@ if [[ `uname -a` =~ "Darwin" ]]; then alias md5cmd="md5 -q" fi -tomcat_pkg_version="7.0.69" -tomcat_pkg_md5="10a071e5169a1a8b14ff35a0ad181052" +tomcat_pkg_version="8.5.9" +tomcat_pkg_md5="b41270a64b7774c964e4bec813eea2ed" if [ ! -f "build/apache-tomcat-${tomcat_pkg_version}.tar.gz" ] then echo "no binary file found" -wget --directory-prefix=build/ http://archive.apache.org/dist/tomcat/tomcat-7/v${tomcat_pkg_version}/bin/apache-tomcat-${tomcat_pkg_version}.tar.gz || echo "Download tomcat failed" +wget --directory-prefix=build/ http://archive.apache.org/dist/tomcat/tomcat-8/v${tomcat_pkg_version}/bin/apache-tomcat-${tomcat_pkg_version}.tar.gz || echo "Download tomcat failed" else if [ `md5cmd build/apache-tomcat-${tomcat_pkg_version}.tar.gz | awk '{print $1}'` != "${tomcat_pkg_md5}" ] then echo "md5 check failed" rm build/apache-tomcat-${tomcat_pkg_version}.tar.gz -wget --directory-prefix=build/ http://archive.apache.org/dist/tomcat/tomcat-7/v${tomcat_pkg_version}/bin/apache-tomcat-${tomcat_pkg_version}.tar.gz || echo "download tomcat failed" +wget --directory-prefix=build/ http://archive.apache.org/dist/tomcat/tomcat-8/v${tomcat_pkg_version}/bin/apache-tomcat-${tomcat_pkg_version}.tar.gz || echo "download tomcat failed" fi fi unalias md5cmd http://git-wip-us.apache.org/repos/asf/kylin/blob/2b60ac6a/pom.xml -- diff --git a/pom.xml b/pom.xml index bf33e07..b82eee2 100644 --- a/pom.xml +++ b/pom.xml @@ -101,7 +101,7 @@ 3.2.4 2.4.0 2.5 -7.0.69 +8.5.9 3.1 http://git-wip-us.apache.org/repos/asf/kylin/blob/2b60ac6a/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java -- diff --git a/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java b/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java index 3461e1d..1b47f79 100644 --- a/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java +++ b/server/src/main/java/org/apache/kylin/rest/DebugTomcat.java @@ -21,11 +21,13 @@ package org.apache.kylin.rest; import org.apache.catalina.Context; import org.apache.catalina.core.AprLifecycleListener; import org.apache.catalina.core.StandardServer; -import org.apache.catalina.deploy.ErrorPage; import org.apache.catalina.startup.Tomcat; import org.apache.commons.lang3.StringUtils; import org.apache.hadoop.util.Shell; import org.apache.kylin.common.KylinConfig; +import org.apache.tomcat.JarScanFilter; +import org.apache.tomcat.JarScanType; +import org.apache.tomcat.util.descriptor.web.ErrorPage; import java.io.File; import java.lang.reflect.Field; @@ -127,12 +129,12 @@ public class DebugTomcat { notFound.setLocation("/index.html"); webContext.addErrorPage(notFound); webContext.addWelcomeFile("index.html"); -//webContext.getJarScanner().setJarScanFilter(new JarScanFilter() { -//@Override -//public boolean check(JarScanType arg0, String arg1) { -//return false; -//} -//}); +webContext.getJarScanner().setJarScanFilter(new JarScanFilter() { +@Override +public boolean check(JarScanType arg0, String arg1) { +return false; +} +}); // tomcat start tomcat.start(); http://git-wip-us.apache.org/repos/asf/kylin/blob/2b60ac6a/tomcat-ext/src/main/java/org/apache/kylin/ext/CustomizedWebappClassloader.java -
[1/3] kylin git commit: KYLIN-2361 add Tomcat8 ordered class loader
Repository: kylin Updated Branches: refs/heads/master 19252848e -> 4047e8dc5 KYLIN-2361 add Tomcat8 ordered class loader Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/9a3bd71c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/9a3bd71c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/9a3bd71c Branch: refs/heads/master Commit: 9a3bd71c8e5ce9dc13e38560efc556dc862819a1 Parents: 2b60ac6 Author: Billy Liu Authored: Sat Feb 4 11:41:49 2017 +0800 Committer: Billy Liu Committed: Sat Feb 4 11:42:02 2017 +0800 -- .../kylin/ext/CustomizedWebappClassloader.java | 4 +- .../kylin/ext/OrderedWebResourceRoot.java | 286 +++ .../kylin/ext/WebappOrderedClassLoader.java | 66 + 3 files changed, 353 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/9a3bd71c/tomcat-ext/src/main/java/org/apache/kylin/ext/CustomizedWebappClassloader.java -- diff --git a/tomcat-ext/src/main/java/org/apache/kylin/ext/CustomizedWebappClassloader.java b/tomcat-ext/src/main/java/org/apache/kylin/ext/CustomizedWebappClassloader.java index f241865..bbf4053 100644 --- a/tomcat-ext/src/main/java/org/apache/kylin/ext/CustomizedWebappClassloader.java +++ b/tomcat-ext/src/main/java/org/apache/kylin/ext/CustomizedWebappClassloader.java @@ -18,14 +18,12 @@ package org.apache.kylin.ext; -import org.apache.catalina.loader.ParallelWebappClassLoader; - /** * simple extension to standard ParallelWebappClassLoader * the only difference is that CustomizedWebappClassloader is able to delegate more packages * to parent classloaders */ -public class CustomizedWebappClassloader extends ParallelWebappClassLoader { +public class CustomizedWebappClassloader extends WebappOrderedClassLoader { /** * Set of package names which are not allowed to be loaded from a webapp * class loader without delegating first. http://git-wip-us.apache.org/repos/asf/kylin/blob/9a3bd71c/tomcat-ext/src/main/java/org/apache/kylin/ext/OrderedWebResourceRoot.java -- diff --git a/tomcat-ext/src/main/java/org/apache/kylin/ext/OrderedWebResourceRoot.java b/tomcat-ext/src/main/java/org/apache/kylin/ext/OrderedWebResourceRoot.java new file mode 100644 index 000..9784bd8 --- /dev/null +++ b/tomcat-ext/src/main/java/org/apache/kylin/ext/OrderedWebResourceRoot.java @@ -0,0 +1,286 @@ +/* + * 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.ext; + +import java.io.InputStream; +import java.net.URL; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; +import java.util.Set; + +import org.apache.catalina.Context; +import org.apache.catalina.LifecycleException; +import org.apache.catalina.LifecycleListener; +import org.apache.catalina.LifecycleState; +import org.apache.catalina.TrackedWebResource; +import org.apache.catalina.WebResource; +import org.apache.catalina.WebResourceRoot; +import org.apache.catalina.WebResourceSet; + +public class OrderedWebResourceRoot implements WebResourceRoot { + +private static final String WEB_INF_LIB_PATH = "/WEB-INF/lib"; + +private static final Comparator WEB_RESOURCE_COMPARATOR = new Comparator() { +@Override +public int compare(WebResource o1, WebResource o2) { +return o1.getName().compareTo(o2.getName()); +} +}; + +private WebResourceRoot delegate; + +public OrderedWebResourceRoot(WebResourceRoot delegate) { +this.delegate = delegate; +} + +@Override +public WebResource[] listResources(String path) { +WebResource[] webResources = delegate.listResources(path); + +if (WEB_INF_LIB_PATH.equals(path)) { +Arrays.sort(webResources, WEB_RESOURCE_COMPARATOR); +} + +return webResources; +} + +@Override +public void addLifecycleListener(LifecycleListener listener) { +de
[3/3] kylin git commit: Merge branch 'KYLIN-2361'
Merge branch 'KYLIN-2361' Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4047e8dc Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4047e8dc Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4047e8dc Branch: refs/heads/master Commit: 4047e8dc5bf8aad7c8db79abb5ef2c3be15cd622 Parents: 1925284 9a3bd71 Author: Billy Liu Authored: Mon Feb 6 14:37:46 2017 +0800 Committer: Billy Liu Committed: Mon Feb 6 14:37:46 2017 +0800 -- build/script/download-tomcat.sh | 8 +- pom.xml | 2 +- .../java/org/apache/kylin/rest/DebugTomcat.java | 16 +- .../kylin/ext/CustomizedWebappClassloader.java | 9 +- .../kylin/ext/OrderedWebResourceRoot.java | 286 +++ .../kylin/ext/WebappOrderedClassLoader.java | 66 + 6 files changed, 369 insertions(+), 18 deletions(-) --
kylin git commit: KYLIN-2426 fix hardcode path
Repository: kylin Updated Branches: refs/heads/master 9cd6c7075 -> 19252848e KYLIN-2426 fix hardcode path Signed-off-by: lidongsjtu Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/19252848 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/19252848 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/19252848 Branch: refs/heads/master Commit: 19252848e27423edeb6f3ebed6dea453db1904e9 Parents: 9cd6c70 Author: etherge Authored: Mon Feb 6 11:38:42 2017 +0800 Committer: lidongsjtu Committed: Mon Feb 6 13:48:38 2017 +0800 -- .../storage/hdfs/ITHDFSResourceStoreTest.java | 39 +++- 1 file changed, 21 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/19252848/kylin-it/src/test/java/org/apache/kylin/storage/hdfs/ITHDFSResourceStoreTest.java -- diff --git a/kylin-it/src/test/java/org/apache/kylin/storage/hdfs/ITHDFSResourceStoreTest.java b/kylin-it/src/test/java/org/apache/kylin/storage/hdfs/ITHDFSResourceStoreTest.java index ec12722..aa5a104 100644 --- a/kylin-it/src/test/java/org/apache/kylin/storage/hdfs/ITHDFSResourceStoreTest.java +++ b/kylin-it/src/test/java/org/apache/kylin/storage/hdfs/ITHDFSResourceStoreTest.java @@ -18,6 +18,9 @@ package org.apache.kylin.storage.hdfs; +import static junit.framework.TestCase.assertTrue; + +import org.apache.commons.lang3.StringUtils; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.kylin.common.KylinConfig; @@ -28,18 +31,18 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import static junit.framework.TestCase.assertTrue; - public class ITHDFSResourceStoreTest extends HBaseMetadataTestCase { KylinConfig kylinConfig; FileSystem fs; +String workingDir; @Before public void setup() throws Exception { this.createTestMetadata(); kylinConfig = KylinConfig.getInstanceFromEnv(); fs = HadoopUtil.getWorkingFileSystem(); +workingDir = getHdfsWorkingDirWithoutScheme(kylinConfig); } @After @@ -47,32 +50,33 @@ public class ITHDFSResourceStoreTest extends HBaseMetadataTestCase { this.cleanupTestMetadata(); } +private String getHdfsWorkingDirWithoutScheme(KylinConfig kylinConfig) { +String hdfsWorkingDir = kylinConfig.getHdfsWorkingDirectory(); +int thirdIndex = StringUtils.ordinalIndexOf(hdfsWorkingDir, "/", 3); +int fourthIndex = StringUtils.ordinalIndexOf(hdfsWorkingDir, "/", 5); +return hdfsWorkingDir.substring(thirdIndex, fourthIndex); +} + @Test public void testBasic() throws Exception { -String oldUrl = kylinConfig.getMetadataUrl(); -String path = "/kylin/kylin_metadata/metadata"; -kylinConfig.setProperty("kylin.metadata.url", path + "@hdfs"); -HDFSResourceStore store = new HDFSResourceStore(kylinConfig); -ResourceStoreTest.testAStore(store); -kylinConfig.setProperty("kylin.metadata.url", oldUrl); -assertTrue(fs.exists(new Path(path))); +String path = workingDir + "/metadata_test1"; +doTestWithPath(path); } @Test public void testQalifiedName() throws Exception { -String oldUrl = kylinConfig.getMetadataUrl(); -String path = "hdfs:///kylin/kylin_metadata/metadata_test1"; -kylinConfig.setProperty("kylin.metadata.url", path + "@hdfs"); -HDFSResourceStore store = new HDFSResourceStore(kylinConfig); -ResourceStoreTest.testAStore(store); -kylinConfig.setProperty("kylin.metadata.url", oldUrl); -assertTrue(fs.exists(new Path(path))); +String path = "hdfs://" + workingDir + "/metadata_test2"; +doTestWithPath(path); } @Test public void testFullQalifiedName() throws Exception { +String path = fs.getUri() + workingDir + "/metadata_test3"; +doTestWithPath(path); +} + +private void doTestWithPath(String path) throws Exception { String oldUrl = kylinConfig.getMetadataUrl(); -String path = "hdfs://sandbox.hortonworks.com:8020/kylin/kylin_metadata/metadata_test2"; kylinConfig.setProperty("kylin.metadata.url", path + "@hdfs"); HDFSResourceStore store = new HDFSResourceStore(kylinConfig); ResourceStoreTest.testAStore(store); @@ -80,5 +84,4 @@ public class ITHDFSResourceStoreTest extends HBaseMetadataTestCase { assertTrue(fs.exists(new Path(path))); } - }