Examples of readCluster()


Examples of voldemort.xml.ClusterMapper.readCluster()

                                                      adminClient,
                                                      CLUSTER_KEY,
                                                      dirPath);

                // Make sure cluster metadata was updated
                Cluster newClusterFromMetadataRepo = clusterMapper.readCluster(new File(dirPath,
                                                                                        CLUSTER_KEY
                                                                                                + "_"
                                                                                                + node.getId()));
                // All nodes should have this old list
                assertTrue(oldCluster.getNodeById(5).getPartitionIds().equals(oldPartitionIds));
View Full Code Here

Examples of voldemort.xml.ClusterMapper.readCluster()

        long start = System.currentTimeMillis();
        File file = new File(args[0]);
        int repFactor = Integer.parseInt(args[1]);
        int maxVal = Integer.parseInt(args[2]);
        ClusterMapper mapper = new ClusterMapper();
        Cluster cluster = mapper.readCluster(file);
        RoutingStrategy strategy = new ConsistentRoutingStrategy(cluster, repFactor);
        JsonTypeSerializer serializer = new JsonTypeSerializer(JsonTypeDefinition.INT32);
        Map<Integer, Integer> counts = new HashMap<Integer, Integer>();

        for(int i = 0; i < maxVal; i++) {
View Full Code Here

Examples of voldemort.xml.ClusterMapper.readCluster()

                   || metaKey.equals(MetadataStore.REBALANCING_SOURCE_CLUSTER_XML)) {
                    if(!Utils.isReadableFile(metaFile)) {
                        throw new VoldemortException("Cluster xml file path incorrect");
                    }
                    ClusterMapper mapper = new ClusterMapper();
                    Cluster newCluster = mapper.readCluster(new File(metaFile));
                    doMetaSet(adminClient, nodeIds, metaKey, mapper.writeCluster(newCluster));
                } else if(metaKey.equals(MetadataStore.STORES_KEY)) {
                    if(!Utils.isReadableFile(metaFile)) {
                        throw new VoldemortException("Stores definition xml file path incorrect");
                    }
View Full Code Here

Examples of voldemort.xml.ClusterMapper.readCluster()

                List<StoreDefinition> oldStoreDefs = storeDefsMapper.readStoreList(new StringReader(storesXML.getValue()));

                if(!Utils.isReadableFile(clusterFile)) {
                    throw new VoldemortException("Cluster xml file path incorrect");
                }
                Cluster cluster = clusterMapper.readCluster(new File(clusterFile));

                if(!Utils.isReadableFile(storesFile)) {
                    throw new VoldemortException("Stores definition xml file path incorrect");
                }
                List<StoreDefinition> newStoreDefs = storeDefsMapper.readStoreList(new File(storesFile));
View Full Code Here

Examples of voldemort.xml.ClusterMapper.readCluster()

                        String clusterXMLPath = metadataValuePair.get(metadataKeyPair.indexOf(MetadataStore.CLUSTER_KEY));
                        clusterXMLPath = clusterXMLPath.replace("~",
                                                                System.getProperty("user.home"));
                        if(!Utils.isReadableFile(clusterXMLPath))
                            throw new VoldemortException("Cluster xml file path incorrect");
                        Cluster cluster = clusterMapper.readCluster(new File(clusterXMLPath));

                        String storesXMLPath = metadataValuePair.get(metadataKeyPair.indexOf(MetadataStore.STORES_KEY));
                        storesXMLPath = storesXMLPath.replace("~", System.getProperty("user.home"));
                        if(!Utils.isReadableFile(storesXMLPath))
                            throw new VoldemortException("Stores definition xml file path incorrect");
View Full Code Here

Examples of voldemort.xml.ClusterMapper.readCluster()

                    if(metadataKey.compareTo(MetadataStore.CLUSTER_KEY) == 0
                       || metadataKey.compareTo(MetadataStore.REBALANCING_SOURCE_CLUSTER_XML) == 0) {
                        if(!Utils.isReadableFile(metadataValue))
                            throw new VoldemortException("Cluster xml file path incorrect");
                        ClusterMapper mapper = new ClusterMapper();
                        Cluster newCluster = mapper.readCluster(new File(metadataValue));
                        if(options.has("auto")) {
                            executeSetMetadata(nodeId,
                                               adminClient,
                                               metadataKey,
                                               mapper.writeCluster(newCluster));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.