This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch ozone-1.3
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/ozone-1.3 by this push:
     new c610eff370 HDDS-6926. Add support for shaded protobufs used by 
hadoop-client/spark. (#3915)
c610eff370 is described below

commit c610eff370616d9a9f70b4d8f8abdb946a74dca8
Author: GeorgeJahad <[email protected]>
AuthorDate: Mon Oct 31 22:51:02 2022 -0700

    HDDS-6926. Add support for shaded protobufs used by hadoop-client/spark. 
(#3915)
    
    (cherry picked from commit 8dded6ce7e626481348f3349b110cc938fc18062)
---
 hadoop-ozone/dist/pom.xml                         |   4 +
 hadoop-ozone/dist/src/main/license/jar-report.txt |   1 +
 hadoop-ozone/ozonefs-hadoop3-client/pom.xml       | 118 ++++++++++++++++++++++
 hadoop-ozone/pom.xml                              |   6 ++
 4 files changed, 129 insertions(+)

diff --git a/hadoop-ozone/dist/pom.xml b/hadoop-ozone/dist/pom.xml
index 6c58e82365..0324fc0543 100644
--- a/hadoop-ozone/dist/pom.xml
+++ b/hadoop-ozone/dist/pom.xml
@@ -241,6 +241,10 @@
           <groupId>org.apache.ozone</groupId>
           <artifactId>ozone-filesystem-hadoop3</artifactId>
         </dependency>
+        <dependency>
+          <groupId>org.apache.ozone</groupId>
+          <artifactId>ozone-filesystem-hadoop3-client</artifactId>
+        </dependency>
       </dependencies>
     </profile>
     <profile>
diff --git a/hadoop-ozone/dist/src/main/license/jar-report.txt 
b/hadoop-ozone/dist/src/main/license/jar-report.txt
index 6147466757..8a6c6a7e67 100644
--- a/hadoop-ozone/dist/src/main/license/jar-report.txt
+++ b/hadoop-ozone/dist/src/main/license/jar-report.txt
@@ -212,6 +212,7 @@ share/ozone/lib/ozone-filesystem-common.jar
 share/ozone/lib/ozone-filesystem-hadoop2.jar
 share/ozone/lib/ozone-filesystem-hadoop3.jar
 share/ozone/lib/ozone-filesystem.jar
+share/ozone/lib/ozone-filesystem-hadoop3-client.jar
 share/ozone/lib/ozone-insight.jar
 share/ozone/lib/ozone-interface-client.jar
 share/ozone/lib/ozone-interface-storage.jar
diff --git a/hadoop-ozone/ozonefs-hadoop3-client/pom.xml 
b/hadoop-ozone/ozonefs-hadoop3-client/pom.xml
new file mode 100644
index 0000000000..431e6c95ba
--- /dev/null
+++ b/hadoop-ozone/ozonefs-hadoop3-client/pom.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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. See accompanying LICENSE file.
+-->
+<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";>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.ozone</groupId>
+    <artifactId>ozone</artifactId>
+    <version>1.3.0</version>
+  </parent>
+<!--
+  This is called "ozone-filesystem-hadoop3-client" to correspond with
+  the shaded hadoop jar that it works with:
+  "hadoop-client-api.jar", (as opposed to the unshaded hadoop jar:
+  "hadoop-common.jar")
+-->
+  <artifactId>ozone-filesystem-hadoop3-client</artifactId>
+  <name>Apache Ozone FS Hadoop shaded 3.x compatibility</name>
+  <packaging>jar</packaging>
+  <version>1.3.0</version>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.ozone</groupId>
+      <artifactId>ozone-filesystem-hadoop3</artifactId>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>include-dependencies</id>
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <configuration>
+              <excludes>META-INF/versions/**/*.*</excludes>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.ozone</groupId>
+                  <artifactId>ozone-filesystem-shaded</artifactId>
+                  <version>${project.version}</version>
+                </artifactItem>
+              </artifactItems>
+              <outputDirectory>target/classes</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <transformers>
+                <transformer
+                        
implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
+                  <resources>
+                    <resource>META-INF/BC1024KE.DSA</resource>
+                    <resource>META-INF/BC2048KE.DSA</resource>
+                    <resource>META-INF/BC1024KE.SF</resource>
+                    <resource>META-INF/BC2048KE.SF</resource>
+                  </resources>
+                </transformer>
+                <transformer
+                        
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                <transformer
+                        
implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
+                  <resource>ozone-default-generated.xml</resource>
+                </transformer>
+              </transformers>
+              <relocations>
+                <relocation>
+                  <pattern>com.google.protobuf</pattern>
+                  <shadedPattern>
+                    org.apache.hadoop.shaded.com.google.protobuf
+                  </shadedPattern>
+                  <includes>
+                    <include>com.google.protobuf.*</include>
+                  </includes>
+                </relocation>
+              </relocations>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>com.github.spotbugs</groupId>
+        <artifactId>spotbugs-maven-plugin</artifactId>
+        <configuration>
+          <onlyAnalyze>org.apache.hadoop.fs.ozone.*</onlyAnalyze>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/hadoop-ozone/pom.xml b/hadoop-ozone/pom.xml
index e294a0beec..5135ae981b 100644
--- a/hadoop-ozone/pom.xml
+++ b/hadoop-ozone/pom.xml
@@ -122,6 +122,11 @@
         <artifactId>ozone-filesystem-hadoop3</artifactId>
         <version>${ozone.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.ozone</groupId>
+        <artifactId>ozone-filesystem-hadoop3-client</artifactId>
+        <version>${ozone.version}</version>
+      </dependency>
       <dependency>
         <groupId>org.apache.ozone</groupId>
         <artifactId>ozone-filesystem-hadoop2</artifactId>
@@ -373,6 +378,7 @@
         <module>ozonefs-shaded</module>
         <module>ozonefs-hadoop2</module>
         <module>ozonefs-hadoop3</module>
+        <module>ozonefs-hadoop3-client</module>
       </modules>
     </profile>
     <profile>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to