Sha256: 95ef7c2199182f1e2cbc98b079a9e6c34e20b3d1328d84776e0ac2782718a5ef

Contents?: true

Size: 1.23 KB

Versions: 6

Compression:

Stored size: 1.23 KB

Contents

package org.embulk.input.riak_cs;

import com.amazonaws.ClientConfiguration;
import com.amazonaws.services.s3.AmazonS3;
import org.embulk.config.Config;
import org.embulk.input.s3.AbstractS3FileInputPlugin;

import static com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;

public class RiakCsFileInputPlugin
        extends AbstractS3FileInputPlugin
{
    public interface RiakCsPluginTask
            extends PluginTask
    {
        @Config("endpoint")
        public String getEndpoint();
    }

    @Override
    protected Class<? extends PluginTask> getTaskClass()
    {
        return RiakCsPluginTask.class;
    }

    @Override
    protected AmazonS3 newS3Client(PluginTask task)
    {
        RiakCsPluginTask t = (RiakCsPluginTask) task;

        return super
                .defaultS3ClientBuilder(task)
                .withEndpointConfiguration(new EndpointConfiguration(t.getEndpoint(), null))
                .build();
    }

    @Override
    protected ClientConfiguration getClientConfiguration(PluginTask task)
    {
        RiakCsPluginTask t = (RiakCsPluginTask) task;

        ClientConfiguration config = super.getClientConfiguration(t);
        config.setSignerOverride("S3SignerType");

        return config;
    }
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
embulk-input-riak_cs-0.2.21 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.2.20 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.2.19 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.2.16 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.2.15 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.2.14 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java