Skip to content

Commit b2ece6c

Browse files
committed
ATLAS-5210: replace hbase-shaded-* dependencies with hbase-shaded-*-hadoop3 (#530)
(cherry picked from commit 14246fe)
1 parent 292af2e commit b2ece6c

6 files changed

Lines changed: 124 additions & 12 deletions

File tree

graphdb/janus/pom.xml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
<artifactId>atlas-graphdb-common</artifactId>
5252
<version>${project.version}</version>
5353
</dependency>
54+
<dependency>
55+
<groupId>org.apache.atlas</groupId>
56+
<artifactId>hbase-shaded-client-fixed</artifactId>
57+
<version>${project.version}</version>
58+
</dependency>
5459
<dependency>
5560
<groupId>org.apache.atlas</groupId>
5661
<artifactId>janusgraph-rdbms</artifactId>
@@ -80,14 +85,20 @@
8085
<version>${commons-text.version}</version>
8186
</dependency>
8287
<dependency>
83-
<groupId>org.apache.hbase</groupId>
84-
<artifactId>hbase-shaded-client</artifactId>
85-
<version>${hbase.version}</version>
88+
<groupId>org.apache.hadoop</groupId>
89+
<artifactId>hadoop-distcp</artifactId>
90+
<version>${hadoop.version}</version>
8691
</dependency>
8792
<dependency>
8893
<groupId>org.apache.hbase</groupId>
8994
<artifactId>hbase-shaded-mapreduce</artifactId>
90-
<version>${hbase.version}</version>
95+
<version>${hbase.version}-hadoop3</version>
96+
<exclusions>
97+
<exclusion>
98+
<groupId>org.apache.hadoop</groupId>
99+
<artifactId>hadoop-distcp</artifactId>
100+
</exclusion>
101+
</exclusions>
91102
</dependency>
92103
<dependency>
93104
<groupId>org.apache.lucene</groupId>

hbase-shaded-client-fixed/pom.xml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one
4+
~ or more contributor license agreements. See the NOTICE file
5+
~ distributed with this work for additional information
6+
~ regarding copyright ownership. The ASF licenses this file
7+
~ to you under the Apache License, Version 2.0 (the
8+
~ "License"); you may not use this file except in compliance
9+
~ with the License. You may obtain a copy of the License at
10+
~
11+
~ http://www.apache.org/licenses/LICENSE-2.0
12+
~
13+
~ Unless required by applicable law or agreed to in writing, software
14+
~ distributed under the License is distributed on an "AS IS" BASIS,
15+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
~ See the License for the specific language governing permissions and
17+
~ limitations under the License.
18+
-->
19+
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
20+
<modelVersion>4.0.0</modelVersion>
21+
22+
<parent>
23+
<groupId>org.apache.atlas</groupId>
24+
<artifactId>apache-atlas</artifactId>
25+
<version>2.5.0-SNAPSHOT</version>
26+
</parent>
27+
28+
<artifactId>hbase-shaded-client-fixed</artifactId>
29+
<packaging>jar</packaging>
30+
31+
<name>HBase shaded client with fix</name>
32+
<description>HBase shaded client with fix to remove 2 entries in META-INF/services</description>
33+
34+
<properties>
35+
<checkstyle.failOnViolation>true</checkstyle.failOnViolation>
36+
<checkstyle.skip>false</checkstyle.skip>
37+
</properties>
38+
39+
<dependencies>
40+
<dependency>
41+
<groupId>org.apache.hbase</groupId>
42+
<artifactId>hbase-shaded-client</artifactId>
43+
<version>${hbase.version}-hadoop3</version>
44+
<scope>provided</scope>
45+
</dependency>
46+
</dependencies>
47+
48+
<build>
49+
<plugins>
50+
<!-- Unpack hbase-shaded-client jar, skipping 2 entries in META-INF/services -->
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-dependency-plugin</artifactId>
54+
<executions>
55+
<execution>
56+
<id>unpack-hbase-shaded-client</id>
57+
<goals>
58+
<goal>unpack</goal>
59+
</goals>
60+
<phase>process-resources</phase>
61+
<configuration>
62+
<artifactItems>
63+
<artifactItem>
64+
<groupId>org.apache.hbase</groupId>
65+
<artifactId>hbase-shaded-client</artifactId>
66+
<version>${hbase.version}-hadoop3</version>
67+
<excludes>META-INF/services/javax.ws.rs.ext.MessageBodyWriter,META-INF/services/javax.ws.rs.ext.MessageBodyReader</excludes>
68+
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
69+
</artifactItem>
70+
</artifactItems>
71+
</configuration>
72+
</execution>
73+
</executions>
74+
</plugin>
75+
76+
<!-- Repack the jar -->
77+
<plugin>
78+
<groupId>org.apache.maven.plugins</groupId>
79+
<artifactId>maven-jar-plugin</artifactId>
80+
<version>2.4</version>
81+
<executions>
82+
<execution>
83+
<id>default-jar</id>
84+
<phase>none</phase>
85+
</execution>
86+
<execution>
87+
<id>repack-fixed-hbase-shaded-client</id>
88+
<goals>
89+
<goal>jar</goal>
90+
</goals>
91+
<phase>package</phase>
92+
<configuration>
93+
<classesDirectory>${project.build.directory}/unpacked</classesDirectory>
94+
<finalName>hbase-shaded-client-${hbase.version}-hadoop3-fixed</finalName>
95+
</configuration>
96+
</execution>
97+
</executions>
98+
</plugin>
99+
</plugins>
100+
</build>
101+
</project>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
<module>docs</module>
6666
<module>graphdb</module>
6767

68+
<module>hbase-shaded-client-fixed</module>
6869
<module>intg</module>
6970
<module>notification</module>
7071
<module>plugin-classloader</module>

repository/pom.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@
123123
<groupId>org.apache.atlas</groupId>
124124
<artifactId>atlas-server-api</artifactId>
125125
</dependency>
126+
<dependency>
127+
<groupId>org.apache.atlas</groupId>
128+
<artifactId>hbase-shaded-client-fixed</artifactId>
129+
<version>${project.version}</version>
130+
</dependency>
126131
<dependency>
127132
<groupId>org.apache.atlas</groupId>
128133
<artifactId>janusgraph-rdbms</artifactId>
@@ -150,12 +155,6 @@
150155
<artifactId>commons-lang3</artifactId>
151156
</dependency>
152157

153-
<dependency>
154-
<groupId>org.apache.hbase</groupId>
155-
<artifactId>hbase-shaded-client</artifactId>
156-
<version>${hbase.version}</version>
157-
</dependency>
158-
159158
<dependency>
160159
<groupId>org.apache.poi</groupId>
161160
<artifactId>poi</artifactId>

webapp/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@
520520
<addClasspath>true</addClasspath>
521521
</manifest>
522522
</archive>
523-
<packagingExcludes>WEB-INF/lib/dom4j-*.jar,WEB-INF/lib/jsp-api*.jar,${packages.to.exclude}</packagingExcludes>
523+
<packagingExcludes>WEB-INF/lib/hbase-shaded-client-${hbase.version}-hadoop3.jar,WEB-INF/lib/dom4j-*.jar,WEB-INF/lib/jsp-api*.jar,${packages.to.exclude}</packagingExcludes>
524524
</configuration>
525525
</plugin>
526526

webapp/src/main/java/org/apache/atlas/web/service/AtlasDebugMetricsSink.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import org.apache.atlas.web.model.DebugMetrics;
2121
import org.apache.commons.lang3.StringUtils;
22-
import org.apache.hadoop.hbase.shaded.org.apache.commons.configuration.SubsetConfiguration;
22+
import org.apache.hadoop.hbase.shaded.org.apache.commons.configuration2.SubsetConfiguration;
2323
import org.apache.hadoop.metrics2.AbstractMetric;
2424
import org.apache.hadoop.metrics2.MetricsRecord;
2525
import org.apache.hadoop.metrics2.MetricsSink;

0 commit comments

Comments
 (0)