@Override public LogConfig topologyLogConfig(String stormId, Runnable cb) { if (cb != null) { logConfigCallback.put(stormId, cb); } String path = ClusterUtils.logConfigPath(stormId); return ClusterUtils.maybeDeserialize(stateStorage.get_data(path, cb != null), LogConfig.class); }
@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 removeStorm(String stormId) { stateStorage.delete_node(ClusterUtils.assignmentPath(stormId)); this.assignmentsBackend.clearStateForStorm(stormId); stateStorage.delete_node(ClusterUtils.credentialsPath(stormId)); stateStorage.delete_node(ClusterUtils.logConfigPath(stormId)); stateStorage.delete_node(ClusterUtils.profilerConfigPath(stormId)); removeStormBase(stormId); }
@Override public LogConfig topologyLogConfig(String stormId, Runnable cb) { if (cb != null){ logConfigCallback.put(stormId, cb); } String path = ClusterUtils.logConfigPath(stormId); return ClusterUtils.maybeDeserialize(stateStorage.get_data(path, cb != null), LogConfig.class); }
@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 removeStorm(String stormId) { stateStorage.delete_node(ClusterUtils.assignmentPath(stormId)); stateStorage.delete_node(ClusterUtils.credentialsPath(stormId)); stateStorage.delete_node(ClusterUtils.logConfigPath(stormId)); stateStorage.delete_node(ClusterUtils.profilerConfigPath(stormId)); removeStormBase(stormId); }