jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-930) Expose the prefix option when listing a container
Date Wed, 08 Jul 2015 00:56:05 GMT

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

ASF subversion and git services commented on JCLOUDS-930:

Commit 6d27fbb18ac682df4579c98b7c3f3fefe8ca11e6 in jclouds's branch refs/heads/master from
[ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=6d27fbb ]

JCLOUDS-930: Handle subdir entries correctly.

When listing blobs, Swift returns an array of "subdir" entries for
every common prefix. The openstack-swift provider needs to process
such entries and add them to the result set. The subdir array is an
array of strings, so additional metadata needs to be added to the
objects (bogus ETag, bogus LastModifiedDate, and so on).

When directory marker blobs are used, this means that potential _two_
entries are generated for every directory if:
1. the delimiter is set and matches the directory blob (e.g. dir/ and
   delimiter /)
2. there are objects under the directory name (e.g. dir/blob), which
   will result in results that include common prefixes (subdir)

In the above example, we should expect two results: "dir" and "dir/"
representing the directory marker blob and the common prefix,

This is caught in the testDirectory integration test.

The patch changes the behavior of the Swift provider to correctly
handle the results in the subdir stanza and changes the test to expect
the directory marker to be returned in the list.

> Expose the prefix option when listing a container
> -------------------------------------------------
>                 Key: JCLOUDS-930
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-930
>             Project: jclouds
>          Issue Type: New Feature
>          Components: jclouds-blobstore
>            Reporter: Timur Alperovich
>            Assignee: Timur Alperovich
> Currently, the blob store interface exposes an _inDirectory()_ method to set the directory
from which to list blobs. This is implemented through a combination of prefix and delimiter
options, namely combining them to retrieve all objects nested under a specific "directory"
(e.g. dir/).
> jclouds should expose an explicit prefix option to, for example, allow listing objects
that all start with a common name. The difference from the existing inDirectory() option is
that the prefix would not require the delimiter to be set and could be an arbitrary string.
> The prefix is an option supported by S3, Swift, Azure, and Google Cloud Storage.

This message was sent by Atlassian JIRA

View raw message