[jira] [Created] (JCLOUDS-1543) list() results are not in order when using withDetails

2020-04-12 Thread Roded Bahat (Jira)
Roded Bahat created JCLOUDS-1543:


 Summary: list() results are not in order when using withDetails
 Key: JCLOUDS-1543
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1543
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-blobstore
Affects Versions: 2.2.0
Reporter: Roded Bahat


When listing blobs using the withDetails ListContainerOption, the returned page 
set's blobs do not return in the original order (as without the withDetails 
option). I suspect that FetchBlobMetadata should try a bit harder to keep to 
page set as it was recieved.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (JCLOUDS-1543) list() results are not in order when using withDetails

2020-04-12 Thread Roded Bahat (Jira)


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

Roded Bahat updated JCLOUDS-1543:
-
Description: When listing blobs using the withDetails ListContainerOption, 
the returned page set's blobs do not return in the original order (as without 
the withDetails option). I suspect that FetchBlobMetadata should try a bit 
harder to keep to page set as it was received.  (was: When listing blobs using 
the withDetails ListContainerOption, the returned page set's blobs do not 
return in the original order (as without the withDetails option). I suspect 
that FetchBlobMetadata should try a bit harder to keep to page set as it was 
recieved.)

> list() results are not in order when using withDetails
> --
>
> Key: JCLOUDS-1543
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1543
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.2.0
>Reporter: Roded Bahat
>Priority: Major
>
> When listing blobs using the withDetails ListContainerOption, the returned 
> page set's blobs do not return in the original order (as without the 
> withDetails option). I suspect that FetchBlobMetadata should try a bit harder 
> to keep to page set as it was received.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (JCLOUDS-1543) list() results are not in order when using withDetails

2020-04-12 Thread Andrew Gaul (Jira)


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

Andrew Gaul commented on JCLOUDS-1543:
--

[~roded] could you provide a test case that demonstrates this issue?  This does 
not seem too complicated; would you like to try to fix it as well?  Let me know 
if you need some pointers.

> list() results are not in order when using withDetails
> --
>
> Key: JCLOUDS-1543
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1543
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.2.0
>Reporter: Roded Bahat
>Priority: Major
>
> When listing blobs using the withDetails ListContainerOption, the returned 
> page set's blobs do not return in the original order (as without the 
> withDetails option). I suspect that FetchBlobMetadata should try a bit harder 
> to keep to page set as it was received.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (JCLOUDS-1543) list() results are not in order when using withDetails

2020-04-12 Thread Roded Bahat (Jira)


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

Roded Bahat updated JCLOUDS-1543:
-
Description: 
When listing blobs using the withDetails ListContainerOption, the returned page 
set's blobs do not return in the original order (as without the withDetails 
option). I suspect that FetchBlobMetadata should try a bit harder to keep to 
page set as it was received.


{code:java}
@Test
public void withDetailsOrdering() {
BlobStoreContext blobStoreContext = ContextBuilder.newBuilder("s3")
.endpoint("...")
.credentials("...", "...")
.buildView(BlobStoreContext.class);
BlobStore blobStore = blobStoreContext.getBlobStore();
String container = "roded-data";
String blobNamePrefix = "test/blob-";
for (int blobIndex = 0; blobIndex < 100; blobIndex++) {
Blob newBlob = blobStore.blobBuilder(blobNamePrefix + 
blobIndex).payload("").build();
blobStore.putBlob(container, newBlob);
}

final PageSet withOutDetails =
blobStore.list(container, 
ListContainerOptions.Builder.prefix(blobNamePrefix));
final PageSet withDetails = blobStore
.list(container, 
ListContainerOptions.Builder.prefix(blobNamePrefix).withDetails());


assertTrue(Ordering.from(Comparator.comparing(StorageMetadata::getName)).isOrdered(withOutDetails));
// Fails.

assertTrue(Ordering.from(Comparator.comparing(StorageMetadata::getName)).isOrdered(withDetails));
}
{code}


  was:When listing blobs using the withDetails ListContainerOption, the 
returned page set's blobs do not return in the original order (as without the 
withDetails option). I suspect that FetchBlobMetadata should try a bit harder 
to keep to page set as it was received.


> list() results are not in order when using withDetails
> --
>
> Key: JCLOUDS-1543
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1543
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.2.0
>Reporter: Roded Bahat
>Priority: Major
>
> When listing blobs using the withDetails ListContainerOption, the returned 
> page set's blobs do not return in the original order (as without the 
> withDetails option). I suspect that FetchBlobMetadata should try a bit harder 
> to keep to page set as it was received.
> {code:java}
> @Test
> public void withDetailsOrdering() {
> BlobStoreContext blobStoreContext = ContextBuilder.newBuilder("s3")
> .endpoint("...")
> .credentials("...", "...")
> .buildView(BlobStoreContext.class);
> BlobStore blobStore = blobStoreContext.getBlobStore();
> String container = "roded-data";
> String blobNamePrefix = "test/blob-";
> for (int blobIndex = 0; blobIndex < 100; blobIndex++) {
> Blob newBlob = blobStore.blobBuilder(blobNamePrefix + 
> blobIndex).payload("").build();
> blobStore.putBlob(container, newBlob);
> }
> final PageSet withOutDetails =
> blobStore.list(container, 
> ListContainerOptions.Builder.prefix(blobNamePrefix));
> final PageSet withDetails = blobStore
> .list(container, 
> ListContainerOptions.Builder.prefix(blobNamePrefix).withDetails());
> 
> assertTrue(Ordering.from(Comparator.comparing(StorageMetadata::getName)).isOrdered(withOutDetails));
> // Fails.
> 
> assertTrue(Ordering.from(Comparator.comparing(StorageMetadata::getName)).isOrdered(withDetails));
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (JCLOUDS-1543) list() results are not in order when using withDetails

2020-04-12 Thread Roded Bahat (Jira)


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

Roded Bahat commented on JCLOUDS-1543:
--

[~gaul], edited the description to include a test case. I'd gladly give it a 
shot. It might take me some time to get to it though.

> list() results are not in order when using withDetails
> --
>
> Key: JCLOUDS-1543
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1543
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.2.0
>Reporter: Roded Bahat
>Priority: Major
>
> When listing blobs using the withDetails ListContainerOption, the returned 
> page set's blobs do not return in the original order (as without the 
> withDetails option). I suspect that FetchBlobMetadata should try a bit harder 
> to keep to page set as it was received.
> {code:java}
> @Test
> public void withDetailsOrdering() {
> BlobStoreContext blobStoreContext = ContextBuilder.newBuilder("s3")
> .endpoint("...")
> .credentials("...", "...")
> .buildView(BlobStoreContext.class);
> BlobStore blobStore = blobStoreContext.getBlobStore();
> String container = "roded-data";
> String blobNamePrefix = "test/blob-";
> for (int blobIndex = 0; blobIndex < 100; blobIndex++) {
> Blob newBlob = blobStore.blobBuilder(blobNamePrefix + 
> blobIndex).payload("").build();
> blobStore.putBlob(container, newBlob);
> }
> final PageSet withOutDetails =
> blobStore.list(container, 
> ListContainerOptions.Builder.prefix(blobNamePrefix));
> final PageSet withDetails = blobStore
> .list(container, 
> ListContainerOptions.Builder.prefix(blobNamePrefix).withDetails());
> 
> assertTrue(Ordering.from(Comparator.comparing(StorageMetadata::getName)).isOrdered(withOutDetails));
> // Fails.
> 
> assertTrue(Ordering.from(Comparator.comparing(StorageMetadata::getName)).isOrdered(withDetails));
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)