KYLIN-2413 a new profile for cdh binary packages
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/eb73da7a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/eb73da7a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/eb73da7a Branch: refs/heads/KYLIN-2361 Commit: eb73da7a0b27540af54fec23b561b390405620c5 Parents: 169c3de Author: lidongsjtu <lid...@apache.org> Authored: Mon Jan 23 11:30:13 2017 +0800 Committer: lidongsjtu <lid...@apache.org> Committed: Mon Jan 23 13:03:29 2017 +0800 ---------------------------------------------------------------------- build/script/build.sh | 2 +- build/script/package.sh | 11 +- .../kylin/engine/mr/steps/MockupMapContext.java | 11 +- pom.xml | 114 +++++++++++++++++++ .../storage/hbase/steps/MockupMapContext.java | 17 +-- tool/pom.xml | 10 ++ 6 files changed, 145 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/eb73da7a/build/script/build.sh ---------------------------------------------------------------------- diff --git a/build/script/build.sh b/build/script/build.sh index c68ca94..458c612 100755 --- a/build/script/build.sh +++ b/build/script/build.sh @@ -22,7 +22,7 @@ echo "package back-end" dir=$(dirname ${0}) cd ${dir}/../.. -mvn clean install -DskipTests || { exit 1; } +mvn clean install -DskipTests $@ || { exit 1; } #package webapp echo 'package front-end' http://git-wip-us.apache.org/repos/asf/kylin/blob/eb73da7a/build/script/package.sh ---------------------------------------------------------------------- diff --git a/build/script/package.sh b/build/script/package.sh index c850ec3..a58a5ce 100755 --- a/build/script/package.sh +++ b/build/script/package.sh @@ -74,9 +74,8 @@ cat << EOF > build/commit_SHA1 EOF git rev-parse HEAD >> build/commit_SHA1 -sh build/script/build.sh || { exit 1; } -sh build/script/download-tomcat.sh || { exit 1; } -sh build/script/download-spark.sh || { exit 1; } -sh build/script/prepare.sh || { exit 1; } -sh build/script/compress.sh || { exit 1; } - +sh build/script/build.sh $@ || { exit 1; } +sh build/script/download-tomcat.sh || { exit 1; } +sh build/script/download-spark.sh || { exit 1; } +sh build/script/prepare.sh || { exit 1; } +sh build/script/compress.sh || { exit 1; } http://git-wip-us.apache.org/repos/asf/kylin/blob/eb73da7a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java ---------------------------------------------------------------------- diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java index dfbba14..92115c9 100644 --- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java +++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java @@ -47,7 +47,7 @@ import org.apache.kylin.engine.mr.common.BatchConstants; * */ @SuppressWarnings({ "rawtypes", "unchecked" }) -public class MockupMapContext implements MapContext{ +public class MockupMapContext implements MapContext { private Configuration hconf; @@ -60,7 +60,7 @@ public class MockupMapContext implements MapContext{ return new WrappedMapper().getMapContext(new MockupMapContext(hconf, outKV)); } - public MockupMapContext(Configuration hconf, Object[] outKV){ + public MockupMapContext(Configuration hconf, Object[] outKV) { this.hconf = hconf; this.outKV = outKV; } @@ -109,7 +109,6 @@ public class MockupMapContext implements MapContext{ throw new NotImplementedException(); } - @Override public float getProgress() { throw new NotImplementedException(); } @@ -224,7 +223,6 @@ public class MockupMapContext implements MapContext{ throw new NotImplementedException(); } - @Override public boolean getTaskCleanupNeeded() { throw new NotImplementedException(); } @@ -239,7 +237,6 @@ public class MockupMapContext implements MapContext{ throw new NotImplementedException(); } - @Override public IntegerRanges getProfileTaskRange(boolean isMap) { throw new NotImplementedException(); } @@ -318,4 +315,8 @@ public class MockupMapContext implements MapContext{ public RawComparator<?> getCombinerKeyGroupingComparator() { throw new NotImplementedException(); } + + public boolean userClassesTakesPrecedence() { + throw new NotImplementedException(); + } } http://git-wip-us.apache.org/repos/asf/kylin/blob/eb73da7a/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 439566a..520ac0c 100644 --- a/pom.xml +++ b/pom.xml @@ -355,6 +355,11 @@ </dependency> <dependency> <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-yarn-common</artifactId> + <version>${hadoop2.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-core</artifactId> <version>${hadoop2.version}</version> </dependency> @@ -812,6 +817,11 @@ <id>conjars</id> <url>http://conjars.org/repo/</url> </repository> + + <repository> + <id>cloudera</id> + <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url> + </repository> </repositories> <build> @@ -1168,6 +1178,110 @@ </build> </profile> <profile> + <id>cdh-5.7</id> + <properties> + <hadoop2.version>2.6.0-cdh5.7.0</hadoop2.version> + <yarn.version>2.6.0-cdh5.7.0</yarn.version> + <hive.version>1.1.0-cdh5.7.0</hive.version> + <hive-hcatalog.version>1.1.0-cdh5.7.0</hive-hcatalog.version> + <hbase-hadoop2.version>1.2.0-cdh5.7.0</hbase-hadoop2.version> + <zookeeper.version>3.4.5-cdh5.7.0</zookeeper.version> + </properties> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <fork>true</fork> + <meminitial>1024m</meminitial> + <maxmem>2048m</maxmem> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-jamm</id> + <goals> + <goal>copy</goal> + </goals> + <phase>generate-test-resources</phase> + <configuration> + <artifactItems> + <artifactItem> + <groupId>com.github.jbellis</groupId> + <artifactId>jamm</artifactId> + <outputDirectory>${project.build.testOutputDirectory}</outputDirectory> + <destFileName>jamm.jar</destFileName> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <configuration> + <append>true</append> + <destFile> + ${sonar.jacoco.reportPath} + </destFile> + </configuration> + <executions> + <execution> + <id>pre-test</id> + <goals> + <goal>prepare-agent</goal> + </goals> + <configuration> + <propertyName>surefireArgLine</propertyName> + </configuration> + </execution> + <execution> + <id>post-test</id> + <phase>test</phase> + <goals> + <goal>report</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.19.1</version> + <configuration> + <reportsDirectory>${project.basedir}/../target/surefire-reports</reportsDirectory> + <excludes> + <exclude>**/IT*.java</exclude> + </excludes> + <systemProperties> + <property> + <name>useSandbox</name> + <value>false</value> + </property> + <property> + <name>buildCubeUsingProvidedData</name> + <value>false</value> + </property> + <property> + <name>log4j.configuration</name> + <value>file:${project.basedir}/../build/conf/kylin-tools-log4j.properties</value> + </property> + </systemProperties> + <argLine>-javaagent:${project.build.testOutputDirectory}/jamm.jar ${argLine} ${surefireArgLine}</argLine> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> <!-- This profile adds/overrides few features of the 'apache-release' profile in the parent pom. --> <id>apache-release</id> http://git-wip-us.apache.org/repos/asf/kylin/blob/eb73da7a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/MockupMapContext.java ---------------------------------------------------------------------- diff --git a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/MockupMapContext.java b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/MockupMapContext.java index d953d9c..536634d 100644 --- a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/MockupMapContext.java +++ b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/steps/MockupMapContext.java @@ -44,10 +44,10 @@ import org.apache.kylin.engine.mr.common.BatchConstants; /** * @author yangli9 - * + * */ @SuppressWarnings({ "rawtypes", "unchecked" }) -public class MockupMapContext implements MapContext { +public class MockupMapContext implements MapContext { private Configuration hconf; @@ -60,7 +60,7 @@ public class MockupMapContext implements MapContext { return new WrappedMapper().getMapContext(new MockupMapContext(hconf, outKV)); } - public MockupMapContext(Configuration hconf, Object[] outKV){ + public MockupMapContext(Configuration hconf, Object[] outKV) { this.hconf = hconf; this.outKV = outKV; } @@ -100,16 +100,15 @@ public class MockupMapContext implements MapContext { } @Override - public void setStatus(String msg) { + public String getStatus() { throw new NotImplementedException(); } @Override - public String getStatus() { + public void setStatus(String msg) { throw new NotImplementedException(); } - @Override public float getProgress() { throw new NotImplementedException(); } @@ -224,7 +223,6 @@ public class MockupMapContext implements MapContext { throw new NotImplementedException(); } - @Override public boolean getTaskCleanupNeeded() { throw new NotImplementedException(); } @@ -239,7 +237,6 @@ public class MockupMapContext implements MapContext { throw new NotImplementedException(); } - @Override public IntegerRanges getProfileTaskRange(boolean isMap) { throw new NotImplementedException(); } @@ -318,4 +315,8 @@ public class MockupMapContext implements MapContext { public RawComparator<?> getCombinerKeyGroupingComparator() { throw new NotImplementedException(); } + + public boolean userClassesTakesPrecedence() { + throw new NotImplementedException(); + } } http://git-wip-us.apache.org/repos/asf/kylin/blob/eb73da7a/tool/pom.xml ---------------------------------------------------------------------- diff --git a/tool/pom.xml b/tool/pom.xml index 919a903..91040d4 100644 --- a/tool/pom.xml +++ b/tool/pom.xml @@ -60,6 +60,16 @@ <artifactId>hbase-client</artifactId> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-yarn-api</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-yarn-common</artifactId> + <scope>provided</scope> + </dependency> <!-- Env & Test --> <dependency>