You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2016/06/30 20:49:47 UTC
[1/5] hbase git commit: HBASE-15729 Remove old JDiff wrapper scripts
in dev-support
Repository: hbase
Updated Branches:
refs/heads/branch-1 4471b1a02 -> f280fa21f
HBASE-15729 Remove old JDiff wrapper scripts in dev-support
Signed-off-by: Sean Busbey <bu...@apache.org>
Conflicts:
dev-support/jdiffHBasePublicAPI.sh
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f280fa21
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f280fa21
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f280fa21
Branch: refs/heads/branch-1
Commit: f280fa21fb0b20871f27aa0bff45b379b4d9b0e5
Parents: 7f56fb2
Author: Dima Spivak <ds...@cloudera.com>
Authored: Wed Apr 27 15:53:05 2016 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Thu Jun 30 15:48:13 2016 -0500
----------------------------------------------------------------------
.../hbase_jdiff_acrossSingularityTemplate.xml | 59 -----
.../hbase_jdiff_afterSingularityTemplate.xml | 66 -----
dev-support/hbase_jdiff_template.xml | 53 ----
dev-support/jdiffHBasePublicAPI.sh | 249 -------------------
dev-support/jdiffHBasePublicAPI_common.sh | 76 ------
5 files changed, 503 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/f280fa21/dev-support/hbase_jdiff_acrossSingularityTemplate.xml
----------------------------------------------------------------------
diff --git a/dev-support/hbase_jdiff_acrossSingularityTemplate.xml b/dev-support/hbase_jdiff_acrossSingularityTemplate.xml
deleted file mode 100644
index e8c5867..0000000
--- a/dev-support/hbase_jdiff_acrossSingularityTemplate.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-
-<project name="jdiff" default="jdiff_report" basedir="JDIFF_FOLDER">
-
-<description>
-Creates a report in the directory "hbase_jdiff_report-p-PREVIOUS_BRANCH-c-CURRENT_BRANCH" of the default jdiff report folder.
-This defaults to /tmp/jdiff but can optionally be specified by export $JDIFF_WORKING_DIRECTORY.
-</description>
-
-<target name="jdiff_report" depends="">
- <!-- This variable is used by the Ant JDiff task. Set it to the
- location where the jdiff package was unpacked -->
- <property name="JDIFF_HOME" value="JDIFF_HOME_NAME" />
- <property name="OLD_BRANCH" value="OLD_BRANCH_NAME"/>
- <property name="NEW_BRANCH" value="NEW_BRANCH_NAME"/>
-
- <taskdef name="jdiff"
- classname="jdiff.JDiffAntTask"
- classpath="${JDIFF_HOME}/antjdiff.jar" />
- <jdiff destdir="hbase_jdiff_report"
- verbose="off"
- stats="on">
- <old name="V1">
- <!-- This is the location of your old source files -->
- <dirset dir="${OLD_BRANCH}/src/main/java" includes="**" />
- </old>
- <new name="V2">
- <!-- This is the location of your new source files -->
- <dirset dir="${NEW_BRANCH}/hbase-server/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-client/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-common/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-protocol/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-it/src/test/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-hadoop-compat/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-hadoop2-compat/src/main/java" includes="**" />
- </new>
- </jdiff>
-</target>
-
-</project>
-
http://git-wip-us.apache.org/repos/asf/hbase/blob/f280fa21/dev-support/hbase_jdiff_afterSingularityTemplate.xml
----------------------------------------------------------------------
diff --git a/dev-support/hbase_jdiff_afterSingularityTemplate.xml b/dev-support/hbase_jdiff_afterSingularityTemplate.xml
deleted file mode 100644
index 6c4cd93..0000000
--- a/dev-support/hbase_jdiff_afterSingularityTemplate.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-
-<project name="jdiff" default="jdiff_report" basedir="JDIFF_FOLDER">
-
-<description>
-Creates a report in the directory "hbase_jdiff_report-p-PREVIOUS_BRANCH-c-CURRENT_BRANCH" of the default jdiff report folder.
-This defaults to /tmp/jdiff but can optionally be specified by export $JDIFF_WORKING_DIRECTORY.
-</description>
-
-<target name="jdiff_report" depends="">
- <!-- This variable is used by the Ant JDiff task. Set it to the
- location where the jdiff package was unpacked -->
- <property name="JDIFF_HOME" value="JDIFF_HOME_NAME" />
- <property name="OLD_BRANCH" value="OLD_BRANCH_NAME"/>
- <property name="NEW_BRANCH" value="NEW_BRANCH_NAME"/>
-
- <taskdef name="jdiff"
- classname="jdiff.JDiffAntTask"
- classpath="${JDIFF_HOME}/antjdiff.jar" />
- <jdiff destdir="hbase_jdiff_report"
- verbose="off"
- stats="on">
- <old name="V1">
- <!-- This is the location of your old source files -->
- <dirset dir="${OLD_BRANCH}/hbase-server/src/main/java" includes="**" />
- <dirset dir="${OLD_BRANCH}/hbase-client/src/main/java" includes="**" />
- <dirset dir="${OLD_BRANCH}/hbase-common/src/main/java" includes="**" />
- <dirset dir="${OLD_BRANCH}/hbase-protocol/src/main/java" includes="**" />
- <dirset dir="${OLD_BRANCH}/hbase-it/src/test/java" includes="**" />
- <dirset dir="${OLD_BRANCH}/hbase-hadoop-compat/src/main/java" includes="**" />
- <dirset dir="${OLD_BRANCH}/hbase-hadoop2-compat/src/main/java" includes="**" />
-
- </old>
- <new name="V2">
- <!-- This is the location of your new source files -->
- <dirset dir="${NEW_BRANCH}/hbase-server/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-client/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-common/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-protocol/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-it/src/test/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-hadoop-compat/src/main/java" includes="**" />
- <dirset dir="${NEW_BRANCH}/hbase-hadoop2-compat/src/main/java" includes="**" />
- </new>
- </jdiff>
-</target>
-
-</project>
-
http://git-wip-us.apache.org/repos/asf/hbase/blob/f280fa21/dev-support/hbase_jdiff_template.xml
----------------------------------------------------------------------
diff --git a/dev-support/hbase_jdiff_template.xml b/dev-support/hbase_jdiff_template.xml
deleted file mode 100644
index 21fe8ed..0000000
--- a/dev-support/hbase_jdiff_template.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-
-<project name="jdiff" default="jdiff_report" basedir="JDIFF_FOLDER">
-
-<description>
-Creates a report in the directory "hbase_jdiff_report-p-PREVIOUS_BRANCH-c-CURRENT_BRANCH" of the default jdiff report folder.
-This defaults to /tmp/jdiff but can optionally be specified by export $JDIFF_WORKING_DIRECTORY.
-</description>
-
-<target name="jdiff_report" depends="">
- <!-- This variable is used by the Ant JDiff task. Set it to the
- location where the jdiff package was unpacked -->
- <property name="JDIFF_HOME" value="JDIFF_HOME_NAME" />
- <property name="OLD_BRANCH" value="OLD_BRANCH_NAME"/>
- <property name="NEW_BRANCH" value="NEW_BRANCH_NAME"/>
-
- <taskdef name="jdiff"
- classname="jdiff.JDiffAntTask"
- classpath="${JDIFF_HOME}/antjdiff.jar" />
- <jdiff destdir="hbase_jdiff_report"
- verbose="off"
- stats="on">
- <old name="V1">
- <!-- This is the location of your old source files -->
- <dirset dir="${OLD_BRANCH}/src/main/java" includes="**" />
- </old>
- <new name="V2">
- <!-- This is the location of your new source files -->
- <dirset dir="${NEW_BRANCH}/src/main/java" includes="**" />
- </new>
- </jdiff>
-</target>
-
-</project>
-
http://git-wip-us.apache.org/repos/asf/hbase/blob/f280fa21/dev-support/jdiffHBasePublicAPI.sh
----------------------------------------------------------------------
diff --git a/dev-support/jdiffHBasePublicAPI.sh b/dev-support/jdiffHBasePublicAPI.sh
deleted file mode 100755
index 2000d2a..0000000
--- a/dev-support/jdiffHBasePublicAPI.sh
+++ /dev/null
@@ -1,249 +0,0 @@
-#!/bin/bash
-set -e
-
-# 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.
-
-################################################ ABOUT JDIFF #######################################################
-#
-# What is JDiff? JDiff is a tool for comparing the public APIs of two separate Java codebases. Like diff, it will
-# give additions, changes, and removals. It will output an HTML report with the information.
-# To learn more, visit http://javadiff.sourceforge.net/.
-# JDiff is licensed under LGPL.
-
-############################################# QUICK-START EXAMPLE ##################################################
-#
-# Suppose we wanted to see the API diffs between HBase 0.92 and HBase 0.94. We could use this tool like so:
-# > ./jdiffHBasePublicAPI.sh https://github.com/apache/hbase.git 0.92 https://github.com/apache/hbase.git 0.94
-#
-# This would generate a report in the local folder /tmp/jdiff/hbase_jdiff_report-p-0.92-c-0.94/
-# To view the report, simply examine /tmp/jdiff/hbase_jdiff_report-p-0.92-c-0.94/changes.html in your choice of
-# browser.
-#
-# Note that this works because 0.92 and 0.94 have the source directory structure that is specified in the
-# hbase_jdiff_template.xml file. To compare 0.95 to 0.96, which have the post-singularity structure, two other
-# template files (included) are used. The formats are autoated and is all taken care of automatically by the script.
-#
-# On a local machine, JDiff reports have taken ~20-30 minutes to run. On Jenkins, it has taken over 35 minutes
-# in some cases. Your mileage may vary. Trunk and 0.95 take more time than 0.92 and 0.94.
-#
-#
-############################################ SPECIFYING A LOCAL REPO ###############################################
-#
-# The JDiff tool also works with local code. Instead of specifying a repo and a branch, you can specifying the
-# absolute path of the ./hbase folder and a name for code (e.g. experimental_94).
-#
-# A local repo can be specified for none, one, or both of the sources.
-#
-############################################### EXAMPLE USE CASES ##################################################
-#
-# Example 1: Generate a report to check if potential change doesn't break API compatibility with Apache HBase 0.94
-#
-# In this case, you could compare the version you are using against a repo branch where your changes are.
-# > ./jdiffHBasePublicAPI.sh https://github.com/apache/hbase.git 0.94 https://github.com/MY_REPO/hbase.git 0.94
-#
-# Example 2: Generate a report to check if two branches of the same repo have any public API incompatibilities
-# > ./jdiffHBasePublicAPI.sh https://github.com/MY_REPO/hbase.git $BRANCH_1 \
-# > https://github.com/MY_REPO/hbase.git $BRANCH_2
-#
-# Example 3: Have Example 1 done in a special directory in the user's home folder
-#
-# > export JDIFF_WORKING_DIRECTORY=~/jdiff_reports
-# > ./jdiffHBasePublicAPI.sh https://github.com/apache/hbase.git 0.94 https://github.com/MY_REPO/hbase.git 0.94
-#
-# Example 4: Check the API diff of a local change against an existing repo branch.
-# > ./jdiffHBasePublicAPI.sh https://github.com/apache/hbase.git 0.95 /home/aleks/exp_hbase/hbase experiment_95
-#
-# Example 5: Compare two local repos for public API changes
-# > ./jdiffHBasePublicAPI.sh /home/aleks/stable_hbase/hbase stable_95 /home/aleks/exp_hbase/hbase experiment_95
-#
-#
-################################################## NOTE ON USAGE ###################################################
-#
-# 1. When using this tool, please specify the initial version first and the current version second. The semantics
-# do not make sense otherwise. For example: jdiff 94 95 is good. jdiff 95 94 is bad
-#
-############################################# READING A JDIFF REPORT ###############################################
-#
-# The purpose of the JDiff report is show things that have changed between two versions of the public API. A user
-# would use this report to determine if committing a change would cause existing API clients to break. To do so,
-# there are specific things that one should look for in the report.
-#
-# 1. Identify the classes that constitute the public API. An example in 0.94 might be all classes in
-# org.apache.hadoop.hbase.client.*
-# 2. After identifying those classes, go through each one and look for offending changes.
-# Those may include, but are not limited to:
-# 1. Removed methods
-# 2. Changed methods (including changes in return type and exception types)
-# 3. Methods added to interfaces
-# 4. Changed class inheritence information (may in innocuous but definitely worth validating)
-# 5. Removed or renamed public static member variables and constants
-# 6. Removed or renamed packages
-# 7. Class moved to a different package
-
-########################################### SETTING THE JDIFF WORKING DIRECTORY ####################################
-#
-# By default, the working environment of jdiff is /tmp/jdiff. However, sometimes it is nice to have it place reports
-# and temp files elsewhere. In that case, please export JDIFF_WORKING_DIRECTORY into the bash environment and this
-# script will pick that up and use it.
-#
-
-scriptDirectory=$(dirname ${BASH_SOURCE[0]})
-x=`echo $scriptDirectory | sed "s{\.{{g"`
-DEV_SUPPORT_HOME="`pwd`$x"
-. $scriptDirectory/jdiffHBasePublicAPI_common.sh
-
-EXPECTED_ARGS=4
-
-if [[ "$#" -ne "$EXPECTED_ARGS" ]]; then
- echo "This tool expects $EXPECTED_ARGS arguments, but received $#. Please check your command and try again.";
- echo "Usage: $0 <repoUrl or local source directory 1> <branch or source name 1> <repoUrl or local source directory 2> <branch or source name 2>"
- exit 1;
-fi
-
-echo "JDiff evaluation beginning:";
-isGitRepo $1
-FIRST_SOURCE_TYPE=$INPUT_FORMAT;
-isGitRepo $3
-SECOND_SOURCE_TYPE=$INPUT_FORMAT;
-
-PREVIOUS_BRANCH=$2 ## We will still call it a branch even if it's not from a git repo.
-CURRENT_BRANCH=$4
-
-echo "We are going to compare source 1 which is a $FIRST_SOURCE_TYPE and source 2, which is a $SECOND_SOURCE_TYPE"
-
-
-# Check that if either source is from a git repo, that the name is reasonable.
-if [[ "$FIRST_SOURCE_TYPE" = "git_repo" ]]; then
-
- git check-ref-format --branch $2
-fi
-
-if [[ "$SECOND_SOURCE_TYPE" = "git_repo" ]]; then
-
- git check-ref-format --branch $4
-fi
-
-#If the JDIFF_WORKING_DIRECTORY is set, then we will output the report there. Otherwise, to the default location
-if [[ "$JDIFF_WORKING_DIRECTORY" = "" ]]; then
-
- JDIFF_WORKING_DIRECTORY=/tmp/jdiff
- echo "JDIFF_WORKING_DIRECTORY not set. That's not an issue. We will default it to $JDIFF_WORKING_DIRECTORY."
-else
- echo "JDIFF_WORKING_DIRECTORY set to $JDIFF_WORKING_DIRECTORY";
-fi
-mkdir -p $JDIFF_WORKING_DIRECTORY
-
-# We will need this to reference the template we want to use
-cd $JDIFF_WORKING_DIRECTORY
-scenario_template_name=hbase_jdiff_p-$PREVIOUS_BRANCH-c-$CURRENT_BRANCH.xml
-
-
-# Pull down JDiff tool and unpack it
-if [ ! -d jdiff-1.1.1-with-incompatible-option ]; then
- curl -O http://cloud.github.com/downloads/tomwhite/jdiff/jdiff-1.1.1-with-incompatible-option.zip
- unzip jdiff-1.1.1-with-incompatible-option.zip
-fi
-
-JDIFF_HOME=`pwd`/jdiff-1.1.1-with-incompatible-option
-cd $JDIFF_WORKING_DIRECTORY
-
-# Pull down sources if necessary. Note that references to previous change are prefaced with p- in order to avoid collission of branch names
-if [[ "$FIRST_SOURCE_TYPE" = "git_repo" ]]; then
-
- PREVIOUS_REPO=$1
- rm -rf p-$PREVIOUS_BRANCH
- mkdir -p p-$PREVIOUS_BRANCH
- cd p-$PREVIOUS_BRANCH
- git clone --depth 1 $PREVIOUS_REPO && cd hbase && git checkout origin/$PREVIOUS_BRANCH
- cd $JDIFF_WORKING_DIRECTORY
- HBASE_1_HOME=`pwd`/p-$PREVIOUS_BRANCH/hbase
-else
- HBASE_1_HOME=$1
-fi
-
-echo "HBASE_1_HOME set to $HBASE_1_HOME"
-echo "In HBASE_1_HOME, we have"
-ls -la $HBASE_1_HOME
-
-if [[ "$SECOND_SOURCE_TYPE" = "git_repo" ]]; then
- CURRENT_REPO=$3
- rm -rf $JDIFF_WORKING_DIRECTORY/c-$CURRENT_BRANCH
- mkdir -p $JDIFF_WORKING_DIRECTORY/c-$CURRENT_BRANCH
- cd $JDIFF_WORKING_DIRECTORY/c-$CURRENT_BRANCH
- git clone --depth 1 $CURRENT_REPO && cd hbase && git checkout origin/$CURRENT_BRANCH
- cd $JDIFF_WORKING_DIRECTORY
- HBASE_2_HOME=`pwd`/c-$CURRENT_BRANCH/hbase
-else
- HBASE_2_HOME=$3
-fi
-
-echo "HBASE_2_HOME set to $HBASE_2_HOME"
-echo "In HBASE_2_HOME, we have"
-ls -la $HBASE_2_HOME
-
-# Next step is to pull down the proper template based on the directory structure
-isNewFormat $HBASE_1_HOME
-export P_FORMAT=$BRANCH_FORMAT
-
-isNewFormat $HBASE_2_HOME
-export C_FORMAT=$BRANCH_FORMAT
-
-if [[ "$C_FORMAT" = "new" ]]; then
-
- if [[ "$P_FORMAT" = "new" ]]; then
- templateFile=$DEV_SUPPORT_HOME/hbase_jdiff_afterSingularityTemplate.xml
- echo "Previous format is of the new style. We'll be using template $templateFile";
- else
- templateFile=$DEV_SUPPORT_HOME/hbase_jdiff_acrossSingularityTemplate.xml
- echo "Previous format is of the old style. We'll be using template $templateFile";
- fi
-
-else
-
- if [[ "P_FORMAT" != "old" ]]; then
- echo "When using this tool, please specify the initial version first and the current version second. They should be in ascending chronological order.
- The semantics do not make sense otherwise. For example: jdiff 94 95 is good. jdiff 95 94 is bad."
- echo "Exiting the script."
- exit 5;
- fi
- templateFile=$DEV_SUPPORT_HOME/hbase_jdiff_template.xml
- echo "Both formats are using the 94 and earlier style directory format. We'll be using template $templateFile"
-fi
-
-cp $templateFile $JDIFF_WORKING_DIRECTORY/$scenario_template_name
-
-### Configure the jdiff script
-
-### Note that PREVIOUS_BRANCH and CURRENT_BRANCH will be the absolute locations of the source.
-echo "Configuring the jdiff script"
-sed -i "s]hbase_jdiff_report]hbase_jdiff_report-p-$PREVIOUS_BRANCH-c-$CURRENT_BRANCH]g" $JDIFF_WORKING_DIRECTORY/$scenario_template_name
-sed -i "s]JDIFF_HOME_NAME]$JDIFF_HOME]g" $JDIFF_WORKING_DIRECTORY/$scenario_template_name
-sed -i "s]OLD_BRANCH_NAME]$HBASE_1_HOME]g" $JDIFF_WORKING_DIRECTORY/$scenario_template_name
-sed -i "s]NEW_BRANCH_NAME]$HBASE_2_HOME]g" $JDIFF_WORKING_DIRECTORY/$scenario_template_name
-
-sed -i "s]V1]$PREVIOUS_BRANCH]g" $JDIFF_WORKING_DIRECTORY/$scenario_template_name
-sed -i "s]V2]$CURRENT_BRANCH]g" $JDIFF_WORKING_DIRECTORY/$scenario_template_name
-
-sed -i "s]JDIFF_FOLDER]$JDIFF_WORKING_DIRECTORY]g" $JDIFF_WORKING_DIRECTORY/$scenario_template_name
-
-echo "Running jdiff";
-ls -la $JDIFF_WORKING_DIRECTORY;
-ant -f $JDIFF_WORKING_DIRECTORY/$scenario_template_name;
-
-echo "jdiff operation complete. Report placed into $JDIFF_WORKING_DIRECTORY/hbase_jdiff_report-p-$PREVIOUS_BRANCH-c-$CURRENT_BRANCH/changes.html";
-
http://git-wip-us.apache.org/repos/asf/hbase/blob/f280fa21/dev-support/jdiffHBasePublicAPI_common.sh
----------------------------------------------------------------------
diff --git a/dev-support/jdiffHBasePublicAPI_common.sh b/dev-support/jdiffHBasePublicAPI_common.sh
deleted file mode 100755
index 1cc9954..0000000
--- a/dev-support/jdiffHBasePublicAPI_common.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/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
-#
-# 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.
-#
-##########################################################################################################################
-#
-### Purpose: To describe whether the directory specified has the old directory format or the new directory format
-### Usage: This function takes one argument: The directory in question
-### It will set the temporary variable BRANCH_FORMAT. This variable can change with every call, so it is up to the user to
-### store it into something else as soon as the function exists
-### Example:
-### > isNewFormat ./myDevDir/testing/branch/hbase
-isNewFormat() {
-
- echo "Determining if directory $1 is of the 0.94 and before OR 0.95 and after versions";
- if [[ "$1" = "" ]]; then
- echo "Directory not specified. Exiting";
- fi
- echo "First, check that $1 exists";
- if [[ -d $1 ]]; then
- echo "Directory $1 exists"
- else
- echo "Directory $1 does not exist. Exiting";
- exit 1;
- fi
-
- if [[ -d "$1/hbase-server" ]]; then
-
- echo "The directory $1/hbase-server exists so this is of the new format";
- export BRANCH_FORMAT=new;
-
- else
- echo "The directory $1/hbase-server does not exist. Therefore, this is of the old format";
- export BRANCH_FORMAT=old;
- fi
-}
-
-### Purpose: To describe whether the argument specified is a git repo or a local directory
-### Usage: This function takes one argument: The directory in question
-### It will set the temporary variable INPUT_FORMAT. This variable can change with every call, so it is up to the user to
-### store it into something else as soon as the function exists
-### Example:
-### > isGitRepo ./myDevDir/testing/branch/hbase
-
-isGitRepo() {
-
- echo "Determining if this is a local directory or a git repo.";
- if [[ "$1" = "" ]]; then
- echo "No value specified for repo or directory. Exiting."
- exit 1;
- fi
-
- if [[ `echo $1 | grep 'http://'` || `echo $1 | grep 'https://'` || `echo $1 | grep 'git://'` ]]; then
- echo "Looks like $1 is a git repo";
- export INPUT_FORMAT=git_repo
- else
- echo "$1 is a local directory";
- export INPUT_FORMAT=local_directory
- fi
-
-
-}
[3/5] hbase git commit: HBASE-15119 Include git SHA in
check_compatibility reports
Posted by bu...@apache.org.
HBASE-15119 Include git SHA in check_compatibility reports
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/13535f4d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/13535f4d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/13535f4d
Branch: refs/heads/branch-1
Commit: 13535f4d43b1699f19d2177daf04278288c63da1
Parents: 4471b1a
Author: Nick Dimiduk <nd...@apache.org>
Authored: Sat Jan 16 15:44:07 2016 -0800
Committer: Sean Busbey <bu...@apache.org>
Committed: Thu Jun 30 15:48:13 2016 -0500
----------------------------------------------------------------------
dev-support/check_compatibility.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/13535f4d/dev-support/check_compatibility.sh
----------------------------------------------------------------------
diff --git a/dev-support/check_compatibility.sh b/dev-support/check_compatibility.sh
index b6c11e0..95dba00 100755
--- a/dev-support/check_compatibility.sh
+++ b/dev-support/check_compatibility.sh
@@ -188,6 +188,8 @@ for ref in 1 2; do
echo "Maven could not successfully package ${COMMIT[${ref}]}. Exiting..." >&2
exit 2
fi
+ # grab sha for future reference
+ SHA[${ref}]=$(git rev-parse --short HEAD)
popd > /dev/null
fi
@@ -207,6 +209,7 @@ for ref in 1 2; do
echo "Maven could not successfully package ${COMMIT[${ref}]}. Exiting..." >&2
exit 2
fi
+ SHA[${ref}]=$(git rev-parse --short HEAD)
popd > /dev/null
done
@@ -259,7 +262,8 @@ fi
# Generate command line arguments for Java ACC.
JAVA_ACC_COMMAND+=(-l HBase)
-JAVA_ACC_COMMAND+=(-v1 ${COMMIT[1]} -v2 ${COMMIT[2]})
+JAVA_ACC_COMMAND+=(-v1 ${COMMIT[1]}${SHA[1]+"/${SHA[1]}"})
+JAVA_ACC_COMMAND+=(-v2 ${COMMIT[2]}${SHA[2]+"/${SHA[2]}"})
JAVA_ACC_COMMAND+=(-d1 ${JARS[1]} -d2 ${JARS[2]})
JAVA_ACC_COMMAND+=(-report-path \
${SCRIPT_DIRECTORY}/target/compatibility/report/${COMMIT[1]}_${COMMIT[2]}_compat_report.html)
[2/5] hbase git commit: HBASE-16129 check_compatibility.sh is broken
when using Java API Compliance Checker v1.7
Posted by bu...@apache.org.
HBASE-16129 check_compatibility.sh is broken when using Java API Compliance Checker v1.7
* This commit also fixes some stray tabs that got into the script at
some point.
Signed-off-by: Sean Busbey <bu...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/aa361a20
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/aa361a20
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/aa361a20
Branch: refs/heads/branch-1
Commit: aa361a20ced90d016dc45d6dd533a075e5f12b19
Parents: 854e796
Author: Dima Spivak <ds...@cloudera.com>
Authored: Mon Jun 27 15:18:04 2016 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Thu Jun 30 15:48:13 2016 -0500
----------------------------------------------------------------------
dev-support/check_compatibility.sh | 65 +++++++++++++++++++--------------
1 file changed, 37 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/aa361a20/dev-support/check_compatibility.sh
----------------------------------------------------------------------
diff --git a/dev-support/check_compatibility.sh b/dev-support/check_compatibility.sh
index 1745172..182cea7 100755
--- a/dev-support/check_compatibility.sh
+++ b/dev-support/check_compatibility.sh
@@ -70,12 +70,14 @@ Options:
-f, --force-download Download dependencies (i.e. Java ACC), even if they are
already present.
-h, --help Show this screen.
+ -j, --java-acc Specify which version of Java ACC to use to run the analysis. This
+ can be a tag, branch, or commit hash. Defaults to master.
-n, --no-checkout Run the tool without first using Git to checkout the two
HBase versions. If this option is selected,
- dev-support/target/compatibility/1 and
- dev-support/target compatibility/2 must each be Git repositories.
- Also note that the references must still be specified as these are
- used when naming the compatibility report.
+ dev-support/target/compatibility/1 and
+ dev-support/target compatibility/2 must each be Git repositories.
+ Also note that the references must still be specified as these are
+ used when naming the compatibility report.
-o <opts>, --options=<opts> A comma-separated list of options to pass directly to Java ACC.
-q, --quick Runs Java ACC in quick analysis mode, which disables a
number of checks for things that may break compatibility.
@@ -89,14 +91,18 @@ __EOF
GETOPT=${GETOPT:-/usr/bin/env getopt}
# Parse command line arguments and check for proper syntax.
-if ! ARG_LIST=$(${GETOPT} -q -o abfhno:qr:s \
- -l all,binary-only,force-download,help,no-checkout,options:,quick,repo:,source-only \
+if ! ARG_LIST=$(${GETOPT} -q -o abfhj:no:qr:s \
+ -l all,binary-only,force-download,help,java-acc:,no-checkout,options:,quick,repo:,source-only \
-- "${@}"); then
usage >&2
exit 2
fi
eval set -- "${ARG_LIST[@]}"
+# Set defaults for options in case they're not specified on the command line.
+JAVA_ACC_COMMIT="master"
+REPO_URL="https://github.com/apache/hbase.git"
+
while ((${#})); do
case "${1}" in
-a | --all )
@@ -111,6 +117,9 @@ while ((${#})); do
-h | --help )
usage
exit 0 ;;
+ -j | --java-acc )
+ JAVA_ACC_COMMIT="${2}"
+ shift 2 ;;
-n | --no-checkout )
NO_CHECKOUT=true
shift 1 ;;
@@ -133,12 +142,12 @@ while ((${#})); do
shift 1
# If there is one positional argument, only <ref1> was specified.
if [ ${#} -eq 1 ]; then
- COMMIT[1]="${1}"
- COMMIT[2]=master
- shift 1
+ COMMIT[1]="${1}"
+ COMMIT[2]=master
+ shift 1
# If there are two positional arguments, <ref1> and <ref2> were both specified.
elif [ ${#} -eq 2 ]; then
- COMMIT[1]="${1}"
+ COMMIT[1]="${1}"
COMMIT[2]="${2}"
shift 2
# If there are no positional arguments or too many, someone needs to reread the usage
@@ -151,9 +160,6 @@ while ((${#})); do
esac
done
-# Set defaults for options if they're not specified on the command line.
-REPO_URL=${REPO_URL:-https://github.com/apache/hbase.git}
-
# Do identical operations for both HBase versions in a for loop to save some lines of code.
for ref in 1 2; do
if ! [ "${NO_CHECKOUT}" ]; then
@@ -165,8 +171,8 @@ for ref in 1 2; do
if [ "${ref}" = "1" ]; then
echo "Cloning ${REPO_URL} into ${SCRIPT_DIRECTORY}/target/compatibility/${ref}..."
if ! git clone ${REPO_URL} ${SCRIPT_DIRECTORY}/target/compatibility/${ref}; then
- echo "Error while cloning ${REPO_URL}. Exiting..." >&2
- exit 2
+ echo "Error while cloning ${REPO_URL}. Exiting..." >&2
+ exit 2
fi
elif [ "${ref}" = "2" ]; then
# Avoid cloning from Git twice by copying first repo into different folder.
@@ -215,7 +221,7 @@ for ref in 1 2; do
JARS=$(find ${SCRIPT_DIRECTORY}/target/compatibility/${ref} "${JAR_FIND_EXPRESSION[@]}")
if [ ${#JARS[@]} -eq 0 ]; then
- echo "Unable to find any JARs matching the find expression. Exiting..." >&2
+ echo "Unable to find any JARs matching the find expression. Exiting..." >&2
exit 2
fi
@@ -225,17 +231,21 @@ for ref in 1 2; do
fi
fi
+ # Create an XML descriptor containing paths to the JARs for Java ACC to use (support for
+ # comma-separated lists of JARs was removed, as described on their issue tracker:
+ # https://github.com/lvc/japi-compliance-checker/issues/27).
+ DESCRIPTOR_PATH="${SCRIPT_DIRECTORY}/target/compatibility/${ref}.xml"
+ echo "<version>${COMMIT[${ref}]}${SHA[${ref}]+"/${SHA[${ref}]}"}</version>" > "${DESCRIPTOR_PATH}"
+ echo "<archives>" >> "${DESCRIPTOR_PATH}"
+
echo "The JARs to be analyzed from ${COMMIT[${ref}]} are:"
for jar in ${JARS}; do
- echo " ${jar}"
+ echo " ${jar}" | tee -a "${DESCRIPTOR_PATH}"
done
- # Generate a comma-separated list of packages by using process substitution and passing
- # the result to paste.
- JARS[${ref}]=$(paste -s -d , <(echo "${JARS}"))
+ echo "</archives>" >> "${DESCRIPTOR_PATH}"
done
-# Download the Java API Compliance Checker (Java ACC) v. 1.7 (see HBASE-16073) into
-# /dev-support/target/compatibility.
+# Download the Java API Compliance Checker (Java ACC) into /dev-support/target/compatibility.
# Note: Java API Compliance Checker (Java ACC) is licensed under the GNU GPL or LGPL. For more
# information, visit http://ispras.linuxbase.org/index.php/Java_API_Compliance_Checker .
@@ -243,7 +253,7 @@ done
if [ ! -d ${SCRIPT_DIRECTORY}/target/compatibility/javaACC ] || [ -n "${FORCE_DOWNLOAD}" ]; then
echo "Downloading Java API Compliance Checker..."
rm -rf ${SCRIPT_DIRECTORY}/target/compatibility/javaACC
- if ! git clone https://github.com/lvc/japi-compliance-checker.git -b 1.7 \
+ if ! git clone https://github.com/lvc/japi-compliance-checker.git -b "${JAVA_ACC_COMMIT}" \
${SCRIPT_DIRECTORY}/target/compatibility/javaACC; then
echo "Failed to download Java API Compliance Checker. Exiting..." >&2
exit 2
@@ -253,8 +263,8 @@ fi
# Generate annotation list dynamically; this way, there's no chance the file
# gets stale and you have better visiblity into what classes are actually analyzed.
declare -a ANNOTATION_LIST
-ANNOTATION_LIST+=(InterfaceAudience.Public)
-ANNOTATION_LIST+=(InterfaceAudience.LimitedPrivate)
+ANNOTATION_LIST+=(org.apache.hadoop.hbase.classification.InterfaceAudience.Public)
+ANNOTATION_LIST+=(org.apache.hadoop.hbase.classification.InterfaceAudience.LimitedPrivate)
if ! [ -f ${SCRIPT_DIRECTORY}/target/compatibility/annotations ]; then
cat > ${SCRIPT_DIRECTORY}/target/compatibility/annotations << __EOF
$(tr " " "\n" <<< "${ANNOTATION_LIST[@]}")
@@ -263,9 +273,8 @@ fi
# Generate command line arguments for Java ACC.
JAVA_ACC_COMMAND+=(-l HBase)
-JAVA_ACC_COMMAND+=(-v1 ${COMMIT[1]}${SHA[1]+"/${SHA[1]}"})
-JAVA_ACC_COMMAND+=(-v2 ${COMMIT[2]}${SHA[2]+"/${SHA[2]}"})
-JAVA_ACC_COMMAND+=(-d1 ${JARS[1]} -d2 ${JARS[2]})
+JAVA_ACC_COMMAND+=(-old "${SCRIPT_DIRECTORY}/target/compatibility/1.xml")
+JAVA_ACC_COMMAND+=(-new "${SCRIPT_DIRECTORY}/target/compatibility/2.xml")
JAVA_ACC_COMMAND+=(-report-path \
${SCRIPT_DIRECTORY}/target/compatibility/report/${COMMIT[1]}_${COMMIT[2]}_compat_report.html)
if [ "${ALL}" != "true" ] ; then
[5/5] hbase git commit: HBASE-16073 update compatibility_checker for
jacc dropping comma sep args
Posted by bu...@apache.org.
HBASE-16073 update compatibility_checker for jacc dropping comma sep args
Signed-off-by: Sean Busbey <bu...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/854e796e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/854e796e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/854e796e
Branch: refs/heads/branch-1
Commit: 854e796ea93242f3bb91d900e8fe37dc7a3fb4ef
Parents: 13535f4
Author: Dima Spivak <ds...@cloudera.com>
Authored: Mon Jun 20 12:45:27 2016 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Thu Jun 30 15:48:13 2016 -0500
----------------------------------------------------------------------
dev-support/check_compatibility.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/854e796e/dev-support/check_compatibility.sh
----------------------------------------------------------------------
diff --git a/dev-support/check_compatibility.sh b/dev-support/check_compatibility.sh
index 95dba00..1745172 100755
--- a/dev-support/check_compatibility.sh
+++ b/dev-support/check_compatibility.sh
@@ -234,7 +234,8 @@ for ref in 1 2; do
JARS[${ref}]=$(paste -s -d , <(echo "${JARS}"))
done
-# Download the Java API Compliance Checker (Java ACC) into /dev-support/target/compatibility.
+# Download the Java API Compliance Checker (Java ACC) v. 1.7 (see HBASE-16073) into
+# /dev-support/target/compatibility.
# Note: Java API Compliance Checker (Java ACC) is licensed under the GNU GPL or LGPL. For more
# information, visit http://ispras.linuxbase.org/index.php/Java_API_Compliance_Checker .
@@ -242,7 +243,7 @@ done
if [ ! -d ${SCRIPT_DIRECTORY}/target/compatibility/javaACC ] || [ -n "${FORCE_DOWNLOAD}" ]; then
echo "Downloading Java API Compliance Checker..."
rm -rf ${SCRIPT_DIRECTORY}/target/compatibility/javaACC
- if ! git clone https://github.com/lvc/japi-compliance-checker.git \
+ if ! git clone https://github.com/lvc/japi-compliance-checker.git -b 1.7 \
${SCRIPT_DIRECTORY}/target/compatibility/javaACC; then
echo "Failed to download Java API Compliance Checker. Exiting..." >&2
exit 2
[4/5] hbase git commit: HBASE-16124 Make check_compatibility.sh less
verbose when building HBase
Posted by bu...@apache.org.
HBASE-16124 Make check_compatibility.sh less verbose when building HBase
Signed-off-by: Sean Busbey <bu...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7f56fb2d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7f56fb2d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7f56fb2d
Branch: refs/heads/branch-1
Commit: 7f56fb2de79d54c82b4e55dec75087b2306d505c
Parents: aa361a2
Author: Dima Spivak <ds...@cloudera.com>
Authored: Mon Jun 27 11:29:23 2016 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Thu Jun 30 15:48:13 2016 -0500
----------------------------------------------------------------------
dev-support/check_compatibility.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/7f56fb2d/dev-support/check_compatibility.sh
----------------------------------------------------------------------
diff --git a/dev-support/check_compatibility.sh b/dev-support/check_compatibility.sh
index 182cea7..249124d 100755
--- a/dev-support/check_compatibility.sh
+++ b/dev-support/check_compatibility.sh
@@ -190,7 +190,7 @@ for ref in 1 2; do
exit 2
fi
echo "Building ${COMMIT[${ref}]}..."
- if ! mvn clean package -DskipTests; then
+ if ! mvn clean package --batch-mode -DskipTests; then
echo "Maven could not successfully package ${COMMIT[${ref}]}. Exiting..." >&2
exit 2
fi
@@ -211,7 +211,7 @@ for ref in 1 2; do
pushd ${SCRIPT_DIRECTORY}/target/compatibility/${ref} > /dev/null
echo "The --no-checkout option was specified, but no JARs were found." \
"Attempting to build ${COMMIT[${ref}]}..."
- if ! mvn clean package -DskipTests; then
+ if ! mvn clean package --batch-mode -DskipTests; then
echo "Maven could not successfully package ${COMMIT[${ref}]}. Exiting..." >&2
exit 2
fi