Search in sources :

Example 6 with RingConfiguration

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;
}
Also used : SKFSNamespaceCreator(com.ms.silverking.cloud.skfs.management.SKFSNamespaceCreator) RingConfiguration(com.ms.silverking.cloud.toporing.meta.RingConfiguration) NamedRingConfiguration(com.ms.silverking.cloud.toporing.meta.NamedRingConfiguration) HostGroupTable(com.ms.silverking.cloud.config.HostGroupTable) InstantiatedRingTree(com.ms.silverking.cloud.toporing.InstantiatedRingTree)

Aggregations

NamedRingConfiguration (com.ms.silverking.cloud.toporing.meta.NamedRingConfiguration)6 RingConfiguration (com.ms.silverking.cloud.toporing.meta.RingConfiguration)6 RingConfigurationZK (com.ms.silverking.cloud.toporing.meta.RingConfigurationZK)5 InstantiatedRingTree (com.ms.silverking.cloud.toporing.InstantiatedRingTree)4 IOException (java.io.IOException)4 KeeperException (org.apache.zookeeper.KeeperException)4 HostGroupTable (com.ms.silverking.cloud.config.HostGroupTable)3 ZooKeeperExtended (com.ms.silverking.cloud.zookeeper.ZooKeeperExtended)3 CloudConfiguration (com.ms.silverking.cloud.meta.CloudConfiguration)2 ExclusionSet (com.ms.silverking.cloud.meta.ExclusionSet)2 HostGroupTableZK (com.ms.silverking.cloud.meta.HostGroupTableZK)2 StoragePolicyGroup (com.ms.silverking.cloud.storagepolicy.StoragePolicyGroup)2 Topology (com.ms.silverking.cloud.topology.Topology)2 TopologyZK (com.ms.silverking.cloud.topology.TopologyZK)2 WeightSpecifications (com.ms.silverking.cloud.toporing.meta.WeightSpecifications)2 DHTRingCurTargetZK (com.ms.silverking.cloud.dht.meta.DHTRingCurTargetZK)1 ExclusionZK (com.ms.silverking.cloud.meta.ExclusionZK)1 ServerSetExtensionZK (com.ms.silverking.cloud.meta.ServerSetExtensionZK)1 SKFSNamespaceCreator (com.ms.silverking.cloud.skfs.management.SKFSNamespaceCreator)1 StoragePolicyZK (com.ms.silverking.cloud.storagepolicy.StoragePolicyZK)1