use of com.ms.silverking.cloud.toporing.meta.RingConfiguration in project SilverKing by Morgan-Stanley.
the class SKAdmin method execCreateSKFSns.
private boolean execCreateSKFSns() throws IOException, ClientException, KeeperException {
SKFSNamespaceCreator nsCreator;
String preferredServer;
Pair<RingConfiguration, InstantiatedRingTree> ringConfigAndTree;
HostGroupTable hostGroupTable;
String hostGroupTableName;
ringConfigAndTree = getRing(dhtConfig, dhtMC);
Log.warning("ringConfig: ", ringConfigAndTree.getV1());
hostGroupTableName = ringConfigAndTree.getV1().getCloudConfiguration().getHostGroupTableName();
Log.warning("hostGroupTableName: ", hostGroupTableName);
hostGroupTable = getHostGroupTable(hostGroupTableName, dhtMC.getZooKeeper().getZKConfig());
if (options.preferredServer == null) {
preferredServer = findArbitraryActiveServer(dhtConfig.getHostGroups(), hostGroupTable);
} else {
preferredServer = options.preferredServer;
}
Log.warning("Using preferredServer ", preferredServer);
nsCreator = new SKFSNamespaceCreator(gc.getClientDHTConfiguration(), preferredServer);
nsCreator.createNamespaces(skfsNamespaces, skfsNSOptions);
nsCreator.createNamespaces(skfsMutableNamespaces, skfsMutableNSOptions);
nsCreator.createNamespaces(skfsFileBlockNamespaces, skfsFileBlockNSOptions);
nsCreator.createNamespaces(skfsDirNamespaces, skfsDirNSOptions);
return true;
}
Aggregations