Package com.amazonaws.services.s3

Examples of com.amazonaws.services.s3.AmazonS3Client


        }

        this.simpleDbClient = new AmazonSimpleDBClient(awsCredentials, createConfiguration(sdbSecure));
        this.simpleDbClient.setEndpoint(sdbEndpoint);

        this.s3Client = new AmazonS3Client(awsCredentials, createConfiguration(s3Secure));
        this.s3Client.setEndpoint(s3Endpoint);
    }
View Full Code Here


        this.credentials = cred;
        this.objCacheMgr = new ObjCacheMgr(this, memCacheable);
        this.sdbMgr = new SimpleDBService(this, cred);
        this.ddbMgr = new DynamoDBService(this, cred);
        this.s3Client = new AmazonS3Client(cred);
        this.preStore1Registry = BuiltinFunc.clonePreStore1Registry();
        this.preStore2Registry = BuiltinFunc.clonePreStore2Registry();
        this.validationRegistry = BuiltinFunc.cloneValidationRegistry();
        this.postLoadRegistry = BuiltinFunc.clonePostLoadRegistry();
    }
View Full Code Here

                          " to "+hdfsPathForKey(s3key).toString()+
                          " attempts="+attempts;
          reporter.setStatus(logmsg);
          System.err.println(logmsg);
        
          AmazonS3Client s3Client = newS3Client();         
          s3object = s3Client.getObject("commoncrawl-crawl-002", s3key.toString()).getObjectContent();                 
          hdfsFile = createHdfsFileFor(s3key);  
         
          copy(s3object, hdfsFile, reporter);                             
         
          s3object.close();
          hdfsFile.close();
          s3Client.shutdown();
         
          return;
        }
        catch (Exception e) {
          // clean up attempt
View Full Code Here

    private Path hdfsPathForKey(Text s3key) {
      return new Path(ccHdfsPath + s3key.toString());    
    }
   
    private AmazonS3Client newS3Client() {     
      AmazonS3Client s3Client = new AmazonS3Client(new BasicAWSCredentials(awsAccessKeyId, awsSecretAccessKey));
      s3Client.addRequestHandler(new AbstractRequestHandler() {
        public void beforeRequest(Request<?> request) {
          request.addHeader("x-amz-request-payer", "requester");
        }
      });     
      return s3Client;
View Full Code Here

     * them throughout applications.
     * <p>
     * TransferManager and all AWS client objects are thread safe.
     */
    public TransferManager(){
        this(new AmazonS3Client(new DefaultAWSCredentialsProviderChain()));
    }
View Full Code Here

     * @param credentialsProvider
     *            The AWS security credentials provider to use when making
     *            authenticated requests.
     */
    public TransferManager(AWSCredentialsProvider credentialsProvider) {
        this(new AmazonS3Client(credentialsProvider));
    }
View Full Code Here

     * @param credentials
     *            The AWS security credentials to use when making authenticated
     *            requests.
     */
    public TransferManager(AWSCredentials credentials) {
        this(new AmazonS3Client(credentials));
    }
View Full Code Here

     * them throughout applications.
     * <p>
     * TransferManager and all AWS client objects are thread safe.
     */
    public TransferManager(){
        this(new AmazonS3Client(new DefaultAWSCredentialsProviderChain()));
    }
View Full Code Here

     * @param credentialsProvider
     *            The AWS security credentials provider to use when making
     *            authenticated requests.
     */
    public TransferManager(AWSCredentialsProvider credentialsProvider) {
        this(new AmazonS3Client(credentialsProvider));
    }
View Full Code Here

     * @param credentials
     *            The AWS security credentials to use when making authenticated
     *            requests.
     */
    public TransferManager(AWSCredentials credentials) {
        this(new AmazonS3Client(credentials));
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.s3.AmazonS3Client

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.