adoroszlai commented on code in PR #8096:
URL: https://github.com/apache/ozone/pull/8096#discussion_r2035426538
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/node/TestSCMNodeManager.java:
##########
@@ -637,7 +637,7 @@ public void testSetNodeOpStateAndCommandFired()
DatanodeDetails dn = HddsTestUtils.createRandomDatanodeAndRegister(
nodeManager);
- long expiry = System.currentTimeMillis() / 1000 + 1000;
+ long expiry = Time.monotonicNow() / 1000 + 1000;
Review Comment:
Also related to `NodeStatus`.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeDecommissionManager.java:
##########
@@ -527,7 +528,7 @@ public synchronized void startMaintenance(DatanodeDetails
dn, int endInHours)
long maintenanceEnd = 0;
if (endInHours != 0) {
maintenanceEnd =
- (System.currentTimeMillis() / 1000L) + (endInHours * 60L * 60L);
+ (Time.monotonicNow() / 1000L) + (endInHours * 60L * 60L);
Review Comment:
This is related to `NodeStatus` mentioned in
https://github.com/apache/ozone/pull/8096/#discussion_r1997654326, I think it
should keep using `System.currentTimeMillis()`.
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/node/TestDecommissionAndMaintenance.java:
##########
@@ -613,7 +614,7 @@ public void testMaintenanceEndsAutomaticallyAtTimeout()
scmClient.startMaintenanceNodes(Arrays.asList(getDNHostAndPort(dn)), 0,
true);
waitForDnToReachPersistedOpState(dn, IN_MAINTENANCE);
- long newEndTime = System.currentTimeMillis() / 1000 + 5;
+ long newEndTime = Time.monotonicNow() / 1000 + 5;
Review Comment:
Also `NodeStatus`.
--
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]