com.amazonaws.services.kinesis.model.DeleteStreamRequest Java Examples

The following examples show how to use com.amazonaws.services.kinesis.model.DeleteStreamRequest. 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 vote down vote up
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 vote down vote up
/**
 * 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 vote down vote up
/**
 * 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 vote down vote up
public void deleteStream(String streamName)
{
    DeleteStreamRequest deleteStreamRequest = new DeleteStreamRequest();
    deleteStreamRequest.setStreamName(streamName);
    amazonKinesisClient.deleteStream(deleteStreamRequest);
}
 
Example #5
Source File: AmazonKinesisMock.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public DeleteStreamResult deleteStream(DeleteStreamRequest deleteStreamRequest) {
  throw new RuntimeException("Not implemented");
}