goiri commented on code in PR #4561: URL: https://github.com/apache/hadoop/pull/4561#discussion_r920333291
########## hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java: ########## @@ -346,36 +324,25 @@ public void run() { @Override public ListenableFuture<Boolean> isFormatted() { - return singleThreadExecutor.submit(new Callable<Boolean>() { - @Override - public Boolean call() throws IOException { - return getProxy().isFormatted(journalId, nameServiceId); - } - }); + return singleThreadExecutor.submit( Review Comment: Fits in one line ########## hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java: ########## @@ -346,36 +324,25 @@ public void run() { @Override public ListenableFuture<Boolean> isFormatted() { - return singleThreadExecutor.submit(new Callable<Boolean>() { - @Override - public Boolean call() throws IOException { - return getProxy().isFormatted(journalId, nameServiceId); - } - }); + return singleThreadExecutor.submit( + () -> getProxy().isFormatted(journalId, nameServiceId)); } @Override public ListenableFuture<GetJournalStateResponseProto> getJournalState() { - return singleThreadExecutor.submit(new Callable<GetJournalStateResponseProto>() { - @Override - public GetJournalStateResponseProto call() throws IOException { - GetJournalStateResponseProto ret = - getProxy().getJournalState(journalId, nameServiceId); - constructHttpServerURI(ret); - return ret; - } + return singleThreadExecutor.submit(() -> { + GetJournalStateResponseProto ret = Review Comment: Fits in one line -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org