Return-Path:
X-Original-To: apmail-hbase-commits-archive@www.apache.org
Delivered-To: apmail-hbase-commits-archive@www.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id 3344E17F8B
for ;
Thu, 6 Nov 2014 18:33:11 +0000 (UTC)
Received: (qmail 47230 invoked by uid 500); 6 Nov 2014 18:33:11 -0000
Delivered-To: apmail-hbase-commits-archive@hbase.apache.org
Received: (qmail 47190 invoked by uid 500); 6 Nov 2014 18:33:11 -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 47169 invoked by uid 99); 6 Nov 2014 18:33:11 -0000
Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org)
(140.211.11.114)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Nov 2014 18:33:11 +0000
Received: by tyr.zones.apache.org (Postfix, from userid 65534)
id C3C188BC52F; Thu, 6 Nov 2014 18:33:10 +0000 (UTC)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: stack@apache.org
To: commits@hbase.apache.org
Message-Id: <4e7ebfe9292f40b2952356a5d404393b@git.apache.org>
X-Mailer: ASF-Git Admin Mailer
Subject: hbase git commit: HBASE-12272 Generate Thrift code using a maven
profile
Date: Thu, 6 Nov 2014 18:33:10 +0000 (UTC)
Repository: hbase
Updated Branches:
refs/heads/branch-1 c99d89fd6 -> de21812ad
HBASE-12272 Generate Thrift code using a maven profile
Signed-off-by: stack
Conflicts:
pom.xml
src/main/docbkx/developer.xml
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/de21812a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/de21812a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/de21812a
Branch: refs/heads/branch-1
Commit: de21812ad5b59bb5b99e8589349109dbd2a3183b
Parents: c99d89f
Author: Niels Basjes
Authored: Wed Nov 5 09:59:23 2014 +0100
Committer: stack
Committed: Thu Nov 6 10:32:41 2014 -0800
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/thrift/package.html | 14 +--
hbase-thrift/pom.xml | 112 +++++++++++++++++++
.../apache/hadoop/hbase/thrift2/package.html | 6 +-
pom.xml | 3 +-
4 files changed, 120 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/de21812a/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/thrift/package.html
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/thrift/package.html b/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/thrift/package.html
index e4b4d40..0e2e9b5 100644
--- a/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/thrift/package.html
+++ b/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/thrift/package.html
@@ -33,15 +33,15 @@ It combines a software stack with a code generation engine to build services
that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby,
Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and OCaml."
-
-
-Important note: We tried to deprecate this Thrift interface and replace it
+
Important note
+We tried to deprecate this Thrift interface and replace it
with the Interface defined over in the thrift2 package only this package will not die.
Folks keep adding to it and fixing it up so its around for another while until someone
takes command and drives this package out of existence replacing it w/ an Interface that
better matches the hbase API (this package was modelled on old HBase API long since dropped).
-
+
+
The org.apache.hadoop.hbase.thrift.generated.Hbase.Iface HBase API is defined in the
file Hbase.thrift (Click the former to see the
thrift generated documentation of thrift interface). A server-side implementation of the API is in
@@ -93,11 +93,7 @@ These are the command line arguments the Thrift server understands in addition t
The files were generated by running the commands under the hbase checkout dir:
- thrift -strict --gen java:hashcode ./hbase-server/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
- # Move the generated files into place their expected location under hbase
- mv gen-java/org/apache/hadoop/hbase/thrift/generated/* hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/generated/
- # Remove the gen-java file made by thrift
- rm -rf gen-java
+ mvn compile -Pcompile-thrift
The 'thrift' binary is the Thrift compiler, and it is distributed as a part
http://git-wip-us.apache.org/repos/asf/hbase/blob/de21812a/hbase-thrift/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-thrift/pom.xml b/hbase-thrift/pom.xml
index adcce61..3876a4c 100644
--- a/hbase-thrift/pom.xml
+++ b/hbase-thrift/pom.xml
@@ -230,6 +230,7 @@
jasper-runtime
+
@@ -244,6 +245,117 @@
true
+
+
+
+ compile-thrift
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 1.3.1
+
+
+ enforce-thrift-version
+
+ enforce
+
+
+
+
+ thrift.version
+ "The Thrift version must be specified."
+ 0\.9\.0
+
+-
+-
+[FATAL] ==========================================================================================
+[FATAL] HBase Thrift requires the thrift generator version 0.9.0.
+[FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
+[FATAL] ==========================================================================================
+-
+-
+
+
+
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.2.1
+
+
+ check-thrift-version
+ generate-sources
+
+ exec
+
+
+ sh
+ ${basedir}
+
+ -c
+ ${thrift.path} -version | \
+ fgrep 'Thrift version ${thrift.version}' && exit 0;
+ echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
+ exit 1
+
+
+
+
+ thrift
+ generate-sources
+
+ exec
+
+
+ ${thrift.path}
+ ${basedir}
+
+ -strict
+ --gen
+ java:hashcode
+ -out
+ ${basedir}/src/main/java
+ ${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
+
+
+
+
+ thrift2
+ generate-sources
+
+ exec
+
+
+ ${thrift.path}
+ ${basedir}
+
+ -strict
+ --gen
+ java:hashcode
+ -out
+ ${basedir}/src/main/java
+ ${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
+
+
+
+
+
+
+
+
+
http://git-wip-us.apache.org/repos/asf/hbase/blob/de21812a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/package.html
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/package.html b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/package.html
index 8f6058e..8c40d95 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/package.html
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/package.html
@@ -91,11 +91,7 @@ These are the command line arguments the Thrift server understands in addition t
HBase currently uses version 0.9.0 of Apache Thrift.
The files were generated by running the commands under the hbase checkout dir:
- thrift -strict --gen java:hashcode ./hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
- # Move the generated files into place their expected location under hbase
- mv gen-java/org/apache/hadoop/hbase/thrift2/generated/* hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/
- # Remove the gen-java file made by thrift
- rm -rf gen-java
+ mvn compile -Pcompile-thrift
The 'thrift' binary is the Thrift compiler, and it is distributed separately from HBase
http://git-wip-us.apache.org/repos/asf/hbase/blob/de21812a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2dafb59..c2a3777 100644
--- a/pom.xml
+++ b/pom.xml
@@ -513,7 +513,7 @@
${hbase-surefire.argLine} ${argLine}
${test.output.tofile}
-
+
target/jacoco.exec
@@ -1011,6 +1011,7 @@
1.2.17
1.10.8
2.5.0
+ thrift
0.9.0
3.4.6
1.7.7