use of backtype.storm.generated.SettableBlobMeta in project jstorm by alibaba.
the class ServiceHandler method backupBlob.
private void backupBlob(String oldKey, String newKey, String topologyId) throws Exception {
LOG.info("Backing topology {} blob key {} to {}", topologyId, oldKey, newKey);
StormClusterState clusterState = data.getStormClusterState();
BlobStore blobStore = data.getBlobStore();
NimbusInfo nimbusInfo = data.getNimbusHostPortInfo();
InputStreamWithMeta oldStream = blobStore.getBlob(oldKey);
BlobStoreUtils.cleanup_key(newKey, blobStore, clusterState);
blobStore.createBlob(newKey, oldStream, new SettableBlobMeta());
if (blobStore instanceof LocalFsBlobStore) {
clusterState.setup_blobstore(newKey, nimbusInfo, BlobStoreUtils.getVersionForKey(newKey, nimbusInfo, conf));
}
}
Aggregations