[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hadoop-commits
Subject:    hadoop git commit: HADOOP-14354. SysInfoWindows is not thread safe. Contributed by Inigo Goiri
From:       cdouglas () apache ! org
Date:       2017-04-27 23:27:04
Message-ID: 0951bded45f447fe85d92b790462b21a () git ! apache ! org
[Download RAW message or body]

Repository: hadoop
Updated Branches:
  refs/heads/trunk 31cf480d6 -> 689fb2fc6


HADOOP-14354. SysInfoWindows is not thread safe. Contributed by Inigo Goiri


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/689fb2fc
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/689fb2fc
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/689fb2fc

Branch: refs/heads/trunk
Commit: 689fb2fc661f233367ecbfa26795ff4c01408f3e
Parents: 31cf480
Author: Chris Douglas <cdouglas@apache.org>
Authored: Thu Apr 27 16:26:39 2017 -0700
Committer: Chris Douglas <cdouglas@apache.org>
Committed: Thu Apr 27 16:26:39 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/util/SysInfoWindows.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/689fb2fc/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/SysInfoWindows.java
                
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/SysInfoWindows.java \
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/SysInfoWindows.java
 index e21adac..8b4ea54 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/SysInfoWindows.java
                
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/SysInfoWindows.java
 @@ -90,7 +90,7 @@ public class SysInfoWindows extends SysInfo {
     return null;
   }
 
-  void refreshIfNeeded() {
+  synchronized void refreshIfNeeded() {
     long now = now();
     if (now - lastRefreshTime > REFRESH_INTERVAL_MS) {
       long refreshInterval = now - lastRefreshTime;


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic