Package voldemort.store

Examples of voldemort.store.StoreDefinitionBuilder


    public void testDeleteStore() throws Exception {
        AdminClient adminClient = getAdminClient();

        doClientOperation();

        StoreDefinition definition = new StoreDefinitionBuilder().setName("deleteTest")
                                                                 .setType(InMemoryStorageConfiguration.TYPE_NAME)
                                                                 .setKeySerializer(new SerializerDefinition("string"))
                                                                 .setValueSerializer(new SerializerDefinition("string"))
                                                                 .setRoutingPolicy(RoutingTier.CLIENT)
                                                                 .setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
View Full Code Here


        String memoryFootprintStr = store.getChildText(STORE_MEMORY_FOOTPRINT);
        long memoryFootprintMB = 0;
        if(memoryFootprintStr != null)
            memoryFootprintMB = Long.parseLong(memoryFootprintStr);

        return new StoreDefinitionBuilder().setName(name)
                                           .setType(storeType)
                                           .setDescription(description)
                                           .setOwners(owners)
                                           .setKeySerializer(keySerializer)
                                           .setValueSerializer(valueSerializer)
View Full Code Here

            routingTier = target.getRoutingPolicy();
        }

        String viewClass = store.getChildText(VIEW_TRANS_ELMT);

        return new StoreDefinitionBuilder().setName(name)
                                           .setViewOf(targetName)
                                           .setType(ViewStorageConfiguration.TYPE_NAME)
                                           .setDescription(description)
                                           .setOwners(owners)
                                           .setRoutingPolicy(routingTier)
View Full Code Here

    public static List<StoreDefinition> getStoreDef() {
        List<StoreDefinition> defs = new ArrayList<StoreDefinition>();
        SerializerDefinition serDef = new SerializerDefinition("string");
        String storageConfiguration = SlowStorageConfiguration.TYPE_NAME;
        defs.add(new StoreDefinitionBuilder().setName(STORE_NAME)
                                             .setType(storageConfiguration)
                                             .setKeySerializer(serDef)
                                             .setValueSerializer(serDef)
                                             .setRoutingPolicy(RoutingTier.CLIENT)
                                             .setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
View Full Code Here

                                                                                         10000,
                                                                                         100000,
                                                                                         32 * 1024);
            Cluster currentCluster = ServerTestUtils.getLocalCluster(1, new int[][] { { 0, 1, 2, 3,
                    4, 5, 6 } });
            StoreDefinition store = new StoreDefinitionBuilder().setName("testRO")
                                                                .setType(ReadOnlyStorageConfiguration.TYPE_NAME)
                                                                .setKeySerializer(new SerializerDefinition("string"))
                                                                .setValueSerializer(new SerializerDefinition("string"))
                                                                .setRoutingPolicy(RoutingTier.CLIENT)
                                                                .setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
View Full Code Here

                                                                                         10000,
                                                                                         100000,
                                                                                         32 * 1024);
            Cluster currentCluster = ServerTestUtils.getLocalCluster(1, new int[][] { { 0, 1, 2, 3,
                    4, 5, 6 } });
            StoreDefinition store = new StoreDefinitionBuilder().setName("testRO")
                                                                .setType(ReadOnlyStorageConfiguration.TYPE_NAME)
                                                                .setKeySerializer(new SerializerDefinition("string"))
                                                                .setValueSerializer(new SerializerDefinition("string"))
                                                                .setRoutingPolicy(RoutingTier.CLIENT)
                                                                .setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
View Full Code Here

        SerializerDefinition serDef = new SerializerDefinition("string");
        String storageConfiguration = InMemoryStorageConfiguration.TYPE_NAME;
        if(nodeId == 2) {
            storageConfiguration = SlowStorageConfiguration.TYPE_NAME;
        }
        defs.add(new StoreDefinitionBuilder().setName(STORE_NAME)
                                             .setType(storageConfiguration)
                                             .setKeySerializer(serDef)
                                             .setValueSerializer(serDef)
                                             .setRoutingPolicy(RoutingTier.CLIENT)
                                             .setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
View Full Code Here

        plans = Lists.newArrayList(plan.getBatchPlan());
        adminClient = ServerTestUtils.getAdminClient(currentCluster);
    }

    public void startFourNodeRO() throws IOException {
        storeDef1 = new StoreDefinitionBuilder().setName("test")
                                                .setType(ReadOnlyStorageConfiguration.TYPE_NAME)
                                                .setKeySerializer(new SerializerDefinition("string"))
                                                .setValueSerializer(new SerializerDefinition("string"))
                                                .setRoutingPolicy(RoutingTier.CLIENT)
                                                .setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
                                                .setReplicationFactor(2)
                                                .setPreferredReads(1)
                                                .setRequiredReads(1)
                                                .setPreferredWrites(1)
                                                .setRequiredWrites(1)
                                                .build();
        storeDef2 = new StoreDefinitionBuilder().setName("test2")
                                                .setType(ReadOnlyStorageConfiguration.TYPE_NAME)
                                                .setKeySerializer(new SerializerDefinition("string"))
                                                .setValueSerializer(new SerializerDefinition("string"))
                                                .setRoutingPolicy(RoutingTier.CLIENT)
                                                .setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
View Full Code Here

        plans = Lists.newArrayList(plan.getBatchPlan());
        adminClient = ServerTestUtils.getAdminClient(currentCluster);
    }

    public void startFourNodeRORW() throws IOException {
        storeDef1 = new StoreDefinitionBuilder().setName("test")
                                                .setType(ReadOnlyStorageConfiguration.TYPE_NAME)
                                                .setKeySerializer(new SerializerDefinition("string"))
                                                .setValueSerializer(new SerializerDefinition("string"))
                                                .setRoutingPolicy(RoutingTier.CLIENT)
                                                .setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
                                                .setReplicationFactor(2)
                                                .setPreferredReads(1)
                                                .setRequiredReads(1)
                                                .setPreferredWrites(1)
                                                .setRequiredWrites(1)
                                                .build();
        storeDef2 = new StoreDefinitionBuilder().setName("test2")
                                                .setType(ReadOnlyStorageConfiguration.TYPE_NAME)
                                                .setKeySerializer(new SerializerDefinition("string"))
                                                .setValueSerializer(new SerializerDefinition("string"))
                                                .setRoutingPolicy(RoutingTier.CLIENT)
                                                .setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
View Full Code Here

            // Test 1) Fail some swap by adding a dummy store
            servers[2].getMetadataStore()
                      .put(MetadataStore.STORES_KEY,
                           Lists.newArrayList(storeDef1,
                                              storeDef2,
                                              new StoreDefinitionBuilder()
                                                                          .setName("test3")
                                                                          .setType(ReadOnlyStorageConfiguration.TYPE_NAME)
                                                                          .setKeySerializer(new SerializerDefinition("string"))
                                                                          .setValueSerializer(new SerializerDefinition("string"))
                                                                          .setRoutingPolicy(RoutingTier.CLIENT)
View Full Code Here

TOP

Related Classes of voldemort.store.StoreDefinitionBuilder

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.