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 2019/11/30 04:24:00 UTC

[hbase] branch HBASE-23337 updated (19cc9d6 -> 5fcffdf)

This is an automated email from the ASF dual-hosted git repository.

busbey pushed a change to branch HBASE-23337
in repository https://gitbox.apache.org/repos/asf/hbase.git.


 discard 19cc9d6  HBASE-23337 Release scripts should rely on maven.
     add dbbba79  HBASE-23334 The table-lock node of zk is not needed since HBASE-16786 (#873)
     add ea6cea8  HBASE-23312 HBase Thrift SPNEGO configs (HBASE-19852) should be backwards compatible
     add 17468ef  HBASE-23293 [REPLICATION] make ship edits timeout configurable (#825)
     add df9cbd4  HBASE-23336 [CLI] Incorrect row(s) count 'clear_deadservers' (#875)
     add b99f583  HBASE-20395 Displaying thrift server type on the thrift page (#811)
     add 0d7a6b9  HBASE-23117: Bad enum in hbase:meta info:state column can fail loadMeta and stop startup (#867)
     add 636fa2c  HBASE-23313 [hbck2] setRegionState should update Master in-memory sta… (#864)
     add d653935  HBASE-20395 Addendum Displaying thrift server type on the thrift page
     new 5fcffdf  HBASE-23337 Release scripts should rely on maven for deploy.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (19cc9d6)
            \
             N -- N -- N   refs/heads/HBASE-23337 (5fcffdf)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dev-support/create-release/release-build.sh        |    26 +-
 .../org/apache/hadoop/hbase/client/HBaseHbck.java  |    45 +-
 .../java/org/apache/hadoop/hbase/client/Hbck.java  |     9 +
 .../hadoop/hbase/client/RegionInfoBuilder.java     |     5 +
 .../hadoop/hbase/shaded/protobuf/ProtobufUtil.java |    12 +
 .../hbase/shaded/protobuf/RequestConverter.java    |    14 +
 .../apache/hadoop/hbase/zookeeper/ZNodePaths.java  |     4 -
 .../hadoop/hbase/zookeeper/TestZNodePaths.java     |     1 -
 .../java/org/apache/hadoop/hbase/HConstants.java   |     4 +
 .../src/main/python/thrift1/DemoClient.py          |     7 +-
 .../main/python/thrift1/gen-py/hbase/Hbase-remote  |   567 +-
 .../src/main/python/thrift1/gen-py/hbase/Hbase.py  | 21253 ++++++++++---------
 .../main/python/thrift1/gen-py/hbase/constants.py  |     9 +-
 .../src/main/python/thrift1/gen-py/hbase/ttypes.py |  2439 ++-
 .../src/main/python/thrift2/DemoClient.py          |     5 +
 .../thrift2/gen-py/hbase/THBaseService-remote      |   504 +-
 .../python/thrift2/gen-py/hbase/THBaseService.py   | 15567 +++++++++-----
 .../main/python/thrift2/gen-py/hbase/constants.py  |     9 +-
 .../src/main/python/thrift2/gen-py/hbase/ttypes.py |  5791 ++---
 .../src/main/protobuf/HBase.proto                  |     1 +
 .../src/main/protobuf/Master.proto                 |    12 +
 .../hadoop/hbase/replication/ReplicationUtils.java |    14 +
 .../hbase/client/AsyncRegionServerAdmin.java       |     8 +-
 .../hadoop/hbase/master/MasterRpcServices.java     |    40 +
 .../hbase/master/assignment/RegionStateStore.java  |    17 +-
 .../hbase/protobuf/ReplicationProtbufUtil.java     |     6 +-
 .../hbase/replication/ReplicationEndpoint.java     |     7 +
 .../HBaseInterClusterReplicationEndpoint.java      |    19 +-
 .../regionserver/ReplicationSourceShipper.java     |     6 +
 .../apache/hadoop/hbase/HBaseTestingUtility.java   |     2 +-
 .../org/apache/hadoop/hbase/client/TestHbck.java   |    35 +
 .../master/assignment/TestRegionStateStore.java    |    39 +
 .../hbase/replication/SyncReplicationTestBase.java |     6 +-
 .../hbase/replication/TestReplicationEndpoint.java |     2 +-
 .../replication/regionserver/TestReplicator.java   |     8 +-
 .../TestSerialReplicationEndpoint.java             |     2 +-
 .../main/ruby/shell/commands/clear_deadservers.rb  |     3 +-
 hbase-shell/src/test/ruby/hbase/admin_test.rb      |     5 +
 .../hadoop/hbase/thrift/HBaseServiceHandler.java   |     2 -
 .../hbase/thrift/ThriftHBaseServiceHandler.java    |     6 +
 .../hadoop/hbase/thrift/ThriftHttpServlet.java     |    21 +-
 .../apache/hadoop/hbase/thrift/ThriftMetrics.java  |     8 +-
 .../apache/hadoop/hbase/thrift/ThriftServer.java   |    53 +-
 .../hbase/thrift/generated/AlreadyExists.java      |     2 +-
 .../hbase/thrift/generated/BatchMutation.java      |     2 +-
 .../hbase/thrift/generated/ColumnDescriptor.java   |     2 +-
 .../hadoop/hbase/thrift/generated/Hbase.java       |   787 +-
 .../hadoop/hbase/thrift/generated/IOError.java     |     2 +-
 .../hbase/thrift/generated/IllegalArgument.java    |     2 +-
 .../hadoop/hbase/thrift/generated/Mutation.java    |     2 +-
 .../hadoop/hbase/thrift/generated/TAppend.java     |     2 +-
 .../hadoop/hbase/thrift/generated/TCell.java       |     2 +-
 .../hadoop/hbase/thrift/generated/TColumn.java     |     2 +-
 .../hadoop/hbase/thrift/generated/TIncrement.java  |     2 +-
 .../hadoop/hbase/thrift/generated/TRegionInfo.java |     2 +-
 .../hadoop/hbase/thrift/generated/TRowResult.java  |     2 +-
 .../hadoop/hbase/thrift/generated/TScan.java       |     2 +-
 .../generated/TThriftServerType.java}              |    24 +-
 .../hbase/thrift2/ThriftHBaseServiceHandler.java   |     6 +
 .../hadoop/hbase/thrift2/generated/TAppend.java    |     2 +-
 .../hbase/thrift2/generated/TAuthorization.java    |     2 +-
 .../hbase/thrift2/generated/TBloomFilterType.java  |     2 +-
 .../hbase/thrift2/generated/TCellVisibility.java   |     2 +-
 .../hadoop/hbase/thrift2/generated/TColumn.java    |     2 +-
 .../thrift2/generated/TColumnFamilyDescriptor.java |     2 +-
 .../hbase/thrift2/generated/TColumnIncrement.java  |     2 +-
 .../hbase/thrift2/generated/TColumnValue.java      |     2 +-
 .../hbase/thrift2/generated/TCompareOperator.java  |     2 +-
 .../thrift2/generated/TCompressionAlgorithm.java   |     2 +-
 .../hbase/thrift2/generated/TConsistency.java      |     2 +-
 .../thrift2/generated/TDataBlockEncoding.java      |     2 +-
 .../hadoop/hbase/thrift2/generated/TDelete.java    |     2 +-
 .../hbase/thrift2/generated/TDeleteType.java       |     2 +-
 .../hbase/thrift2/generated/TDurability.java       |     2 +-
 .../hadoop/hbase/thrift2/generated/TGet.java       |     2 +-
 .../hbase/thrift2/generated/THBaseService.java     |  5017 +++--
 .../hbase/thrift2/generated/THRegionInfo.java      |     2 +-
 .../hbase/thrift2/generated/THRegionLocation.java  |     2 +-
 .../hadoop/hbase/thrift2/generated/TIOError.java   |     2 +-
 .../hbase/thrift2/generated/TIllegalArgument.java  |     2 +-
 .../hadoop/hbase/thrift2/generated/TIncrement.java |     2 +-
 .../hbase/thrift2/generated/TKeepDeletedCells.java |     2 +-
 .../hadoop/hbase/thrift2/generated/TMutation.java  |     2 +-
 .../thrift2/generated/TNamespaceDescriptor.java    |     2 +-
 .../hadoop/hbase/thrift2/generated/TPut.java       |     2 +-
 .../hadoop/hbase/thrift2/generated/TReadType.java  |     2 +-
 .../hadoop/hbase/thrift2/generated/TResult.java    |     2 +-
 .../hbase/thrift2/generated/TRowMutations.java     |     2 +-
 .../hadoop/hbase/thrift2/generated/TScan.java      |     2 +-
 .../hbase/thrift2/generated/TServerName.java       |     2 +-
 .../hbase/thrift2/generated/TTableDescriptor.java  |     2 +-
 .../hadoop/hbase/thrift2/generated/TTableName.java |     2 +-
 .../{TReadType.java => TThriftServerType.java}     |    22 +-
 .../hadoop/hbase/thrift2/generated/TTimeRange.java |     2 +-
 .../main/resources/hbase-webapps/thrift/thrift.jsp |     7 +-
 .../org/apache/hadoop/hbase/thrift/Hbase.thrift    |    15 +
 .../org/apache/hadoop/hbase/thrift2/hbase.thrift   |    15 +
 .../hbase/thrift/HBaseThriftTestingUtility.java    |   128 +
 .../hadoop/hbase/thrift/TestThriftServer.java      |    38 +
 ...ava => TestThriftSpnegoHttpFallbackServer.java} |   117 +-
 .../hbase/thrift/TestThriftSpnegoHttpServer.java   |    84 +-
 .../thrift2/TestThriftHBaseServiceHandler.java     |    38 +
 .../apache/hadoop/hbase/zookeeper/ZKWatcher.java   |     1 -
 pom.xml                                            |    34 +-
 104 files changed, 31749 insertions(+), 21269 deletions(-)
 mode change 100644 => 100755 hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase-remote
 copy hbase-thrift/src/main/java/org/apache/hadoop/hbase/{thrift2/generated/TReadType.java => thrift/generated/TThriftServerType.java} (64%)
 copy hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/{TReadType.java => TThriftServerType.java} (68%)
 create mode 100644 hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/HBaseThriftTestingUtility.java
 copy hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/{TestThriftSpnegoHttpServer.java => TestThriftSpnegoHttpFallbackServer.java} (68%)


[hbase] 01/01: HBASE-23337 Release scripts should rely on maven for deploy.

Posted by bu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

busbey pushed a commit to branch HBASE-23337
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 5fcffdf099ea83c476bed05845d912f46d9d6f59
Author: Sean Busbey <bu...@apache.org>
AuthorDate: Wed Nov 27 21:54:27 2019 -0600

    HBASE-23337 Release scripts should rely on maven for deploy.
    
    - switch to nexus-staging-maven-plugin for asf-release
    - refactor release-build to use mvn deploy and its output.
    - cleaned up some tabs in the root pom
---
 dev-support/create-release/release-build.sh | 108 ++++++----------------------
 pom.xml                                     |  34 +++++++--
 2 files changed, 49 insertions(+), 93 deletions(-)

diff --git a/dev-support/create-release/release-build.sh b/dev-support/create-release/release-build.sh
index 596a58a..8c680c2 100755
--- a/dev-support/create-release/release-build.sh
+++ b/dev-support/create-release/release-build.sh
@@ -95,12 +95,7 @@ export LANG=C.UTF-8
 
 # Commit ref to checkout when building
 GIT_REF=${GIT_REF:-master}
-
 RELEASE_STAGING_LOCATION="https://dist.apache.org/repos/dist/dev/hbase"
-
-GPG="gpg --pinentry-mode loopback -u $GPG_KEY --no-tty --batch"
-NEXUS_ROOT=https://repository.apache.org/service/local/staging
-NEXUS_PROFILE=8e226b97c0c82 # Profile for project staging uploads via INFRA-17900 Need nexus "staging profile id" for the hbase project
 BASE_DIR=$(pwd)
 
 init_java
@@ -148,13 +143,13 @@ cd ..
 tmp_repo="${REPO:-`pwd`/$(mktemp -d hbase-repo-XXXXX)}"
 # Reexamine. Not sure this working. Pass as arg? That don't seem to work either!
 tmp_settings="/${tmp_repo}/tmp-settings.xml"
-echo "<settings><servers>" > $tmp_settings
-echo "<server><id>apache.snapshots.https</id><username>$ASF_USERNAME</username>" >> $tmp_settings
-echo "<password>$ASF_PASSWORD</password></server>" >> $tmp_settings
-echo "<server><id>apache-release</id><username>$ASF_USERNAME</username>" >> $tmp_settings
-echo "<password>$ASF_PASSWORD</password></server>" >> $tmp_settings
-echo "</servers>" >> $tmp_settings
-echo "</settings>" >> $tmp_settings
+echo "<settings><servers>" > "$tmp_settings"
+echo "<server><id>apache.snapshots.https</id><username>$ASF_USERNAME</username>" >> "$tmp_settings"
+echo "<password>$ASF_PASSWORD</password></server>" >> "$tmp_settings"
+echo "<server><id>apache.releases.https</id><username>$ASF_USERNAME</username>" >> "$tmp_settings"
+echo "<password>$ASF_PASSWORD</password></server>" >> "$tmp_settings"
+echo "</servers>" >> "$tmp_settings"
+echo "</settings>" >> "$tmp_settings"
 export tmp_settings
 
 if [[ "$1" == "build" ]]; then
@@ -216,91 +211,30 @@ if [[ "$1" == "publish-snapshot" ]]; then
 fi
 
 if [[ "$1" == "publish-release" ]]; then
+  (
   cd "${PROJECT}"
-  # Get list of modules from parent pom but filter out 'assembly' modules.
-  # Used below in a few places.
-  modules=`sed -n 's/<module>\(.*\)<.*$/\1/p' pom.xml | grep -v '-assembly' |  tr '\n' ' '`
-  # Need to add the 'parent' module too. Its the SECOND artifactId instance in pom
-  artifactid=`sed -n 's/<artifactId>\(.*\)<.*$/\1/p' pom.xml | tr '\n' ' '| awk '{print $2}'`
-  modules="${artifactid} ${modules}"
-  # Get the second groupId in the pom. This is the groupId for these artifacts.
-  groupid=`sed -n 's/<groupId>\(.*\)<.*$/\1/p' pom.xml | tr '\n' ' '| awk '{print $2}'`
-  # Convert groupid to a dir path for use below reaching into repo for jars.
-  groupid_as_dir=`echo $groupid | sed -n 's/\./\//gp'`
-  echo "pwd=`pwd`, groupid_as_dir=${groupid_as_dir}"
   # Publish ${PROJECT} to Maven release repo
   echo "Publishing ${PROJECT} checkout at '$GIT_REF' ($git_hash)"
   echo "Publish version is $VERSION"
   # Coerce the requested version
   $MVN versions:set -DnewVersion=$VERSION
-  MAVEN_OPTS="${MAVEN_OPTS}" ${MVN} --settings $tmp_settings \
-    clean install -DskipTests \
-    -Dcheckstyle.skip=true "${PUBLISH_PROFILES}" \
-    -Dmaven.repo.local="${tmp_repo}"
-  pushd "${tmp_repo}/${groupid_as_dir}"
-  # Remove any extra files generated during install
-  # Remove extaneous files from module subdirs
-  find $modules -type f | grep -v \.jar | grep -v \.pom | xargs rm -rf
-
-  # Using Nexus API documented here:
-  # https://support.sonatype.com/entries/39720203-Uploading-to-a-Staging-Repository-via-REST-API
+  declare -a mvn_goals=(clean install)
   if ! is_dry_run; then
-    echo "Creating Nexus staging repository"
-    repo_request="<promoteRequest><data><description>Apache ${PROJECT} $VERSION (commit $git_hash)</description></data></promoteRequest>"
-    out=$(curl -X POST -d "$repo_request" -u $ASF_USERNAME:$ASF_PASSWORD \
-      -H "Content-Type:application/xml" -v \
-      $NEXUS_ROOT/profiles/$NEXUS_PROFILE/start)
-    staged_repo_id=$(echo $out | sed -e "s/.*\(orgapachehbase-[0-9]\{4\}\).*/\1/")
-    echo "Created Nexus staging repository: $staged_repo_id"
+    mvn_goals=("${mvn_goals[@]}" deploy)
   fi
-
-  # this must have .asc, and .sha1 - it really doesn't like anything else there
-  for file in $(find $modules -type f)
-  do
-    if [[ "$file" == *.asc ]]; then
-      continue
-    fi
-    if [ ! -f $file.asc ]; then
-      echo "$GPG_PASSPHRASE" | $GPG --passphrase-fd 0 --output "$file.asc" \
-        --detach-sig --armour $file;
-    fi
-    if [ $(command -v md5)  ]; then
-      # Available on OS X; -q to keep only hash
-      md5 -q "$file" > "$file.md5"
-    else
-      # Available on Linux; cut to keep only hash
-      md5sum "$file" | cut -f1 -d' ' > "$file.md5"
-    fi
-    if [ $(command -v sha1sum)  ]; then
-      sha1sum "$file" | cut -f1 -d' ' > "$file.sha1"
-    else
-      shasum "$file" | cut -f1 -d' ' > "$file.sha1"
-    fi
-  done
-
+  echo "Staging release in nexus"
+  MAVEN_OPTS="${MAVEN_OPTS}" ${MVN} --settings $tmp_settings \
+      -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES}" \
+      -Dmaven.repo.local="${tmp_repo}" \
+      "${mvn_goals[@]}" > "${BASE_DIR}/mvn_deploy.log"
   if ! is_dry_run; then
-    nexus_upload=$NEXUS_ROOT/deployByRepositoryId/$staged_repo_id
-    echo "Uploading files to $nexus_upload"
-    for file in $(find ${modules} -type f)
-    do
-      # strip leading ./
-      file_short=$(echo $file | sed -e "s/\.\///")
-      dest_url="$nexus_upload/$groupid_as_dir/$file_short"
-      echo "  Uploading $file to $dest_url"
-      curl -u "$ASF_USERNAME:$ASF_PASSWORD" --upload-file "${file_short}" "${dest_url}"
-    done
-
-    echo "Closing nexus staging repository"
-    repo_request="<promoteRequest><data><stagedRepositoryId>$staged_repo_id</stagedRepositoryId><description>Apache ${PROJECT} $VERSION (commit $git_hash)</description></data></promoteRequest>"
-    out=$(curl -X POST -d "$repo_request" -u $ASF_USERNAME:$ASF_PASSWORD \
-      -H "Content-Type:application/xml" -v \
-      $NEXUS_ROOT/profiles/$NEXUS_PROFILE/finish)
-    echo "Closed Nexus staging repository: $staged_repo_id"
+    staged_repo_id=$(grep -o "Closing staging repository with ID .*" "${BASE_DIR}/mvn_deploy.log" \
+        | sed -e 's/Closing staging repository with ID "\([^"]*\)"./\1/')
+    echo "Artifacts successfully staged to repo ${staged_repo_id}"
+  else
+    echo "Artifacts successfully built. not staged due to dry run."
   fi
-
-  popd
-  rm -rf "$tmp_repo"
-  cd ..
+  )
   # Dump out email to send. Where we find vote.tmpl depends
   # on where this script is run from
   export PROJECT_TEXT=$(echo "${PROJECT}" | sed "s/-/ /g")
diff --git a/pom.xml b/pom.xml
index 4f680c1..48d3cb6 100755
--- a/pom.xml
+++ b/pom.xml
@@ -545,17 +545,17 @@
       <name>Tak-Lon (Stephen) Wu</name>
       <email>taklwu@apache.org</email>
       <timezone>-8</timezone>
-    </developer>	  
+    </developer>
     <developer>
       <id>tedyu</id>
       <name>Ted Yu</name>
       <email>yuzhihong@gmail.com</email>
       <timezone>-8</timezone>
     </developer>
-	<developer>
-	  <id>tianjy</id>
-	  <email>tianjy@apache.org</email>
-	  <timezone>+8</timezone>
+    <developer>
+      <id>tianjy</id>
+      <email>tianjy@apache.org</email>
+      <timezone>+8</timezone>
     </developer>
     <developer>
       <id>todd</id>
@@ -2481,6 +2481,28 @@
         <argLine>${hbase-surefire.cygwin-argLine}</argLine>
       </properties>
     </profile>
+    <!-- this profile should match the name of the release profile in the root asf pom -->
+    <profile>
+      <id>apache-release</id>
+      <build>
+        <plugins>
+          <!-- This should insert itself in place of the normal deploy plugin and then
+               handle either closing or dropping the staging repository for us depending
+               on if the build succeeds.
+            -->
+          <plugin>
+            <groupId>org.sonatype.plugins</groupId>
+            <artifactId>nexus-staging-maven-plugin</artifactId>
+            <version>1.6.8</version>
+            <extensions>true</extensions>
+            <configuration>
+              <nexusUrl>https://repository.apache.org/</nexusUrl>
+              <serverId>apache.releases.https</serverId>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
     <!-- this profile should be activated for release builds -->
     <profile>
       <id>release</id>
@@ -2729,7 +2751,7 @@
           <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-auth</artifactId>
-	    <version>${hadoop-two.version}</version>
+            <version>${hadoop-two.version}</version>
             <exclusions>
               <exclusion>
                 <groupId>com.google.guava</groupId>