MultiPart Uploads

147 views
Skip to first unread message

pawan kumar

unread,
Nov 23, 2012, 5:10:53 AM11/23/12
to jets3t...@googlegroups.com
Hi James, 


          i have gone through  multipart uploads  sample code available over here  http://jets3t.s3.amazonaws.com/toolkit/code-samples.html#multipart.  I have tested the following code against to Eucalyptus Walrus. uploaded file size around 80MB(employees_db-dump-files-1.0.5.tar.bz2) .

        ProviderCredentials cred1=new org.jets3t.service.security.AWSCredentials("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");    
        Jets3tProperties jets3=new Jets3tProperties();
        jets3.loadAndReplaceProperties(new FileInputStream("/root/Desktop/jets3t.properties"), "jets3t.properties");
        S3Service s3=new RestS3Service(cred1,"",null,jets3); 
        S3Object largeFileObject = new S3Object(new File("/root/Downloads/employees_db-dump-files-1.0.5.tar.bz2"));
        List objectsToUploadAsMultipart = new ArrayList();
        objectsToUploadAsMultipart.add(largeFileObject);
        long maxSizeForAPartInBytes = 20 * 1024 * 1024;
        MultipartUtils mpUtils = new MultipartUtils(maxSizeForAPartInBytes);
        String bname="pawan";
        mpUtils.uploadObjects(bname, s3,objectsToUploadAsMultipart, null);


i am facing the below error. 


Nov 23, 2012 3:24:06 PM org.jets3t.service.multi.ThreadedStorageService$ThreadGroupManager run
error::>>Multipart upload failed
SEVERE: A thread failed with an exception. Firing ERROR event and cancelling all threads
org.jets3t.service.S3ServiceException: Request Error: java.net.UnknownHostException: pawan.192.168.81.210
at org.jets3t.service.impl.rest.httpclient.RestS3Service.multipartStartUploadImpl(RestS3Service.java:786)
at org.jets3t.service.S3Service.multipartStartUpload(S3Service.java:3366)
at org.jets3t.service.multi.s3.ThreadedS3Service$MultipartStartRunnable.run(ThreadedS3Service.java:313)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.UnknownHostException: pawan.192.168.81.210
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:850)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1201)
at java.net.InetAddress.getAllByName0(InetAddress.java:1154)
at java.net.InetAddress.getAllByName(InetAddress.java:1084)
at java.net.InetAddress.getAllByName(InetAddress.java:1020)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:242)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:130)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:561)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:334)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:281)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRestPost(RestStorageService.java:1100)
at org.jets3t.service.impl.rest.httpclient.RestS3Service.multipartStartUploadImpl(RestS3Service.java:778)
... 3 more
java.lang.Exception: Multipart upload failed
at org.jets3t.service.utils.MultipartUtils.uploadObjects(MultipartUtils.java:272)
at test.MultipartUpload.main(MultipartUpload.java:44)
Caused by: org.jets3t.service.S3ServiceException: Request Error: java.net.UnknownHostException: pawan.192.168.81.210
at org.jets3t.service.impl.rest.httpclient.RestS3Service.multipartStartUploadImpl(RestS3Service.java:786)
at org.jets3t.service.S3Service.multipartStartUpload(S3Service.java:3366)
at org.jets3t.service.multi.s3.ThreadedS3Service$MultipartStartRunnable.run(ThreadedS3Service.java:313)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.UnknownHostException: pawan.192.168.81.210
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:850)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1201)
at java.net.InetAddress.getAllByName0(InetAddress.java:1154)
at java.net.InetAddress.getAllByName(InetAddress.java:1084)
at java.net.InetAddress.getAllByName(InetAddress.java:1020)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:242)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:130)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:561)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:334)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:281)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRestPost(RestStorageService.java:1100)
at org.jets3t.service.impl.rest.httpclient.RestS3Service.multipartStartUploadImpl(RestS3Service.java:778)
... 3 more

  

please suggest me how to resolve this issue. And i would like to know that Jets3t -0.9.0 does have support in Multiparts Uploads in Eucalyptus Walrus(open-source). Why it is trying to connect pawan.192.168.81.210 which url name of bukcet applicable in Amazon s3. 



Thanks in Advance.



James Murty

unread,
Nov 23, 2012, 6:26:55 AM11/23/12
to jets3t...@googlegroups.com
Hi,

Please don't include long and repetitive tracebacks in forum posts and then ask your questions below them.

Why it is trying to connect pawan.192.168.81.210

Probably because you have 192.168.81.210 set as your service endpoint in your properties file and JetS3t uses CNAME hostnames by default, since these work for S3. If Eucalyptus/Walrus doesn't support bucket CNAMEs set the JetS3t property "s3service.disable-dns-buckets=true" to stop using them.

 i would like to know that Jets3t -0.9.0 does have support in Multiparts Uploads in Eucalyptus Walrus

JetS3t supports multipart uploads to Amazon's S3. I don't know whether Eucalyptus/Walrus supports multipart uploads, and if it does whether JetS3t will work with it correctly. Probably not on both counts.

James





--
You received this message because you are subscribed to the Google Groups "JetS3t Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jets3t-users/-/l-sZH1Zw0hUJ.
To post to this group, send email to jets3t...@googlegroups.com.
To unsubscribe from this group, send email to jets3t-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jets3t-users?hl=en.

pawan kumar

unread,
Nov 26, 2012, 1:29:36 AM11/26/12
to jets3t...@googlegroups.com
Thanks for your Information. I am sorry for  my long trace backs here.

James Murty

unread,
Nov 26, 2012, 1:35:16 AM11/26/12
to jets3t...@googlegroups.com
Thanks for your Information. I am sorry for  my long trace backs here.

You're welcome, and it's not a big problem.

The long trace backs just make it easy to miss your questions or further comments. It's probably best to ask your questions and refer to the traceback but put it at the very end.

Cheers,
James

Reply all
Reply to author
Forward
0 new messages