DomGarguilo commented on code in PR #4380:
URL: https://github.com/apache/accumulo/pull/4380#discussion_r1934668717


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java:
##########
@@ -1769,13 +1772,13 @@ public void importDataFiles(long tid, 
Map<ReferencedTabletFile,DataFileInfo> fil
 
     // Clients timeout and will think that this operation failed.
     // Don't do it if we spent too long waiting for the lock
-    long now = System.nanoTime();
+    Timer lockWaitTimer = Timer.startNew();
     synchronized (this) {
       if (isClosed()) {
         throw new IOException("tablet " + extent + " is closed");
       }
 
-      long rpcTimeoutNanos = TimeUnit.MILLISECONDS.toNanos(
+      Duration rpcTimeout = Duration.ofMillis(

Review Comment:
   Yea I was trying to use `getDuration` but this code scales the value by 
`1.1` and the `Duration.multipliedBy()` only accepts a `long` for the 
multiplicand for some reason. So it seems we have to use the millis value and 
then convert it to Duration after scaling.



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

Reply via email to