You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/10/06 08:59:00 UTC

[jira] [Work logged] (HADOOP-17288) Use shaded guava from thirdparty

     [ https://issues.apache.org/jira/browse/HADOOP-17288?focusedWorklogId=495796&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-495796 ]

ASF GitHub Bot logged work on HADOOP-17288:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Oct/20 08:58
            Start Date: 06/Oct/20 08:58
    Worklog Time Spent: 10m 
      Work Description: vinayakumarb commented on a change in pull request #2342:
URL: https://github.com/apache/hadoop/pull/2342#discussion_r500116361



##########
File path: hadoop-common-project/hadoop-auth/pom.xml
##########
@@ -234,6 +235,24 @@
           <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>com.google.code.maven-replacer-plugin</groupId>
+        <artifactId>replacer</artifactId>
+        <executions>
+          <execution>
+            <id>replace-sources</id>
+            <configuration>
+              <skip>false</skip>
+            </configuration>
+          </execution>
+          <execution>
+            <id>replace-test-sources</id>
+            <configuration>
+              <skip>false</skip>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>

Review comment:
       Instead of replacing guava references along with protobuf references, create a separate replacer-execution in hadoop-project/pom.xml and enable by default for all projects.
   ```
               <execution>
                 <id>replace-guava</id>
                 <phase>process-sources</phase>
                 <goals>
                   <goal>replace</goal>
                 </goals>
                 <configuration>
                   <skip>false</skip><!--This will run for all modules-->
                   <basedir>${basedir}</basedir>
                   <includes>
                     <include>src/main/java/**/*.java</include>
                     <include>src/test/java/**/*.java</include>
                   </includes>
                   <replacements>
                     <replacement>
                       <token>([^\.])com.google.common</token>
                       <value>$1${hadoop-thirdparty-shaded-guava-prefix}</value>
                     </replacement>
                   </replacements>
                 </configuration>
               </execution>
   ```
   
   2. Exclude guava-replacement in hadoop-yarn-csi module. yarn-csi seems to have separate classpath, and it explicitly uses guava-20. This will not affect any downstreams.
   
   3. Replaces all dependencies on guava to hadoop-shaded-guava (except yarn-csi)
   
   4. In hadoop-common/pom.xml, Keep both guava (11.0.2) and hadoop-shaded-guava as dependencies. Of course code should use shaded version of guava. version 11.0.2 is used in curator libs during runtime. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 495796)
    Time Spent: 0.5h  (was: 20m)

> Use shaded guava from thirdparty
> --------------------------------
>
>                 Key: HADOOP-17288
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17288
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Use the shaded version of guava in hadoop-thirdparty



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org