/** * Deletes an Amazon Kinesis stream if it exists. * * @param kinesisClient * The {@link AmazonKinesisClient} with Amazon Kinesis read and write privileges * @param streamName * The Amazon Kinesis stream to delete */ public static void deleteStream(AmazonKinesisClient kinesisClient, String streamName) { if (streamExists(kinesisClient, streamName)) { DeleteStreamRequest deleteStreamRequest = new DeleteStreamRequest(); deleteStreamRequest.setStreamName(streamName); kinesisClient.deleteStream(deleteStreamRequest); LOG.info("Deleting stream " + streamName); } else { LOG.warn("Stream " + streamName + " does not exist"); } }
public void delteStream(String streamName) { DeleteStreamRequest deleteStreamRequest = new DeleteStreamRequest(); deleteStreamRequest.setStreamName(streamName); amazonKinesisClient.deleteStream(deleteStreamRequest); if (streamsCreated.contains(streamName)) { streamsCreated.remove(streamName); } }
/** * Delete a topic * @param topic */ public void deleteTopic(final String topic){ LOGGER.info("Deleting stream {} ", topic); final DeleteStreamRequest deleteStreamRequest = new DeleteStreamRequest(); deleteStreamRequest.setStreamName(topic); this.client.deleteStream(deleteStreamRequest); LOGGER.info("Stream {} is being deleted", topic); }
@Override public DeleteStreamResult deleteStream(DeleteStreamRequest deleteStreamRequest) { throw new RuntimeException("Not implemented"); }