szetszwo commented on code in PR #11294:
URL: https://github.com/apache/ozone/pull/11294#discussion_r4136627541


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientShortCircuit.java:
##########
@@ -653,4 +624,35 @@ public boolean equals(Object obj) {
           && this.blockLocalId == that.blockLocalId;
     }
   }
+
+  static final class TimeoutScheduler {
+    private Timer timer;
+
+    synchronized void init(String prefix) {
+      Preconditions.assertNull(timer, "timer");
+      timer = new Timer(prefix + "-Timer");
+    }
+
+    synchronized void schedule(TimerTask task, int timeoutMs) {
+      if (timer == null) {

Review Comment:
   Let's change it to requireNonNull.
   



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to