use of com.alibaba.jstorm.zk.Zookeeper in project jstorm by alibaba.
the class ZooKeeperDataViewTest method init.
@BeforeClass
public static void init() {
String CONFIG_PATH = System.getProperty("user.home") + CONFIG_FILE;
File file = new File(CONFIG_PATH);
if (file.exists() == false) {
SKIP = true;
return;
}
try {
zkobj = new Zookeeper();
System.getProperties().setProperty("storm.conf.file", CONFIG_PATH);
Map conf = Utils.readStormConfig();
zk = zkobj.mkClient(conf, (List<String>) conf.get(Config.STORM_ZOOKEEPER_SERVERS), conf.get(Config.STORM_ZOOKEEPER_PORT), (String) conf.get(Config.STORM_ZOOKEEPER_ROOT));
gson = new GsonBuilder().setPrettyPrinting().create();
} catch (Throwable e) {
e.printStackTrace();
SKIP = true;
}
}
Aggregations