@Test(expectedExceptions = IllegalArgumentException.class) public void testDeleteWithNullDatastream() { _store.deleteDatastream(null); }
@Override public void deleteDatastream(String key) { Validate.notNull(key, "null key"); Datastream datastream = getDatastream(key); if (datastream != null) { datastream.setStatus(DatastreamStatus.DELETING); String data = DatastreamUtils.toJSON(datastream); String path = getZnodePath(key); _zkClient.updateDataSerialized(path, old -> data); notifyLeaderOfDataChange(); } }
ZookeeperBackedDatastreamStore implements DatastreamStore { @Override public void deleteDatastream(String key) { Validate.notNull(key, "null key"); Datastream datastream = getDatastream(key); if (datastream != null) { datastream.setStatus(DatastreamStatus.DELETING); String data = DatastreamUtils.toJSON(datastream); String path = getZnodePath(key); _zkClient.updateDataSerialized(path, old -> data); notifyLeaderOfDataChange(); } } }
ZookeeperBackedDatastreamStore implements DatastreamStore { @Override public void deleteDatastream(String key) { Validate.notNull(key, "null key"); Datastream datastream = getDatastream(key); if (datastream != null) { datastream.setStatus(DatastreamStatus.DELETING); String data = DatastreamUtils.toJSON(datastream); String path = getZnodePath(key); _zkClient.updateDataSerialized(path, old -> data); notifyLeaderOfDataChange(); } } ZookeeperBackedDatastreamStore(CachedDatastreamReader datastreamCache, ZkClient zkClient, String cluster); }
ZookeeperBackedDatastreamStore implements DatastreamStore { @Override public void deleteDatastream(String key) { Validate.notNull(key, "null key"); Datastream datastream = getDatastream(key); if (datastream != null) { datastream.setStatus(DatastreamStatus.DELETING); String data = DatastreamUtils.toJSON(datastream); String path = getZnodePath(key); _zkClient.updateDataSerialized(path, old -> data); notifyLeaderOfDataChange(); } } ZookeeperBackedDatastreamStore(CachedDatastreamReader datastreamCache, ZkClient zkClient, String cluster); @Override Datastream getDatastream(String key); @Override Stream<String> getAllDatastreams(); @Override void updateDatastream(String key, Datastream datastream, boolean notifyLeader); @Override void createDatastream(String key, Datastream datastream); @Override void updatePartitionAssignments(String key, Datastream datastream, HostTargetAssignment targetAssignment,
      boolean notifyLeader); @Override void deleteDatastream(String key); }
ZookeeperBackedDatastreamStore implements DatastreamStore { @Override public void deleteDatastream(String key) { Validate.notNull(key, "null key"); Datastream datastream = getDatastream(key); if (datastream != null) { datastream.setStatus(DatastreamStatus.DELETING); String data = DatastreamUtils.toJSON(datastream); String path = getZnodePath(key); _zkClient.updateDataSerialized(path, old -> data); notifyLeaderOfDataChange(); } } ZookeeperBackedDatastreamStore(CachedDatastreamReader datastreamCache, ZkClient zkClient, String cluster); @Override Datastream getDatastream(String key); @Override Stream<String> getAllDatastreams(); @Override void updateDatastream(String key, Datastream datastream, boolean notifyLeader); @Override void createDatastream(String key, Datastream datastream); @Override void updatePartitionAssignments(String key, Datastream datastream, HostTargetAssignment targetAssignment,
      boolean notifyLeader); @Override void deleteDatastream(String key);  }