YARN-9057.  Removed third party class bundle from CSI jar file.
            Contributed by Weiwei Yang


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/1dabb31c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/1dabb31c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/1dabb31c

Branch: refs/heads/HDFS-12943
Commit: 1dabb31cdf907cbee418c469368a59393fd52844
Parents: 228156c
Author: Eric Yang <ey...@apache.org>
Authored: Wed Dec 5 15:56:10 2018 -0500
Committer: Eric Yang <ey...@apache.org>
Committed: Wed Dec 5 15:56:10 2018 -0500

----------------------------------------------------------------------
 .../resources/assemblies/hadoop-yarn-dist.xml   |  4 +
 .../hadoop-yarn/hadoop-yarn-csi/pom.xml         | 78 ++++----------------
 2 files changed, 19 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1dabb31c/hadoop-assemblies/src/main/resources/assemblies/hadoop-yarn-dist.xml
----------------------------------------------------------------------
diff --git 
a/hadoop-assemblies/src/main/resources/assemblies/hadoop-yarn-dist.xml 
b/hadoop-assemblies/src/main/resources/assemblies/hadoop-yarn-dist.xml
index 4055acb..a5c3c0e 100644
--- a/hadoop-assemblies/src/main/resources/assemblies/hadoop-yarn-dist.xml
+++ b/hadoop-assemblies/src/main/resources/assemblies/hadoop-yarn-dist.xml
@@ -220,6 +220,10 @@
       
<directory>hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-common/target/lib</directory>
       
<outputDirectory>share/hadoop/${hadoop.component}/timelineservice/lib</outputDirectory>
     </fileSet>
+    <fileSet>
+      <directory>hadoop-yarn/hadoop-yarn-csi/target/lib</directory>
+      
<outputDirectory>share/hadoop/${hadoop.component}/csi/lib</outputDirectory>
+    </fileSet>
   </fileSets>
   <moduleSets>
     <moduleSet>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1dabb31c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi/pom.xml 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi/pom.xml
index 27d8452..1a19f0e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi/pom.xml
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi/pom.xml
@@ -86,14 +86,17 @@
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-common</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-yarn-common</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-yarn-api</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>javax.annotation</groupId>
@@ -114,6 +117,18 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeScope>runtime</includeScope>
+                            
<outputDirectory>${project.build.directory}/lib</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -148,69 +163,6 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <version>${maven-shade-plugin.version}</version>
-                <configuration>
-                    
<createDependencyReducedPom>false</createDependencyReducedPom>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <relocations>
-                                <relocation>
-                                    <pattern>io.grpc</pattern>
-                                    <shadedPattern>csi.io.grpc</shadedPattern>
-                                </relocation>
-                                <relocation>
-                                    <!-- this includes protobuf-java and guava 
libraries -->
-                                    <pattern>com.google</pattern>
-                                    
<shadedPattern>csi.com.google</shadedPattern>
-                                </relocation>
-                                <relocation>
-                                    <pattern>io.netty</pattern>
-                                    <shadedPattern>csi.io.netty</shadedPattern>
-                                </relocation>
-                            </relocations>
-                            <transformers>
-                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"
 />
-                            </transformers>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <!-- We need to rename the native library file in order to let 
shaded classes to load them -->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>package</phase>
-                        <configuration>
-                            <target>
-                                <echo message="Unpack hadoop-yarn-csi jar 
file"/>
-                                <unzip 
src="${project.build.directory}/${project.artifactId}-${project.version}.jar"
-                                       
dest="${project.build.directory}/unpacked/"/>
-                                <echo message="Append the shaded prefix to 
netty's native file in META-INF"/>
-                                <move 
file="${project.build.directory}/unpacked/META-INF/native/libnetty_transport_native_epoll_x86_64.so"
-                                      
tofile="${project.build.directory}/unpacked/META-INF/native/libcsi_netty_transport_native_epoll_x86_64.so"
 />
-                                <echo message="Re-pack the jar"/>
-                                <jar 
destfile="${project.build.directory}/${project.artifactId}-${project.version}.jar"
-                                     
basedir="${project.build.directory}/unpacked"/>
-                            </target>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.rat</groupId>
                 <artifactId>apache-rat-plugin</artifactId>
                 <configuration>


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to