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 "Ahmed Hussein (Jira)" <ji...@apache.org> on 2020/10/20 21:41:00 UTC
[jira] [Comment Edited] (HADOOP-17315) Use shaded guava in
ClientCache.java
[ https://issues.apache.org/jira/browse/HADOOP-17315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17217954#comment-17217954 ]
Ahmed Hussein edited comment on HADOOP-17315 at 10/20/20, 9:40 PM:
-------------------------------------------------------------------
Hey [~aajisaka], thanks for working on this patch.
The guava enforcer rules were introduced to warn against increasing the reliance on guava classes; specifically to prevent the new patches from re-introducing code that was already "un-guaved".
{code:xml}
<property name="illegalClasses"
value="^com\.google\.common\.base\.(Optional|Function|Predicate|Supplier), ^com\.google\.common\.collect\.(ImmutableListMultimap)"/>
{code}
After merging that patch, the rules are only checking for imports that start with com.google. By Introducing shading, the regex becomes obsolete because the packages have a different prefix {{org.apache.hadoop.thirdparty.*}}.
I suggested that rules are modified to make sure that those guava classes are not used in Hadoop code.
was (Author: ahussein):
Hey [~aajisaka], thanks for working on this patch.
The guava enforcer rules were introduced to warn against increasing the reliance on guava classes; specifically to prevent the new patches from re-introducing code that was already "un-guaved".
{code:xml}
<property name="illegalClasses"
value="^com\.google\.common\.base\.(Optional|Function|Predicate|Supplier), ^com\.google\.common\.collect\.(ImmutableListMultimap)"/>
{code}
After merging that patch, the rules are only checking for imports that start with com.google. Introducing shading, the regex becomes obsolete because the packages have a different prefix {{org.apache.hadoop.thirdparty.*}}.
I suggested that rules are modified to make sure that those guava classes are not used in Hadoop code.
> Use shaded guava in ClientCache.java
> ------------------------------------
>
> Key: HADOOP-17315
> URL: https://issues.apache.org/jira/browse/HADOOP-17315
> Project: Hadoop Common
> Issue Type: Bug
> Components: build
> Reporter: Akira Ajisaka
> Assignee: Akira Ajisaka
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.4.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> After HADOOP-17288, we should use shaded guava.
--
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