You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Roman Coedo <no...@github.com> on 2014/06/28 07:34:35 UTC
[jclouds-labs-aws] JCLOUDS-457: Added the retrieve output operations
(#31)
Now the Glacier client can retrieve data.
You can merge this Pull Request by running:
git pull https://github.com/rcoedo/jclouds-labs-aws jobs
Or you can view, comment on it, or merge it online at:
https://github.com/jclouds/jclouds-labs-aws/pull/31
-- Commit Summary --
* JCLOUDS-457: Added the retrieve output operations
-- File Changes --
M glacier/src/main/java/org/jclouds/glacier/GlacierAsyncClient.java (38)
M glacier/src/main/java/org/jclouds/glacier/GlacierClient.java (39)
A glacier/src/main/java/org/jclouds/glacier/binders/BindArchiveOutputRangeToHeaders.java (40)
A glacier/src/main/java/org/jclouds/glacier/domain/ArchiveMetadata.java (106)
A glacier/src/main/java/org/jclouds/glacier/domain/ArchiveMetadataCollection.java (54)
A glacier/src/main/java/org/jclouds/glacier/functions/GetPayloadFromHttpContent.java (38)
A glacier/src/main/java/org/jclouds/glacier/functions/ParseArchiveMetadataCollectionFromHttpContent.java (32)
M glacier/src/test/java/org/jclouds/glacier/GlacierClientMockTest.java (58)
A glacier/src/test/resources/json/getJobOutputResponseBody.json (20)
-- Patch Links --
https://github.com/jclouds/jclouds-labs-aws/pull/31.patch
https://github.com/jclouds/jclouds-labs-aws/pull/31.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Roman Coedo <no...@github.com>.
> @@ -0,0 +1,106 @@
> +/*
> + * Licensed to the Apache Softwareimport java.net.URI;
> +import java.util.Date;
> +
> +import org.jclouds.io.MutableContentMetadata;
That's wierd, I'll fix it.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31/files#r14332700
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Andrew Gaul <no...@github.com>.
> @@ -0,0 +1,38 @@
> +/*
> + * Licensed to the Apache Software Foimport org.jclouds.http.HttpException;
> +import org.jclouds.http.HttpResponse;
> +
> +import com.google.common.base.Function;
More junk here?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31/files#r14332681
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-aws-pull-requests #67](https://jclouds.ci.cloudbees.com/job/jclouds-labs-aws-pull-requests/67/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#issuecomment-47486099
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Andrew Gaul <no...@github.com>.
> @@ -0,0 +1,106 @@
> +/*
> + * Licensed to the Apache Softwareimport java.net.URI;
> +import java.util.Date;
> +
> +import org.jclouds.io.MutableContentMetadata;
Some junk here?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31/files#r14332679
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-aws #1062](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-aws/1062/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#issuecomment-47485245
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Andrew Gaul <no...@github.com>.
> +
> +import com.google.gson.annotations.SerializedName;
> +
> +
> +public class ArchiveMetadataCollection {
> +
> + @SerializedName("ArchiveList")
> + private final Iterable<ArchiveMetadata> archives;
> + @SerializedName("VaultARN")
> + private final String vaultARN;
> + @SerializedName("InventoryDate")
> + private final Date inventoryDate;
> +
> + @ConstructorProperties({ "ArchiveList", "VaultARN", "InventoryDate" })
> + public ArchiveMetadataCollection(Iterable<ArchiveMetadata> archives, String vaultARN, Date inventoryDate) {
> + this.archives = checkNotNull(archives, "archives");
`IterableWithMarker` and `Iterable` are appropriate for infinite-length streams, or at least those too large for memory, and useful for listing container contents.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31/files#r14332209
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-aws-pull-requests #66](https://jclouds.ci.cloudbees.com/job/jclouds-labs-aws-pull-requests/66/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#issuecomment-47485122
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Roman Coedo <no...@github.com>.
> +
> +import com.google.gson.annotations.SerializedName;
> +
> +
> +public class ArchiveMetadataCollection {
> +
> + @SerializedName("ArchiveList")
> + private final Iterable<ArchiveMetadata> archives;
> + @SerializedName("VaultARN")
> + private final String vaultARN;
> + @SerializedName("InventoryDate")
> + private final Date inventoryDate;
> +
> + @ConstructorProperties({ "ArchiveList", "VaultARN", "InventoryDate" })
> + public ArchiveMetadataCollection(Iterable<ArchiveMetadata> archives, String vaultARN, Date inventoryDate) {
> + this.archives = checkNotNull(archives, "archives");
What if we return an iterator instead of the list? It would be consistent with the rest of the domain collection classes.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31/files#r14331413
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Roman Coedo <no...@github.com>.
> +
> +import com.google.gson.annotations.SerializedName;
> +
> +
> +public class ArchiveMetadataCollection {
> +
> + @SerializedName("ArchiveList")
> + private final Iterable<ArchiveMetadata> archives;
> + @SerializedName("VaultARN")
> + private final String vaultARN;
> + @SerializedName("InventoryDate")
> + private final Date inventoryDate;
> +
> + @ConstructorProperties({ "ArchiveList", "VaultARN", "InventoryDate" })
> + public ArchiveMetadataCollection(Iterable<ArchiveMetadata> archives, String vaultARN, Date inventoryDate) {
> + this.archives = checkNotNull(archives, "archives");
Then I should probably make a copy using ImmutableList on the other collections too. Also, what do you think about IterableWithMarker? Do you think I should use an alternative, returning a collection instead of an iterator? I don't want to hurt any kittens!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31/files#r14331980
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Andrew Gaul <no...@github.com>.
Tested locally, squashed, and pushed to master as 17249cf7364a1a0b06dd4ef9e68632f5abdb8eb0.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#issuecomment-47486203
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-aws-pull-requests #65](https://jclouds.ci.cloudbees.com/job/jclouds-labs-aws-pull-requests/65/) FAILURE
Looks like there's a problem with this pull request
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#issuecomment-47484991
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Andrew Gaul <no...@github.com>.
> +
> +import com.google.gson.annotations.SerializedName;
> +
> +
> +public class ArchiveMetadataCollection {
> +
> + @SerializedName("ArchiveList")
> + private final Iterable<ArchiveMetadata> archives;
> + @SerializedName("VaultARN")
> + private final String vaultARN;
> + @SerializedName("InventoryDate")
> + private final Date inventoryDate;
> +
> + @ConstructorProperties({ "ArchiveList", "VaultARN", "InventoryDate" })
> + public ArchiveMetadataCollection(Iterable<ArchiveMetadata> archives, String vaultARN, Date inventoryDate) {
> + this.archives = checkNotNull(archives, "archives");
Storing as an `ImmutableList` avoids some questions about thread-safety, nullability, etc. Also consider the kittens: http://alexruiz.developerblogs.com/?p=2519
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31/files#r14331838
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-aws #1055](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-aws/1055/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#issuecomment-47419213
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Andrew Gaul <no...@github.com>.
Closed #31.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#event-136328368
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-aws-pull-requests #62](https://jclouds.ci.cloudbees.com/job/jclouds-labs-aws-pull-requests/62/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#issuecomment-47419215
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-aws #1061](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-aws/1061/) FAILURE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#issuecomment-47484946
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-aws #1063](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-aws/1063/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31#issuecomment-47485986
Re: [jclouds-labs-aws] JCLOUDS-457: Added the retrieve output
operations (#31)
Posted by Andrew Gaul <no...@github.com>.
> +
> +import com.google.gson.annotations.SerializedName;
> +
> +
> +public class ArchiveMetadataCollection {
> +
> + @SerializedName("ArchiveList")
> + private final Iterable<ArchiveMetadata> archives;
> + @SerializedName("VaultARN")
> + private final String vaultARN;
> + @SerializedName("InventoryDate")
> + private final Date inventoryDate;
> +
> + @ConstructorProperties({ "ArchiveList", "VaultARN", "InventoryDate" })
> + public ArchiveMetadataCollection(Iterable<ArchiveMetadata> archives, String vaultARN, Date inventoryDate) {
> + this.archives = checkNotNull(archives, "archives");
Should this create a copy of `archives` via `ImmutableList.copyOf`?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/31/files#r14331369