Search in sources :

Example 16 with FailureDetectorConfig

use of voldemort.cluster.failuredetector.FailureDetectorConfig in project voldemort by voldemort.

the class HttpStoreClientFactory method initFailureDetector.

@Override
protected FailureDetector initFailureDetector(final ClientConfig config, Cluster cluster) {
    ClientStoreConnectionVerifier verifier = new ClientStoreConnectionVerifier() {

        @Override
        protected Store<ByteArray, byte[], byte[]> getStoreInternal(Node node) {
            return HttpStoreClientFactory.this.getStore(MetadataStore.METADATA_STORE_NAME, node.getHost(), node.getHttpPort(), config.getRequestFormatType());
        }
    };
    FailureDetectorConfig failureDetectorConfig = new FailureDetectorConfig(config).setCluster(cluster).setConnectionVerifier(verifier);
    return create(failureDetectorConfig, config.isJmxEnabled());
}
Also used : Node(voldemort.cluster.Node) FailureDetectorConfig(voldemort.cluster.failuredetector.FailureDetectorConfig) ClientStoreConnectionVerifier(voldemort.cluster.failuredetector.ClientStoreConnectionVerifier) ByteArray(voldemort.utils.ByteArray)

Aggregations

FailureDetectorConfig (voldemort.cluster.failuredetector.FailureDetectorConfig)16 ByteArray (voldemort.utils.ByteArray)11 Test (org.junit.Test)8 BannagePeriodFailureDetector (voldemort.cluster.failuredetector.BannagePeriodFailureDetector)7 Slop (voldemort.store.slop.Slop)7 StreamingSlopPusherJob (voldemort.server.scheduler.slop.StreamingSlopPusherJob)6 ScanPermitWrapper (voldemort.server.storage.ScanPermitWrapper)6 Versioned (voldemort.versioning.Versioned)6 Node (voldemort.cluster.Node)5 ServerStoreConnectionVerifier (voldemort.cluster.failuredetector.ServerStoreConnectionVerifier)5 SlopStorageEngine (voldemort.store.slop.SlopStorageEngine)5 Cluster (voldemort.cluster.Cluster)4 Before (org.junit.Before)3 ThresholdFailureDetector (voldemort.cluster.failuredetector.ThresholdFailureDetector)3 Store (voldemort.store.Store)3 StoreDefinition (voldemort.store.StoreDefinition)3 HashMap (java.util.HashMap)2 Properties (java.util.Properties)2 TimeoutConfig (voldemort.client.TimeoutConfig)2 ClientStoreConnectionVerifier (voldemort.cluster.failuredetector.ClientStoreConnectionVerifier)2