You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "duongkame (via GitHub)" <gi...@apache.org> on 2024/01/09 19:45:24 UTC

[PR] HDDS-10099. TestHddsConfServlet unnecessarily depends on hadoop-thirdparty [ozone]

duongkame opened a new pull request, #5966:
URL: https://github.com/apache/ozone/pull/5966

   ## What changes were proposed in this pull request?
   
   TestHddsConfServlet has an unnecessary dependency on hadoop-thirdparty.
   
   ```
   ...
   import org.apache.hadoop.http.HttpServer2;
   import org.apache.hadoop.thirdparty.com.google.common.base.Strings;
   import org.apache.hadoop.util.XMLUtils;
   ...
   ```
   Ozone code is supposed to use guava directly and from hadoop-thirdparty.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-10099
   
   ## How was this patch tested?
   
   CI.
   


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


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


Re: [PR] HDDS-10099. TestHddsConfServlet unnecessarily depends on hadoop-thirdparty [ozone]

Posted by "duongkame (via GitHub)" <gi...@apache.org>.
duongkame merged PR #5966:
URL: https://github.com/apache/ozone/pull/5966


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


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


Re: [PR] HDDS-10099. TestHddsConfServlet unnecessarily depends on hadoop-thirdparty [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #5966:
URL: https://github.com/apache/ozone/pull/5966#issuecomment-1883685626

   Thanks @duongkame for the spotting this.  The fix itself looks good.  I have two notes:
   
   1. `TestHddsConfServlet` is being changed in #5959, too, so there will be conflict:
   
   ```diff
   -import org.apache.hadoop.http.HttpServer2;
   +import org.apache.hadoop.hdds.server.http.HttpServer2;
   ```
   
   2. Let's avoid future cases by banning import of `org.apache.hadoop.thirdparty.com.google.common.**` here:
   
   https://github.com/apache/ozone/blob/d7e15f5733b997bca60d1921192d7497c6500a37/pom.xml#L1808-L1814


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


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


Re: [PR] HDDS-10099. TestHddsConfServlet unnecessarily depends on hadoop-thirdparty [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #5966:
URL: https://github.com/apache/ozone/pull/5966#discussion_r1446548840


##########
pom.xml:
##########
@@ -1812,6 +1812,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
                       <bannedImport>org.apache.ratis.thirdparty.com.google.common.**</bannedImport>
                     </bannedImports>
                   </restrictImports>
+                  <restrictImports>
+                    <includeTestCode>true</includeTestCode>
+                    <reason>Use directly from Guava</reason>
+                    <bannedImports>
+                      <bannedImport>org.apache.hadoop.thirdparty.com.google.common.**</bannedImport>

Review Comment:
   nit: I think we can add this single line to the existing ban.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


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


Re: [PR] HDDS-10099. TestHddsConfServlet unnecessarily depends on hadoop-thirdparty [ozone]

Posted by "duongkame (via GitHub)" <gi...@apache.org>.
duongkame commented on PR #5966:
URL: https://github.com/apache/ozone/pull/5966#issuecomment-1883709703

   > Thanks @duongkame for the spotting this. The fix itself looks good. I have two notes:
   > 
   > 1. `TestHddsConfServlet` is being changed in [HDDS-9847. Replace usage of org.apache.hadoop.http.HttpServer2 #5959](https://github.com/apache/ozone/pull/5959), too, so there will be conflict:
   > 
   > ```diff
   > -import org.apache.hadoop.http.HttpServer2;
   > +import org.apache.hadoop.hdds.server.http.HttpServer2;
   > ```
   > 
   > 2. Let's avoid future cases by banning import of `org.apache.hadoop.thirdparty.com.google.common.**` here:
   > 
   > https://github.com/apache/ozone/blob/d7e15f5733b997bca60d1921192d7497c6500a37/pom.xml#L1808-L1814
   
   Thanks for the review @adoroszlai. Rebased and made the config to prevent future usage (it's a good one, thanks). 


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


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