streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smashew <...@git.apache.org>
Subject [GitHub] incubator-streams pull request: Twitter Modificaitons
Date Mon, 05 May 2014 21:49:41 GMT
Github user smashew commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/8#discussion_r12301794
  
    --- Diff: streams-contrib/streams-amazon-aws/streams-persist-s3/src/main/java/org/apache/streams/s3/S3Configurator.java
---
    @@ -0,0 +1,64 @@
    +package org.apache.streams.s3;
    +
    +import com.fasterxml.jackson.databind.ObjectMapper;
    +import com.typesafe.config.Config;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +public class S3Configurator {
    +
    +    private final static Logger LOGGER = LoggerFactory.getLogger(S3Configurator.class);
    +
    +    private final static ObjectMapper mapper = new ObjectMapper();
    +
    +    public static S3Configuration detectConfiguration(Config s3) {
    +
    +        S3Configuration s3Configuration = new S3Configuration();
    +
    +        s3Configuration.setBucket(s3.getString("bucket"));
    +        s3Configuration.setKey(s3.getString("key"));
    +        s3Configuration.setSecretKey(s3.getString("secretKey"));
    +
    +        // The Amazon S3 Library defaults to HTTPS
    +        String protocol = (!s3.hasPath("protocol") ? "https": s3.getString("protocol")).toLowerCase();
    +
    +        if(!(protocol.equals("https") || protocol.equals("http"))) {
    +            // you must specify either HTTP or HTTPS
    --- End diff --
    
    Good catch, another commit coming with a RUN-TIME exception.


---
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