virajjasani commented on a change in pull request #2343:
URL: https://github.com/apache/hbase/pull/2343#discussion_r483794886
##########
File path:
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/RemoteProcedureDispatcher.java
##########
@@ -298,6 +299,8 @@ default boolean storeInDispatchedQueue() {
//
============================================================================================
private final class TimeoutExecutorThread extends Thread {
private final DelayQueue<DelayedWithTimeout> queue = new
DelayQueue<DelayedWithTimeout>();
+ private final ConcurrentHashMap<DelayedWithTimeout, DelayedWithTimeout>
pendingBufferNode =
Review comment:
As a general rule, it's good to handle implementation by using interface
to avoid the pain of changing all references if we wish to change the
implementation. I understand, we don't want to change implementation here, but
it's always great to refer to implementation using interface unless we want to
deliberately use implementor methods which are not overridden from interface.
Hence, just like why we would want to use `Map<Key,Val> map=new HashMap<>`,
let's also use:
```
private final ConcurrentMap<DelayedWithTimeout, DelayedWithTimeout>
pendingBufferNode = new ConcurrentHashMap<>();
```
----------------------------------------------------------------
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]