[ 
https://issues.apache.org/jira/browse/JCLOUDS-749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Spiros Koulouzis updated JCLOUDS-749:
-------------------------------------
    Description: 
Uploading any file of 961450810 bytes (tested 3 random files using  dd 
if=/dev/urandom of=file bs=961450810 count=1)  to swift using multipart is 
currupted if downloaded back. 

This is the code used for uploading: 
props.setProperty("jclouds.mpu.parts.size", "103554431");
BlobStoreContext blobStoreContext = 
ContextBuilder.newBuilder(provider).overrides(props).build(BlobStoreContext.class);
blobstore = blobStoreContext.getBlobStore();

Blob blob = blobstore.getBlob(container, name);
File file = new File("/tmp/file");
blob.setPayload(file);
blobstore.putBlob(name, blob, PutOptions.Builder.multipart(true));


And downloading:

Blob blob = blobstore.getBlob(container,name);
Payload payload = blob.getPayload();
in =  payload.openStream();

  was:
Uploading any file of 961450810 bytes (tested 3 random files using  dd 
if=/dev/urandom of=file bs=961450810 count=1)  to swift using multipart is 
currupted if downloaded back. 

This is the code used for uploading: 
props.setProperty("jclouds.mpu.parts.size", "103554431");
BlobStoreContext blobStoreContext = 
ContextBuilder.newBuilder(provider).overrides(props).build(BlobStoreContext.class);
blobstore = blobStoreContext.getBlobStore();

Blob blob = blobstore.getBlob(container, name);
File file = new File(/tmp/file);
blob.setPayload(file);
blobstore.putBlob(containerAndPath[0], blob, 
PutOptions.Builder.multipart(true));


And downloading:

Blob blob = blobstore.getBlob(container,file);
Payload payload = blob.getPayload();
in =  payload.openStream();


> Files of 961450810 bytes are corupted in swift when using multipart 
> --------------------------------------------------------------------
>
>                 Key: JCLOUDS-749
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-749
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>    Affects Versions: 1.8.0
>         Environment: storage: swift  
>            Reporter: Spiros Koulouzis
>
> Uploading any file of 961450810 bytes (tested 3 random files using  dd 
> if=/dev/urandom of=file bs=961450810 count=1)  to swift using multipart is 
> currupted if downloaded back. 
> This is the code used for uploading: 
> props.setProperty("jclouds.mpu.parts.size", "103554431");
> BlobStoreContext blobStoreContext = 
> ContextBuilder.newBuilder(provider).overrides(props).build(BlobStoreContext.class);
> blobstore = blobStoreContext.getBlobStore();
> Blob blob = blobstore.getBlob(container, name);
> File file = new File("/tmp/file");
> blob.setPayload(file);
> blobstore.putBlob(name, blob, PutOptions.Builder.multipart(true));
> And downloading:
> Blob blob = blobstore.getBlob(container,name);
> Payload payload = blob.getPayload();
> in =  payload.openStream();



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to