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

ASF GitHub Bot logged work on HDFS-16597:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/May/22 06:46
            Start Date: 27/May/22 06:46
    Worklog Time Spent: 10m 
      Work Description: slfan1989 opened a new pull request, #4362:
URL: https://github.com/apache/hadoop/pull/4362

   JIRA: HDFS-16597 Improve RouterRpcServer#reload With Lambda
   
   When reading the code, I found that RouterRpcServer#reload uses the 
following method to submit threads
   RouterRpcServer#reload
   ```
   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);
           }
         });
       } 
   ```
   
   This place is better to use lambda .




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

            Worklog Id:     (was: 775411)
    Remaining Estimate: 0h
            Time Spent: 10m

> Improve RouterRpcServer#reload With Lambda
> ------------------------------------------
>
>                 Key: HDFS-16597
>                 URL: https://issues.apache.org/jira/browse/HDFS-16597
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: rbf
>    Affects Versions: 3.4.0
>            Reporter: fanshilun
>            Assignee: fanshilun
>            Priority: Minor
>          Time Spent: 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to