Package voldemort.rest.coordinator.config

Examples of voldemort.rest.coordinator.config.CoordinatorConfig


        COPY_OF_FAT_CLIENT_CONFIG_FILE = new File(TestUtils.createTempDir(),
                                                  "fat-client-config" + System.currentTimeMillis()
                                                          + ".avro");
        FileUtils.copyFile(src, COPY_OF_FAT_CLIENT_CONFIG_FILE);

        CoordinatorConfig config = new CoordinatorConfig();
        List<String> bootstrapUrls = new ArrayList<String>();
        socketUrl = servers[0].getIdentityNode().getSocketUrl().toString();
        bootstrapUrls.add(socketUrl);

        System.out.println("\n\n************************ Starting the Coordinator *************************");

        config.setBootstrapURLs(bootstrapUrls);
        config.setFatClientConfigPath(COPY_OF_FAT_CLIENT_CONFIG_FILE.getAbsolutePath());
        StoreClientConfigService storeClientConfigs = null;
        switch(config.getFatClientConfigSource()) {
            case FILE:
                storeClientConfigs = new FileBasedStoreClientConfigService(config);
                break;
            case ZOOKEEPER:
                throw new UnsupportedOperationException("Zookeeper-based configs are not implemented yet!");
View Full Code Here


    }

    @Test
    public void testLargeValueSizeVersionedPut() {
        String key = "amigo";
        String payload = generateRandomString(new CoordinatorConfig().getHttpMessageDecoderMaxChunkSize() * 10,
                                              ValueType.ALPHA);
        String newPayload = generateRandomString(new CoordinatorConfig().getHttpMessageDecoderMaxChunkSize() * 10,
                                                 ValueType.ALPHA);

        // 1. Do a put
        doPut(key, payload, null);

View Full Code Here

                                                  "clientConfigs_" + System.currentTimeMillis()
                                                          + ".avro");
        FileUtils.copyFile(src, COPY_Of_FAT_CLIENT_CONFIG_FILE);

        // Setup the Coordinator
        CoordinatorConfig coordinatorConfig = new CoordinatorConfig();
        coordinatorConfig.setBootstrapURLs(bootstrapUrls)
                         .setCoordinatorCoreThreads(100)
                         .setCoordinatorMaxThreads(100)
                         .setFatClientConfigPath(COPY_Of_FAT_CLIENT_CONFIG_FILE.getAbsolutePath())
                         .setServerPort(SERVER_PORT)
                         .setAdminPort(ADMIN_PORT);
View Full Code Here

                                                  "clientConfigs" + System.currentTimeMillis()
                                                          + ".avro");
        FileUtils.copyFile(src, COPY_OF_FAT_CLIENT_CONFIG_FILE);

        // Setup the Coordinator
        CoordinatorConfig coordinatorConfig = new CoordinatorConfig();
        coordinatorConfig.setBootstrapURLs(bootstrapUrls)
                         .setCoordinatorCoreThreads(100)
                         .setCoordinatorMaxThreads(100)
                         .setFatClientConfigPath(COPY_OF_FAT_CLIENT_CONFIG_FILE.getAbsolutePath())
                         .setServerPort(9999);

        try {
            StoreClientConfigService storeClientConfigs = null;
            switch(coordinatorConfig.getFatClientConfigSource()) {
                case FILE:
                    storeClientConfigs = new FileBasedStoreClientConfigService(coordinatorConfig);
                    break;
                case ZOOKEEPER:
                    throw new UnsupportedOperationException("Zookeeper-based configs are not implemented yet!");
View Full Code Here

                                                  "clientConfigs_" + System.currentTimeMillis()
                                                          + ".avro");
        FileUtils.copyFile(src, COPY_OF_FAT_CLIENT_CONFIG_FILE);

        // Setup the Coordinator
        CoordinatorConfig coordinatorConfig = new CoordinatorConfig();
        coordinatorConfig.setBootstrapURLs(bootstrapUrls)
                         .setCoordinatorCoreThreads(100)
                         .setCoordinatorMaxThreads(100)
                         .setFatClientConfigPath(COPY_OF_FAT_CLIENT_CONFIG_FILE.getAbsolutePath())
                         .setServerPort(SERVER_PORT)
                         .setAdminPort(ADMIN_PORT);
View Full Code Here

            throw exceptions.get(0);
        }
    }

    public static void main(String[] args) throws Exception {
        CoordinatorConfig config = null;
        try {
            if(args.length != 1) {
                croak("USAGE: java " + CoordinatorProxyService.class.getName()
                      + " <coordinator_config_file>");
                System.exit(-1);
            }
            config = new CoordinatorConfig(new File(args[0]));
        } catch(Exception e) {
            logger.error(e);
            Utils.croak("Error while loading configuration: " + e.getMessage());
        }
        final CoordinatorServer coordinatorServer = new CoordinatorServer(config);
View Full Code Here

TOP

Related Classes of voldemort.rest.coordinator.config.CoordinatorConfig

Copyright © 2018 www.massapicom. 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.