use of com.amazonaws.services.kinesis.model.AddTagsToStreamRequest in project druid by druid-io.
the class KinesisAdminClient method createStream.
@Override
public void createStream(String streamName, int shardCount, Map<String, String> tags) {
CreateStreamResult createStreamResult = amazonKinesis.createStream(streamName, shardCount);
if (createStreamResult.getSdkHttpMetadata().getHttpStatusCode() != 200) {
throw new ISE("Cannot create stream for integration test");
}
if (tags != null && !tags.isEmpty()) {
AddTagsToStreamRequest addTagsToStreamRequest = new AddTagsToStreamRequest();
addTagsToStreamRequest.setStreamName(streamName);
addTagsToStreamRequest.setTags(tags);
AddTagsToStreamResult addTagsToStreamResult = amazonKinesis.addTagsToStream(addTagsToStreamRequest);
if (addTagsToStreamResult.getSdkHttpMetadata().getHttpStatusCode() != 200) {
throw new ISE("Cannot tag stream for integration test");
}
}
}
Aggregations