Package voldemort.xml

Examples of voldemort.xml.StoreDefinitionsMapper.writeStoreList()


                VoldemortAdminTool.executeSetMetadataPair(node.getId(),
                                                          adminClient,
                                                          CLUSTER_KEY,
                                                          new ClusterMapper().writeCluster(cluster),
                                                          STORES_KEY,
                                                          storeDefsMapper.writeStoreList(storeDefs));
            }
            // Wait for about 15 seconds to be sure
            try {
                Thread.sleep(15000);
            } catch(Exception e) {
View Full Code Here


                VoldemortAdminTool.executeSetMetadataPair(node.getId(),
                                                          adminClient,
                                                          CLUSTER_KEY,
                                                          clusterMapper.writeCluster(newCluster),
                                                          STORES_KEY,
                                                          storeDefsMapper.writeStoreList(storeDefs));
            }

            String dirPath = TestUtils.createTempDir().getAbsolutePath();

            for(Node node: newCluster.getNodes()) {
View Full Code Here

                                                               .build();

        File storesXml = new File(TestUtils.createTempDir(), "stores.xml");
        StoreDefinitionsMapper storeDefMapper = new StoreDefinitionsMapper();
        FileWriter writer = new FileWriter(storesXml);
        writer.write(storeDefMapper.writeStoreList(Lists.newArrayList(storeDef)));
        writer.close();

        return storesXml.getAbsolutePath();
    }
View Full Code Here

                    Versioned<String> storesXML = adminClient.metadataMgmtOps.getRemoteMetadata(nodeIdToGetStoreXMLFrom,
                                                                                                MetadataStore.STORES_KEY);

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

                    doMetaSet(adminClient, nodeIds, metaKey, mapper.writeStoreList(newStoreDefs));
                    if(!allNodes) {
                        System.err.println("WARNING: Metadata version update of stores goes to all servers, "
                                           + "although this set-metadata oprations only goes to node: ");
                        for(Integer nodeId: nodeIds) {
                            System.err.println(nodeId);
View Full Code Here

                StoreDefinitionUtils.validateSchemasAsNeeded(newStoreDefs);

                doMetaSetPair(adminClient,
                              nodeIds,
                              clusterMapper.writeCluster(cluster),
                              storeDefsMapper.writeStoreList(newStoreDefs));
                if(!allNodes) {
                    System.err.println("WARNING: Metadata version update of stores goes to all servers, "
                                       + "although this set-metadata oprations only goes to node: ");
                    for(Integer nodeId: nodeIds) {
                        System.err.println(nodeId);
View Full Code Here

        this.metadataStore = ServerTestUtils.createMetadataStore(cluster, storeDefs);
        storage = new StorageService(storeRepository, metadataStore, scheduler, config);
        // Start the storage service
        storage.start();
        this.socketStoreFactory = new ClientRequestExecutorPool(2, 10000, 100000, 32 * 1024);
        String storeDefsString = mapper.writeStoreList(storeDefs);
        File file = null;
        try {
            file = File.createTempFile("single-store-", ".xml");
            FileUtils.writeStringToFile(file, storeDefsString);
            String storeDefFile = file.getAbsolutePath();
View Full Code Here

                        executeSetMetadataPair(nodeId,
                                               adminClient,
                                               MetadataStore.CLUSTER_KEY,
                                               clusterMapper.writeCluster(cluster),
                                               MetadataStore.STORES_KEY,
                                               storeDefsMapper.writeStoreList(newStoreDefs));
                        executeUpdateMetadataVersionsOnStores(adminClient,
                                                              oldStoreDefs,
                                                              newStoreDefs);
                    } else {
                        throw new VoldemortException("set-metadata-pair keys should be <cluster.xml, stores.xml>");
View Full Code Here

                        List<StoreDefinition> oldStoreDefs = mapper.readStoreList(new StringReader(storesXML.getValue()));
                        if(options.has("auto")) {
                            executeSetMetadata(nodeId,
                                               adminClient,
                                               MetadataStore.STORES_KEY,
                                               mapper.writeStoreList(newStoreDefs));
                            executeUpdateMetadataVersionsOnStores(adminClient,
                                                                  oldStoreDefs,
                                                                  newStoreDefs);
                        } else {
                            if(confirmMetadataUpdate(nodeId, adminClient, storesXML.getValue())) {
View Full Code Here

                        } else {
                            if(confirmMetadataUpdate(nodeId, adminClient, storesXML.getValue())) {
                                executeSetMetadata(nodeId,
                                                   adminClient,
                                                   MetadataStore.STORES_KEY,
                                                   mapper.writeStoreList(newStoreDefs));
                                if(nodeId >= 0) {
                                    System.err.println("WARNING: Metadata version update of stores goes to all servers, "
                                                       + "although this set-metadata oprations only goes to node "
                                                       + nodeId);
                                }
View Full Code Here

        FileWriter writer = new FileWriter(clusterXml);
        writer.write(clusterMapper.writeCluster(cluster));
        writer.close();

        writer = new FileWriter(storesXml);
        writer.write(storeDefMapper.writeStoreList(stores));
        writer.close();

        return createServerConfig(useNio,
                                  nodeId,
                                  baseDir,
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.