Java Code Examples for com.amazonaws.services.kinesis.model.DeleteStreamRequest#setStreamName()
The following examples show how to use
com.amazonaws.services.kinesis.model.DeleteStreamRequest#setStreamName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EmbeddedKinesisStream.java From presto-kinesis with Apache License 2.0 | 5 votes |
public void delteStream(String streamName) { DeleteStreamRequest deleteStreamRequest = new DeleteStreamRequest(); deleteStreamRequest.setStreamName(streamName); amazonKinesisClient.deleteStream(deleteStreamRequest); if (streamsCreated.contains(streamName)) { streamsCreated.remove(streamName); } }
Example 2
Source File: KinesisUtils.java From aws-big-data-blog with Apache License 2.0 | 5 votes |
/** * 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"); } }
Example 3
Source File: KinesisUtils.java From amazon-kinesis-connectors with Apache License 2.0 | 5 votes |
/** * 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"); } }
Example 4
Source File: EmbeddedKinesisStream.java From presto with Apache License 2.0 | 4 votes |
public void deleteStream(String streamName) { DeleteStreamRequest deleteStreamRequest = new DeleteStreamRequest(); deleteStreamRequest.setStreamName(streamName); amazonKinesisClient.deleteStream(deleteStreamRequest); }