Search in sources :

Example 16 with BlobStore

use of org.apache.storm.blobstore.BlobStore in project storm by apache.

the class Utils method getNimbusBlobStore.

public static BlobStore getNimbusBlobStore(Map conf, String baseDir, NimbusInfo nimbusInfo) {
    String type = (String) conf.get(Config.NIMBUS_BLOBSTORE);
    if (type == null) {
        type = LocalFsBlobStore.class.getName();
    }
    BlobStore store = (BlobStore) newInstance(type);
    HashMap nconf = new HashMap(conf);
    // only enable cleanup of blobstore on nimbus
    nconf.put(Config.BLOBSTORE_CLEANUP_ENABLE, Boolean.TRUE);
    if (store != null) {
        // store can be null during testing when mocking utils.
        store.prepare(nconf, baseDir, nimbusInfo);
    }
    return store;
}
Also used : LocalFsBlobStore(org.apache.storm.blobstore.LocalFsBlobStore) HashMap(java.util.HashMap) BlobStore(org.apache.storm.blobstore.BlobStore) LocalFsBlobStore(org.apache.storm.blobstore.LocalFsBlobStore) ClientBlobStore(org.apache.storm.blobstore.ClientBlobStore)

Aggregations

BlobStore (org.apache.storm.blobstore.BlobStore)16 LocalFsBlobStore (org.apache.storm.blobstore.LocalFsBlobStore)15 IStormClusterState (org.apache.storm.cluster.IStormClusterState)11 HashMap (java.util.HashMap)6 KeyNotFoundException (org.apache.storm.generated.KeyNotFoundException)6 IOException (java.io.IOException)5 InterruptedIOException (java.io.InterruptedIOException)5 BindException (java.net.BindException)5 ArrayList (java.util.ArrayList)5 List (java.util.List)5 AlreadyAliveException (org.apache.storm.generated.AlreadyAliveException)5 AuthorizationException (org.apache.storm.generated.AuthorizationException)5 InvalidTopologyException (org.apache.storm.generated.InvalidTopologyException)5 KeyAlreadyExistsException (org.apache.storm.generated.KeyAlreadyExistsException)5 NotAliveException (org.apache.storm.generated.NotAliveException)5 StormTopology (org.apache.storm.generated.StormTopology)5 NimbusInfo (org.apache.storm.nimbus.NimbusInfo)5 TException (org.apache.thrift.TException)5 VisibleForTesting (com.google.common.annotations.VisibleForTesting)3 HashSet (java.util.HashSet)3