diff --git a/storm-core/src/jvm/org/apache/storm/blobstore/BlobStoreUtils.java b/storm-core/src/jvm/org/apache/storm/blobstore/BlobStoreUtils.java index 071c4f576be..16cdc2dfcf4 100644 --- a/storm-core/src/jvm/org/apache/storm/blobstore/BlobStoreUtils.java +++ b/storm-core/src/jvm/org/apache/storm/blobstore/BlobStoreUtils.java @@ -47,7 +47,7 @@ public class BlobStoreUtils { public static CuratorFramework createZKClient(Map conf) { List zkServers = (List) 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(); diff --git a/storm-core/src/jvm/org/apache/storm/transactional/state/TransactionalState.java b/storm-core/src/jvm/org/apache/storm/transactional/state/TransactionalState.java index f05512eb864..da9acecef5d 100644 --- a/storm-core/src/jvm/org/apache/storm/transactional/state/TransactionalState.java +++ b/storm-core/src/jvm/org/apache/storm/transactional/state/TransactionalState.java @@ -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 servers = (List) 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); diff --git a/storm-core/src/jvm/org/apache/storm/trident/topology/state/TransactionalState.java b/storm-core/src/jvm/org/apache/storm/trident/topology/state/TransactionalState.java index 3bf279448e1..2011e10c8bc 100644 --- a/storm-core/src/jvm/org/apache/storm/trident/topology/state/TransactionalState.java +++ b/storm-core/src/jvm/org/apache/storm/trident/topology/state/TransactionalState.java @@ -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 servers = (List) 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); diff --git a/storm-core/src/jvm/org/apache/storm/utils/Utils.java b/storm-core/src/jvm/org/apache/storm/utils/Utils.java index 9d0c7c610a7..f9214d9393c 100644 --- a/storm-core/src/jvm/org/apache/storm/utils/Utils.java +++ b/storm-core/src/jvm/org/apache/storm/utils/Utils.java @@ -997,11 +997,11 @@ public static boolean canUserReadBlob(ReadableBlobMeta meta, String user) { return false; } - public static CuratorFramework newCurator(Map conf, List servers, Object port, String root) { + public static CuratorFramework newCurator(Map conf, List servers, Integer port, String root) { return newCurator(conf, servers, port, root, null); } - public static CuratorFramework newCurator(Map conf, List servers, Object port, String root, ZookeeperAuthInfo auth) { + public static CuratorFramework newCurator(Map conf, List servers, Integer port, String root, ZookeeperAuthInfo auth) { List serverPorts = new ArrayList(); for (String zkServer : servers) { serverPorts.add(zkServer + ":" + Utils.getInt(port)); @@ -1050,17 +1050,17 @@ public String getBackupConnectionString() throws Exception { } } - public static CuratorFramework newCurator(Map conf, List servers, Object port, ZookeeperAuthInfo auth) { + public static CuratorFramework newCurator(Map conf, List servers, Integer port, ZookeeperAuthInfo auth) { return newCurator(conf, servers, port, "", auth); } - public static CuratorFramework newCuratorStarted(Map conf, List servers, Object port, String root, ZookeeperAuthInfo auth) { + public static CuratorFramework newCuratorStarted(Map conf, List 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 servers, Object port, ZookeeperAuthInfo auth) { + public static CuratorFramework newCuratorStarted(Map conf, List servers, Integer port, ZookeeperAuthInfo auth) { CuratorFramework ret = newCurator(conf, servers, port, auth); ret.start(); return ret;