Repository: storm Updated Branches: refs/heads/1.x-branch a60fefd0e -> 1142ba7f5
STORM-2750: fix double_checked locking update HBaseSecurityUtil singleton to fix double_checked, http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/1142ba7f Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/1142ba7f Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/1142ba7f Branch: refs/heads/1.x-branch Commit: 1142ba7f53fa0773ff1f18e3c6b8cfb2cb859117 Parents: a60fefd Author: xiaoyong03 <[email protected]> Authored: Wed Sep 20 16:44:24 2017 +0800 Committer: Stig Rohde Døssing <[email protected]> Committed: Fri Sep 22 16:40:04 2017 +0200 ---------------------------------------------------------------------- .../java/org/apache/storm/hbase/security/HBaseSecurityUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/1142ba7f/external/storm-autocreds/src/main/java/org/apache/storm/hbase/security/HBaseSecurityUtil.java ---------------------------------------------------------------------- diff --git a/external/storm-autocreds/src/main/java/org/apache/storm/hbase/security/HBaseSecurityUtil.java b/external/storm-autocreds/src/main/java/org/apache/storm/hbase/security/HBaseSecurityUtil.java index 7c01653..b7be01e 100644 --- a/external/storm-autocreds/src/main/java/org/apache/storm/hbase/security/HBaseSecurityUtil.java +++ b/external/storm-autocreds/src/main/java/org/apache/storm/hbase/security/HBaseSecurityUtil.java @@ -40,7 +40,7 @@ public class HBaseSecurityUtil { public static final String STORM_KEYTAB_FILE_KEY = "storm.keytab.file"; public static final String STORM_USER_NAME_KEY = "storm.kerberos.principal"; public static final String HBASE_CREDENTIALS_CONFIG_KEYS = "hbaseCredentialsConfigKeys"; - private static UserProvider legacyProvider = null; + private static volatile UserProvider legacyProvider = null; public static UserProvider login(Map conf, Configuration hbaseConfig) throws IOException { //Allowing keytab based login for backward compatibility.
