storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/3] storm git commit: STORM-2243: adds ip address to supervisor id
Date Thu, 05 Jan 2017 15:33:27 GMT
Repository: storm
Updated Branches:
  refs/heads/master ff07f0ddd -> 42db5f1b4


STORM-2243: adds ip address to supervisor id


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

Branch: refs/heads/master
Commit: aeb3b8c71d42359474f8cc7d678d8df5b7b678ee
Parents: c08d61c
Author: Alessandro Bellina <abellina@yahoo-inc.com>
Authored: Tue Dec 13 20:43:59 2016 -0600
Committer: Alessandro Bellina <abellina@yahoo-inc.com>
Committed: Wed Dec 14 13:43:42 2016 -0600

----------------------------------------------------------------------
 .../storm/daemon/supervisor/StandaloneSupervisor.java   | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/aeb3b8c7/storm-core/src/jvm/org/apache/storm/daemon/supervisor/StandaloneSupervisor.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/daemon/supervisor/StandaloneSupervisor.java
b/storm-core/src/jvm/org/apache/storm/daemon/supervisor/StandaloneSupervisor.java
index a1fa798..4aac1c0 100644
--- a/storm-core/src/jvm/org/apache/storm/daemon/supervisor/StandaloneSupervisor.java
+++ b/storm-core/src/jvm/org/apache/storm/daemon/supervisor/StandaloneSupervisor.java
@@ -23,6 +23,8 @@ import org.apache.storm.utils.LocalState;
 import org.apache.storm.utils.Utils;
 
 import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
 import java.util.Collection;
 import java.util.Map;
 
@@ -78,6 +80,12 @@ public class StandaloneSupervisor implements ISupervisor {
     }
 
     public String generateSupervisorId(){
-        return Utils.uuid();
+        String extraPart = "";
+        try {
+            extraPart = "-" + InetAddress.getLocalHost().getHostAddress();
+        } catch (UnknownHostException e) {
+            // This should not happen (localhost), but if it does we are still OK
+        }
+        return Utils.uuid() + extraPart;
     }
-}
\ No newline at end of file
+}


Mime
View raw message