You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/04/06 22:10:11 UTC
[GitHub] [hbase] ndimiduk commented on a change in pull request #1441:
HBASE-24120 Flakey Test: TestReplicationAdminWithClusters timeout
ndimiduk commented on a change in pull request #1441: HBASE-24120 Flakey Test: TestReplicationAdminWithClusters timeout
URL: https://github.com/apache/hbase/pull/1441#discussion_r404418881
##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
##########
@@ -579,8 +579,8 @@ private void interruptOrAbortWhenFail(ReplicationQueueOperation op) {
if (e.getCause() != null && e.getCause() instanceof KeeperException.SystemErrorException
Review comment:
I tried rewriting this big nasty if-expression using an `Optional`. Tell me what you think
```java
if (Optional.of(e.getCause())
.filter(c -> c instanceof KeeperException.SystemErrorException)
.map(c -> (KeeperException.SystemErrorException) c)
.map(Exception::getCause)
.filter(c -> c instanceof InterruptedException)
.isPresent()) {
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services