You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "fanshilun (Jira)" <ji...@apache.org> on 2022/05/28 04:28:00 UTC

[jira] [Resolved] (HDFS-16597) RBF: Improve RouterRpcServer#reload With Lambda

     [ https://issues.apache.org/jira/browse/HDFS-16597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

fanshilun resolved HDFS-16597.
------------------------------
    Resolution: Fixed

> RBF: Improve RouterRpcServer#reload With Lambda
> -----------------------------------------------
>
>                 Key: HDFS-16597
>                 URL: https://issues.apache.org/jira/browse/HDFS-16597
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: rbf
>    Affects Versions: 3.4.0
>            Reporter: fanshilun
>            Assignee: fanshilun
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> When reading the code, I found that RouterRpcServer#reload uses the following method to submit threads
>  RouterRpcServer#reload
> {code:java}
> public ListenableFuture<DatanodeInfo[]> reload(
>         final DatanodeReportType type, DatanodeInfo[] oldValue)
>         throws Exception {
>       return executorService.submit(new Callable<DatanodeInfo[]>() {
>         @Override
>         public DatanodeInfo[] call() throws Exception {
>           return load(type);
>         }
>       });
>     } {code}
> This place is better to use lambda way



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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