HADOOP-10612. NFS failed to refresh the user group id mapping table. Contributed by Brandon Li
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1596075 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4a839f0cc1
commit
674c523db1
@ -521,6 +521,8 @@ Release 2.4.1 - UNRELEASED
|
||||
HADOOP-10527. Fix incorrect return code and allow more retries on EINTR.
|
||||
(kihwal)
|
||||
|
||||
HADOOP-10612. NFS failed to refresh the user group id mapping table (brandonli)
|
||||
|
||||
Release 2.4.0 - 2014-04-07
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -24,6 +24,7 @@
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.util.Time;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.BiMap;
|
||||
@ -79,7 +80,7 @@ public long getTimeout() {
|
||||
}
|
||||
|
||||
synchronized private boolean isExpired() {
|
||||
return lastUpdateTime - System.currentTimeMillis() > timeout;
|
||||
return Time.monotonicNow() - lastUpdateTime > timeout;
|
||||
}
|
||||
|
||||
// If can't update the maps, will keep using the old ones
|
||||
@ -210,7 +211,7 @@ synchronized public void updateMaps() throws IOException {
|
||||
|
||||
uidNameMap = uMap;
|
||||
gidNameMap = gMap;
|
||||
lastUpdateTime = System.currentTimeMillis();
|
||||
lastUpdateTime = Time.monotonicNow();
|
||||
}
|
||||
|
||||
synchronized public int getUid(String user) throws IOException {
|
||||
|
Loading…
Reference in New Issue
Block a user