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;
}
Aggregations