-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-27222 Purge FutureReturnValueIgnored warnings from error prone #4634
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
Conversation
|
There are still 4 warnings left. For the two metrics one, I do not find a better way to fix, as the scheduleWithFixedRate will return a ScheduledFuture, seems the way is to store it somewhere and cancel it when stop? And in AssignmentManager, the problem is moveAsync just returns a Future, not a CompletableFuture, so there is no way to register a listener to log the errors if any. We can fix this in the future to let it returns a CompletableFuture, but better in another issue. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
Ping @apurtell . PTAL at this one? Thanks. |
| Promise<Void> saslPromise = channel.eventLoop().newPromise(); | ||
| trySaslNegotiate(conf, channel, dnInfo, timeoutMs, client, accessToken, saslPromise); | ||
| saslPromise.addListener(new FutureListener<Void>() { | ||
| addListener(saslPromise, new FutureListener<Void>() { |
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.
"Promoting" the listener makes sense.
| state = State.BROKEN; | ||
| failWaitingAckQueue(channel, errorSupplier); | ||
| datanodeInfoMap.keySet().forEach(ChannelOutboundInvoker::close); | ||
| datanodeInfoMap.keySet().forEach(NettyFutureUtils::safeClose); |
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.
I like the approach here where new NettyFutureUtils encapsulates the await/cleanup details, (edit: and suppresses warnings in one place, mostly.)
hbase-common/src/main/java/org/apache/hadoop/hbase/util/FutureUtils.java
Outdated
Show resolved
Hide resolved
| * thrown from the code that completes the future, and this method will catch all the exception | ||
| * thrown from the {@code listener} to catch possible code bugs. | ||
| * <p/> | ||
| * And the error phone check will always report FutureReturnValueIgnored because every method in |
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.
Sounds good.
hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/HttpProxyExample.java
Show resolved
Hide resolved
|
@Apache9 Apologies for the delay, lgtm with minor comments |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
The failed UT seems not related. Let me merge. |
…4634) Signed-off-by: Andrew Purtell <[email protected]> (cherry picked from commit 8b091c4)
…4634) Signed-off-by: Andrew Purtell <[email protected]> (cherry picked from commit 8b091c4)
…pache#4634) This change backports the changes from Jira: HBASE-27222. Signed-off-by: Andrew Purtell <[email protected]> (cherry picked from commit 8b091c4) (cherry picked from commit 84e7cdb) Change-Id: Ibd7bbaab22dcec49a25ad61ec43c7eac3365e902
No description provided.