Skip to content

Commit ec4c57c

Browse files
committed
HBASE-20999 Move hbase-REST to new hbase-connectors repository
1 parent 5976b15 commit ec4c57c

File tree

143 files changed

+30805
-0
lines changed

Some content is hidden

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

143 files changed

+30805
-0
lines changed
Lines changed: 275 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<artifactId>hbase-connectors</artifactId>
9+
<groupId>org.apache.hbase.connectors</groupId>
10+
<version>${revision}</version>
11+
<relativePath>../</relativePath>
12+
</parent>
13+
<artifactId>hbase-connectors-protocol-shaded</artifactId>
14+
<name>Apache HBase Connectors - Shaded Protocol</name>
15+
<description>Shaded protobuf protocol classes used by HBase Connectors internally.</description>
16+
<properties>
17+
<maven.javadoc.skip>true</maven.javadoc.skip>
18+
<!--Version of protobuf that hbase connectors uses internally (we shade our pb)
19+
Must match what is out in hbase-thirdparty include.
20+
-->
21+
<internal.protobuf.version>3.5.1-1</internal.protobuf.version>
22+
</properties>
23+
<build>
24+
<plugins>
25+
<!-- Make a jar and put the sources in the jar -->
26+
<plugin>
27+
<groupId>org.apache.maven.plugins</groupId>
28+
<artifactId>maven-source-plugin</artifactId>
29+
</plugin>
30+
<plugin>
31+
<!--Make it so assembly:single does nothing in here-->
32+
<artifactId>maven-assembly-plugin</artifactId>
33+
<configuration>
34+
<skipAssembly>true</skipAssembly>
35+
</configuration>
36+
</plugin>
37+
<plugin>
38+
<artifactId>maven-surefire-plugin</artifactId>
39+
<!-- Always skip the second part executions, since we only run simple unit tests in this module -->
40+
<executions>
41+
<execution>
42+
<id>secondPartTestsExecution</id>
43+
<phase>test</phase>
44+
<goals>
45+
<goal>test</goal>
46+
</goals>
47+
<configuration>
48+
<skip>true</skip>
49+
</configuration>
50+
</execution>
51+
</executions>
52+
</plugin>
53+
<plugin>
54+
<groupId>org.xolstice.maven.plugins</groupId>
55+
<artifactId>protobuf-maven-plugin</artifactId>
56+
<executions>
57+
<execution>
58+
<id>compile-protoc</id>
59+
<phase>generate-sources</phase>
60+
<goals>
61+
<goal>compile</goal>
62+
</goals>
63+
<configuration>
64+
<protocArtifact>com.google.protobuf:protoc:${internal.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
65+
<checkStaleness>true</checkStaleness>
66+
</configuration>
67+
</execution>
68+
</executions>
69+
</plugin>
70+
<!--Need this old plugin to replace in generated files instances
71+
of com.google.protobuf so instead its o.a.h.h.com.google.protobuf.
72+
Plugin is old and in google code archive. Here is usage done by
73+
anohther: https://github.com/beiliubei/maven-replacer-plugin/wiki/Usage-Guide
74+
The mess with the regex in the below is to prevent replacement every time
75+
we run mvn install. There is probably a better way of avoiding the
76+
double interpolation but this is it for now.
77+
-->
78+
<plugin>
79+
<groupId>com.google.code.maven-replacer-plugin</groupId>
80+
<artifactId>replacer</artifactId>
81+
<version>1.5.3</version>
82+
<executions>
83+
<execution>
84+
<phase>process-sources</phase>
85+
<goals>
86+
<goal>replace</goal>
87+
</goals>
88+
</execution>
89+
</executions>
90+
<configuration>
91+
<basedir>${basedir}/target/generated-sources/</basedir>
92+
<includes>
93+
<include>**/*.java</include>
94+
</includes>
95+
<!-- Ignore errors when missing files, because it means this build
96+
was run with -Dprotoc.skip and there is no -Dreplacer.skip -->
97+
<ignoreErrors>true</ignoreErrors>
98+
<replacements>
99+
<replacement>
100+
<token>([^\.])com.google.protobuf</token>
101+
<value>$1org.apache.hbase.thirdparty.com.google.protobuf</value>
102+
</replacement>
103+
<replacement>
104+
<token>(public)(\W+static)?(\W+final)?(\W+class)</token>
105+
<value>@javax.annotation.Generated("proto") $1$2$3$4</value>
106+
</replacement>
107+
<!-- replacer doesn't support anchoring or negative lookbehind -->
108+
<replacement>
109+
<token>(@javax.annotation.Generated\("proto"\) ){2}</token>
110+
<value>$1</value>
111+
</replacement>
112+
</replacements>
113+
</configuration>
114+
</plugin>
115+
<plugin>
116+
<groupId>org.apache.maven.plugins</groupId>
117+
<artifactId>maven-shade-plugin</artifactId>
118+
<executions>
119+
<execution>
120+
<phase>package</phase>
121+
<goals>
122+
<goal>shade</goal>
123+
</goals>
124+
<configuration>
125+
<minimizeJar>true</minimizeJar>
126+
<shadeSourcesContent>true</shadeSourcesContent>
127+
<!-- Causes an NPE until shade 3.0.1. See MSHADE-247
128+
<createSourcesJar>true</createSourcesJar>
129+
-->
130+
<relocations>
131+
<relocation>
132+
<pattern>com.google.protobuf</pattern>
133+
<shadedPattern>org.apache.hadoop.hbase.shaded.com.google.protobuf</shadedPattern>
134+
</relocation>
135+
</relocations>
136+
<artifactSet>
137+
<excludes>
138+
<!-- exclude J2EE modules that come in for JDK11+ or modules that come in for
139+
JDK8+ but need not be included -->
140+
<exclude>javax.annotation:javax.annotation-api</exclude>
141+
<!--Exclude protobuf itself. We get a patched version from hbase-thirdparty.
142+
-->
143+
<exclude>org.apache.hbase.thirdparty:*</exclude>
144+
<exclude>com.google.protobuf:protobuf-java</exclude>
145+
<exclude>com.google.code.findbugs:*</exclude>
146+
<exclude>com.google.j2objc:j2objc-annotations</exclude>
147+
<exclude>org.codehaus.mojo:animal-sniffer-annotations</exclude>
148+
<exclude>junit:junit</exclude>
149+
<exclude>log4j:log4j</exclude>
150+
<exclude>commons-logging:commons-logging</exclude>
151+
<exclude>org.slf4j:slf4j-api</exclude>
152+
<exclude>org.apache.yetus:audience-annotations</exclude>
153+
<exclude>com.github.stephenc.fingbugs:*</exclude>
154+
<exclude>com.github.spotbugs:*</exclude>
155+
</excludes>
156+
</artifactSet>
157+
</configuration>
158+
</execution>
159+
</executions>
160+
</plugin>
161+
<plugin>
162+
<groupId>org.apache.maven.plugins</groupId>
163+
<artifactId>maven-checkstyle-plugin</artifactId>
164+
<configuration>
165+
<failOnViolation>true</failOnViolation>
166+
</configuration>
167+
</plugin>
168+
<plugin>
169+
<groupId>net.revelc.code</groupId>
170+
<artifactId>warbucks-maven-plugin</artifactId>
171+
</plugin>
172+
</plugins>
173+
</build>
174+
<dependencies>
175+
<!--BE CAREFUL! Any dependency added here needs to be
176+
excluded above in the shade plugin else the dependency
177+
will get bundled-->
178+
<!-- Intra-project dependencies -->
179+
<dependency>
180+
<groupId>org.apache.hbase.thirdparty</groupId>
181+
<artifactId>hbase-shaded-protobuf</artifactId>
182+
</dependency>
183+
<dependency>
184+
<groupId>junit</groupId>
185+
<artifactId>junit</artifactId>
186+
<scope>test</scope>
187+
</dependency>
188+
<dependency>
189+
<groupId>org.apache.htrace</groupId>
190+
<artifactId>htrace-core4</artifactId>
191+
</dependency>
192+
</dependencies>
193+
<profiles>
194+
<!-- Skip the tests in this module -->
195+
<profile>
196+
<id>skip-protocol-shaded-tests</id>
197+
<activation>
198+
<property>
199+
<name>skip-protocol-shaded-tests</name>
200+
</property>
201+
</activation>
202+
<properties>
203+
<surefire.skipFirstPart>true</surefire.skipFirstPart>
204+
<surefire.skipSecondPart>true</surefire.skipSecondPart>
205+
</properties>
206+
</profile>
207+
<profile>
208+
<id>build-with-jdk11</id>
209+
<activation>
210+
<jdk>[1.11,)</jdk>
211+
</activation>
212+
<dependencies>
213+
<dependency>
214+
<groupId>javax.annotation</groupId>
215+
<artifactId>javax.annotation-api</artifactId>
216+
</dependency>
217+
</dependencies>
218+
</profile>
219+
<profile>
220+
<id>eclipse-specific</id>
221+
<activation>
222+
<property>
223+
<name>m2e.version</name>
224+
</property>
225+
</activation>
226+
<build>
227+
<pluginManagement>
228+
<plugins>
229+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
230+
<plugin>
231+
<groupId>org.eclipse.m2e</groupId>
232+
<artifactId>lifecycle-mapping</artifactId>
233+
<configuration>
234+
<lifecycleMappingMetadata>
235+
<pluginExecutions>
236+
<pluginExecution>
237+
<pluginExecutionFilter>
238+
<groupId>org.apache.hadoop</groupId>
239+
<artifactId>hadoop-maven-plugins</artifactId>
240+
<versionRange>[2.0.5-alpha,)</versionRange>
241+
<goals>
242+
<goal>protoc</goal>
243+
</goals>
244+
</pluginExecutionFilter>
245+
<action>
246+
<ignore/>
247+
</action>
248+
</pluginExecution>
249+
<pluginExecution>
250+
<pluginExecutionFilter>
251+
<groupId>
252+
com.google.code.maven-replacer-plugin
253+
</groupId>
254+
<artifactId>replacer</artifactId>
255+
<versionRange>[1.5.3,)</versionRange>
256+
<goals>
257+
<goal>replace</goal>
258+
</goals>
259+
</pluginExecutionFilter>
260+
<action>
261+
<execute>
262+
<runOnIncremental>false</runOnIncremental>
263+
</execute>
264+
</action>
265+
</pluginExecution>
266+
</pluginExecutions>
267+
</lifecycleMappingMetadata>
268+
</configuration>
269+
</plugin>
270+
</plugins>
271+
</pluginManagement>
272+
</build>
273+
</profile>
274+
</profiles>
275+
</project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
syntax = "proto2";
19+
package org.apache.hadoop.hbase.shaded.rest.protobuf.generated;
20+
21+
message Cell {
22+
optional bytes row = 1; // unused if Cell is in a CellSet
23+
optional bytes column = 2;
24+
optional int64 timestamp = 3;
25+
optional bytes data = 4;
26+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
syntax = "proto2";
19+
package org.apache.hadoop.hbase.shaded.rest.protobuf.generated;
20+
21+
import "rest/CellMessage.proto";
22+
23+
message CellSet {
24+
message Row {
25+
required bytes key = 1;
26+
repeated Cell values = 2;
27+
}
28+
repeated Row rows = 1;
29+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
syntax = "proto2";
19+
package org.apache.hadoop.hbase.shaded.rest.protobuf.generated;
20+
21+
message ColumnSchema {
22+
optional string name = 1;
23+
message Attribute {
24+
required string name = 1;
25+
required string value = 2;
26+
}
27+
repeated Attribute attrs = 2;
28+
// optional helpful encodings of commonly used attributes
29+
optional int32 ttl = 3;
30+
optional int32 maxVersions = 4;
31+
optional string compression = 5;
32+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
syntax = "proto2";
19+
package org.apache.hadoop.hbase.shaded.rest.protobuf.generated;
20+
21+
message NamespaceProperties {
22+
message Property {
23+
required string key = 1;
24+
required string value = 2;
25+
}
26+
repeated Property props = 1;
27+
}

0 commit comments

Comments
 (0)