Added shell scripts to make it easier to run, and resource files with expected results for ODPi 2.1.
(cherry picked from commit b67df8e394192ca9604a8b31a6b4fbbb4bb07425) Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/4f19c159 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/4f19c159 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/4f19c159 Branch: refs/heads/master Commit: 4f19c159fafc67e3475a300ec9323d5eab03c748 Parents: 29eebd0 Author: Alan Gates <[email protected]> Authored: Wed Mar 8 15:10:19 2017 -0800 Committer: Roman Shaposhnik <[email protected]> Committed: Thu Mar 23 10:27:14 2017 -0700 ---------------------------------------------------------------------- bigtop-tests/spec-tests/runtime/build.gradle | 2 +- .../odpi/specs/runtime/hadoop/ApiExaminer.java | 8 +-- .../src/main/resources/api-examiner-checker.sh | 52 ++++++++++++++++++++ .../src/main/resources/api-examiner-prep.sh | 44 +++++++++++++++++ .../hadoop-common-2.7.3-api-report.json | 1 + .../resources/hadoop-hdfs-2.7.3-api-report.json | 1 + ...-mapreduce-client-core-2.7.3-api-report.json | 1 + .../hadoop-yarn-api-2.7.3-api-report.json | 1 + .../hadoop-yarn-client-2.7.3-api-report.json | 1 + .../hadoop-yarn-common-2.7.3-api-report.json | 1 + 10 files changed, 104 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/4f19c159/bigtop-tests/spec-tests/runtime/build.gradle ---------------------------------------------------------------------- diff --git a/bigtop-tests/spec-tests/runtime/build.gradle b/bigtop-tests/spec-tests/runtime/build.gradle index 0eadd96..97e3635 100644 --- a/bigtop-tests/spec-tests/runtime/build.gradle +++ b/bigtop-tests/spec-tests/runtime/build.gradle @@ -40,7 +40,7 @@ dependencies { testCompile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-common', version: '2.7.2' testCompile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: '2.7.2' testCompile group: 'org.apache.hive', name: 'hive-exec', version: '1.2.1' - testCompile "junit:junit:4.11" + testCompile "junit:junit:4.11" if (System.env.HADOOP_CONF_DIR) testRuntime files(System.env.HADOOP_CONF_DIR) } http://git-wip-us.apache.org/repos/asf/bigtop/blob/4f19c159/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hadoop/ApiExaminer.java ---------------------------------------------------------------------- diff --git a/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hadoop/ApiExaminer.java b/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hadoop/ApiExaminer.java index c49be13..2ae97a2 100644 --- a/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hadoop/ApiExaminer.java +++ b/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hadoop/ApiExaminer.java @@ -51,7 +51,6 @@ public class ApiExaminer { private static final Log LOG = LogFactory.getLog(ApiExaminer.class.getName()); static private Set<String> unloadableClasses; - //static private List<String> jarsWeCareAbout; private List<String> errors; private List<String> warnings; @@ -65,17 +64,12 @@ public class ApiExaminer { /* jarsWeCareAbout = new ArrayList<>(); + jarsWeCareAbout.add("hadoop-common"); jarsWeCareAbout.add("hadoop-hdfs"); jarsWeCareAbout.add("hadoop-yarn-common"); jarsWeCareAbout.add("hadoop-yarn-client"); jarsWeCareAbout.add("hadoop-yarn-api"); - jarsWeCareAbout.add("hadoop-mapreduce-client-app"); - jarsWeCareAbout.add("hadoop-mapreduce-client-common"); jarsWeCareAbout.add("hadoop-mapreduce-client-core"); - jarsWeCareAbout.add("hadoop-mapreduce-client-hs"); - jarsWeCareAbout.add("hadoop-mapreduce-client-hs-plugins"); - jarsWeCareAbout.add("hadoop-mapreduce-client-jobclient"); - jarsWeCareAbout.add("hadoop-mapreduce-client-shuffle"); */ } http://git-wip-us.apache.org/repos/asf/bigtop/blob/4f19c159/bigtop-tests/spec-tests/runtime/src/main/resources/api-examiner-checker.sh ---------------------------------------------------------------------- diff --git a/bigtop-tests/spec-tests/runtime/src/main/resources/api-examiner-checker.sh b/bigtop-tests/spec-tests/runtime/src/main/resources/api-examiner-checker.sh new file mode 100755 index 0000000..1cb9583 --- /dev/null +++ b/bigtop-tests/spec-tests/runtime/src/main/resources/api-examiner-checker.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +############################################################################ +# 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 +# <p> +# http://www.apache.org/licenses/LICENSE-2.0 +# <p> +# 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. +############################################################################ + +function usage() { + echo "You must set the following variables: HADOOP_COMMON_HOME HADOOP_COMMON_DIR HADOOP_COMMON_LIB_JARS_DIR " + echo "HADOOP_HDFS_HOME HDFS_DIR HDFS_LIB_JARS_DIR HADOOP_YARN_HOME YARN_DIR YARN_LIB_JARS_DIR " + echo "HADOOP_MAPRED_HOME MAPRED_DIR MAPRED_LIB_JARS_DIR BIGTOP_HOME (location of bigtop source)" + echo "You can get the Hadoop environment variables by using hadoop envvars, hdfs envvars, yarn envvars, and mapred envvars" +} + +for envar in x$HADOOP_COMMON_HOME x$HADOOP_COMMON_DIR x$HADOOP_COMMON_LIB_JARS_DIR x$HADOOP_HDFS_HOME x$HDFS_DIR \ + x$HDFS_LIB_JARS_DIR x$HADOOP_YARN_HOME x$YARN_DIR x$YARN_LIB_JARS_DIR x$HADOOP_MAPRED_HOME x$MAPRED_DIR \ + x$MAPRED_LIB_JARS_DIR +do + if [ "${envar}" = "x" ] + then + usage + exit 1 + fi +done + + +for dir in $BIGTOP_HOME/bigtop-tests/spec-tests/runtime/build/libs/ $HADOOP_COMMON_HOME/$HADOOP_COMMON_DIR \ + $HADOOP_COMMON_HOME/$HADOOP_COMMON_LIB_JARS_DIR $HADOOP_HDFS_HOME/$HDFS_DIR \ + $HADOOP_HDFS_HOME/$HDFS_LIB_JARS_DIR $HADOOP_YARN_HOME/$YARN_DIR $HADOOP_YARN_HOME/$YARN_LIB_JARS_DIR \ + $HADOOP_MAPRED_HOME/$MAPRED_DIR $HADOOP_MAPRED_HOME/$MAPRED_LIB_JARS_DIR +do + for jar in `find $dir -name \*.jar` + do + CLASSPATH=$CLASSPATH:$jar + done +done + +java -cp $CLASSPATH org.odpi.specs.runtime.hadoop.ApiExaminer $@ + http://git-wip-us.apache.org/repos/asf/bigtop/blob/4f19c159/bigtop-tests/spec-tests/runtime/src/main/resources/api-examiner-prep.sh ---------------------------------------------------------------------- diff --git a/bigtop-tests/spec-tests/runtime/src/main/resources/api-examiner-prep.sh b/bigtop-tests/spec-tests/runtime/src/main/resources/api-examiner-prep.sh new file mode 100755 index 0000000..0bdfe05 --- /dev/null +++ b/bigtop-tests/spec-tests/runtime/src/main/resources/api-examiner-prep.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +############################################################################ +# 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 +# <p> +# http://www.apache.org/licenses/LICENSE-2.0 +# <p> +# 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. +############################################################################ + +if [ "x${APACHE_HADOOP_DIR}" = "x" ] +then + echo "You must set APACHE_HADOOP_DIR to the directory you have placed the Apache Hadoop binary distribution in" + exit 1 +fi + +if [ "x${BIGTOP_HOME}" = "x" ] +then + echo "You must set BIGTOP_HOME to the root directory for your bigtop source" + exit 1 +fi + +for jar in `find $BIGTOP_HOME/bigtop-tests/spec-tests/runtime/build/libs/ -name \*.jar` +do + CLASSPATH=$CLASSPATH:$jar +done + +for jar in `find $APACHE_HADOOP_DIR -name \*.jar` +do + CLASSPATH=$CLASSPATH:$jar +done + +java -cp $CLASSPATH org.odpi.specs.runtime.hadoop.ApiExaminer $@ +
