use of org.apache.storm.generated.SettableBlobMeta in project storm by apache.
the class TopoCache method addTopoConf.
/**
* Add a new topology config.
* @param topoId the id of the topology
* @param who who is doing it
* @param topoConf the topology conf itself
* @throws AuthorizationException if who is not allowed to add a topology conf
* @throws KeyAlreadyExistsException if the toplogy conf already exists in the blob store
* @throws IOException on any error interacting with the blob store.
*/
public void addTopoConf(final String topoId, final Subject who, final Map<String, Object> topoConf) throws AuthorizationException, KeyAlreadyExistsException, IOException {
final String key = ConfigUtils.masterStormConfKey(topoId);
final List<AccessControl> acl = BlobStoreAclHandler.DEFAULT;
SettableBlobMeta meta = new SettableBlobMeta(acl);
store.createBlob(key, Utils.toCompressedJsonConf(topoConf), meta, who);
confs.put(topoId, new WithAcl<>(meta.get_acl(), topoConf));
}
Aggregations