Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class BlobStoreUtils {

public static CuratorFramework createZKClient(Map conf) {
List<String> zkServers = (List<String>) conf.get(Config.STORM_ZOOKEEPER_SERVERS);
Object port = conf.get(Config.STORM_ZOOKEEPER_PORT);
Integer port = (Integer)conf.get(Config.STORM_ZOOKEEPER_PORT);
ZookeeperAuthInfo zkAuthInfo = new ZookeeperAuthInfo(conf);
CuratorFramework zkClient = Utils.newCurator(conf, zkServers, port, (String) conf.get(Config.STORM_ZOOKEEPER_ROOT), zkAuthInfo);
zkClient.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected TransactionalState(Map conf, String id, Map componentConf, String subr
String transactionalRoot = (String)conf.get(Config.TRANSACTIONAL_ZOOKEEPER_ROOT);
String rootDir = transactionalRoot + "/" + id + "/" + subroot;
List<String> servers = (List<String>) getWithBackup(conf, Config.TRANSACTIONAL_ZOOKEEPER_SERVERS, Config.STORM_ZOOKEEPER_SERVERS);
Object port = getWithBackup(conf, Config.TRANSACTIONAL_ZOOKEEPER_PORT, Config.STORM_ZOOKEEPER_PORT);
Integer port = (Integer)getWithBackup(conf, Config.TRANSACTIONAL_ZOOKEEPER_PORT, Config.STORM_ZOOKEEPER_PORT);
ZookeeperAuthInfo auth = new ZookeeperAuthInfo(conf);
CuratorFramework initter = Utils.newCuratorStarted(conf, servers, port, auth);
_zkAcls = Utils.getWorkerACL(conf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected TransactionalState(Map conf, String id, String subroot) {
String transactionalRoot = (String)conf.get(Config.TRANSACTIONAL_ZOOKEEPER_ROOT);
String rootDir = transactionalRoot + "/" + id + "/" + subroot;
List<String> servers = (List<String>) getWithBackup(conf, Config.TRANSACTIONAL_ZOOKEEPER_SERVERS, Config.STORM_ZOOKEEPER_SERVERS);
Object port = getWithBackup(conf, Config.TRANSACTIONAL_ZOOKEEPER_PORT, Config.STORM_ZOOKEEPER_PORT);
Integer port = (Integer)getWithBackup(conf, Config.TRANSACTIONAL_ZOOKEEPER_PORT, Config.STORM_ZOOKEEPER_PORT);
ZookeeperAuthInfo auth = new ZookeeperAuthInfo(conf);
CuratorFramework initter = Utils.newCuratorStarted(conf, servers, port, auth);
_zkAcls = Utils.getWorkerACL(conf);
Expand Down
10 changes: 5 additions & 5 deletions storm-core/src/jvm/org/apache/storm/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -997,11 +997,11 @@ public static boolean canUserReadBlob(ReadableBlobMeta meta, String user) {
return false;
}

public static CuratorFramework newCurator(Map conf, List<String> servers, Object port, String root) {
public static CuratorFramework newCurator(Map conf, List<String> servers, Integer port, String root) {
return newCurator(conf, servers, port, root, null);
}

public static CuratorFramework newCurator(Map conf, List<String> servers, Object port, String root, ZookeeperAuthInfo auth) {
public static CuratorFramework newCurator(Map conf, List<String> servers, Integer port, String root, ZookeeperAuthInfo auth) {
List<String> serverPorts = new ArrayList<String>();
for (String zkServer : servers) {
serverPorts.add(zkServer + ":" + Utils.getInt(port));
Expand Down Expand Up @@ -1050,17 +1050,17 @@ public String getBackupConnectionString() throws Exception {
}
}

public static CuratorFramework newCurator(Map conf, List<String> servers, Object port, ZookeeperAuthInfo auth) {
public static CuratorFramework newCurator(Map conf, List<String> servers, Integer port, ZookeeperAuthInfo auth) {
return newCurator(conf, servers, port, "", auth);
}

public static CuratorFramework newCuratorStarted(Map conf, List<String> servers, Object port, String root, ZookeeperAuthInfo auth) {
public static CuratorFramework newCuratorStarted(Map conf, List<String> servers, Integer port, String root, ZookeeperAuthInfo auth) {
CuratorFramework ret = newCurator(conf, servers, port, root, auth);
ret.start();
return ret;
}

public static CuratorFramework newCuratorStarted(Map conf, List<String> servers, Object port, ZookeeperAuthInfo auth) {
public static CuratorFramework newCuratorStarted(Map conf, List<String> servers, Integer port, ZookeeperAuthInfo auth) {
CuratorFramework ret = newCurator(conf, servers, port, auth);
ret.start();
return ret;
Expand Down