You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Timur Alperovich <no...@github.com> on 2015/08/20 23:31:47 UTC
[jclouds-labs-google] JCLOUDS-992: do not use RELATIVE_PATH for
BLOBs. (#164)
Changes the Google storage provider to be inline with the other
providers in not returning RELATIVE_PATH for objects that are BLOBs.
You can view, comment on, or merge this pull request online at:
https://github.com/jclouds/jclouds-labs-google/pull/164
-- Commit Summary --
* JCLOUDS-992: do not use RELATIVE_PATH for BLOBs.
-- File Changes --
M google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/functions/ObjectToBlobMetadata.java (16)
-- Patch Links --
https://github.com/jclouds/jclouds-labs-google/pull/164.patch
https://github.com/jclouds/jclouds-labs-google/pull/164.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/164
Re: [jclouds-labs-google] JCLOUDS-992: do not use RELATIVE_PATH for
BLOBs. (#164)
Posted by Timur Alperovich <no...@github.com>.
> - new Function<BlobMetadata, StorageMetadata>() {
> - public StorageMetadata apply(BlobMetadata input) {
> - Map<String, String> userMetaData = (input != null && input.getUserMetadata() != null) ? input
> - .getUserMetadata() : ImmutableMap.<String, String> of();
> - if (input.getContentMetadata().getContentType().equals("application/directory")) {
> - return new StorageMetadataImpl(StorageType.RELATIVE_PATH, input.getProviderId(), input
> - .getName(), input.getLocation(), input.getUri(), input.getETag(), input
> - .getCreationDate(), input.getLastModified(), userMetaData,
> - input.getSize());
> - }
> - return input;
> - }
> - }), from.nextPageToken());
> + SortedSet<StorageMetadata> results = Sets.<StorageMetadata> newTreeSet(Iterables.transform(from, object2blobMd));
> + for (String prefix : from.prefixes()) {
> + MutableStorageMetadata metadata = new MutableStorageMetadataImpl();
Done
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/164/files#r37597912
Re: [jclouds-labs-google] JCLOUDS-992: do not use RELATIVE_PATH for
BLOBs. (#164)
Posted by Andrew Gaul <no...@github.com>.
> - new Function<BlobMetadata, StorageMetadata>() {
> - public StorageMetadata apply(BlobMetadata input) {
> - Map<String, String> userMetaData = (input != null && input.getUserMetadata() != null) ? input
> - .getUserMetadata() : ImmutableMap.<String, String> of();
> - if (input.getContentMetadata().getContentType().equals("application/directory")) {
> - return new StorageMetadataImpl(StorageType.RELATIVE_PATH, input.getProviderId(), input
> - .getName(), input.getLocation(), input.getUri(), input.getETag(), input
> - .getCreationDate(), input.getLastModified(), userMetaData,
> - input.getSize());
> - }
> - return input;
> - }
> - }), from.nextPageToken());
> + SortedSet<StorageMetadata> results = Sets.<StorageMetadata> newTreeSet(Iterables.transform(from, object2blobMd));
> + for (String prefix : from.prefixes()) {
> + MutableStorageMetadata metadata = new MutableStorageMetadataImpl();
extra whitespace
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/164/files#r37597721