Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions hadoop-ozone/dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions hadoop-ozone/dist/src/main/license/jar-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
118 changes: 118 additions & 0 deletions hadoop-ozone/ozonefs-hadoop3-client/pom.xml
Original file line number Diff line number Diff line change
@@ -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-SNAPSHOT</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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the documentation for why the name was selected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kerneltime Done. Please cherry-pick into the 1.3 branch when you can.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious~ how to know which jar is shaded and which isn't?
are they documented somewhere~?

<name>Apache Ozone FS Hadoop shaded 3.x compatibility</name>
<packaging>jar</packaging>
<version>1.3.0-SNAPSHOT</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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious~ what do BC1024KE.DSA and BC2048KE.SF mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that is used when shading jars to prevent the changes from causing security exceptions. We use it here as well:

<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>

That is where I got it from.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh!! thanks!!

</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>
6 changes: 6 additions & 0 deletions hadoop-ozone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -373,6 +378,7 @@
<module>ozonefs-shaded</module>
<module>ozonefs-hadoop2</module>
<module>ozonefs-hadoop3</module>
<module>ozonefs-hadoop3-client</module>
</modules>
</profile>
<profile>
Expand Down