[ 
https://issues.apache.org/jira/browse/HADOOP-16222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16809859#comment-16809859
 ] 

Gabor Bota commented on HADOOP-16222:
-------------------------------------

[[email protected]] I saw you were the author of the affected part in 
{{SemaphoredDelegatingExecutor}} so here's me question:
Is it good enough if we change {{immediateFailedCheckedFuture}} to 
{{immediateFailedFuture}}, or do we need to create our own CheckedFuture? 
CheckedFuture is deprecated in guava, and will be removed in the next version 
because of:
{noformat}
   * @deprecated {@link CheckedFuture} cannot properly support the chained 
operations that are the
   *     primary goal of {@link ListenableFuture}. {@code CheckedFuture} also 
encourages users to
   *     rethrow exceptions from one thread in another thread, producing 
misleading stack traces.
   *     Additionally, it has a surprising policy about which exceptions to map 
and which to leave
   *     untouched. Guava users who want a {@code CheckedFuture} can fork the 
classes for their own
   *     use, possibly specializing them to the particular exception type they 
use. We recommend
   *     that most people use {@code ListenableFuture} and perform any 
exception wrapping
   *     themselves. This method is scheduled for removal from Guava in January 
2019.
{noformat}

Otherwise my PR is ready and pre-commit job is running.

> Fix new deprecations after guava 27.0 update in trunk
> -----------------------------------------------------
>
>                 Key: HADOOP-16222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16222
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: 3.3.0
>            Reporter: Gabor Bota
>            Assignee: Gabor Bota
>            Priority: Major
>
> *Note*: this can be done after the guava update.
> There are a bunch of new deprecations after the guava update. We need to fix 
> those, because these will be removed after the next guava version (after 27).
> I created a separate jira for this from HADOOP-16210 because jenkins 
> pre-commit test job (yetus) will time-out after 5 hours after running this 
> together. 
> {noformat}
> [WARNING] 
> /testptch/hadoop/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/SemaphoredDelegatingExecutor.java:[110,20]
>  [deprecation] <V,X>immediateFailedCheckedFuture(X) in Futures has been 
> deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ZKUtil.java:[175,16]
>  [deprecation] toString(File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java:[44,9]
>  [deprecation] write(CharSequence,File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java:[67,9]
>  [deprecation] write(CharSequence,File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java:[131,9]
>  [deprecation] write(CharSequence,File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java:[150,9]
>  [deprecation] write(CharSequence,File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java:[169,9]
>  [deprecation] write(CharSequence,File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestZKUtil.java:[134,9]
>  [deprecation] write(CharSequence,File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestSecurityUtil.java:[437,9]
>  [deprecation] write(CharSequence,File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java:[211,26]
>  [deprecation] toString(File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java:[219,36]
>  [deprecation] toString(File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/fpga/TestFpgaResourceHandler.java:[130,9]
>  [deprecation] append(CharSequence,File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/fpga/TestFpgaResourceHandler.java:[352,9]
>  [deprecation] append(CharSequence,File,Charset) in Files has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestAMRestart.java:[1161,18]
>  [deprecation] propagate(Throwable) in Throwables has been deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/ServiceTestUtils.java:[413,18]
>  [deprecation] propagate(Throwable) in Throwables has been deprecated
> {noformat}
> Maybe fix these by module by module instead of a single patch?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to