goiri commented on code in PR #4362:
URL: https://github.com/apache/hadoop/pull/4362#discussion_r883871623
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java:
##########
@@ -2061,12 +2060,7 @@ public DatanodeInfo[] load(DatanodeReportType type)
throws Exception {
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);
- }
- });
+ return executorService.submit(() -> load(type));
Review Comment:
One of the reasons to not use this syntax was to keep some backwards
compatibility with branch-2.
I guess that's long gone so let's go ahead.
--
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]