Skip to content

Commit 7a6de1b

Browse files
committed
HBASE-17056 Remove checked in PB generated files
Selective add of dependency on hbase-thirdparty jars. Update to READMEs on how protobuf is done (and update to refguide). Removed all checked in generated protobuf files. They are generated on the fly now as part of mainline build.
1 parent d4bd993 commit 7a6de1b

File tree

245 files changed

+1222
-742056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+1222
-742056
lines changed

hbase-client/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@
8787
</build>
8888

8989
<dependencies>
90+
<dependency>
91+
<groupId>org.apache.hbase.thirdparty</groupId>
92+
<artifactId>hbase-shaded-protobuf</artifactId>
93+
</dependency>
9094
<!-- Intra-project dependencies -->
9195
<dependency>
9296
<groupId>org.apache.hbase</groupId>

hbase-endpoint/README.txt

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
11
ON PROTOBUFS
2-
This maven module has protobuf definition files ('.protos') used by hbase
3-
Coprocessor Endpoints that ship with hbase core including tests. Coprocessor
2+
This maven module has protobuf definition files ('.protos') used by hbase
3+
Coprocessor Endpoints that ship with hbase core (including tests). Coprocessor
44
Endpoints are meant to be standalone, independent code not reliant on hbase
55
internals. They define their Service using protobuf. The protobuf version
66
they use can be distinct from that used by HBase internally since HBase started
77
shading its protobuf references. Endpoints have no access to the shaded protobuf
8-
hbase uses. They do have access to the content of hbase-protocol but avoid using
9-
as much of this as you can as it is liable to change.
8+
hbase uses. They do have access to the content of hbase-protocol -- the
9+
.protos found in this module -- but avoid using as much of this as you can as it is
10+
liable to change.
1011

11-
Generation of java files from protobuf .proto files included here is done apart
12-
from the build. Run the generation whenever you make changes to the .orotos files
13-
and then check in the produced java (The reasoning is that change is infrequent
14-
so why pay the price of generating files anew on each build.
15-
16-
To generate java files from protos run:
17-
18-
$ mvn compile -Dcompile-protobuf
19-
or
20-
$ mvn compile -Pcompile-protobuf
21-
22-
After you've done the above, check it and then check in changes (or post a patch
23-
on a JIRA with your definition file changes and the generated files). Be careful
24-
to notice new files and files removed and do appropriate git rm/adds.
12+
Generation of java files from protobuf .proto files included here is done as
13+
part of the build.

hbase-endpoint/pom.xml

