You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Andrew Gaul (JIRA)" <ji...@apache.org> on 2014/05/24 05:32:01 UTC

[jira] [Created] (JCLOUDS-575) Support multiple ranges in getBlob

Andrew Gaul created JCLOUDS-575:
-----------------------------------

             Summary: Support multiple ranges in getBlob
                 Key: JCLOUDS-575
                 URL: https://issues.apache.org/jira/browse/JCLOUDS-575
             Project: jclouds
          Issue Type: New Feature
          Components: jclouds-blobstore
    Affects Versions: 1.7.2
            Reporter: Andrew Gaul


GetOptions.Builder.range allows users to specify multiple ranges to fetch in a single GET request, but the s3 and swift providers do not support this operation when tested against aws-s3 and cloudfiles-us.  Consider this test:

{noformat}
   @Test(groups = { "integration", "live" })
   public void testGetTwoRangesDiscontiguous() throws InterruptedException, IOException {
      String container = getContainerName();
      try {

         String name = "apples";

         addObjectAndValidateContent(container, name);
         Blob blob = view.getBlobStore().getBlob(container, name, range(0, 5).range(7, TEST_STRING.length()));
         validateMetadata(blob.getMetadata(), container, name);
         assertEquals(getContentAsStringOrNullAndClose(blob), TEST_STRING.substring(0, 6) + TEST_STRING.substring(8, TEST_STRING.length()));
      } finally {
         returnContainer(container);
      }
   }
{noformat}

aws-s3 fails with:

{noformat}
testGetTwoRangesDiscontiguous(org.jclouds.aws.s3.blobstore.integration.AWSS3BlobIntegrationLiveTest)  Time elapsed: 3.487 sec  <<< FAILURE!
java.lang.AssertionError: expected [<apple<apple name="apple"></apple> </apples>] but found [<apples><apple name="apple"></apple> </apples>]
{noformat}

cloudfiles-us fails with:

{noformat}
testGetTwoRangesDiscontiguous(org.jclouds.rackspace.cloudfiles.blobstore.integration.CloudFilesUSBlobIntegrationLiveTest)  Time elapsed: 3.509 sec  <<< FAILURE!
java.lang.AssertionError: expected [<apple<apple name="apple"></apple> </apples>] but found [
--116d2f17083b496e4039ab4022ae341a
Content-Type: text/xml
Content-Range: bytes 0-5/46

<apple
--116d2f17083b496e4039ab4022ae341a
Content-Type: text/xml
Content-Range: bytes 7-45/46

><apple name="apple"></apple> </apples>
--116d2f17083b496e4039ab4022ae341a--
]
{noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)