@Override public void setCredentials(String stormId, Credentials creds, Map<String, Object> topoConf) { List<ACL> aclList = ClusterUtils.mkTopoReadOnlyAcls(topoConf); String path = ClusterUtils.credentialsPath(stormId); stateStorage.set_data(path, Utils.serialize(creds), aclList); }
@Override public void setTopologyLogConfig(String stormId, LogConfig logConfig, Map<String, Object> topoConf) { stateStorage.mkdirs(ClusterUtils.LOGCONFIG_SUBTREE, defaultAcls); stateStorage.set_data(ClusterUtils.logConfigPath(stormId), Utils.serialize(logConfig), ClusterUtils.mkTopoReadOnlyAcls(topoConf)); }
@Override public void activateStorm(String stormId, StormBase stormBase, Map<String, Object> topoConf) { String path = ClusterUtils.stormPath(stormId); stateStorage.mkdirs(ClusterUtils.STORMS_SUBTREE, defaultAcls); stateStorage.set_data(path, Utils.serialize(stormBase), ClusterUtils.mkTopoReadOnlyAcls(topoConf)); this.assignmentsBackend.keepStormId(stormBase.get_name(), stormId); }
@Override public void setAssignment(String stormId, Assignment info, Map<String, Object> topoConf) { byte[] serAssignment = Utils.serialize(info); stateStorage.mkdirs(ClusterUtils.ASSIGNMENTS_SUBTREE, defaultAcls); stateStorage.set_data(ClusterUtils.assignmentPath(stormId), Utils.serialize(info), ClusterUtils.mkTopoReadOnlyAcls(topoConf)); this.assignmentsBackend.keepOrUpdateAssignment(stormId, info); }
@Override public void setCredentials(String stormId, Credentials creds, Map topoConf) { List<ACL> aclList = ClusterUtils.mkTopoReadOnlyAcls(topoConf); String path = ClusterUtils.credentialsPath(stormId); stateStorage.set_data(path, Utils.serialize(creds), aclList); }
@Override public void setTopologyLogConfig(String stormId, LogConfig logConfig, Map<String, Object> topoConf) { stateStorage.mkdirs(ClusterUtils.LOGCONFIG_SUBTREE, acls); stateStorage.set_data(ClusterUtils.logConfigPath(stormId), Utils.serialize(logConfig), ClusterUtils.mkTopoReadOnlyAcls(topoConf)); }
@Override public void activateStorm(String stormId, StormBase stormBase, Map<String, Object> topoConf) { String path = ClusterUtils.stormPath(stormId); stateStorage.mkdirs(ClusterUtils.STORMS_SUBTREE, acls); stateStorage.set_data(path, Utils.serialize(stormBase), ClusterUtils.mkTopoReadOnlyAcls(topoConf)); }
@Override public void setAssignment(String stormId, Assignment info, Map<String, Object> topoConf) { stateStorage.mkdirs(ClusterUtils.ASSIGNMENTS_SUBTREE, acls); stateStorage.set_data(ClusterUtils.assignmentPath(stormId), Utils.serialize(info), ClusterUtils.mkTopoReadOnlyAcls(topoConf)); }