Sha256: 39e421bbc19bafbff471d34d5bdada150437befa39500fc27d2ee7759a532acb

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")
        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.3.5 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.3.4 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.3.3 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.3.2 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.3.1 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java
embulk-input-riak_cs-0.3.0 src/main/java/org/embulk/input/riak_cs/RiakCsFileInputPlugin.java