-
Notifications
You must be signed in to change notification settings - Fork 177
/
pom.xml
259 lines (242 loc) · 9.35 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-hbase-1.x-parent</artifactId>
<version>2.12.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
</parent>
<artifactId>bigtable-hbase-1.x-mapreduce</artifactId>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description>
This project contains tweaks to the hbase 1.* map reduce jobs that work for
bigtable.
Specifically, HBase's Import M/R job has ZooKeeper referrence which needed
to be removed
in order to work with Bigtable.
</description>
<properties>
<mrunit.version>1.1.0</mrunit.version>
<google-cloud-bigtable-emulator.version>0.165.0</google-cloud-bigtable-emulator.version>
</properties>
<!-- NOTE: this artifact is designed to be used alongside hbase-server via
the bin/hbase script. Its primary intention is to produce a single jar that can
be added to hbase's classpath to kick off mapreduce jobs targeted at bigtable.
A secondary goal is for some java orchestration program to kick off the jobs.
Thus the dependencies here must be exactly:
- bigtable-hbase-1.x-hadoop
- any hbase provided jars
In the primary usecase we will shade bigtable-hbase-1.x-hadoop allowing the
enduser to drop a single jar in the hbase classpath. In the secondary case,
the enduser can explcitly add their own version hbase-server.
-->
<dependencies>
<!-- Primary Group -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<version>${hbase1.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>bigtable-hbase-1.x-hadoop</artifactId>
<version>2.12.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<exclusions>
<!-- we need hbase-server instead of hbase-client -->
<exclusion>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
</exclusion>
<!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced
pom.xml files when invoking the build from a parent project. So we have to manually exclude
the dependencies. Note that this works in conjunction with the manually promoted dependencies
in bigtable-hbase-1.x-shaded/pom.xml -->
<exclusion>
<groupId>${project.groupId}</groupId>
<artifactId>bigtable-hbase-1.x-shaded</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Test Group -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.mrunit</groupId>
<artifactId>mrunit</artifactId>
<version>${mrunit.version}</version>
<classifier>hadoop2</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigtable-emulator-core</artifactId>
<version>${google-cloud-bigtable-emulator.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-testing-util</artifactId>
<version>${hbase1.version}</version>
<scope>test</scope>
<exclusions>
<!-- exclusion to avoid version conflict with existing artifact -->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<!-- exclusion to avoid version conflict with existing artifact -->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-internal-test-helper</artifactId>
<version>2.12.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- This is basically a replacement for the mapreduce jobs in hbase-server,
but with the implementation replaced by bigtable-hbase-1.x-hadoop. This means
that all of our dependencies are dictated by hbase-server. hbase-server
has a fairly complex dependency tree with a lot of exclusions. Trying to
replicate it here to declare exact deps our job uses creates an undue burden.-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<ignoredDependencies>
<dependency>*</dependency>
</ignoredDependencies>
</configuration>
</plugin>
<plugin>
<!-- skip UpperBound enforcement for hadoop jars -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<!-- We are not introducing any new deps here. We expect to be
running in hadoop's provided classpath -->
<execution>
<id>enforce-banned-deps</id>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>../../third_party/third_party_hbase_server/src/main/mapreduce/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.google.cloud.bigtable.mapreduce.Driver</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>shaded</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<archive>
<manifest>
<mainClass>com.google.cloud.bigtable.mapreduce.Driver</mainClass>
</manifest>
</archive>
<descriptors>
<descriptor>assembly/shaded-byo-hadoop.xml</descriptor>
<descriptor>assembly/shaded.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.cloud.bigtable.test</groupId>
<artifactId>bigtable-build-helper</artifactId>
<version>2.12.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<executions>
<execution>
<id>verify-mirror-deps</id>
<phase>verify</phase>
<goals>
<goal>verify-mirror-deps</goal>
</goals>
<configuration>
<targetDependencies>
<targetDependency>org.apache.hbase:hbase-server:${hbase1.version}</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- TODO: figure out why this diverges from hbase-client -->
<ignoredDependency>org.slf4j:slf4j-api</ignoredDependency>
<!-- For some reason, hbase-server pulls in test deps -->
<ignoredDependency>junit:junit</ignoredDependency>
<ignoredDependency>org.hamcrest:hamcrest-core</ignoredDependency>
</ignoredDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>