You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/10/16 10:59:26 UTC

[GitHub] [hadoop-ozone] elek commented on issue #8: HDDS-2267. Container metadata scanner interval mismatch

elek commented on issue #8: HDDS-2267. Container metadata scanner interval mismatch
URL: https://github.com/apache/hadoop-ozone/pull/8#issuecomment-542646488
 
 
   My previous comments are not addressed but it was an optional suggestion. I commit it right now as it's better than the current code.
   
   From the old PR:
   
   
   
   
   Thanks to fix it @adoroszlai. Nice catch.
   
   As the millisecond resolution is enough I think it can be more safer to use type-safe java API:
   
   Sg like:
   
   ```
   Instant start = Instant.now();
   
   ...
   
   nextCheck = start.plus(metadataScanInterval, ChronoUnit.SECONDS)
   remainingMs = Instant.now().until(nextCheck, ChronoUnit.MILLIS)
   Time.sleep(remainingMs)
   ```
   
   But I am also fine with the current patch as it's definitely better than the earlier code ;-)

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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org