flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzulitai <...@git.apache.org>
Subject [GitHub] flink pull request #2260: [FLINK-4222] Allow Kinesis configuration to get cr...
Date Sat, 16 Jul 2016 06:56:59 GMT
Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2260#discussion_r71062232
  
    --- Diff: flink-streaming-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java
---
    @@ -50,8 +50,14 @@ public static AmazonKinesisClient createKinesisClient(Properties configProps)
{
     		awsClientConfig.setUserAgent("Apache Flink " + EnvironmentInformation.getVersion()
+
     			" (" + EnvironmentInformation.getRevisionInformation().commitId + ") Kinesis Connector");
     
    -		AmazonKinesisClient client =
    -			new AmazonKinesisClient(AWSUtil.getCredentialsProvider(configProps).getCredentials(),
awsClientConfig);
    +		AWSCredentialsProvider credentialsProvider = AWSUtil.getCredentialsProvider(configProps);
    +
    +		if (credentialsProvider != null) {
    +			AmazonKinesisClient client =
    +				new AmazonKinesisClient(credentialsProvider.getCredentials(), awsClientConfig);
    +		} else {
    +			AmazonKinesisClient client = new AmazonKinesisClient(awsClientConfig);
    +		}
    --- End diff --
    
    The `client` variable still needs to be declared outside the if/else clause, because `client`
will be used below.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message