[ 
https://issues.apache.org/jira/browse/JCLOUDS-1258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16016788#comment-16016788
 ] 

zreal commented on JCLOUDS-1258:
--------------------------------

when I change the 
org.jclouds.rest.internal.RestAnnotationProcessor.addHostIfMissing method as 
follow:
 @VisibleForTesting
   static URI addHostIfMissing(URI original, URI withHost) {
      checkNotNull(withHost, "URI withHost cannot be null");
      checkArgument(withHost.getHost() != null, "URI withHost must have host:" 
+ withHost);
      if (original == null)
         return null;
      //if (original.getHost() != null)
      //   return original;
          if (original.getHost() != null) {
                        /*
                         * zreal 04-18-2017 change original's host, and make it 
be
                         * s3.cn-north-1.amazonaws.com.cn
                         */
                        original = Uris.uriBuilder(original)
                                        
.host("s3.cn-north-1.amazonaws.com.cn").build();
                        return original;
          }
      return withHost.resolve(original);
   }

The blobStore.createContainerInLocation(locationCN, "test0518") will be 
executed correcthly.

> S3 China Beijing Region Support
> -------------------------------
>
>                 Key: JCLOUDS-1258
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1258
>             Project: jclouds
>          Issue Type: Improvement
>          Components: jclouds-blobstore, jclouds-compute
>    Affects Versions: 2.0.1
>            Reporter: Archana Chinnaiah
>            Priority: Minor
>              Labels: aws-ec2, aws-s3
>             Fix For: 2.1.0, 2.0.2
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to