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:31 UTC

[53/59] [abbrv] storm git commit: Making HA backwards-compatible

Making HA backwards-compatible


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

Branch: refs/heads/1.x-branch
Commit: 9c5860498a71c04fda1e201283a63ec2c6352062
Parents: 20180cc
Author: Kyle Nusbaum <Ky...@gmail.com>
Authored: Thu Sep 29 17:06:16 2016 -0500
Committer: Kyle Nusbaum <Ky...@gmail.com>
Committed: Thu Sep 29 17:06:16 2016 -0500

----------------------------------------------------------------------
 conf/defaults.yaml                                           | 3 +--
 .../org/apache/storm/pacemaker/pacemaker_state_factory.clj   | 4 +++-
 storm-core/src/jvm/org/apache/storm/Config.java              | 8 ++++++++
 3 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/9c586049/conf/defaults.yaml
----------------------------------------------------------------------
diff --git a/conf/defaults.yaml b/conf/defaults.yaml
index 4d16d84..041a628 100644
--- a/conf/defaults.yaml
+++ b/conf/defaults.yaml
@@ -276,8 +276,7 @@ resource.aware.scheduler.priority.strategy: "org.apache.storm.scheduler.resource
 
 dev.zookeeper.path: "/tmp/dev-storm-zookeeper"
 
-pacemaker.servers:
-   - "localhost"
+pacemaker.host: "localhost"
 pacemaker.port: 6699
 pacemaker.base.threads: 10
 pacemaker.max.threads: 50

http://git-wip-us.apache.org/repos/asf/storm/blob/9c586049/storm-core/src/clj/org/apache/storm/pacemaker/pacemaker_state_factory.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/pacemaker/pacemaker_state_factory.clj b/storm-core/src/clj/org/apache/storm/pacemaker/pacemaker_state_factory.clj
index eda477c..b37b901 100644
--- a/storm-core/src/clj/org/apache/storm/pacemaker/pacemaker_state_factory.clj
+++ b/storm-core/src/clj/org/apache/storm/pacemaker/pacemaker_state_factory.clj
@@ -87,7 +87,9 @@
       (throw (HBExecutionException. "Invalid Response Type")))))
 
 (defn shuffle-servers-list [conf]
-  (shuffle (conf PACEMAKER-SERVERS)))
+  (shuffle (or
+            (conf PACEMAKER-SERVERS)
+            [(conf PACEMAKER-HOST)])))
 
 (defn shutdown-rotate [servers client-pool]
   ; Shutdown the client and remove from the pool

http://git-wip-us.apache.org/repos/asf/storm/blob/9c586049/storm-core/src/jvm/org/apache/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/Config.java b/storm-core/src/jvm/org/apache/storm/Config.java
index 80a2a5d..0854f35 100644
--- a/storm-core/src/jvm/org/apache/storm/Config.java
+++ b/storm-core/src/jvm/org/apache/storm/Config.java
@@ -938,6 +938,14 @@ public class Config extends HashMap<String, Object> {
     public static final String PACEMAKER_SERVERS = "pacemaker.servers";
 
     /**
+     * The host that Pacemaker is running on.
+     * @deprecated in favor of PACEMAKER_SERVERS for Pacemaker-HA.
+     */
+    @Deprecated
+    @isString
+    public static final String PACEMAKER_HOST = "pacemaker.host";
+    
+    /**
      * The port Pacemaker should run on. Clients should
      * connect to this port to submit or read heartbeats.
      */