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 2016/10/11 23:51:32 UTC
[54/59] [abbrv] storm git commit: Working on cleaning up the PR.
Working on cleaning up the PR.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/737847c2
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/737847c2
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/737847c2
Branch: refs/heads/1.x-branch
Commit: 737847c24f47b50c3c199d686f8e386d2cb28f2b
Parents: 9c58604
Author: Kyle Nusbaum <Ky...@gmail.com>
Authored: Mon Oct 10 11:10:05 2016 -0500
Committer: Kyle Nusbaum <Ky...@gmail.com>
Committed: Mon Oct 10 11:10:05 2016 -0500
----------------------------------------------------------------------
.../netty/KerberosSaslNettyClient.java | 1 -
.../apache/storm/pacemaker/PacemakerClient.java | 24 +++++++-------------
2 files changed, 8 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/737847c2/storm-core/src/jvm/org/apache/storm/messaging/netty/KerberosSaslNettyClient.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/messaging/netty/KerberosSaslNettyClient.java b/storm-core/src/jvm/org/apache/storm/messaging/netty/KerberosSaslNettyClient.java
index 00459e2..4402c09 100644
--- a/storm-core/src/jvm/org/apache/storm/messaging/netty/KerberosSaslNettyClient.java
+++ b/storm-core/src/jvm/org/apache/storm/messaging/netty/KerberosSaslNettyClient.java
@@ -111,7 +111,6 @@ public class KerberosSaslNettyClient {
try {
Principal principal = (Principal)subject.getPrincipals().toArray()[0];
final String fPrincipalName = principal.getName();
- KerberosName kerbName = new KerberosName(principal.getName());
final String fHost = host;
final String fServiceName = serviceName;
final CallbackHandler fch = ch;
http://git-wip-us.apache.org/repos/asf/storm/blob/737847c2/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerClient.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerClient.java b/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerClient.java
index d555dae..67201b8 100644
--- a/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerClient.java
+++ b/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerClient.java
@@ -45,7 +45,7 @@ public class PacemakerClient implements ISaslClient {
private static final Logger LOG = LoggerFactory.getLogger(PacemakerClient.class);
- private String topo_name;
+ private String client_name;
private String secret;
private AtomicBoolean ready;
private final ClientBootstrap bootstrap;
@@ -55,22 +55,16 @@ public class PacemakerClient implements ISaslClient {
private HBMessage messages[];
private LinkedBlockingQueue<Integer> availableMessageSlots;
private ThriftNettyClientCodec.AuthMethod authMethod;
- private static Timer timer;
- private String host;
-
- static {
- timer = new Timer(true);
- }
+ private static Timer timer = new Timer(true);
private StormBoundedExponentialBackoffRetry backoff = new StormBoundedExponentialBackoffRetry(100, 5000, 20);
private int retryTimes = 0;
public PacemakerClient(Map config, String host) {
- this.host = host;
int port = (int)config.get(Config.PACEMAKER_PORT);
- topo_name = (String)config.get(Config.TOPOLOGY_NAME);
- if(topo_name == null) {
- topo_name = "pacemaker-client";
+ client_name = (String)config.get(Config.TOPOLOGY_NAME);
+ if(client_name == null) {
+ client_name = "pacemaker-client";
}
String auth = (String)config.get(Config.PACEMAKER_AUTH_METHOD);
@@ -122,10 +116,6 @@ public class PacemakerClient implements ISaslClient {
bootstrap.connect(remote_addr);
}
- public String toString() {
- return host;
- }
-
private void setupMessaging() {
messages = new HBMessage[maxPending];
availableMessageSlots = new LinkedBlockingQueue<Integer>();
@@ -134,6 +124,7 @@ public class PacemakerClient implements ISaslClient {
}
}
+ @Override
public synchronized void channelConnected(Channel channel) {
Channel oldChannel = channelRef.get();
if (oldChannel != null) {
@@ -156,6 +147,7 @@ public class PacemakerClient implements ISaslClient {
return ready.get();
}
+ @Override
public synchronized void channelReady() {
LOG.debug("Channel is ready.");
ready.set(true);
@@ -163,7 +155,7 @@ public class PacemakerClient implements ISaslClient {
}
public String name() {
- return topo_name;
+ return client_name;
}
public String secretKey() {