Search in sources :

Example 6 with MerkleTreeConfig

use of com.hazelcast.config.MerkleTreeConfig in project hazelcast by hazelcast.

the class ExternalMemberConfigurationOverrideEnvTest method shouldHandleMapMerkleTreeConfig.

@Test
public void shouldHandleMapMerkleTreeConfig() throws Exception {
    Config config = new Config();
    MerkleTreeConfig merkleTreeConfig = new MerkleTreeConfig().setEnabled(false).setDepth(5);
    config.getMapConfig("foo1").setBackupCount(4).setMerkleTreeConfig(merkleTreeConfig);
    Map<String, String> envVariables = new HashMap<>();
    envVariables.put("HZ_MAP_FOO1_BACKUPCOUNT", "2");
    envVariables.put("HZ_MAP_FOO1_MERKLETREE_ENABLED", "true");
    new ExternalConfigurationOverride(envVariables, System::getProperties).overwriteMemberConfig(config);
    assertEquals(2, config.getMapConfig("foo1").getBackupCount());
    assertTrue(config.getMapConfig("foo1").getMerkleTreeConfig().isEnabled());
    assertEquals(5, config.getMapConfig("foo1").getMerkleTreeConfig().getDepth());
}
Also used : HashMap(java.util.HashMap) EventJournalConfig(com.hazelcast.config.EventJournalConfig) UserCodeDeploymentConfig(com.hazelcast.config.UserCodeDeploymentConfig) Config(com.hazelcast.config.Config) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) NearCacheConfig(com.hazelcast.config.NearCacheConfig) MerkleTreeConfig(com.hazelcast.config.MerkleTreeConfig) RestServerEndpointConfig(com.hazelcast.config.RestServerEndpointConfig) MerkleTreeConfig(com.hazelcast.config.MerkleTreeConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

MerkleTreeConfig (com.hazelcast.config.MerkleTreeConfig)6 EventJournalConfig (com.hazelcast.config.EventJournalConfig)4 AttributeConfig (com.hazelcast.config.AttributeConfig)3 IndexConfig (com.hazelcast.config.IndexConfig)3 MapConfig (com.hazelcast.config.MapConfig)3 MergePolicyConfig (com.hazelcast.config.MergePolicyConfig)3 MultiMapConfig (com.hazelcast.config.MultiMapConfig)3 NearCacheConfig (com.hazelcast.config.NearCacheConfig)3 AwsConfig (com.hazelcast.config.AwsConfig)2 CachePartitionLostListenerConfig (com.hazelcast.config.CachePartitionLostListenerConfig)2 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)2 CacheSimpleEntryListenerConfig (com.hazelcast.config.CacheSimpleEntryListenerConfig)2 CardinalityEstimatorConfig (com.hazelcast.config.CardinalityEstimatorConfig)2 Config (com.hazelcast.config.Config)2 DataPersistenceConfig (com.hazelcast.config.DataPersistenceConfig)2 DiscoveryConfig (com.hazelcast.config.DiscoveryConfig)2 DiscoveryStrategyConfig (com.hazelcast.config.DiscoveryStrategyConfig)2 DiskTierConfig (com.hazelcast.config.DiskTierConfig)2 DurableExecutorConfig (com.hazelcast.config.DurableExecutorConfig)2 EntryListenerConfig (com.hazelcast.config.EntryListenerConfig)2