You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/05/18 22:49:05 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #6874: Add dynamodb streams source

sijie commented on a change in pull request #6874:
URL: https://github.com/apache/pulsar/pull/6874#discussion_r426932512



##########
File path: pulsar-io/aws/src/main/java/org/apache/pulsar/io/aws/AbstractAwsConnector.java
##########
@@ -79,16 +77,19 @@ public static AwsCredentialProviderPlugin createCredentialProviderWithPlugin(Str
      * @param awsCredentialPluginParam
      * @return
      */
-    protected AwsCredentialProviderPlugin defaultCredentialProvider(String awsCredentialPluginParam) {
+    public AwsCredentialProviderPlugin defaultCredentialProvider(String awsCredentialPluginParam) {
         Map<String, String> credentialMap = new Gson().fromJson(awsCredentialPluginParam,
                 new TypeToken<Map<String, String>>() {
                 }.getType());
         String accessKey = credentialMap.get(ACCESS_KEY_NAME);
         String secretKey = credentialMap.get(SECRET_KEY_NAME);
-        checkArgument(isNotBlank(accessKey) && isNotBlank(secretKey),
-                String.format(
-                        "Default %s and %s must be present into json-map if AwsCredentialProviderPlugin not provided",
-                        ACCESS_KEY_NAME, SECRET_KEY_NAME));
+        if (!(StringUtils.isNotBlank(accessKey) && StringUtils.isNotBlank(secretKey))) {

Review comment:
       Just out of curiosity, what was changed here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org