@Override public Credentials credentials(String stormId, Runnable callback) { if (callback != null) { credentialsCallback.put(stormId, callback); } String path = ClusterUtils.credentialsPath(stormId); return ClusterUtils.maybeDeserialize(stateStorage.get_data(path, callback != null), Credentials.class); }
@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 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 Credentials credentials(String stormId, Runnable callback) { if (callback != null) { credentialsCallback.put(stormId, callback); } String path = ClusterUtils.credentialsPath(stormId); return ClusterUtils.maybeDeserialize(stateStorage.get_data(path, callback != null), Credentials.class); }
@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 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); }