Search in sources :

Example 1 with ClusterTtlProvider

use of com.facebook.presto.spi.ttl.ClusterTtlProvider in project presto by prestodb.

the class ConfidenceBasedClusterTtlProviderManager method load.

@VisibleForTesting
public void load(String factoryName, Map<String, String> properties) {
    log.info("-- Loading Cluster Ttl Provider factory --");
    ClusterTtlProviderFactory clusterTtlProviderFactory = clusterTtlProviderFactories.get(factoryName);
    checkState(clusterTtlProviderFactory != null, "Cluster Ttl Provider factory %s is not registered", factoryName);
    ClusterTtlProvider clusterTtlProvider = clusterTtlProviderFactory.create(properties);
    checkState(this.clusterTtlProvider.compareAndSet(null, clusterTtlProvider), "Cluster Ttl Provider has already been set!");
    log.info("-- Loaded Cluster Ttl Provider %s --", factoryName);
}
Also used : ClusterTtlProviderFactory(com.facebook.presto.spi.ttl.ClusterTtlProviderFactory) ClusterTtlProvider(com.facebook.presto.spi.ttl.ClusterTtlProvider) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Aggregations

ClusterTtlProvider (com.facebook.presto.spi.ttl.ClusterTtlProvider)1 ClusterTtlProviderFactory (com.facebook.presto.spi.ttl.ClusterTtlProviderFactory)1 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1