use of com.ms.silverking.cloud.zookeeper.ZooKeeperConfig in project SilverKing by Morgan-Stanley.
the class MetaTool method doWork.
@Override
protected void doWork(MetaToolOptions options) throws IOException, KeeperException {
MetaClient mc;
Tool tool;
tool = Tool.valueOf(options.tool);
mc = new MetaClient(namedRingConfigurationFor(tool, options.name), new ZooKeeperConfig(options.zkConfig));
doWork(options, new MetaToolWorker(getModule(tool, mc)));
}
use of com.ms.silverking.cloud.zookeeper.ZooKeeperConfig in project SilverKing by Morgan-Stanley.
the class RingConfigWatcher method main.
/**
* @param args
*/
public static void main(String[] args) {
try {
if (args.length != 3) {
System.out.println("args: <zkConfig> <ringName> <intervalSeconds>");
} else {
ZooKeeperConfig zkConfig;
RingConfigWatcher rw;
String ringName;
long intervalMillis;
zkConfig = new ZooKeeperConfig(args[0]);
ringName = args[1];
intervalMillis = Integer.parseInt(args[2]) * 1000;
rw = new RingConfigWatcher(zkConfig, ringName, intervalMillis);
ThreadUtil.sleepForever();
}
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.ms.silverking.cloud.zookeeper.ZooKeeperConfig in project SilverKing by Morgan-Stanley.
the class DHTMetaWatcher method main.
public static void main(String[] args) {
try {
if (args.length != 3) {
System.out.println("args: <zkConfig> <mapConfig> <intervalSeconds>>");
} else {
ZooKeeperConfig zkConfig;
DHTMetaWatcher dw;
String dhtName;
long intervalMillis;
zkConfig = new ZooKeeperConfig(args[0]);
dhtName = args[1];
intervalMillis = Integer.parseInt(args[2]) * 1000;
dw = new DHTMetaWatcher(zkConfig, dhtName, intervalMillis);
dw.addListener(new RingUpdateListenerTest());
Thread.sleep(60 * 60 * 1000);
}
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.ms.silverking.cloud.zookeeper.ZooKeeperConfig in project SilverKing by Morgan-Stanley.
the class MetaTool method doWork.
@Override
protected void doWork(MetaToolOptions options) throws IOException, KeeperException {
MetaClient mc;
Tool tool;
tool = Tool.valueOf(options.tool);
mc = new MetaClient(cloudConfigurationFor(tool, options.name), new ZooKeeperConfig(options.zkConfig));
doWork(options, new MetaToolWorker(getModule(tool, mc)));
}
Aggregations