Repository: kylin Updated Branches: refs/heads/KYLIN-2428 f2f0c7eb0 -> e9024fbb4
KYLIN-2428 shade third party libraries in job/coprocessor/tool Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/e9024fbb Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/e9024fbb Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/e9024fbb Branch: refs/heads/KYLIN-2428 Commit: e9024fbb4c2c27335a77d54d0fedf7d1255de6db Parents: f2f0c7e Author: Billy Liu <[email protected]> Authored: Thu Feb 9 21:58:20 2017 +0800 Committer: Billy Liu <[email protected]> Committed: Thu Feb 9 21:58:20 2017 +0800 ---------------------------------------------------------------------- assembly/pom.xml | 30 ++++++++++++++++++--- build/bin/get-properties.sh | 2 +- build/conf/kylin-tools-init-log4j.properties | 32 ----------------------- build/conf/kylin-tools-log4j.properties | 9 ++++--- storage-hbase/pom.xml | 15 ++++++++++- tool/pom.xml | 22 ++++++++++++++++ 6 files changed, 68 insertions(+), 42 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/e9024fbb/assembly/pom.xml ---------------------------------------------------------------------- diff --git a/assembly/pom.xml b/assembly/pom.xml index 873abff..7d895fc 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -19,16 +19,20 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <artifactId>kylin-assembly</artifactId> + <name>Apache Kylin - Assembly</name> + <parent> <artifactId>kylin</artifactId> <groupId>org.apache.kylin</groupId> <version>2.0.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>kylin-assembly</artifactId> - <name>Apache Kylin - Assembly</name> + <properties> + <shadeBase>org.apache.kylin.job.shaded</shadeBase> + </properties> <dependencies> <dependency> @@ -182,6 +186,24 @@ <exclude>org.apache.httpcomponents:*</exclude> </excludes> </artifactSet> + <relocations> + <relocation> + <pattern>com</pattern> + <shadedPattern>${shadeBase}.com</shadedPattern> + </relocation> + <relocation> + <pattern>javax</pattern> + <shadedPattern>${shadeBase}.javax</shadedPattern> + </relocation> + <relocation> + <pattern>org.apache.commons</pattern> + <shadedPattern>${shadeBase}.org.apache.commons</shadedPattern> + </relocation> + <relocation> + <pattern>org.roaringbitmap</pattern> + <shadedPattern>${shadeBase}.org.roaringbitmap</shadedPattern> + </relocation> + </relocations> <filters> <filter> <artifact>*:*</artifact> http://git-wip-us.apache.org/repos/asf/kylin/blob/e9024fbb/build/bin/get-properties.sh ---------------------------------------------------------------------- diff --git a/build/bin/get-properties.sh b/build/bin/get-properties.sh index 4be9740..d6ebc2e 100755 --- a/build/bin/get-properties.sh +++ b/build/bin/get-properties.sh @@ -27,5 +27,5 @@ fi job_jar=$(ls $KYLIN_HOME/lib/kylin-job-*.jar) tool_jar=$(ls $KYLIN_HOME/tool/kylin-tool-*.jar) -result=`java -cp $job_jar:$tool_jar -Dlog4j.configuration=file:${KYLIN_HOME}/conf/kylin-tools-init-log4j.properties org.apache.kylin.tool.KylinConfigCLI $1 2>/dev/null` +result=`java -cp $job_jar:$tool_jar -Dlog4j.configuration=file:${KYLIN_HOME}/conf/kylin-tools-log4j.properties org.apache.kylin.tool.KylinConfigCLI $1 2>/dev/null` echo "$result" http://git-wip-us.apache.org/repos/asf/kylin/blob/e9024fbb/build/conf/kylin-tools-init-log4j.properties ---------------------------------------------------------------------- diff --git a/build/conf/kylin-tools-init-log4j.properties b/build/conf/kylin-tools-init-log4j.properties deleted file mode 100644 index 650745d..0000000 --- a/build/conf/kylin-tools-init-log4j.properties +++ /dev/null @@ -1,32 +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. -# - - -# the kylin-tools-init-log4j.properties is mainly for configuring log properties on kylin tools, including: -# 1. tools launched by get-properties.sh script -# -# It's called kylin-tools-log4j.properties so that it won't distract users from the other more important log4j config file: kylin-server-log4j.properties -# enable this by -Dlog4j.configuration=kylin-tools-log4j.properties - -log4j.rootLogger=INFO,stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p [%t %c{1}:%L]: %m%n - -log4j.logger.org.apache.kylin=ERROR http://git-wip-us.apache.org/repos/asf/kylin/blob/e9024fbb/build/conf/kylin-tools-log4j.properties ---------------------------------------------------------------------- diff --git a/build/conf/kylin-tools-log4j.properties b/build/conf/kylin-tools-log4j.properties index 0ba7d2e..e975d18 100644 --- a/build/conf/kylin-tools-log4j.properties +++ b/build/conf/kylin-tools-log4j.properties @@ -25,11 +25,12 @@ # It's called kylin-tools-log4j.properties so that it won't distract users from the other more important log4j config file: kylin-server-log4j.properties # enable this by -Dlog4j.configuration=kylin-tools-log4j.properties -log4j.rootLogger=INFO,stdout +log4j.rootLogger=INFO,stderr -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p [%t %c{1}:%L]: %m%n +log4j.appender.stderr=org.apache.log4j.ConsoleAppender +log4j.appender.stderr.Target=System.err +log4j.appender.stderr.layout=org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.ConversionPattern=%d{ISO8601} %-5p [%t %c{1}:%L]: %m%n #log4j.logger.org.apache.hadoop=ERROR log4j.logger.org.apache.kylin=DEBUG http://git-wip-us.apache.org/repos/asf/kylin/blob/e9024fbb/storage-hbase/pom.xml ---------------------------------------------------------------------- diff --git a/storage-hbase/pom.xml b/storage-hbase/pom.xml index 054b2e7..29ca7e5 100644 --- a/storage-hbase/pom.xml +++ b/storage-hbase/pom.xml @@ -32,8 +32,11 @@ <version>2.0.0-SNAPSHOT</version> </parent> - <dependencies> + <properties> + <shadeBase>org.apache.kylin.coprocessor.shaded</shadeBase> + </properties> + <dependencies> <dependency> <groupId>org.apache.kylin</groupId> <artifactId>kylin-engine-mr</artifactId> @@ -123,6 +126,16 @@ <include>com.tdunning:t-digest</include> </includes> </artifactSet> + <relocations> + <relocation> + <pattern>com.tdunning</pattern> + <shadedPattern>${shadeBase}.com.tdunning</shadedPattern> + </relocation> + <relocation> + <pattern>org.roaringbitmap</pattern> + <shadedPattern>${shadeBase}.org.roaringbitmap</shadedPattern> + </relocation> + </relocations> <filters> <filter> <artifact>*:*</artifact> http://git-wip-us.apache.org/repos/asf/kylin/blob/e9024fbb/tool/pom.xml ---------------------------------------------------------------------- diff --git a/tool/pom.xml b/tool/pom.xml index e9bb9ba..70293d0 100644 --- a/tool/pom.xml +++ b/tool/pom.xml @@ -32,6 +32,10 @@ <version>2.0.0-SNAPSHOT</version> </parent> + <properties> + <shadeBase>org.apache.kylin.tool.shaded</shadeBase> + </properties> + <dependencies> <dependency> <groupId>org.apache.kylin</groupId> @@ -136,6 +140,24 @@ <include>org.apache.kylin:kylin-tool</include> </includes> </artifactSet> + <relocations> + <relocation> + <pattern>com</pattern> + <shadedPattern>${shadeBase}.com</shadedPattern> + </relocation> + <relocation> + <pattern>org.apache.commons</pattern> + <shadedPattern>${shadeBase}.org.apache.commons</shadedPattern> + </relocation> + <relocation> + <pattern>org.apache.http</pattern> + <shadedPattern>${shadeBase}.org.apache.http</shadedPattern> + </relocation> + <relocation> + <pattern>org.apache.log4j</pattern> + <shadedPattern>${shadeBase}.org.apache.log4j</shadedPattern> + </relocation> + </relocations> <filters> <filter> <artifact>*:*</artifact>
