petersomogyi commented on a change in pull request #673: HBASE-23093 : Avoid
Optional Anti-Pattern where possible
URL: https://github.com/apache/hbase/pull/673#discussion_r331748551
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncBatchRpcRetryingCaller.java
##########
@@ -400,18 +400,17 @@ private void sendToServer(ServerName serverName,
ServerRequest serverReq, int tr
// based on the load of the region server and the region.
private void sendOrDelay(Map<ServerName, ServerRequest> actionsByServer, int
tries) {
Optional<MetricsConnection> metrics = conn.getConnectionMetrics();
- Optional<ServerStatisticTracker> optStats = conn.getStatisticsTracker();
- if (!optStats.isPresent()) {
+ ServerStatisticTracker optStats = conn.getStatisticsTracker();
Review comment:
The variable name can be `stats` now.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services