You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2015/05/29 18:16:58 UTC
[1/2] storm git commit: STORM-827: Allow AutoTGT to work with
storm-hdfs too.
Repository: storm
Updated Branches:
refs/heads/0.10.x-branch 02f4ae96b -> 6a230e5b8
STORM-827: Allow AutoTGT to work with storm-hdfs too.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/cdce04ff
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/cdce04ff
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/cdce04ff
Branch: refs/heads/0.10.x-branch
Commit: cdce04ff9e7400e715b33029837c685a56e07819
Parents: 02f4ae9
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue May 19 15:42:34 2015 -0500
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Fri May 29 12:08:37 2015 -0400
----------------------------------------------------------------------
.../org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/cdce04ff/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java
----------------------------------------------------------------------
diff --git a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java
index 9e390e9..86e7e3d 100644
--- a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java
+++ b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/security/HdfsSecurityUtil.java
@@ -17,6 +17,8 @@
*/
package org.apache.storm.hdfs.common.security;
+import backtype.storm.security.auth.kerberos.AutoTGT;
+
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.security.SecurityUtil;
import org.apache.hadoop.security.UserGroupInformation;
@@ -42,7 +44,8 @@ public class HdfsSecurityUtil {
public static void login(Map conf, Configuration hdfsConfig) throws IOException {
//If AutoHDFS is specified, do not attempt to login using keytabs, only kept for backward compatibility.
if(conf.get(TOPOLOGY_AUTO_CREDENTIALS) == null ||
- !(((List)conf.get(TOPOLOGY_AUTO_CREDENTIALS)).contains(AutoHDFS.class.getName()))) {
+ (!(((List)conf.get(TOPOLOGY_AUTO_CREDENTIALS)).contains(AutoHDFS.class.getName())) &&
+ !(((List)conf.get(TOPOLOGY_AUTO_CREDENTIALS)).contains(AutoTGT.class.getName())))) {
if (UserGroupInformation.isSecurityEnabled()) {
LOG.info("Logging in using keytab as AutoHDFS is not specified for " + TOPOLOGY_AUTO_CREDENTIALS);
String keytab = (String) conf.get(STORM_KEYTAB_FILE_KEY);
[2/2] storm git commit: STORM-835 Netty Client hold batch object
until io operation complete
Posted by pt...@apache.org.
STORM-835 Netty Client hold batch object until io operation complete
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/6a230e5b
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/6a230e5b
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/6a230e5b
Branch: refs/heads/0.10.x-branch
Commit: 6a230e5b8f304985a40e36d363e985e3a68c1800
Parents: cdce04f
Author: zhanghailei <zh...@youku.com>
Authored: Mon May 25 10:00:12 2015 +0800
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Fri May 29 12:10:31 2015 -0400
----------------------------------------------------------------------
storm-core/src/jvm/backtype/storm/messaging/netty/Client.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/6a230e5b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
index f332bb3..ac3f3f2 100644
--- a/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
+++ b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
@@ -461,7 +461,7 @@ public class Client extends ConnectionWithStatus implements IStatefulObject {
*
* If the write operation fails, then we will close the channel and trigger a reconnect.
*/
- private synchronized void flushMessages(Channel channel, final MessageBatch batch) {
+ private synchronized void flushMessages(Channel channel, MessageBatch batch) {
if (!containsMessages(batch)) {
return;
}
@@ -476,7 +476,7 @@ public class Client extends ConnectionWithStatus implements IStatefulObject {
pendingMessages.getAndAdd(0 - numMessages);
if (future.isSuccess()) {
LOG.debug("sent {} messages to {}", numMessages, dstAddressPrefixedName);
- messagesSent.getAndAdd(batch.size());
+ messagesSent.getAndAdd(numMessages);
}
else {
LOG.error("failed to send {} messages to {}: {}", numMessages, dstAddressPrefixedName,