Skip to content

Commit 1ee2db4

Browse files
committed
Applied comments
1 parent caf69c1 commit 1ee2db4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeStatus.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import java.util.Objects;
2323
import java.util.Set;
2424
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
25-
import org.apache.hadoop.util.Time;
2625

2726
/**
2827
* This class is used to capture the current status of a datanode. This
@@ -124,7 +123,7 @@ public boolean operationalStateExpired() {
124123
if (0 == opStateExpiryEpochSeconds) {
125124
return false;
126125
}
127-
return Time.monotonicNow() / 1000 >= opStateExpiryEpochSeconds;
126+
return System.currentTimeMillis() / 1000 >= opStateExpiryEpochSeconds;
128127
}
129128

130129
public boolean isInService() {

hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ protected void runTask() throws Exception {
147147
unhealthyContainerStateStatsMap);
148148
long start = Time.monotonicNow();
149149
long currentTime = System.currentTimeMillis();
150-
long existingCount = processExistingDBRecords(Time.monotonicNow(),
150+
long existingCount = processExistingDBRecords(System.currentTimeMillis(),
151151
unhealthyContainerStateStatsMap);
152152
LOG.debug("Container Health task thread took {} milliseconds to" +
153153
" process {} existing database records.",

0 commit comments

Comments
 (0)