Examples of AdminClientConfig


Examples of voldemort.client.protocol.admin.AdminClientConfig

    public void tearDown() {
        socketStoreFactory.close();
    }

    private AdminClient getAdminClient(Cluster newCluster) {
        return new AdminClient(newCluster, new AdminClientConfig(), new ClientConfig());
    }
View Full Code Here

Examples of voldemort.client.protocol.admin.AdminClientConfig

        // Generate random data, populate cluster with it.
        HashMap<String, String> testEntries = ServerTestUtils.createRandomKeyValueString(128);
        populateData(testEntries);

        // create admin client and run repair on all nodes
        AdminClient admin = new AdminClient(cluster, new AdminClientConfig(), new ClientConfig());
        for(int i = 0; i < 9; i++) {
            admin.storeMntOps.repairJob(i);
        }

        // wait for the repair to complete
View Full Code Here

Examples of voldemort.client.protocol.admin.AdminClientConfig

        props.put("enable.quota.limiting", "true");
        server = ServerTestUtils.startStandAloneVoldemortServer(props,
                                                                "test/common/voldemort/config/single-store.xml");

        adminClient = new AdminClient(server.getMetadataStore().getCluster(),
                                      new AdminClientConfig(),
                                      new ClientConfig());
        String bootStrapUrl = "tcp://" + server.getIdentityNode().getHost() + ":"
                              + server.getIdentityNode().getSocketPort();
        factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootStrapUrl));
        storeClient = factory.getStoreClient("test");
View Full Code Here

Examples of voldemort.client.protocol.admin.AdminClientConfig

        Validate.notEmpty(clusterUrls, "Clusterurls cannot be null");
        // If only one clusterUrl return immediately
        if (clusterUrls.size() == 1)
            return;
        AdminClient adminClientLhs = new AdminClient(clusterUrls.get(0),
                                                     new AdminClientConfig(),
                                                     new ClientConfig());
        Cluster clusterLhs = adminClientLhs.getAdminClientCluster();
        for (int index = 1; index < clusterUrls.size(); index++) {
            AdminClient adminClientRhs = new AdminClient(clusterUrls.get(index),
                                                         new AdminClientConfig(),
                                                         new ClientConfig());
            Cluster clusterRhs = adminClientRhs.getAdminClientCluster();
            if (!areTwoClustersEqual(clusterLhs, clusterRhs))
                throw new VoldemortException("Cluster " + clusterLhs.getName()
                                             + "is not the same as " + clusterRhs.getName());
View Full Code Here

Examples of voldemort.client.protocol.admin.AdminClientConfig

            catch(RuntimeException e) {
                log.error("Getting store definition from: " + url + " (node id " + this.nodeId + ")", e);
                System.exit(-1);
            }
        }
        AdminClient adminClient = new AdminClient(url, new AdminClientConfig(), new ClientConfig());
        // don't use newStoreDef because we want to ALWAYS use the JSON definition since the store
        // builder assumes that you are using JsonTypeSerializer. This allows you to tweak your
        // value/key store xml  as you see fit, but still uses the json sequence file meta data
        // to  build the store.
        storeDefs = ImmutableList.of(VoldemortUtils.getStoreDef(VoldemortUtils.getStoreDefXml(storeName,
View Full Code Here

Examples of voldemort.client.protocol.admin.AdminClientConfig

                                  int requiredReads,
                                  int requiredWrites) {
        log.info("Verifying store: \n" + newStoreDefXml.toString());
        StoreDefinition newStoreDef = VoldemortUtils.getStoreDef(newStoreDefXml);
        log.info("Getting store definition from: " + url + " (node id " + this.nodeId + ")");
        AdminClient adminClient = new AdminClient(url, new AdminClientConfig(), new ClientConfig());
        try {
            List<StoreDefinition> remoteStoreDefs = adminClient.metadataMgmtOps.getRemoteStoreDefList(this.nodeId)
                                                                               .getValue();
            boolean foundStore = false;
            // go over all store defs and see if one has the same name as the store we're trying to build
View Full Code Here

Examples of voldemort.client.protocol.admin.AdminClientConfig

            throw new RuntimeException("Owner field missing in store definition. "
                                       + "Please add \"push.store.owners\" with value being comma-separated list of LinkedIn email ids");

        }
        log.info("Could not find store " + storeName + " on Voldemort. Adding it to all nodes ");
        AdminClient adminClient = new AdminClient(url, new AdminClientConfig(), new ClientConfig());
        try {
            adminClient.storeMgmtOps.addStore(newStoreDef);
        }
        catch(VoldemortException ve) {
            throw new RuntimeException("Exception during adding store" + ve.getMessage());
View Full Code Here

Examples of voldemort.client.protocol.admin.AdminClientConfig

            catch(RuntimeException e) {
                log.error("Error in adding store definition from: " + url, e);
                System.exit(-1);
            }
        }
        AdminClient adminClient = new AdminClient(url, new AdminClientConfig(), new ClientConfig());
        // don't use newStoreDef because we want to ALWAYS use the JSON definition since the store
        // builder assumes that you are using JsonTypeSerializer. This allows you to tweak your
        // value/key store xml  as you see fit, but still uses the json sequence file meta data
        // to  build the store.
        storeDefs = ImmutableList.of(VoldemortUtils.getStoreDef(VoldemortUtils.getStoreDefXml(storeName,
View Full Code Here

Examples of voldemort.client.protocol.admin.AdminClientConfig

                                      KeyValueSchema schemaObj) {
        log.info("Verifying store: \n" + newStoreDefXml.toString());
        StoreDefinition newStoreDef = VoldemortUtils.getStoreDef(newStoreDefXml);
        // get store def from cluster
        log.info("Getting store definition from: " + url + " (node id " + this.nodeId + ")");
        AdminClient adminClient = new AdminClient(url, new AdminClientConfig(), new ClientConfig());
        try {
            List<StoreDefinition> remoteStoreDefs = adminClient.metadataMgmtOps.getRemoteStoreDefList(this.nodeId)
                                                                               .getValue();
            boolean foundStore = false;
            // go over all store defs and see if one has the same name as the store we're trying to build
View Full Code Here

Examples of voldemort.client.protocol.admin.AdminClientConfig

            }
            recordCount++;
        }

        // run the prune job
        AdminClient admin = new AdminClient(cluster, new AdminClientConfig(), new ClientConfig());
        for(int nodeid = 0; nodeid < servers.length; nodeid++) {
            admin.storeMntOps.pruneJob(nodeid, "test");
        }
        for(VoldemortServer server: servers) {
            ServerTestUtils.waitForAsyncOperationOnServer(server, "Prune", 5000);
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.