ZanderXu opened a new pull request, #4668:
URL: https://github.com/apache/hadoop/pull/4668

   ### Description of PR
   Improve Code with Lambda in org.apahce.hadoop.hdfs.server.namenode package.
   
   For example:
   Current logic:
   ```
   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);
             }
           });
     }
   ```
   
   Improved Code with Lambda:
   ```
   public ListenableFuture<GetJournaledEditsResponseProto> getJournaledEdits(
         long fromTxnId, int maxTransactions) {
       return parallelExecutor.submit(() -> getProxy().getJournaledEdits(
           journalId, nameServiceId, fromTxnId, maxTransactions));
     }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to