HADOOP-10612. Merging change r1596075 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1596080 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brandon Li 2014-05-19 22:20:03 +00:00
parent b6988521f4
commit 63740cb27a
2 changed files with 5 additions and 2 deletions

View File

@ -182,6 +182,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

View File

@ -24,6 +24,7 @@ import java.io.InputStreamReader;
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 class IdUserGroup {
}
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 @@ public class IdUserGroup {
uidNameMap = uMap;
gidNameMap = gMap;
lastUpdateTime = System.currentTimeMillis();
lastUpdateTime = Time.monotonicNow();
}
synchronized public int getUid(String user) throws IOException {