kinesis-lib/src/main/java/com/streamsets/pipeline/stage/lib/kinesis/KinesisUtil.java
public static long checkStreamExists(
      ClientConfiguration awsClientConfig,
      KinesisConfigBean conf,
      String streamName,
      List<Stage.ConfigIssue> issues,
      Stage.Context context
  ) {
    long numShards = 0;

    try {
      numShards = getShardCount(awsClientConfig, conf, streamName);
    } catch (AmazonClientException|StageException e) {
      LOG.error(Errors.KINESIS_01.getMessage(), e.toString(), e);
      issues.add(context.createConfigIssue(
          Groups.KINESIS.name(),
          KINESIS_CONFIG_BEAN + ".streamName", Errors.KINESIS_01, e.toString()
      ));
    }
    return numShards;
  }
public static long checkStreamExists(
      ClientConfiguration awsClientConfig,
      KinesisConfigBean conf,
      String streamName,
      List<Stage.ConfigIssue> issues,
      Stage.Context context
  ) {
    long numShards = 0;

    try {
      numShards = getShardCount(awsClientConfig, conf, streamName);
    } catch (AmazonClientException|StageException e) {
      LOG.error(Errors.KINESIS_01.getMessage(), e.toString(), e);
      issues.add(context.createConfigIssue(
          Groups.KINESIS.name(),
          KINESIS_CONFIG_BEAN + ".streamName", Errors.KINESIS_01, e.toString()
      ));
    }
    return numShards;
  }
public static long checkStreamExists ( ClientConfiguration awsClientConfig , KinesisConfigBean conf , String streamName , List < Stage . ConfigIssue > issues , Stage . Context context ) { long numShards = 0 ; try { numShards = getShardCount ( awsClientConfig , conf , streamName ) ; } catch ( AmazonClientException | StageException e ) { LOG . error ( Errors . KINESIS_01 . getMessage ( ) , e . toString ( ) , e ) ; issues . add ( context . createConfigIssue ( Groups . KINESIS . name ( ) , KINESIS_CONFIG_BEAN + ".streamName" , Errors . KINESIS_01 , e . toString ( ) ) ) ; } return numShards ; }
Checks for existence of the requested stream and adds
any configuration issues to the list.
@param conf
@param streamName
@param issues
@param context
Checks for existence of the requested stream and adds any configuration issues to the list .