[
https://issues.apache.org/jira/browse/HDFS-16695?focusedWorklogId=797025&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-797025
]
ASF GitHub Bot logged work on HDFS-16695:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Aug/22 20:30
Start Date: 01/Aug/22 20:30
Worklog Time Spent: 10m
Work Description: goiri commented on PR #4668:
URL: https://github.com/apache/hadoop/pull/4668#issuecomment-1201689352
> Personally, I think this optimization should still be valuable, I hope
that the submitted pr is not at the class level, at least at the moudle level.
I wouldn't go for one per class but maybe subpackage.
I also think this PR is doing a couple of things more other than adding
lambdas.
For example, adjusting for iterations.
Issue Time Tracking
-------------------
Worklog Id: (was: 797025)
Time Spent: 1h (was: 50m)
> Improve Code with Lambda in org.apahce.hadoop.hdfs.server.namenode package
> --------------------------------------------------------------------------
>
> Key: HDFS-16695
> URL: https://issues.apache.org/jira/browse/HDFS-16695
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: ZanderXu
> Assignee: ZanderXu
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Improve Code with Lambda in org.apahce.hadoop.hdfs.server.namenode package.
> 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: [email protected]
For additional commands, e-mail: [email protected]