storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srihar...@apache.org
Subject [3/4] storm git commit: [STORM-2482] addressing review comments
Date Tue, 02 May 2017 21:56:06 GMT
[STORM-2482] addressing review comments


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/6d08e29e
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/6d08e29e
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/6d08e29e

Branch: refs/heads/1.x-branch
Commit: 6d08e29e5577f31696190664a1b94cb9e4bad25d
Parents: 19ea744
Author: Arun Mahadevan <arunm@apache.org>
Authored: Thu Apr 27 18:17:19 2017 +0530
Committer: Arun Mahadevan <arunm@apache.org>
Committed: Thu Apr 27 18:24:19 2017 +0530

----------------------------------------------------------------------
 docs/storm-hbase.md                                     |  2 +-
 .../java/org/apache/storm/common/AbstractAutoCreds.java | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/6d08e29e/docs/storm-hbase.md
----------------------------------------------------------------------
diff --git a/docs/storm-hbase.md b/docs/storm-hbase.md
index 8074244..f8d955e 100644
--- a/docs/storm-hbase.md
+++ b/docs/storm-hbase.md
@@ -98,7 +98,7 @@ topology submission, nimbus will impersonate the topology submitter user
and acq
 topology submitter user. If topology was started with topology.auto-credentials set to AutoHBase,
nimbus will push the
 delegation tokens to all the workers for your topology and the hbase bolt/state will authenticate
with these tokens.
 
-As nimbus is impersonating topology submitter user, you need to ensure the user specified
in storm.kerberos.principal 
+As nimbus is impersonating topology submitter user, you need to ensure the user specified
in hbase.kerberos.principal 
 has permissions to acquire tokens on behalf of other users. To achieve this you need to follow
configuration directions 
 listed on this link
 

http://git-wip-us.apache.org/repos/asf/storm/blob/6d08e29e/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java
----------------------------------------------------------------------
diff --git a/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java
b/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java
index 816e263..cc374c9 100644
--- a/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java
+++ b/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java
@@ -74,7 +74,7 @@ public abstract class AbstractAutoCreds implements IAutoCredentials, ICredential
     @Override
     public void populateCredentials(Map<String, String> credentials, Map conf) {
         try {
-            if (configKeys != null) {
+            if (!configKeys.isEmpty()) {
                 Map<String, Object> updatedConf = updateConfigs(conf);
                 for (String configKey : configKeys) {
                     credentials.put(getCredentialKey(configKey),
@@ -92,11 +92,9 @@ public abstract class AbstractAutoCreds implements IAutoCredentials, ICredential
 
     private Map<String, Object> updateConfigs(Map topologyConf) {
         Map<String, Object> res = new HashMap<>(topologyConf);
-        if (configKeys != null) {
-            for (String configKey : configKeys) {
-                if (!res.containsKey(configKey) && configMap.containsKey(configKey))
{
-                    res.put(configKey, configMap.get(configKey));
-                }
+        for (String configKey : configKeys) {
+            if (!res.containsKey(configKey) && configMap.containsKey(configKey))
{
+                res.put(configKey, configMap.get(configKey));
             }
         }
         return res;
@@ -134,7 +132,7 @@ public abstract class AbstractAutoCreds implements IAutoCredentials, ICredential
 
     protected Set<Pair<String, Credentials>> getCredentials(Map<String, String>
credentials) {
         Set<Pair<String, Credentials>> res = new HashSet<>();
-        if (configKeys != null) {
+        if (!configKeys.isEmpty()) {
             for (String configKey : configKeys) {
                 Credentials cred = doGetCredentials(credentials, configKey);
                 if (cred != null) {


Mime
View raw message