From commits-return-71213-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Thu Apr 12 21:54:27 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 14AF318067B for ; Thu, 12 Apr 2018 21:54:26 +0200 (CEST) Received: (qmail 98183 invoked by uid 500); 12 Apr 2018 19:54:26 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 98174 invoked by uid 99); 12 Apr 2018 19:54:26 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2018 19:54:26 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 93115F4EAA; Thu, 12 Apr 2018 19:54:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mdrob@apache.org To: commits@hbase.apache.org Date: Thu, 12 Apr 2018 19:54:26 -0000 Message-Id: <8886bfc2c9a64ebaad3d2c87d630de66@git.apache.org> In-Reply-To: <6c52103fa0af4878895dbd748af92229@git.apache.org> References: <6c52103fa0af4878895dbd748af92229@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] hbase git commit: HBASE-20356 Make skipping protoc possible HBASE-20356 Make skipping protoc possible Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a50d9f43 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a50d9f43 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a50d9f43 Branch: refs/heads/branch-2 Commit: a50d9f43512a5321a00e141d929072300cb41490 Parents: 0c751da Author: Mike Drob Authored: Wed Apr 11 21:25:04 2018 -0500 Committer: Mike Drob Committed: Thu Apr 12 14:54:03 2018 -0500 ---------------------------------------------------------------------- dev-support/hbase-personality.sh | 2 +- hbase-protocol-shaded/pom.xml | 5 ++++- src/main/asciidoc/_chapters/developer.adoc | 28 ++++++++++++++++++++----- 3 files changed, 28 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/a50d9f43/dev-support/hbase-personality.sh ---------------------------------------------------------------------- diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh index 90786f2..3507a1d 100755 --- a/dev-support/hbase-personality.sh +++ b/dev-support/hbase-personality.sh @@ -554,7 +554,7 @@ function hbaseprotoc_rebuild # Need to run 'install' instead of 'compile' because shading plugin # is hooked-up to 'install'; else hbase-protocol-shaded is left with # half of its process done. - modules_workers patch hbaseprotoc install -DskipTests -Pcompile-protobuf -X -DHBasePatchProcess + modules_workers patch hbaseprotoc install -DskipTests -X -DHBasePatchProcess # shellcheck disable=SC2153 until [[ $i -eq "${#MODULE[@]}" ]]; do http://git-wip-us.apache.org/repos/asf/hbase/blob/a50d9f43/hbase-protocol-shaded/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-protocol-shaded/pom.xml b/hbase-protocol-shaded/pom.xml index c409012..ee7d54b 100644 --- a/hbase-protocol-shaded/pom.xml +++ b/hbase-protocol-shaded/pom.xml @@ -106,7 +106,7 @@ 1.5.3 - generate-sources + process-sources replace @@ -117,6 +117,9 @@ **/*.java + + true ([^\.])com.google.protobuf http://git-wip-us.apache.org/repos/asf/hbase/blob/a50d9f43/src/main/asciidoc/_chapters/developer.adoc ---------------------------------------------------------------------- diff --git a/src/main/asciidoc/_chapters/developer.adoc b/src/main/asciidoc/_chapters/developer.adoc index 6d959c2..40701e9 100644 --- a/src/main/asciidoc/_chapters/developer.adoc +++ b/src/main/asciidoc/_chapters/developer.adoc @@ -415,22 +415,40 @@ use so we can freely change versions without upsetting any downstream project us The protobuf files are located in _hbase-protocol/src/main/protobuf_. For the change to be effective, you will need to regenerate the classes. -You can use maven profile `compile-protobuf` to do this. [source,bourne] ---- -mvn compile -Pcompile-protobuf +mvn package -pl hbase-protocol -am ---- -You may also want to define `protoc.path` for the protoc binary, using the following command: +Similarly, protobuf definitions for internal use are located in the _hbase-protocol-shaded_ module. [source,bourne] ---- +mvn package -pl hbase-protocol-shaded -am +---- + +Typically, protobuf code generation is done using the native `protoc` binary. In our build we use a maven plugin for +convenience; however, the plugin may not be able to retrieve appropriate binaries for all platforms. If you find yourself +on a platform where protoc fails, you will have to compile protoc from source, and run it independent of our maven build. +You can disable the inline code generation by specifying `-Dprotoc.skip` in your maven arguments, allowing your build to proceed further. -mvn compile -Pcompile-protobuf -Dprotoc.path=/opt/local/bin/protoc +A similar failure relates to the stock CentOS 6 docker image providing a too old version of glibc for the version of protoc that we use. +In this case, you would have to install glibc 2.14 and protoc 3.5.1 manually, then execute something like: + +[source,bourne] ---- +cd hbase-protocol-shaded +LD_LIBRARY_PATH=/opt/glibc-2.14/lib protoc \ + --proto_path=src/main/protobuf \ + --java_out=target/generated-sources/protobuf/java \ + src/main/protobuf/*.proto +---- + +[NOTE] +If you need to manually generate your protobuf files, you should not use `clean` in subsequent maven calls, as that will delete the newly generated files. -Read the _hbase-protocol/README.txt_ for more details. +Read the _hbase-protocol/README.txt_ for more details [[build.thrift]] ==== Build Thrift