You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2017/05/08 05:05:47 UTC
[3/6] storm git commit: [STORM-2482] addressing review comments
[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/289d6ff7
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/289d6ff7
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/289d6ff7
Branch: refs/heads/master
Commit: 289d6ff743c42ef3cf7bd1e9e8fe52652aeac457
Parents: a0122ae
Author: Arun Mahadevan <ar...@apache.org>
Authored: Thu Apr 27 18:17:19 2017 +0530
Committer: Arun Mahadevan <ar...@apache.org>
Committed: Wed May 3 14:13:38 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/289d6ff7/docs/storm-hbase.md
----------------------------------------------------------------------
diff --git a/docs/storm-hbase.md b/docs/storm-hbase.md
index 0fb2c14..ec88054 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/289d6ff7/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) {