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

ZanderXu updated HDFS-16695:
----------------------------
    Summary: Improve Code with Lambda in hadoop-hdfs module  (was: Improve Code 
With Lambda in hadoop-hdfs module)

> Improve Code with Lambda in hadoop-hdfs module
> ----------------------------------------------
>
>                 Key: HDFS-16695
>                 URL: https://issues.apache.org/jira/browse/HDFS-16695
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Minor
>
> Improve Code with Lambda in hadoop-hdfs module. 
> For example:
> Current logic:
> {code:java}
> public ListenableFuture<GetJournaledEditsResponseProto> getJournaledEdits(
>       long fromTxnId, int maxTransactions) {
>     return parallelExecutor.submit(
>         new Callable<GetJournaledEditsResponseProto>() {
>           @Override
>           public GetJournaledEditsResponseProto call() throws IOException {
>             return getProxy().getJournaledEdits(journalId, nameServiceId,
>                 fromTxnId, maxTransactions);
>           }
>         });
>   }
> {code}
> Improved Code with Lambda:
> {code:java}
> public ListenableFuture<GetJournaledEditsResponseProto> getJournaledEdits(
>       long fromTxnId, int maxTransactions) {
>     return parallelExecutor.submit(() -> getProxy().getJournaledEdits(
>         journalId, nameServiceId, fromTxnId, maxTransactions));
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to