Lines changed: 121 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<!--
3+
<!--
44
/**
55
* Licensed to the Apache Software Foundation (ASF) under one
66
* or more contributor license agreements. See the NOTICE file
@@ -19,76 +19,91 @@
1919
* limitations under the License.
2020
*/
2121
-->
22-
<modelVersion>4.0.0</modelVersion>
23-
<parent>
24-
<artifactId>hbase</artifactId>
25-
<groupId>org.apache.hbase</groupId>
26-
<version>3.0.0-SNAPSHOT</version>
27-
<relativePath>..</relativePath>
28-
</parent>
29-
30-
<artifactId>hbase-endpoint</artifactId>
31-
<name>Apache HBase - Coprocessor Endpoint</name>
32-
<description>HBase Coprocessor Endpoint implementations</description>
33-
<!--REMOVE-->
34-
35-
<properties>
36-
<maven.javadoc.skip>true</maven.javadoc.skip>
37-
</properties>
38-
39-
<build>
40-
<plugins>
41-
<plugin>
42-
<groupId>org.apache.maven.plugins</groupId>
43-
<artifactId>maven-site-plugin</artifactId>
44-
<configuration>
45-
<skip>true</skip>
46-
</configuration>
47-
</plugin>
48-
<!-- Make a jar and put the sources in the jar -->
49-
<plugin>
50-
<groupId>org.apache.maven.plugins</groupId>
51-
<artifactId>maven-source-plugin</artifactId>
52-
</plugin>
22+
<modelVersion>4.0.0</modelVersion>
23+
<parent>
24+
<artifactId>hbase</artifactId>
25+
<groupId>org.apache.hbase</groupId>
26+
<version>3.0.0-SNAPSHOT</version>
27+
<relativePath>..</relativePath>
28+
</parent>
29+
<artifactId>hbase-endpoint</artifactId>
30+
<name>Apache HBase - Coprocessor Endpoint</name>
31+
<description>HBase Coprocessor Endpoint implementations</description>
32+
<!--REMOVE-->
33+
<properties>
34+
<maven.javadoc.skip>true</maven.javadoc.skip>
35+
</properties>
36+
<build>
37+
<plugins>
38+
<plugin>
39+
<groupId>org.apache.maven.plugins</groupId>
40+
<artifactId>maven-site-plugin</artifactId>
41+
<configuration>
42+
<skip>true</skip>
43+
</configuration>
44+
</plugin>
45+
<!-- Make a jar and put the sources in the jar -->
46+
<plugin>
47+
<groupId>org.apache.maven.plugins</groupId>
48+
<artifactId>maven-source-plugin</artifactId>
49+
</plugin>
5350
<plugin>
5451
<!--Make it so assembly:single does nothing in here-->
5552
<artifactId>maven-assembly-plugin</artifactId>
5653
<configuration>
5754
<skipAssembly>true</skipAssembly>
5855
</configuration>
5956
</plugin>
57+
<plugin>
58+
<groupId>org.xolstice.maven.plugins</groupId>
59+
<artifactId>protobuf-maven-plugin</artifactId>
60+
<executions>
61+
<execution>
62+
<id>compile-protoc</id>
63+
<phase>generate-sources</phase>
64+
<goals>
65+
<goal>compile</goal>
66+
</goals>
67+
<configuration>
68+
<additionalProtoPathElements>
69+
<additionalProtoPathElement>${basedir}/../hbase-protocol/src/main/protobuf</additionalProtoPathElement>
70+
</additionalProtoPathElements>
71+
</configuration>
72+
</execution>
73+
</executions>
74+
</plugin>
75+
</plugins>
76+
<pluginManagement>
77+
<plugins>
78+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
79+
<plugin>
80+
<groupId>org.eclipse.m2e</groupId>
81+
<artifactId>lifecycle-mapping</artifactId>
82+
<version>1.0.0</version>
83+
<configuration>
84+
<lifecycleMappingMetadata>
85+
<pluginExecutions>
86+
<pluginExecution>
87+
<pluginExecutionFilter>
88+
<groupId>org.apache.hadoop</groupId>
89+
<artifactId>hadoop-maven-plugins</artifactId>
90+
<versionRange>[2.0.5-alpha,)</versionRange>
91+
<goals>
92+
<goal>protoc</goal>
93+
</goals>
94+
</pluginExecutionFilter>
95+
<action>
96+
<ignore/>
97+
</action>
98+
</pluginExecution>
99+
</pluginExecutions>
100+
</lifecycleMappingMetadata>
101+
</configuration>
102+
</plugin>
60103
</plugins>
61-
<pluginManagement>
62-
<plugins>
63-
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
64-
<plugin>
65-
<groupId>org.eclipse.m2e</groupId>
66-
<artifactId>lifecycle-mapping</artifactId>
67-
<configuration>
68-
<lifecycleMappingMetadata>
69-
<pluginExecutions>
70-
<pluginExecution>
71-
<pluginExecutionFilter>
72-
<groupId>org.apache.hadoop</groupId>
73-
<artifactId>hadoop-maven-plugins</artifactId>
74-
<versionRange>[2.0.5-alpha,)</versionRange>
75-
<goals>
76-
<goal>protoc</goal>
77-
</goals>
78-
</pluginExecutionFilter>
79-
<action>
80-
<ignore></ignore>
81-
</action>
82-
</pluginExecution>
83-
</pluginExecutions>
84-
</lifecycleMappingMetadata>
85-
</configuration>
86-
</plugin>
87-
</plugins>
88-
</pluginManagement>
89-
</build>
90-
91-
<dependencies>
104+
</pluginManagement>
105+
</build>
106+
<dependencies>
92107
<dependency>
93108
<groupId>org.apache.hbase.thirdparty</groupId>
94109
<artifactId>hbase-shaded-miscellaneous</artifactId>
@@ -131,88 +146,57 @@
131146
<type>test-jar</type>
132147
<scope>test</scope>
133148
</dependency>
134-
<dependency>
135-
<groupId>org.apache.hbase</groupId>
136-
<artifactId>hbase-protocol</artifactId>
137-
</dependency>
138-
<dependency>
139-
<groupId>org.apache.hbase</groupId>
140-
<artifactId>hbase-client</artifactId>
141-
</dependency>
142-
<!--Some of the CPEPs use hbase server-side internals; they shouldn't!
149+
<dependency>
150+
<groupId>org.apache.hbase</groupId>
151+
<artifactId>hbase-protocol</artifactId>
152+
</dependency>
153+
<dependency>
154+
<groupId>org.apache.hbase</groupId>
155+
<artifactId>hbase-client</artifactId>
156+
</dependency>
157+
<!--Some of the CPEPs use hbase server-side internals; they shouldn't!
143158
-->
144-
<dependency>
145-
<groupId>org.apache.hbase</groupId>
146-
<artifactId>hbase-server</artifactId>
147-
</dependency>
148-
<dependency>
149-
<groupId>org.apache.hbase</groupId>
150-
<artifactId>hbase-server</artifactId>
151-
<type>test-jar</type>
152-
<scope>test</scope>
153-
</dependency>
154-
<!-- General dependencies -->
155-
<dependency>
156-
<groupId>commons-logging</groupId>
157-
<artifactId>commons-logging</artifactId>
158-
</dependency>
159-
</dependencies>
160-
161-
<profiles>
162-
<!-- Skip the tests in this module -->
163-
<profile>
164-
<id>skipRpcTests</id>
165-
<activation>
166-
<property>
167-
<name>skipRpcTests</name>
168-
</property>
169-
</activation>
170-
<properties>
171-
<surefire.skipFirstPart>true</surefire.skipFirstPart>
172-
<surefire.skipSecondPart>true</surefire.skipSecondPart>
173-
</properties>
174-
</profile>
175-
<profile>
176-
<id>compile-protobuf</id>
177-
<activation>
178-
<property>
179-
<name>compile-protobuf</name>
180-
</property>
181-
</activation>
182-
<build>
183-
<plugins>
184-
<plugin>
185-
<groupId>org.xolstice.maven.plugins</groupId>
186-
<artifactId>protobuf-maven-plugin</artifactId>
187-
<executions>
188-
<execution>
189-
<id>compile-protoc</id>
190-
<phase>generate-sources</phase>
191-
<goals>
192-
<goal>compile</goal>
193-
</goals>
194-
<configuration>
195-
<additionalProtoPathElements>
196-
<additionalProtoPathElement>${basedir}/../hbase-protocol/src/main/protobuf</additionalProtoPathElement>
197-
</additionalProtoPathElements>
198-
</configuration>
199-
</execution>
200-
</executions>
201-
</plugin>
202-
</plugins>
203-
</build>
204-
</profile>
159+
<dependency>
160+
<groupId>org.apache.hbase</groupId>
161+
<artifactId>hbase-server</artifactId>
162+
</dependency>
163+
<dependency>
164+
<groupId>org.apache.hbase</groupId>
165+
<artifactId>hbase-server</artifactId>
166+
<type>test-jar</type>
167+
<scope>test</scope>
168+
</dependency>
169+
<!-- General dependencies -->
170+
<dependency>
171+
<groupId>commons-logging</groupId>
172+
<artifactId>commons-logging</artifactId>
173+
</dependency>
174+
</dependencies>
175+
<profiles>
176+
<!-- Skip the tests in this module -->
177+
<profile>
178+
<id>skipRpcTests</id>
179+
<activation>
180+
<property>
181+
<name>skipRpcTests</name>
182+
</property>
183+
</activation>
184+
<properties>
185+
<surefire.skipFirstPart>true</surefire.skipFirstPart>
186+
<surefire.skipSecondPart>true</surefire.skipSecondPart>
187+
</properties>
188+
</profile>
205189
<!-- Profiles for building against different hadoop versions -->
206190
<!-- There are a lot of common dependencies used here, should investigate
207191
if we can combine these profiles somehow -->
208-
209192
<!-- profile for building against Hadoop 2.x. This is the default. -->
210193
<profile>
211194
<id>hadoop-2.0</id>
212195
<activation>
213196
<property>
214-
<!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
215-
<!--h2--><name>!hadoop.profile</name>
197+
<!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
198+
<!--h2-->
199+
<name>!hadoop.profile</name>
216200
</property>
217201
</activation>
218202
<dependencies>
@@ -315,5 +299,5 @@
315299
</dependency>
316300
</dependencies>
317301
</profile>
318-
</profiles>
302+
</profiles>
319303
</project>

0 commit comments

Comments
 (0)