use of com.alibaba.jstorm.blobstore.BlobSynchronizer in project jstorm by alibaba.
the class FollowerRunnable method blobSync.
private synchronized void blobSync() {
if (!data.isLeader()) {
try {
BlobStore blobStore = data.getBlobStore();
StormClusterState clusterState = data.getStormClusterState();
Set<String> localKeys = Sets.newHashSet(blobStore.listKeys());
Set<String> zkKeys = Sets.newHashSet(clusterState.blobstore(blobSyncCallback));
BlobSynchronizer blobSynchronizer = new BlobSynchronizer(blobStore, data.getConf());
blobSynchronizer.setNimbusInfo(data.getNimbusHostPortInfo());
blobSynchronizer.setBlobStoreKeySet(localKeys);
blobSynchronizer.setZookeeperKeySet(zkKeys);
blobSynchronizer.syncBlobs();
} catch (Exception e) {
LOG.error("blob sync error", e);
}
}
}
Aggregations