New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDFS-16660. Improve Code With Lambda in IPCLoggerChannel class #4561
Conversation
return getProxy().isFormatted(journalId, nameServiceId); | ||
} | ||
}); | ||
return singleThreadExecutor.submit( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fits in one line
return ret; | ||
} | ||
return singleThreadExecutor.submit(() -> { | ||
GetJournalStateResponseProto ret = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fits in one line
💔 -1 overall
This message was automatically generated. |
getProxy().journal(createReqInfo(), | ||
segmentTxId, firstTxnId, numTxns, data); | ||
} catch (IOException e) { | ||
QuorumJournalManager.LOG.warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use {}
💔 -1 overall
This message was automatically generated. |
...oject/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java
Outdated
Show resolved
Hide resolved
long now = System.nanoTime(); | ||
long rpcTime = TimeUnit.MICROSECONDS.convert( | ||
now - rpcSendTimeNanos, TimeUnit.NANOSECONDS); | ||
long endToEndTime = TimeUnit.MICROSECONDS.convert( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
endToEndTimeMs?
return null; | ||
throw e; | ||
} finally { | ||
long now = System.nanoTime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nowNs
@goiri Can help me reivew it and push it forward? After this, I will create a PR try to improve codes with Lambda in the whole hadoop-hdfs module. |
@goiri Hi, master, can you help me merge it into the trunk? I will move to improve codes with Lambda in the whole hadoop-hdfs module. |
Description of PR
Improve Code With Lambda in IPCLoggerChannel class, make it more readable.