diff --git a/.gitattributes b/.gitattributes
index 4bf4c97b7..cd914d4f4 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,11 @@
+# When text is set to "auto", the path is marked for automatic end-of-line conversion.
+# If Git decides that the content is text, its line endings are converted to LF on
+# checkin. When the file has been committed with CRLF, no conversion is done.
+# https://git-scm.com/docs/gitattributes
+* text=auto
+
+# associate .txt files as text files.
*.txt text
+# Override default behavior: BAT files always have CRLF line endings.
+*.bat text eol=crlf
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 000000000..b1650df74
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,40 @@
+name: DS3 Java SDK Tests
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened]
+
+jobs:
+ check-deps:
+ name: Compile main and test classes with fresh dependencies
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+ check-latest: true
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v3
+ - run: ./gradlew clean classes testClasses integrationTestClasses shadowJar --refresh-dependencies
+ test:
+ name: Test with multiple Temurin JDK versions
+ strategy:
+ matrix:
+ test-jdk-version: [ 8, 11, 17 ]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ name: Setup Temurin JDK ${{ matrix.test-jdk-version }}
+ with:
+ distribution: 'temurin'
+ java-version: ${{ matrix.test-jdk-version }}
+ check-latest: true
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v3
+ - name: Compile and assemble main project with Temurin JDK ${{ matrix.test-jdk-version }}
+ run: ./gradlew clean assemble
+ - name: Test with Temurin JDK ${{ matrix.test-jdk-version }}
+ run: ./gradlew -S test${{ matrix.test-jdk-version }}
diff --git a/.gitignore b/.gitignore
index 204cfe08d..629bdb4d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.gradle/
+.gradletasknamecache
.idea/
out/
coverage-report/
@@ -17,3 +18,4 @@ atlassian-ide-plugin.xml
bin/
*.log
*.rc
+.DS_Store
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 5b850af23..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-language: java
-jdk:
- - oraclejdk8
- - oraclejdk7
- - openjdk7
-script: ./gradlew -S clean jar ds3-sdk:test ds3-utils:test ds3-metadata:test
diff --git a/README.md b/README.md
index 0bdba6178..673a0fea7 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,10 @@
ds3_java_sdk
============
-[](https://travis-ci.org/SpectraLogic/ds3_java_sdk)
-
-
-
-[ ](https://bintray.com/spectralogic/ds3/ds3_java_sdk/_latestVersion)
-[](https://github.com/SpectraLogic/ds3_java_sdk/blob/master/LICENSE.md) [](https://www.openhub.net/p/ds3_java_sdk?ref=sample)
+[](https://github.com/SpectraLogic/ds3_java_sdk/releases/latest)
+[](https://search.maven.org/artifact/com.spectralogic.ds3/ds3-bom)
+[](https://github.com/SpectraLogic/ds3_java_sdk/blob/master/LICENSE.md)
+[](https://www.openhub.net/p/ds3_java_sdk?ref=sample)
## Contact Us
@@ -21,60 +18,53 @@ If using Intellij, simply import the project as a Gradle project.
## Install
-To install the latest `ds3_java_sdk` either download the latest release jar file from the [Releases](../../releases) page or clone the repository with `git clone https://github.com/SpectraLogic/ds3_java_sdk.git`, cd to `ds3_java_sdk` and run `./gradlew clean ds3-sdk:install` to install the sdk into your local maven repository. It is compatible with Java 7 and above.
+To install the latest `ds3_java_sdk` either download the latest release jar file from the [Releases](../../releases) page or clone the repository with `git clone https://github.com/SpectraLogic/ds3_java_sdk.git`, cd to `ds3_java_sdk` and run `./gradlew clean ds3-sdk:install` to install the sdk into your local maven repository. It is compatible with Java 8 and is additionally tested against Java 11 and 17.
-The SDK can also be included directly into a Maven or Gradle build. There is also a fatjar version that you can optionally use with the `all` classifier, take a look at the commented out code in the examples below. To include the SDK into maven add the following to the `pom.xml` file:
+Starting with the 5.6.0 release, the SDK is available on [Maven Central](https://central.sonatype.com/namespace/com.spectralogic.ds3) and can be included directly into a Maven or Gradle build. There is also a fatjar version that you can optionally use with the `all` classifier, take a look at the commented out code in the examples below. To include the SDK into maven add the following to the `pom.xml` file:
```xml
-
- ...
-
-
- Spectra-Github
- http://dl.bintray.com/spectralogic/ds3
-
-
...
...
- com.spectralogic.ds3
- ds3-sdk
- 3.4.0
+ com.spectralogic.ds3
+ ds3-sdk
+ Tag
-
+
...
+```
+To include the sdk into Gradle include the following in the `build.gradle.kts` file:
+
+```kotlin
+dependencies {
+ implementation(platform("com.spectralogic.ds3:ds3-bom:Tag"))
+ implementation("com.spectralogic.ds3:ds3-sdk")
+ //implementation("com.spectralogic.ds3:ds3-sdk::all")
+}
```
-To include the sdk into Gradle include the following in the `build.gradle` file:
+or in the `build.gradle` file:
```groovy
-repositories {
- ...
- maven {
- url 'http://dl.bintray.com/spectralogic/ds3'
- }
- ...
-}
-
dependencies {
- ...
- compile 'com.spectralogic.ds3:ds3-sdk:3.4.0'
- // compile 'com.spectralogic.ds3:ds3-sdk:3.4.0:all'
- ...
+ implementation platform('com.spectralogic.ds3:ds3-bom:Tag')
+ implementation 'com.spectralogic.ds3:ds3-sdk'
+ //implementation 'com.spectralogic.ds3:ds3-sdk::all'
}
-
```
-## Javadoc
-The latest javadoc is located at [http://spectralogic.github.io/ds3_java_sdk/javadoc/](http://spectralogic.github.io/ds3_java_sdk/javadoc/)
+### Previous versions
+
+Versions prior to 5.6.0 are available on [jitpack.io](https://jitpack.io/#SpectraLogic/ds3_java_sdk) under different maven coordinates. Unfortunately, the 5.6.0 version on jitpack.io is a pre-release version and is missing important fixes, and it is recommended that the artifacts on Maven Central are used going forward. To access versions earlier than 5.6.0, please see the instructions at https://jitpack.io/#SpectraLogic/ds3_java_sdk.
## Contributing
+
If you would like to contribute to the source code, sign the [Contributors Agreement](https://developer.spectralogic.com/contributors-agreement/) and make sure that your source conforms to our [Java Style Guide](https://github.com/SpectraLogic/spectralogic.github.com/wiki/Java-Style-Guide). For an overview of how we use Github, please review our [Github Workflow](https://github.com/SpectraLogic/spectralogic.github.com/wiki/Github-Workflow).
## Examples
@@ -94,3 +84,21 @@ bridges, please see [SLF4j.org](http://www.slf4j.org/manual.html).
In addition to unit tests in the main `ds3-sdk` module, there are additional integration tests in the `ds3-integration` module. Please see the integration [README](ds3-sdk-integration/README.md) for details on running the tests. To just run the SDK's unit tests use:
./gradlew clean ds3-sdk:test
+
+## Creating a New Release
+
+Update the version of the SDK before creating a new release. The format is `..`, where the
+`.` numbers must match the version of BP. The `` is an incrementing number that increments with
+each SDK release for a given major/minor release.
+
+The version is specified in `libs.versions.toml`:
+
+```
+[versions]
+#
+# project version
+#
+ds3SdkVersion = "5.6.1"
+```
+
+Once released, increment the minor version and add the suffix "-SNAPSHOT" to prepare for the next development cycle.
diff --git a/SETUP.md b/SETUP.md
index 82c281663..412b0690f 100644
--- a/SETUP.md
+++ b/SETUP.md
@@ -13,7 +13,7 @@ If using Eclipse:
* In the results that are returned install `Gradle Integration for Eclipse (4.4) 3.7.1.RELEASE` or current version. Clicking `Install` will take you to the 'Confirm Selected Features' dialog. (De-select the two optional Spring checkboxes on older versions). `Gradle IDE` and `org.gradle.toolingapi.feature` should both be selected. Accept any dialogs that popup.
* After Gradle has been installed into eclipse and git has been installed, you should be able to clone the repo and import that project into eclipse
-If using Intelllij:
+If using Intellij:
* Open Intellij and select `Import Project`
-* Find the `build.gradle` file contained at the root of the project and select it
+* Find the `settings.gradle.kts` file contained at the root of the project and select it
* Accept the defaults
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index 36ddc0040..000000000
--- a/build.gradle
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * ****************************************************************************
- * Copyright 2014-2016 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-allprojects {
- group = 'com.spectralogic.ds3'
- version = '3.4.0'
-}
-
-subprojects {
- apply plugin: 'maven'
- apply plugin: 'java'
- apply plugin: 'findbugs'
-
- sourceCompatibility = JavaVersion.VERSION_1_7
- repositories {
- mavenCentral()
- mavenLocal()
- }
-
- dependencies {
- compile 'org.slf4j:slf4j-api:1.7.22'
- testCompile ('org.mockito:mockito-core:1.10.19') {
- exclude group: 'org.hamcrest'
- }
-
- testCompile 'junit:junit:4.12'
- testCompile 'org.slf4j:slf4j-simple:1.7.22'
- }
-}
-
-task wrapper(type: Wrapper) {
- gradleVersion = '3.3'
-}
-
-project(':ds3-sdk') {
- dependencies {
- compile project(':ds3-utils')
- }
-}
-
-project(':ds3-metadata') {
- dependencies {
- compile project(':ds3-utils')
- }
-}
-
-project(':ds3-sdk-integration') {
- dependencies {
- compile project(':ds3-sdk')
- compile project(':ds3-metadata')
- }
-}
-
-project(':ds3-sdk-samples') {
- dependencies {
- compile project(':ds3-sdk')
- }
-}
-
-project(':ds3-utils') {
- dependencies {
- compile project(':ds3-interfaces')
- }
-}
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 000000000..49c2d2e8c
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,19 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+tasks.wrapper {
+ // to upgrade the gradle wrapper, bump the version below and run ./gradlew wrapper twice
+ gradleVersion = "8.3"
+}
\ No newline at end of file
diff --git a/ds3-sdk-samples/build.gradle b/buildSrc/build.gradle.kts
similarity index 75%
rename from ds3-sdk-samples/build.gradle
rename to buildSrc/build.gradle.kts
index e0b2a6709..9688570a2 100644
--- a/ds3-sdk-samples/build.gradle
+++ b/buildSrc/build.gradle.kts
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -13,10 +13,12 @@
* ****************************************************************************
*/
-apply plugin: 'application'
-
-mainClassName = 'com.spectralogic.ds3client.samples.PartialObjectGetExample'
+plugins {
+ `kotlin-dsl`
+}
dependencies {
- compile 'org.slf4j:slf4j-simple:1.7.22'
+ implementation(libs.kotlinJvmPlugin)
+ implementation(libs.owaspDepCheckPlugin)
+ implementation(libs.gradleVersionsPlugin)
}
diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts
new file mode 100644
index 000000000..7640721ad
--- /dev/null
+++ b/buildSrc/settings.gradle.kts
@@ -0,0 +1,19 @@
+/*
+ * ****************************************************************************
+ * Copyright 2023 Spectra Logic Corporation. All Rights Reserved.
+ * ***************************************************************************
+ */
+
+rootProject.name = "buildSrc"
+
+dependencyResolutionManagement {
+ repositories {
+ mavenCentral()
+ gradlePluginPortal()
+ versionCatalogs {
+ create("libs") {
+ from(files("../libs.versions.toml"))
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/ds3-java-sdk-internal-convention.gradle.kts b/buildSrc/src/main/kotlin/ds3-java-sdk-internal-convention.gradle.kts
new file mode 100644
index 000000000..33df6655c
--- /dev/null
+++ b/buildSrc/src/main/kotlin/ds3-java-sdk-internal-convention.gradle.kts
@@ -0,0 +1,58 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+plugins {
+ `java`
+ `jacoco`
+ id("com.github.ben-manes.versions")
+}
+
+java {
+ toolchain {
+ languageVersion.set(JavaLanguageVersion.of(8))
+ }
+}
+
+tasks.test {
+ useJUnitPlatform()
+}
+
+tasks.jacocoTestReport {
+ dependsOn(tasks.test) // report depends on running tests first
+ reports {
+ html.required.set(true)
+ }
+}
+
+tasks.test {
+ finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
+}
+
+// convenience task name for github tests
+tasks.register("test8") {
+ dependsOn(tasks.test)
+}
+
+tasks.register("test11") {
+ javaLauncher.set(javaToolchains.launcherFor {
+ languageVersion.set(JavaLanguageVersion.of(11))
+ })
+}
+
+tasks.register("test17") {
+ javaLauncher.set(javaToolchains.launcherFor {
+ languageVersion.set(JavaLanguageVersion.of(17))
+ })
+}
\ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/ds3-java-sdk-library-convention.gradle.kts b/buildSrc/src/main/kotlin/ds3-java-sdk-library-convention.gradle.kts
new file mode 100644
index 000000000..4ab27883d
--- /dev/null
+++ b/buildSrc/src/main/kotlin/ds3-java-sdk-library-convention.gradle.kts
@@ -0,0 +1,61 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+plugins {
+ id("ds3-java-sdk-version")
+ id("ds3-java-sdk-internal-convention")
+ id("org.jetbrains.kotlin.jvm")
+ `java-library`
+ `maven-publish`
+ id("ds3-java-sdk-publishing-common-convention")
+ signing
+ id("org.owasp.dependencycheck")
+}
+
+kotlin {
+ jvmToolchain {
+ (this as JavaToolchainSpec).apply {
+ languageVersion.set(JavaLanguageVersion.of("8"))
+ }
+ }
+}
+
+java {
+ withJavadocJar()
+ withSourcesJar()
+}
+
+publishing {
+ publications {
+ create("Project") {
+ from(components["java"])
+ }
+ }
+}
+
+signing {
+ setRequired({
+ (extra["isReleaseVersion"] as Boolean) && gradle.taskGraph.hasTask("publishProjectPublicationToOSSRHRepository")
+ })
+ useGpgCmd()
+ sign(publishing.publications["Project"])
+}
+
+dependencyCheck {
+ // fail the build if any vulnerable dependencies are identified (CVSS score > 0)
+ failBuildOnCVSS = 0f;
+ suppressionFile = "project_files/owasp/dependency-check-suppression.xml"
+ nvd.apiKey = System.getenv("NVD_API_KEY")
+}
diff --git a/buildSrc/src/main/kotlin/ds3-java-sdk-publishing-common-convention.gradle.kts b/buildSrc/src/main/kotlin/ds3-java-sdk-publishing-common-convention.gradle.kts
new file mode 100644
index 000000000..161889575
--- /dev/null
+++ b/buildSrc/src/main/kotlin/ds3-java-sdk-publishing-common-convention.gradle.kts
@@ -0,0 +1,125 @@
+import org.gradle.api.publish.maven.MavenPublication
+
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+plugins {
+ `maven-publish`
+ signing
+}
+
+var mavenCentralPrepDir = rootProject.layout.buildDirectory.dir("deployment/central/")
+
+publishing {
+ repositories {
+ maven {
+ name = "internal"
+ val releasesRepoUrl = "https://artifacts.eng.sldomain.com/repository/spectra-releases/"
+ val snapshotsRepoUrl = "https://artifacts.eng.sldomain.com/repository/spectra-snapshots/"
+ url = uri(if (extra["isReleaseVersion"] as Boolean) releasesRepoUrl else snapshotsRepoUrl)
+ credentials {
+ username = extra.has("artifactsUsername").let {
+ if (it) extra.get("artifactsUsername") as String else null
+ }
+ password = extra.has("artifactsPassword").let {
+ if (it) extra.get("artifactsPassword") as String else null
+ }
+ }
+ }
+ maven {
+ name = "OSSRH"
+ url = uri(mavenCentralPrepDir)
+ }
+ }
+}
+
+tasks.register("publishToInternalRepository") {
+ group = "publishing"
+ description = "Publishes all Maven publications to the internal Maven repository."
+ dependsOn(tasks.withType().matching {
+ it.repository == publishing.repositories["internal"]
+ })
+}
+
+var prepareMavenCentralPayload = tasks.register("prepareMavenCentralPayload") {
+ group = "publishing"
+ description = "Generate files for payload to submit to maven central."
+ dependsOn(tasks.withType().matching {
+ it.repository == publishing.repositories["OSSRH"]
+ })
+ doLast {
+ // remove maven metadata, as it is only used in the local repository and
+ // not published to maven central
+ delete(fileTree(mavenCentralPrepDir) {
+ include("**/maven-metadata.xml*")
+ })
+ }
+}
+
+tasks.register("generateMavenCentralPayload") {
+ // see https://central.sonatype.org/publish/publish-portal-upload/
+ group = "publishing"
+ description = "Create .tar.gz payload for submission to maven central."
+ archiveBaseName.set("ds3-java-sdk-maven-central")
+ archiveVersion.set("${version}")
+ archiveExtension.set("tar.gz")
+ compression = Compression.GZIP
+ from(mavenCentralPrepDir) {
+ include("**/*")
+ }
+ destinationDirectory.set(mavenCentralPrepDir.get().asFile.parentFile)
+ dependsOn(prepareMavenCentralPayload)
+}
+
+tasks.clean {
+ delete(mavenCentralPrepDir.get().asFile.parentFile)
+}
+
+val augmentPom = tasks.register("augmentPom") {
+ publishing.publications.filterIsInstance().forEach { pub ->
+ pub.pom {
+ name.set("${project.group}:${project.name}")
+ url.set("https://github.com/SpectraLogic/ds3_java_sdk")
+ description.set("${project.description}")
+ licenses {
+ license {
+ name.set("The Apache License, Version 2.0")
+ url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
+ }
+ }
+ developers {
+ developer {
+ name.set("Spectra Logic Developers")
+ email.set("developer@spectralogic.com")
+ organization.set("Spectra Logic")
+ organizationUrl.set("https://spectralogic.com/")
+ }
+ }
+ scm {
+ connection.set("scm:git:https://github.com/SpectraLogic/ds3_java_sdk.git")
+ developerConnection.set("scm:git:https://github.com/SpectraLogic/ds3_java_sdk.git")
+ url.set("https://github.com/SpectraLogic/ds3_java_sdk")
+ }
+ }
+ }
+}
+
+tasks.withType().configureEach {
+ dependsOn(augmentPom)
+}
+
+tasks.withType().configureEach {
+ onlyIf("isReleaseVersion is set") { project.extra["isReleaseVersion"] as Boolean }
+}
diff --git a/buildSrc/src/main/kotlin/ds3-java-sdk-version.gradle.kts b/buildSrc/src/main/kotlin/ds3-java-sdk-version.gradle.kts
new file mode 100644
index 000000000..fc6f9a0c9
--- /dev/null
+++ b/buildSrc/src/main/kotlin/ds3-java-sdk-version.gradle.kts
@@ -0,0 +1,22 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+val catalogs = extensions
+ .getByType()
+
+group = "com.spectralogic.ds3"
+version = catalogs.named("libs").findVersion("ds3SdkVersion").get().requiredVersion
+
+extra["isReleaseVersion"] = !version.toString().endsWith("SNAPSHOT")
\ No newline at end of file
diff --git a/contract/3_4_1_contract.xml b/contract/3_4_1_contract.xml
deleted file mode 100644
index 10fd02c10..000000000
--- a/contract/3_4_1_contract.xml
+++ /dev/null
@@ -1,17060 +0,0 @@
-
-
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.AzureTargetFailureNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.Ds3TargetFailureNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.GenericDaoNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.JobCompletedNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.JobCreatedNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.JobCreationFailedNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.PoolFailureNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.S3ObjectsCachedNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.S3ObjectsLostNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.S3ObjectsPersistedNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.S3TargetFailureNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.StorageDomainFailureNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.SystemFailureNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.TapeFailureNotificationPayload
-
-
- com.spectralogic.s3.common.platform.notification.domain.payload.TapePartitionFailureNotificationPayload
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.9D854BF00D3B516D4045D9DBEB4B174A
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 404
-
-
-
-
-
- 1.A4F544C672FC8C11593427E560385533
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 403
-
-
-
-
-
- 409
-
-
-
-
-
- 1.B17329949B488995473FD573BF5A0507
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 404
-
-
-
-
-
- 1.013CF864155A896718908128F7C31E1E
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 410
-
-
-
-
-
- 411
-
-
-
-
-
- 503
-
-
-
-
-
- 1.5B99BA64EAFD43AEC9359E716A93B234
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 409
-
-
-
-
-
- 1.416E43D944A06C824AD8BF5005FA1DC3
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 404
-
-
-
-
-
- 1.46B3A42F88F14FF8E433CEF3CED4C70E
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.773E50A74C3DC9EB87D6CD924CA1B34A
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.3A8DB55ED9BC0A138E7E63E96E6EF55F
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.8D18E6B210A254D12ACD074CF265700F
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 206
-
-
-
-
-
- 307
-
-
-
-
-
- 400
-
-
-
-
-
- 503
-
-
-
-
-
- 1.F50E6F8DEFB864FE89D9385A71A6C25A
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 1.5AB983AB4BABA77BCD64173290A741B4
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 404
-
-
-
-
-
- 1.CF182CD57551902A475553F26582BC78
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 404
-
-
-
-
-
- 1.871E6F61ED03FE40EECFD0AAD53AAA34
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.12220CAF96D6A1B3E1BC31330E95EA51
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.51D7750881DA0A4621487FFE61533D85
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 403
-
-
-
-
-
- 1.E368236F01A4B820CB381ABB9DC6A481
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 403
-
-
-
-
-
- 1.8926D009A5E919B034A8C12CC7BC6AA4
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.AB6BB38915AC1B434AA79A746AEC1CA9
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.090A514BE0B269138CD466668F79C773
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.1AF4C0F11AB88FCD30536164F07B3944
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.878704403C5B1CFAD98804ABD56AB840
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.09B5FAE5CF69BF5E945E124D60852125
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.D65ECD1D08D1272AD5E969F80235DFAC
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 403
-
-
-
-
-
- 1.0500995E51CDDBCFFC70327F12F2428F
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.C6B44D720B8BC5FEC46CEDA4EA04CA5F
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.CE89262FB9070D85EAB1C361CB74D99D
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.D561CC0BB1BDF0FCD73E2AC1509393F7
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.14A107B85D096EB8554EDB0A4A8589B9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.8A4F25C489C1E3C970CAD13B9AD4754E
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 400
-
-
-
-
-
- 403
-
-
-
-
-
- 409
-
-
-
-
-
- 1.4751D97F3546F963C451CE9F9AE16C76
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 409
-
-
-
-
-
- 1.7E0B95E1E222BB82689E2AA8CD3FE344
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.4FAD1C67C3247080EFA33C224B87544D
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.8C885A22F5F8EA044A104A020AE563D5
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 1.0EB0673D4EFC79596617FFE680876C1F
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.E697E63D8C13C0C06626E57BB95305CD
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.90CDE2CBD14856E5FDA2474704819E6B
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.581382F387E3FC77A09A11F14FEB312D
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.4E2A47F1477F1A5E5D4BA9166FD13700
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 404
-
-
-
-
-
- 409
-
-
-
-
-
- 1.8D11714D318A13D76782B5A71471D887
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.00FF753915ABC8F954677D57253B3230
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.002A078CDCBEB6844EA00B0BBAC7CAC8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.B27EA3CC583291FFD676193DBAA4551C
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.8E0A2BF92DD79E7C634778C97619CDEF
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.1789113D83DC2E48D1B5D1C221DC1872
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.C554C793C965F9B60414FF9092DD6907
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.15D63B0FD0C4257041795BA2235277C5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 409
-
-
-
-
-
- 1.A1CF121219F77829C8480AC814898D87
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 400
-
-
-
-
-
- 1.74C5BC1D5C856DAC66A4AC9893FC4BB9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.B6E603A64C60859EEA83B2E687FB55AB
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.CC4C9ED25B1509ABD0F30B375ABA4D78
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.377DC47D5802F8BBB59CC5D011268847
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.E3B3238A4639A19B8507203907EA2D52
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.5C597451975C08FCCE2F0647EDD16872
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.D032BD8264B23E052A900CD171273D84
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.779978550E2AC7519DBEE1B6418D7FA1
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.BD89C8ADCBAC5C96569ABC8DE7D841D9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.760344CC17CCA3AAC0D1AEAAB22664BE
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.7FE0018AE76D9D24DADF93BC83A73EF2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.9A7A0BABDD6E7CC2D134B62D158E6C57
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.8C6D05D23CDCAFBC0344FE0C91513C32
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.40C486BA0D58B76E2C253E81EB297D0E
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.18B2E9524D43E524BBB9C54ECA35E5F3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.87B1B5789ECD05E15FC0C8BFED48E73E
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.B23CBBE34EDFFE1E8FBF444E4E0EA0ED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.F85D09C772C76D466ECDE210ABD0F6E2
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.D90C5C1EF5D3968AE776DED4DD4B41CA
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 409
-
-
-
-
-
- 1.4C6316BC92D7D1285A6565E212E6999E
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 500
-
-
-
-
-
- 1.BA76BEF97888F20DAAB5ABAF89492E6F
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.B024C098E863E2B1C9275B0EBFBA3BF6
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.E7A5FD996704C81CD95CC171BA42549E
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.F51C99474F629A2CFD5CDB6BC5CB7C6D
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.FB9358D923F09B224C1272BD9B459121
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.B030FA7F19336B7B8C64BAF6E6F6346B
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.FCF1BFADC9D4DE1CF114901B69B22280
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.3970B4F7B6EEDF3D16C14B1FE8D74EA5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.FCDDCC0EE93BE92A31D4BD84C9DD57C7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.39020D24E8F55C01FF5ECC4524C78189
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.823E96C86A899E615759E3AADB7355E0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.C8788BC1989E0E16F93945C2F157893B
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.0D4C916F64F122E94EEB6674D7B9F4D1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.620EF529E4CD2E0912AE9F42E2B802C0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.2F15899DE5E70055E0490AD29530C842
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.DE22EC0929BAB9F743BFC38EAB10D680
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.905EEF6FC284DC0AC05F8F1B347829C0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.BEECB5756E585359144D71D4410D4846
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.B8E477B5613F3E518F79082D5552E7AC
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.1480092553E000D0103C80E1BC65B2C5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.B32DA5E8C42BDE53830D288C86582A9B
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.8FB599E4270D6BDE67B81DDEAACACAC8
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 1.1B32364BA03FED4EBBD9BEF15A49EFB1
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 1.F1B9C4424263D106712B36B7809F8EFC
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 1.782935F97E84EF7CAABC357C5CEE2271
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 1.F4A8A78DF6670ECDAB83A83A18D1547D
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 1.2C0E9739F7F0BF5B9C16B620D3C195EB
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 403
-
-
-
-
-
- 409
-
-
-
-
-
- 1.8611905E16872C3EEFC979239C47CFFE
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.D6C48865C0991834DDDE193AB40E04EA
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 403
-
-
-
-
-
- 1.5A1DF310850382BEEFC771A9C1DECC3D
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 403
-
-
-
-
-
- 1.33DEA650BE9ABCDCDF53E462D402DAFE
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 403
-
-
-
-
-
- 1.E434ED8B2A34F104A95442717B1A4BA7
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.25BA53F39517497CBFEC02F6F1A1281D
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.02D9D53D22A0F5B6893643EE40ADB324
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.ABED6B8929079AC01A596C9E4C08CBF8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.CA6D598467AAD4083472C11E72F28A8A
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 403
-
-
-
-
-
- 1.03E8ABF4920FE0C59B424EEDB8001FAB
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 204
-
-
-
-
-
- 403
-
-
-
-
-
- 1.3289F9FD0E9ACCD50787DB1A0055712D
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 404
-
-
-
-
-
- 1.4DB23DDC56235578526ECD74A1E1D151
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.278BB8E0110D66EDACF595107C09427A
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.5787086FAAD0AEFD6965BE9007AEF32F
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.F66A4CBE1684496D395E5546FEB8C8B8
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.EDC1DDE6748591464113649924079D39
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.5A6D3D3A60E77AC626275AF623C4C766
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.C079F9483A04E55B04DBB93A82435427
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 500
-
-
-
-
-
- 12.7853EE12A10929010211D370E4E9FCB8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 403
-
-
-
-
-
- 13.33017D3F34393D367E5E63FB7F1DEB3E
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 1.1AA08A21610BD902ED2A0BFDBB145B9C
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 1.5F29580D0FA9D13D4F31F6FA1479253C
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.BE9B123D699A33A084C657EDA216FD46
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 1.366B50C862A74986AFC2A1FD9AFA0DC8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.2CB8F6FD0FD4AAB2DBFDA3B66906F811
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 1.82806C1E451AD1325DD45123292E6360
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.AF1AD1BB3EE186EBC9E967F37EF47B63
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.81935DED0B11C2F6579420B1D503F846
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.96AA26481EDB1492BF1A4696FB4A5E90
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 409
-
-
-
-
-
- 410
-
-
-
-
-
- 12.E85F3447509D8658DC4747BDBC1124AE
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 12.D2E1E5F53C787AAE87CD6C64E57DF392
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.5441D6DB77E32465283AFFCD70BF0BD9
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.A91ACBDE9427D4617DBA938B01FD4A65
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.46852EDC36DDDB68792432241EBAB228
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 403
-
-
-
-
-
- 1.8DD6A5CAEBA22CCE74B380322FB5EDD6
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 204
-
-
-
-
-
- 1.6F544A6CED02468AF923384632138561
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.A1093E63522E0D37459A3DD2ED4BA382
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.381372DCEE1323BA3EC6135F28BD40E7
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 411
-
-
-
-
-
- 1.B66BD19B24CA38C77915186CAC7278FB
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 403
-
-
-
-
-
- 1.61F4F2C6BB6C6B6682D36487830BB9DC
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 402
-
-
-
-
-
- 1.5A3E7F31249938D514C56E364FC6D02F
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.6DAEDCFBF2E71F76371CDB2DE03FB216
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.4EB20E46D4C9A9D1A9C832A10416B269
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.D6574E9F317A632E897CC1497A014EE7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.2963DE5A15B7A94AE018A555B04855E3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.BA2D594EAC2171E3CD66A1E4B261C157
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 403
-
-
-
-
-
- 1.F6F99FB1D96FAAB52761A4A6F9C007F4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.4493BC861FFB54D0474875CDA923917F
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.BCDE69D118A54DB3850A7A1DCB9044A5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.B9B14FD95B7365854A4873C9E03CF714
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.CB59926ABCCE409B8DA620D7098051EF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.8A412C738BCEA2E768EEE5AFA91A02E3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.F58DEB2156F89FEFF73AA296FB996076
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.6D9C05CCD6FC973CEC7EC06B2852C004
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.D2F89CEFD1D076C722E383CD47F54B0E
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.C3E90840E58C0ED58DE5285F1C629007
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.697EEA5D819D1CCED8356F3707A80CC0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.F8EE6F2C578B71C30A5818323B8C63DD
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.CEC966DCE333C324697D8D2C014D5844
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.F75FB6B03E5778971F18B3E156F1C368
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.FB37D5236F8B9FAA3C23E1E1ED75EF7B
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.BF2D067D7C365D5CD381837F5376FBCC
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.1DCB7A5A19D0073AB4C529DE68EFF590
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 404
-
-
-
-
-
- 1.AE62860962CCA944FDE6BA7A1FA29BE8
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.74228C20E21299810A61BDC1D72981CB
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.5A5F6DB8F16E8BA2850BBC9786BF933A
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.9B0188827522EB7EEF626D5957F16EF7
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.057E27FF0C7515839363635ABD87011B
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.815B2098111720A02816432FD0B11263
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.F17A1AE113B6FD07741496A307004005
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.3FD065CF09A9346481021BC207729FC8
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 403
-
-
-
-
-
- 1.67E8651E0A9719E5AA68ED2783076E40
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.E7E2388B6F0182AA8B191836FDC2EF46
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.0B3D7131A8DE08F23DD8F92E4FB445CE
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.E016A3B10B9E2BCFBDC052B607BEF218
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.405BE0983E37E87E48E0D549DFFD22CD
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.D55B0B0605B4BF3AE32149CAD90110CE
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.89699929828B8EC5AE4F1F41003A1293
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.02BC732C912E22F368101E336487D192
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.58AA7409654D5D50B6B8F55539C0774B
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.6B1CA505E2302A04F63AA27099F0FCFF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.96BE833135E4A5C8F7DE52803D85CCA1
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.3FB901D98106C97ED02FBD2FCB72A368
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.06D8300D0336BED673A20EF70C44CCCF
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.C9293362A29ABB99EA2382C6B71D0649
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.351B871DFA1717273590632B38A4EBC7
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 404
-
-
-
-
-
- 1.6DFABCE265B2455CBE17C12CF01CDDD2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.C4D2CFB128128AFB2C46656E3EE693BB
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.9222B04244CF97705F3488EE7906FC41
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.AA0AD23B2F046B29AA8947581FDFB860
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.D74722063AC27B6ECB815A78C0E790C5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.E5ACD5AF9B1F02DDDF00504737297CFD
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 404
-
-
-
-
-
- 1.8E55D6D6105C140A17D3438C4F4D8D54
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.86F306440C4799F14DD5F4C0719E507C
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 404
-
-
-
-
-
- 1.301D82C48DB6624F74A9A6BD309A9E40
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.098207A6680442B3FA9643BB23CB370E
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.0EC16E3818F17C785ABB022A34A7A083
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.F1ED654859180EBA33AD4697444A2636
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.84A39C5D428089EF64F5DB0558FA2C45
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.4C47E15164EB0479D97A05D6AF22162F
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 404
-
-
-
-
-
- 1.BEEFBBCACF4A979C567F1D144C04067C
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 1.51440FCFF3ADF3834C5500FF554FFBE2
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.70D55191E13B0C77A5FF57DA126E0849
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 403
-
-
-
-
-
- 1.F5177563B1D7F1A4A055D706B82C6734
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.B8DE45F9011916BD826DFA339DD3646B
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 1.8677D16DE53C2800647C7DB609C6EE44
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 1.67D1B7BB3E64E9C05C62F59054DF73DE
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 404
-
-
-
-
-
- 1.867574E65E9156E31D51517D17DDE283
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 404
-
-
-
-
-
- 1.833E8B67365C5B36D6B3E2C048660EEB
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.E7BF64005D511F7DF092A1FD63CAFDB2
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.6DA60D3A441DEB83245CF9390DB652C2
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.FCB7A1CCECDBFE60B9F9268A4DA13E64
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.5EDB52181C6563D67BB04B9F6F9FFCB3
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.602C9239FB1B18A48D8E6AB920F9865E
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.613F01620D33F44F7F08DAD27477860D
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.B3F196534F6B3239F608E60F46CC5054
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.9395090644FD6A9EEDE620F2EDB2659C
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.51360490B8BC0FEA841584D3A7941DA9
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.21D484F75EB67BB6E52299CFE9026E8C
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.B470C7165F3CC8ED799ED4F8B5BAEA45
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.C56316687F31CD493F7064FD951EC99C
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.79EEE017A84D0C323D68CA23A8CB1076
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.A4AFD3D5DA908492647C739E941CC97C
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.EF17F568146C914F8023380045758F9C
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.3D539F4D333D3240C489C26EC0A011EF
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.B0E4F8E2EF4C7507621D37BF97395F31
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.A426A6A86571D4DB76768FBF9E3540DF
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.BB0DDF53B3466065E0CC36A0EDFF2834
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.965E74D83E54746B6877B79D92E8768A
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.C21A692F9E87799AB2806A96B545C0C6
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.6B887FD15AF647C5F0ED993C439A0EE0
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 409
-
-
-
-
-
- 1.28359B909678D42A4868FB82F28934BB
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.486CB0412BAD44C82290FBD64DEC1F6D
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 404
-
-
-
-
-
- 1.C2B1E38A255F67B820C6DB2C5A021FC5
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.AA7061BA6F294ACDB2FA2282E0742BCC
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.A5E2220D36BE184AE56CCD3CFC42D0AE
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.F6BC5F562CC7CDDF11632321B21D97DF
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.97CAA19C72182CEF847821F9E6FB3AAA
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.3B8F9F9CA8F1879985BF29BF5CBD21E6
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.019396D4D4686224FF7C3CB6D1E0C0FF
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.56E9BDA78930F90CD41C280B94F3EC92
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.A7B51CF0108CAE7FF2ED2ECFEEF990D9
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.02F4797EB106FFD0157EC4EAB8FBB3BC
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.6D17F999F7BD299E10604D67FB269746
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.FC523C8224CB7FBABCF213D5D951CB18
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.0647B93684A5AF9B4EF9AAFC7148E0C7
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.04BA526681D926E6F55834C3FF14C800
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.C7CE8CF71088F3DB585CD3B02AD6C01E
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.C784129AA41D66504348A3879B18409C
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 409
-
-
-
-
-
- 1.B3C891ADBE07985D8EB07F47AD5B9DA9
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.574C8D1B7983E679131E37FD5C3DF1B3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.75E4BA966FFC501D192F53E91B7DA97C
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.CB9A35E0D20D8F23F42BE689119E06FA
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.D7B16FCF4CB54A4DDD0B7B96965B0C89
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.6C78CB68979C1B30B65792A51C4909B4
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 503
-
-
-
-
-
- 1.1425C7EF3EB1C555EEDB3A7B83959C18
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.6C71667DFCE4EFE9D2D594675F5D0548
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.3FA058A0E73CD716458E4AD473D01D8E
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.7A7A1F423942BCD065A53F5E2C08CA10
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.686D026F4E37237A3FB0CFDDADBC9F8A
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.285B3B8B3249390AC0EA62095620648D
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.483EDC95D9050419855BB2C9B7D9395A
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.57134A2893313DE704198EED54D5B6E6
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.9193C0F29388C5B9B6583A6BF6C2B347
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.424FC52414BFE0A49B6746D5DB1256AB
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.13C8280BFD2D49B31E703A6C942A14BB
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.2ED8A733A34F7268A165FCB3C4DE0232
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.BCD510DF25513B8FAF0352336F094053
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.D24D24F09DCA78579C08ADE1D5528A18
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.388A14B11DC4161D76E7BA3524CED336
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 404
-
-
-
-
-
- 1.E8ECE9BA39F0B03F8394B4AB5065B60D
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.67C819CC3E37319CB3D533A2D31F00D7
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.7A9D46F2B10E01B201BD25BF3DA3E3D6
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 404
-
-
-
-
-
- 1.466E11BA31409FC6549BB27A0C1400CC
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.5458586BDBC05CE6DC7B96FB305E279E
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 400
-
-
-
-
-
- 1.D07A22B79C602A5E8C570C5E049FD7AB
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.0AE60BB682E75CC3CB3CE074995267EF
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.EF0CC59153D7673ED206E0F310880A6E
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.D946E977B16DE185BC7065F3C36BBA94
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.6758EF1C334FA94EC51F836A229DFFCA
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.D96F1DC7CD390C447BBA6A55F52476AC
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.74729E8767FC62D9F49C309DA2993DE6
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.D9690323F9BD00A1D7AC14D449C5C5F5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.2BDEFEC679C5FBAF0D8D2934FE55F708
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 404
-
-
-
-
-
- 1.2ADB64C9DC3241D0FFE93910210E1FF9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.12337E3CF98F2E0E44AEB002441C4918
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.F0DCE0BD19F895084F3C461358ABB31B
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.362B98FD68A372E063F679FC32F89B31
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.CB7932D0E8A306C5A2E35C8916C0E4B4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.E62DED290400027E754EB45DBAC5062D
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.DBBD22390D6F477450A6966FDA2CA298
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.FED65C1D6BB97C21B4F9DA0B7A997D35
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.44F69227AF5D5C013E4E8870692550C7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.6B2469AA8D0FC2655F6EB394348EB437
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.A0A9BFEABE8E3C638E51660CF67D0B3C
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.4614C67BE4C4B0B22F40F86B47B40D2D
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.D86253165E5E58A4859699AF6C04C146
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 1.DB420EA069BBE1730C24DC9EDA476595
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.31CBB28C0277768C8BF04A6CF1BA98A5
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.E6B45FD1B7595DCC123636DD01E50D8A
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 409
-
-
-
-
-
- 1.AD707ECC69A1E835FADE9B7B896C7C53
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 1.304855C6B7C0744B1F4E23991BD4CF83
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 1.94A9B934CC18AB22E125F70FBB9F82DE
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.038E34A9C374FC176986FC568A165527
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.CA5A1C1C65E431A37F3207B81767774B
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.6E171A954319F5E7A916A6A47BB1BB39
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.55C29670AA54CE2E07EA9C9D31E82EAC
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 207
-
-
-
-
-
- 1.A6D31BBFAFCCC9A55B9FEBF72E1C2953
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.32E4082ED243CB134EA743FF78000BD5
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.38E575DC2AF4B7D7CF3203E6B7BDA74D
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.220648A0923367BC4FA2794FA4BE4591
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.38448C20E04942C66F6D9AB3169CEF09
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.B7BB4C29193AC92DB35E9E206A01E30D
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.4D5F15EE9801D7E3BE0892FD38AFDE0D
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.E062F9FB6D3FA8A9EEE31C6A81CC6604
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.78F8ED04EC79A126AEADE8C08B0E4F97
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.958F111DBDA1BCE46EFBC10511A145E9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.1E72B20786B3BFB6DE896C380864C4ED
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.A62A0E7E1808EED079989D04772B6CB6
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.65E7DE349575885F8EC2E78FFBBD3484
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.17A61EEDF79D76747BE37B3DA3F698DF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.F0EE6E4715A3D2CFB1F5795EA52EF0A1
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.59DE4FDFB535F952488C8C76082D1957
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.E8DD94F2A92ABC73D6632A48722BDF66
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 409
-
-
-
-
-
- 1.83B487198471CDEAF5C95D371BE1227E
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.B13DC16C4369B842DD1580DFC9A23E90
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 400
-
-
-
-
-
- 1.D9B3DB52DF8218B45D48BECB5131915E
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.CF52BFFDF3E12D43EFD5F614833B7DCE
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.FF43777C8C33E41102BCF3F2A2A90C64
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.7B3676D45CECCC1D12D71EBA722FFF30
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.71B0E6E68AA99863BE55E1D6D037301B
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.9F2F0F9EE78721BF80AD83701F9736A0
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.680A6E46ADDF391752A3A89F95D73448
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.496A9334045EC97BFFE3A5116694FF85
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.BC1C6F682219387D81896AD542BFDA1B
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.21E756DE8577C5778B49EB14777DE712
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.9066576F0656AE6BA8E13A019F6A59AB
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.444CF76C0D4A6C4E637033A4D4E9126A
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.3BFB533872841D46A011D369D3FF2977
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 409
-
-
-
-
-
- 1.3426C46B6878DDEC0DA8DA6A0D5554AA
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 1.068DA432A58C3D7331CA5C906158F229
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.B316331E65CCB79F118C8A178C4D1112
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.27B9DEC971AF1E0443505F6381B2C647
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.F528AE4144225E113F7B00825EE52AA2
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.8D68C314C554FFCC800097F48EA2B2BF
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.B29CE6CAE05044347C6F6D2CD82D2B76
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.0EDA4B68A5E0A7A119DF093167A9643B
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.25F94118327D5D07CF4BD4214EE33EC0
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.AD3D66C9BD4CFDABA55559C35CECD9E1
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.E336292FC529AF487A9AD66216D49654
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.673FA4C32058D8D329E1630ADA8E73C1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.B74A7AA44043A326AC2D7D7934967B14
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.75F9BD52CF2A252C3696A912624AF4E7
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.1568E0AA2E38BC533DF1D9A3C26D9A80
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.DA7E3AB4DC966A21CCA466E87760769B
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.AF491ABBC242A023D510DB3FEFC8D333
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.D0BF3B5963590A886B4DECEFF9D5DA2C
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.F09CDCAD633DBE0BD4D81B4ACD40F402
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 409
-
-
-
-
-
- 1.4F8C9F278402E6FB2E4EA057B834CC73
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 409
-
-
-
-
-
- 1.251760D30B95DDFD686CF5F8DD244B34
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 400
-
-
-
-
-
- 1.0FC6240C9AA47CA11A06C45AF5EED527
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.AA72044B9C3357E0774AADA4EF555CC6
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 409
-
-
-
-
-
- 500
-
-
-
-
-
- 1.6BCFED905208FF2C3021E49E1113053C
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 500
-
-
-
-
-
- 1.E7E6381C3DCFF65F04EFF2E13C486B02
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 404
-
-
-
-
-
- 1.BCF75A4FA6D197563529575007325A9D
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 410
-
-
-
-
-
- 1.4D283CDE0658BDE321C6C7B4CFB00DB5
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 400
-
-
-
-
-
- 1.6D32416F86CAE6372CEE63F13A13B4CE
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 403
-
-
-
-
-
- 1.E49AE7C4E4606611A2264F17092383DE
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.AF255C11E7836E705C16FB2E0C5C5893
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.EDD41D719CF5C94BEBC543ED4E1FA92B
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.87C46F7702591A04073B685E3DCA18E8
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.DF34657F1F638BF55CCB59D8766A7A40
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.227468E94768C87DC18B9D82AE1DD73A
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.A11EBAEA1FB195A00CA8C77DAA86896E
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.ED42C99A3F7707AE33EA46D9155ACF67
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.CB843F4F8FA5F1FD7A435EF77E9AB382
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.55C741CC9A0D6215D57FB954E57DBF9E
-
-
-
-
-
-
-
-
- 200
-
-
-
-
-
- 1.A37E5119D3567CC0420518DD48F43AC6
-
-
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 1.14B1920F8A49D1721022BDA3054DF8EB
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 1.BB98871AF82585B0C646B6954309CBC3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201
-
-
-
-
-
- 400
-
-
-
-
-
- 403
-
-
-
-
-
- 1.6D706AB11308B480CF5A83510CFA437B
-
-
-
-
-
-
-
-
- 204
-
-
-
-
-
- 404
-
-
-
-
-
- 1.EA981FC342B0BC7143D8A6B5C650CBA3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/contract/5_8_x_3150467_contract.xml b/contract/5_8_x_3150467_contract.xml
new file mode 100644
index 000000000..5a18a9238
--- /dev/null
+++ b/contract/5_8_x_3150467_contract.xml
@@ -0,0 +1,19249 @@
+
+
+
+ com.spectralogic.s3.common.platform.notification.domain.payload.AzureTargetFailureNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.BucketChangesNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.Ds3TargetFailureNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.GenericDaoNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.JobCompletedNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.JobCreatedNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.JobCreationFailedNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.PoolFailureNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.S3ObjectsCachedNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.S3ObjectsLostNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.S3ObjectsPersistedNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.S3TargetFailureNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.StorageDomainFailureNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.SystemFailureNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.TapeFailureNotificationPayload
+ com.spectralogic.s3.common.platform.notification.domain.payload.TapePartitionFailureNotificationPayload
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.9D854BF00D3B516D4045D9DBEB4B174A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.F3A87D9C7810A8FFFB44D111A3C392D2
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.A4F544C672FC8C11593427E560385533
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.B17329949B488995473FD573BF5A0507
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.013CF864155A896718908128F7C31E1E
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 409
+
+
+
+
+
+ 410
+
+
+
+
+
+ 411
+
+
+
+
+
+ 503
+
+
+
+
+
+ 1.5B99BA64EAFD43AEC9359E716A93B234
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.416E43D944A06C824AD8BF5005FA1DC3
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.2ADEBFA66BD7C8629539A7399BD3A755
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.3303E206BA09EA57A94B52B6205C4782
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.032AD615FE7006F89222B5D50F080D6A
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.8D18E6B210A254D12ACD074CF265700F
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 206
+
+
+
+
+
+ 307
+
+
+
+
+
+ 400
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.96E158735C2EC75B428EB1DFF0DC121E
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.5AB983AB4BABA77BCD64173290A741B4
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.BD093F5535B89F8338AE7E066E9BBFE2
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.871E6F61ED03FE40EECFD0AAD53AAA34
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.12220CAF96D6A1B3E1BC31330E95EA51
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.51D7750881DA0A4621487FFE61533D85
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.E368236F01A4B820CB381ABB9DC6A481
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.8926D009A5E919B034A8C12CC7BC6AA4
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.AB6BB38915AC1B434AA79A746AEC1CA9
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.090A514BE0B269138CD466668F79C773
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.1AF4C0F11AB88FCD30536164F07B3944
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.878704403C5B1CFAD98804ABD56AB840
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.09B5FAE5CF69BF5E945E124D60852125
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.D65ECD1D08D1272AD5E969F80235DFAC
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.0500995E51CDDBCFFC70327F12F2428F
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.C6B44D720B8BC5FEC46CEDA4EA04CA5F
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.CE89262FB9070D85EAB1C361CB74D99D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.D561CC0BB1BDF0FCD73E2AC1509393F7
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.14A107B85D096EB8554EDB0A4A8589B9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.8A4F25C489C1E3C970CAD13B9AD4754E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.44A480497E699D9A16A2A2ABB356106B
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.7E0B95E1E222BB82689E2AA8CD3FE344
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.4FAD1C67C3247080EFA33C224B87544D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.8C885A22F5F8EA044A104A020AE563D5
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.565CC9AD475CF6B1DAB856F2FD41FC54
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.E697E63D8C13C0C06626E57BB95305CD
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.90CDE2CBD14856E5FDA2474704819E6B
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.581382F387E3FC77A09A11F14FEB312D
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.4E2A47F1477F1A5E5D4BA9166FD13700
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 404
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.AA63804087FDC605BA9B9619926B2A13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.00FF753915ABC8F954677D57253B3230
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.002A078CDCBEB6844EA00B0BBAC7CAC8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.B27EA3CC583291FFD676193DBAA4551C
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.8E0A2BF92DD79E7C634778C97619CDEF
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.1789113D83DC2E48D1B5D1C221DC1872
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.7E43CF8DCCA94FF867D50196D9F7C1CC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.15D63B0FD0C4257041795BA2235277C5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.A1CF121219F77829C8480AC814898D87
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.7EA25AF7C646BCB2F9BDF8736B50093C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.B6E603A64C60859EEA83B2E687FB55AB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.CC4C9ED25B1509ABD0F30B375ABA4D78
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.377DC47D5802F8BBB59CC5D011268847
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.E3B3238A4639A19B8507203907EA2D52
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.5C597451975C08FCCE2F0647EDD16872
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.D032BD8264B23E052A900CD171273D84
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.779978550E2AC7519DBEE1B6418D7FA1
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.BD89C8ADCBAC5C96569ABC8DE7D841D9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.760344CC17CCA3AAC0D1AEAAB22664BE
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.7FE0018AE76D9D24DADF93BC83A73EF2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.9A7A0BABDD6E7CC2D134B62D158E6C57
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.8C6D05D23CDCAFBC0344FE0C91513C32
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.40C486BA0D58B76E2C253E81EB297D0E
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.18B2E9524D43E524BBB9C54ECA35E5F3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.87B1B5789ECD05E15FC0C8BFED48E73E
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.B23CBBE34EDFFE1E8FBF444E4E0EA0ED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.F85D09C772C76D466ECDE210ABD0F6E2
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.D90C5C1EF5D3968AE776DED4DD4B41CA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.4C6316BC92D7D1285A6565E212E6999E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 500
+
+
+
+
+
+ 1.8AB4C4419A05BBB45CC2EEEFE10CAA82
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.B024C098E863E2B1C9275B0EBFBA3BF6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.E7A5FD996704C81CD95CC171BA42549E
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.F51C99474F629A2CFD5CDB6BC5CB7C6D
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.FB9358D923F09B224C1272BD9B459121
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.B030FA7F19336B7B8C64BAF6E6F6346B
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.FCF1BFADC9D4DE1CF114901B69B22280
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.3970B4F7B6EEDF3D16C14B1FE8D74EA5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.FCDDCC0EE93BE92A31D4BD84C9DD57C7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.39020D24E8F55C01FF5ECC4524C78189
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.823E96C86A899E615759E3AADB7355E0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.C8788BC1989E0E16F93945C2F157893B
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.0D4C916F64F122E94EEB6674D7B9F4D1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.620EF529E4CD2E0912AE9F42E2B802C0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.2F15899DE5E70055E0490AD29530C842
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.DE22EC0929BAB9F743BFC38EAB10D680
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.905EEF6FC284DC0AC05F8F1B347829C0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.BEECB5756E585359144D71D4410D4846
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.B8E477B5613F3E518F79082D5552E7AC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.1480092553E000D0103C80E1BC65B2C5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.B32DA5E8C42BDE53830D288C86582A9B
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.FD0CCCBDAB885F5E5C8D9BD9DA12B9CE
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.1B32364BA03FED4EBBD9BEF15A49EFB1
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.F1B9C4424263D106712B36B7809F8EFC
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.782935F97E84EF7CAABC357C5CEE2271
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.F4A8A78DF6670ECDAB83A83A18D1547D
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.2C0E9739F7F0BF5B9C16B620D3C195EB
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 403
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.8611905E16872C3EEFC979239C47CFFE
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.D6C48865C0991834DDDE193AB40E04EA
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.5A1DF310850382BEEFC771A9C1DECC3D
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.33DEA650BE9ABCDCDF53E462D402DAFE
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.E434ED8B2A34F104A95442717B1A4BA7
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.25BA53F39517497CBFEC02F6F1A1281D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.02D9D53D22A0F5B6893643EE40ADB324
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.ABED6B8929079AC01A596C9E4C08CBF8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.CA6D598467AAD4083472C11E72F28A8A
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.03E8ABF4920FE0C59B424EEDB8001FAB
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 204
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.3289F9FD0E9ACCD50787DB1A0055712D
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.4DB23DDC56235578526ECD74A1E1D151
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.278BB8E0110D66EDACF595107C09427A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.5787086FAAD0AEFD6965BE9007AEF32F
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.F66A4CBE1684496D395E5546FEB8C8B8
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.EDC1DDE6748591464113649924079D39
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.5A6D3D3A60E77AC626275AF623C4C766
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.C079F9483A04E55B04DBB93A82435427
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.1212DC6708EBC50394B744582FAA65B4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 500
+
+
+
+
+
+ 12.4521084E7C6C8D90D72D43B641CFC389
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 13.A68A4880F347BA44083CB1F0C28E2404
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.1AA08A21610BD902ED2A0BFDBB145B9C
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.A16175D85EED2CC89E132CB59AE50B1A
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.5F29580D0FA9D13D4F31F6FA1479253C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.BE9B123D699A33A084C657EDA216FD46
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.366B50C862A74986AFC2A1FD9AFA0DC8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.2CB8F6FD0FD4AAB2DBFDA3B66906F811
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.82806C1E451AD1325DD45123292E6360
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.AF1AD1BB3EE186EBC9E967F37EF47B63
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.81935DED0B11C2F6579420B1D503F846
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.96AA26481EDB1492BF1A4696FB4A5E90
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 409
+
+
+
+
+
+ 410
+
+
+
+
+
+ 12.E85F3447509D8658DC4747BDBC1124AE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.FF74C34F6936A3185B7DF890EA50A6EA
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 12.D2E1E5F53C787AAE87CD6C64E57DF392
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.5441D6DB77E32465283AFFCD70BF0BD9
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A91ACBDE9427D4617DBA938B01FD4A65
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.D10F011A18EEF4569C8A980431DF4850
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.5F6A41FED3043165DFD47ADA4C45298D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 204
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.6F544A6CED02468AF923384632138561
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.0D522E432703A7E48DBEDD1A6BB5CEF8
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.A1093E63522E0D37459A3DD2ED4BA382
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.381372DCEE1323BA3EC6135F28BD40E7
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 411
+
+
+
+
+
+ 1.B66BD19B24CA38C77915186CAC7278FB
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 403
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.61F4F2C6BB6C6B6682D36487830BB9DC
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 402
+
+
+
+
+
+ 1.5A3E7F31249938D514C56E364FC6D02F
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.6DAEDCFBF2E71F76371CDB2DE03FB216
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.4EB20E46D4C9A9D1A9C832A10416B269
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.D6574E9F317A632E897CC1497A014EE7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.2963DE5A15B7A94AE018A555B04855E3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.610DEA508CD26A5530855611329147F8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.BA2D594EAC2171E3CD66A1E4B261C157
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.F6F99FB1D96FAAB52761A4A6F9C007F4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.4493BC861FFB54D0474875CDA923917F
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.BCDE69D118A54DB3850A7A1DCB9044A5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.B9B14FD95B7365854A4873C9E03CF714
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.CB59926ABCCE409B8DA620D7098051EF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.8A412C738BCEA2E768EEE5AFA91A02E3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.F58DEB2156F89FEFF73AA296FB996076
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.6D9C05CCD6FC973CEC7EC06B2852C004
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.D2F89CEFD1D076C722E383CD47F54B0E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.C3E90840E58C0ED58DE5285F1C629007
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.697EEA5D819D1CCED8356F3707A80CC0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.F8EE6F2C578B71C30A5818323B8C63DD
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.CEC966DCE333C324697D8D2C014D5844
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.94FDDACEB38E1AEE4DE4BD04D5CA1715
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.F75FB6B03E5778971F18B3E156F1C368
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.FB37D5236F8B9FAA3C23E1E1ED75EF7B
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.BF2D067D7C365D5CD381837F5376FBCC
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.1DCB7A5A19D0073AB4C529DE68EFF590
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.AE62860962CCA944FDE6BA7A1FA29BE8
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.74228C20E21299810A61BDC1D72981CB
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.5A5F6DB8F16E8BA2850BBC9786BF933A
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.9B0188827522EB7EEF626D5957F16EF7
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.057E27FF0C7515839363635ABD87011B
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.815B2098111720A02816432FD0B11263
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.F17A1AE113B6FD07741496A307004005
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.3FD065CF09A9346481021BC207729FC8
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.67E8651E0A9719E5AA68ED2783076E40
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.E7E2388B6F0182AA8B191836FDC2EF46
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.0B3D7131A8DE08F23DD8F92E4FB445CE
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A1F33C79ADB650C34CBA5470E455A17D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.156CA822F9C5F127EBE0310BB1B87C70
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.6418EF00E4F7D58B1FB1EFE7DEAC6277
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.E016A3B10B9E2BCFBDC052B607BEF218
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.405BE0983E37E87E48E0D549DFFD22CD
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.D55B0B0605B4BF3AE32149CAD90110CE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.89699929828B8EC5AE4F1F41003A1293
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.02BC732C912E22F368101E336487D192
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.58AA7409654D5D50B6B8F55539C0774B
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.6B1CA505E2302A04F63AA27099F0FCFF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.96BE833135E4A5C8F7DE52803D85CCA1
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.3FB901D98106C97ED02FBD2FCB72A368
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.06D8300D0336BED673A20EF70C44CCCF
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.C9293362A29ABB99EA2382C6B71D0649
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.351B871DFA1717273590632B38A4EBC7
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.6DFABCE265B2455CBE17C12CF01CDDD2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.C4D2CFB128128AFB2C46656E3EE693BB
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.9222B04244CF97705F3488EE7906FC41
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.AA0AD23B2F046B29AA8947581FDFB860
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.D74722063AC27B6ECB815A78C0E790C5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.E5ACD5AF9B1F02DDDF00504737297CFD
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.8E55D6D6105C140A17D3438C4F4D8D54
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.86F306440C4799F14DD5F4C0719E507C
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.301D82C48DB6624F74A9A6BD309A9E40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.098207A6680442B3FA9643BB23CB370E
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.0EC16E3818F17C785ABB022A34A7A083
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.F1ED654859180EBA33AD4697444A2636
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.84A39C5D428089EF64F5DB0558FA2C45
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.4C47E15164EB0479D97A05D6AF22162F
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.D65C68901F23BADFA697712B7F496D8B
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.51440FCFF3ADF3834C5500FF554FFBE2
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.70D55191E13B0C77A5FF57DA126E0849
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.590227D4C2600E9BBB7B5082E4792767
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.445C035DB924A9B0FA42C72674EE4F89
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.AA975962B34D69CE1C78662B13A65313
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.BDA9A7110ADB2C122D0CA705B6B1D6FA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.94C075BD3FE76604F8ED084C9B9E4AE5
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.C861C307A1307B7D19E67CEF0C9FF674
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.9AC8B3AFD901820523B5E22441984736
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.E7BF64005D511F7DF092A1FD63CAFDB2
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.6DA60D3A441DEB83245CF9390DB652C2
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.FCB7A1CCECDBFE60B9F9268A4DA13E64
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.5EDB52181C6563D67BB04B9F6F9FFCB3
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.602C9239FB1B18A48D8E6AB920F9865E
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.613F01620D33F44F7F08DAD27477860D
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.B3F196534F6B3239F608E60F46CC5054
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.9395090644FD6A9EEDE620F2EDB2659C
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.51360490B8BC0FEA841584D3A7941DA9
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.21D484F75EB67BB6E52299CFE9026E8C
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.B470C7165F3CC8ED799ED4F8B5BAEA45
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.C56316687F31CD493F7064FD951EC99C
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.79EEE017A84D0C323D68CA23A8CB1076
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A4AFD3D5DA908492647C739E941CC97C
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.EF17F568146C914F8023380045758F9C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.3D539F4D333D3240C489C26EC0A011EF
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.B0E4F8E2EF4C7507621D37BF97395F31
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A426A6A86571D4DB76768FBF9E3540DF
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.BB0DDF53B3466065E0CC36A0EDFF2834
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.25C2373230B0EA43C94F0DCAAAEEA6FB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.179F228C42340ABB9EEB830006BC5F2A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.3DDC7451EA1620AE50203012113A61CC
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.28359B909678D42A4868FB82F28934BB
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.486CB0412BAD44C82290FBD64DEC1F6D
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.C2B1E38A255F67B820C6DB2C5A021FC5
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.AA7061BA6F294ACDB2FA2282E0742BCC
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A5E2220D36BE184AE56CCD3CFC42D0AE
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.F6BC5F562CC7CDDF11632321B21D97DF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.97CAA19C72182CEF847821F9E6FB3AAA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.3B8F9F9CA8F1879985BF29BF5CBD21E6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.E05E227E544680F0B4BB26DE70617352
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.56E9BDA78930F90CD41C280B94F3EC92
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.A7B51CF0108CAE7FF2ED2ECFEEF990D9
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.02F4797EB106FFD0157EC4EAB8FBB3BC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.6D17F999F7BD299E10604D67FB269746
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.FC523C8224CB7FBABCF213D5D951CB18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.0647B93684A5AF9B4EF9AAFC7148E0C7
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.04BA526681D926E6F55834C3FF14C800
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.C7CE8CF71088F3DB585CD3B02AD6C01E
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.2861D535C9E907B2316C6DD326F9C9DB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.B3C891ADBE07985D8EB07F47AD5B9DA9
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.574C8D1B7983E679131E37FD5C3DF1B3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.75E4BA966FFC501D192F53E91B7DA97C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.CB9A35E0D20D8F23F42BE689119E06FA
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.D7B16FCF4CB54A4DDD0B7B96965B0C89
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.6C78CB68979C1B30B65792A51C4909B4
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 503
+
+
+
+
+
+ 1.1425C7EF3EB1C555EEDB3A7B83959C18
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.6C71667DFCE4EFE9D2D594675F5D0548
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.3FA058A0E73CD716458E4AD473D01D8E
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.7A7A1F423942BCD065A53F5E2C08CA10
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.686D026F4E37237A3FB0CFDDADBC9F8A
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.285B3B8B3249390AC0EA62095620648D
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.483EDC95D9050419855BB2C9B7D9395A
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.57134A2893313DE704198EED54D5B6E6
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.9193C0F29388C5B9B6583A6BF6C2B347
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.309FA7AAF19EEC5CCD22B2BC222D2BAC
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.424FC52414BFE0A49B6746D5DB1256AB
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.13C8280BFD2D49B31E703A6C942A14BB
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.2ED8A733A34F7268A165FCB3C4DE0232
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A44097E7733B4F75C8C3F55B7223E894
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.BCD510DF25513B8FAF0352336F094053
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.D24D24F09DCA78579C08ADE1D5528A18
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.388A14B11DC4161D76E7BA3524CED336
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.E8ECE9BA39F0B03F8394B4AB5065B60D
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.67C819CC3E37319CB3D533A2D31F00D7
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.7A9D46F2B10E01B201BD25BF3DA3E3D6
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.466E11BA31409FC6549BB27A0C1400CC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.5458586BDBC05CE6DC7B96FB305E279E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.221F7DCAF04AE6EB1BADF4997871733E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.2C5C28BB2FF03BAE5647F7DA4B0FBC7C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.EF0CC59153D7673ED206E0F310880A6E
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.D946E977B16DE185BC7065F3C36BBA94
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.6758EF1C334FA94EC51F836A229DFFCA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.D96F1DC7CD390C447BBA6A55F52476AC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A7D83C4D167D0650C16DF8831A5503C4
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.D9690323F9BD00A1D7AC14D449C5C5F5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.2BDEFEC679C5FBAF0D8D2934FE55F708
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.2ADB64C9DC3241D0FFE93910210E1FF9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.F03568C031D1937D3B54EA29D055333D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.F0DCE0BD19F895084F3C461358ABB31B
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.362B98FD68A372E063F679FC32F89B31
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.CB7932D0E8A306C5A2E35C8916C0E4B4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.E62DED290400027E754EB45DBAC5062D
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.DBBD22390D6F477450A6966FDA2CA298
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.FED65C1D6BB97C21B4F9DA0B7A997D35
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.44F69227AF5D5C013E4E8870692550C7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.6B2469AA8D0FC2655F6EB394348EB437
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A0A9BFEABE8E3C638E51660CF67D0B3C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 500
+
+
+
+
+
+ 1.23E6F9A6049ADDD0E927CC18B54C3B38
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.FF1951EAE0ACBAB8DB513DF209D32122
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.B73F07D16A191E0EFD397E3DCB5CE051
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.31CBB28C0277768C8BF04A6CF1BA98A5
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.E6B45FD1B7595DCC123636DD01E50D8A
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.488DE2B815EF3AA7ED005927F9CF0255
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.AD707ECC69A1E835FADE9B7B896C7C53
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.B4A550D4C92733C33F4F42DF5C62F48C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.3354560A47DC27A0EB7E2791DCFFD76C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.16F6604E1706C8BFE79C56B75C629259
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.038E34A9C374FC176986FC568A165527
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.CA5A1C1C65E431A37F3207B81767774B
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.7D48EAAB19465D9008EFE5C6E3C020EA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.3669C6C2F1550E1554DB9CF129DCD965
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.BB44DAB83E2DEF71FDAB005430239AD3
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 207
+
+
+
+
+
+ 1.A6D31BBFAFCCC9A55B9FEBF72E1C2953
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.32E4082ED243CB134EA743FF78000BD5
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.38E575DC2AF4B7D7CF3203E6B7BDA74D
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.220648A0923367BC4FA2794FA4BE4591
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.38448C20E04942C66F6D9AB3169CEF09
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.B7BB4C29193AC92DB35E9E206A01E30D
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.4D5F15EE9801D7E3BE0892FD38AFDE0D
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.E062F9FB6D3FA8A9EEE31C6A81CC6604
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.78F8ED04EC79A126AEADE8C08B0E4F97
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.958F111DBDA1BCE46EFBC10511A145E9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.1E72B20786B3BFB6DE896C380864C4ED
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A62A0E7E1808EED079989D04772B6CB6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.65E7DE349575885F8EC2E78FFBBD3484
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.17A61EEDF79D76747BE37B3DA3F698DF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.F0EE6E4715A3D2CFB1F5795EA52EF0A1
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.59DE4FDFB535F952488C8C76082D1957
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.AC6CF1A6EDCCAC74410543D331DCEBFC
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.83B487198471CDEAF5C95D371BE1227E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.B13DC16C4369B842DD1580DFC9A23E90
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.D9B3DB52DF8218B45D48BECB5131915E
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.CF52BFFDF3E12D43EFD5F614833B7DCE
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.FF43777C8C33E41102BCF3F2A2A90C64
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.7B3676D45CECCC1D12D71EBA722FFF30
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.71B0E6E68AA99863BE55E1D6D037301B
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.9F2F0F9EE78721BF80AD83701F9736A0
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.680A6E46ADDF391752A3A89F95D73448
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.496A9334045EC97BFFE3A5116694FF85
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.BC1C6F682219387D81896AD542BFDA1B
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.21E756DE8577C5778B49EB14777DE712
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.9066576F0656AE6BA8E13A019F6A59AB
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.444CF76C0D4A6C4E637033A4D4E9126A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.3BFB533872841D46A011D369D3FF2977
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.3426C46B6878DDEC0DA8DA6A0D5554AA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.068DA432A58C3D7331CA5C906158F229
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.B316331E65CCB79F118C8A178C4D1112
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.27B9DEC971AF1E0443505F6381B2C647
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.F528AE4144225E113F7B00825EE52AA2
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.8D68C314C554FFCC800097F48EA2B2BF
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.B29CE6CAE05044347C6F6D2CD82D2B76
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.0EDA4B68A5E0A7A119DF093167A9643B
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.25F94118327D5D07CF4BD4214EE33EC0
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.AD3D66C9BD4CFDABA55559C35CECD9E1
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.E336292FC529AF487A9AD66216D49654
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.673FA4C32058D8D329E1630ADA8E73C1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.B74A7AA44043A326AC2D7D7934967B14
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.75F9BD52CF2A252C3696A912624AF4E7
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.1568E0AA2E38BC533DF1D9A3C26D9A80
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.DA7E3AB4DC966A21CCA466E87760769B
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.AF491ABBC242A023D510DB3FEFC8D333
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.9AE867341DC4E9D188C81105BB655840
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.658474BB59B4C339A45CF52CB7F697C3
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.4F8C9F278402E6FB2E4EA057B834CC73
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.F68B18D7E344D6FA9B40E23E3D97B61F
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 400
+
+
+
+
+
+ 409
+
+
+
+
+
+ 1.D6CE3DF7A0C10820202A220ACFC9E213
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.AA72044B9C3357E0774AADA4EF555CC6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 409
+
+
+
+
+
+ 500
+
+
+
+
+
+ 1.671331B470E29F833F419F6BAD29384B
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 500
+
+
+
+
+
+ 1.E7E6381C3DCFF65F04EFF2E13C486B02
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.BCF75A4FA6D197563529575007325A9D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.4D283CDE0658BDE321C6C7B4CFB00DB5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 400
+
+
+
+
+
+ 1.10D8DE9FF8DAD881A8553CC2EA0B33D8
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.E49AE7C4E4606611A2264F17092383DE
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.AF255C11E7836E705C16FB2E0C5C5893
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.EDD41D719CF5C94BEBC543ED4E1FA92B
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.87C46F7702591A04073B685E3DCA18E8
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.DF34657F1F638BF55CCB59D8766A7A40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.227468E94768C87DC18B9D82AE1DD73A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.A11EBAEA1FB195A00CA8C77DAA86896E
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.ED42C99A3F7707AE33EA46D9155ACF67
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.CB843F4F8FA5F1FD7A435EF77E9AB382
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.55C741CC9A0D6215D57FB954E57DBF9E
+
+
+
+
+
+
+
+
+
+ 200
+
+
+
+
+
+ 1.A37E5119D3567CC0420518DD48F43AC6
+
+
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 1.14B1920F8A49D1721022BDA3054DF8EB
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 1.BB98871AF82585B0C646B6954309CBC3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201
+
+
+
+
+
+ 400
+
+
+
+
+
+ 403
+
+
+
+
+
+ 1.577E0E6FD00116FDB9FCC4BA96BC82E6
+
+
+
+
+
+
+
+
+
+ 204
+
+
+
+
+
+ 404
+
+
+
+
+
+ 1.EA981FC342B0BC7143D8A6B5C650CBA3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 00d7d6b08..5ce225695 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,4 +1,4 @@
-FROM greyrocksoftware/javastandalone7
+FROM greyrocksoftware/javastandalone
# Set the locale
RUN locale-gen en_US.UTF-8
diff --git a/docker/run_tests.sh b/docker/run_tests.sh
index ce2523e82..685689ee5 100755
--- a/docker/run_tests.sh
+++ b/docker/run_tests.sh
@@ -20,5 +20,5 @@ cd ds3_java_sdk
git rev-parse HEAD
./gradlew jar
-./gradlew test
+./gradlew test integrationTest
diff --git a/ds3-bom/build.gradle.kts b/ds3-bom/build.gradle.kts
new file mode 100644
index 000000000..cf6611420
--- /dev/null
+++ b/ds3-bom/build.gradle.kts
@@ -0,0 +1,49 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+plugins {
+ `ds3-java-sdk-version`
+ `maven-publish`
+ `ds3-java-sdk-publishing-common-convention`
+ signing
+ `java-platform`
+}
+
+description = "The DS3 Java SDK Bill of Materials."
+
+dependencies {
+ constraints {
+ api(project(":ds3-interfaces"))
+ api(project(":ds3-utils"))
+ api(project(":ds3-metadata"))
+ api(project(":ds3-sdk"))
+ }
+}
+
+publishing {
+ publications {
+ create("Ds3Bom") {
+ from(components["javaPlatform"])
+ }
+ }
+}
+
+signing {
+ setRequired({
+ (extra["isReleaseVersion"] as Boolean) && gradle.taskGraph.hasTask("publishProjectPublicationToOSSRHRepository")
+ })
+ useGpgCmd()
+ sign(publishing.publications["Ds3Bom"])
+}
diff --git a/ds3-interfaces/build.gradle b/ds3-interfaces/build.gradle
deleted file mode 100644
index ac8ff43ef..000000000
--- a/ds3-interfaces/build.gradle
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-buildscript {
- repositories { jcenter() }
- dependencies {
- classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
- }
-}
-
-apply plugin: 'com.github.johnrengelman.shadow'
-
-dependencies {
- compile 'commons-io:commons-io:2.4'
-}
-
-shadowJar {
- relocate 'org.apache', 'ds3fatjar.org.apache'
- dependencies {
- exclude(dependency('org.hamcrest:hamcrest-library:1.3'))
- exclude(dependency('org.mockito:mockito-core:1.10.19'))
- exclude(dependency('junit:junit:4.12'))
- exclude(dependency('org.slf4j:slf4j-api:1.7.22'))
- exclude(dependency('org.slf4j:slf4j-simple:1.7.22'))
- }
-}
-
-artifacts {
- archives shadowJar
-}
diff --git a/ds3-interfaces/build.gradle.kts b/ds3-interfaces/build.gradle.kts
new file mode 100644
index 000000000..d322d8143
--- /dev/null
+++ b/ds3-interfaces/build.gradle.kts
@@ -0,0 +1,21 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+description = "The interfaces module holds the interfaces for headers and " +
+ "metadata."
+
+plugins {
+ `ds3-java-sdk-library-convention`
+}
diff --git a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/helpers/MetadataAccess.java b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/helpers/MetadataAccess.java
index f9a0e5258..2e552973d 100644
--- a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/helpers/MetadataAccess.java
+++ b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/helpers/MetadataAccess.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/helpers/MetadataReceivedListener.java b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/helpers/MetadataReceivedListener.java
index ccc85d709..a2e821b7f 100644
--- a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/helpers/MetadataReceivedListener.java
+++ b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/helpers/MetadataReceivedListener.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/metadata/interfaces/MetadataRestore.java b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/metadata/interfaces/MetadataRestore.java
index b328ee20e..0ddb5da5d 100644
--- a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/metadata/interfaces/MetadataRestore.java
+++ b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/metadata/interfaces/MetadataRestore.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/metadata/interfaces/MetadataStore.java b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/metadata/interfaces/MetadataStore.java
index 34908d2e1..fe0cd8141 100644
--- a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/metadata/interfaces/MetadataStore.java
+++ b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/metadata/interfaces/MetadataStore.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/networking/Headers.java b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/networking/Headers.java
index 43d07f6dc..f02f57f86 100644
--- a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/networking/Headers.java
+++ b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/networking/Headers.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/networking/Metadata.java b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/networking/Metadata.java
index 92061ef19..3d285dacb 100644
--- a/ds3-interfaces/src/main/java/com/spectralogic/ds3client/networking/Metadata.java
+++ b/ds3-interfaces/src/main/java/com/spectralogic/ds3client/networking/Metadata.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-metadata/build.gradle b/ds3-metadata/build.gradle
deleted file mode 100644
index 9d45f587d..000000000
--- a/ds3-metadata/build.gradle
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-buildscript {
- repositories { jcenter() }
- dependencies {
- classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
- }
-}
-
-apply plugin: 'com.github.johnrengelman.shadow'
-
-shadowJar {
- relocate 'org.apache', 'ds3metafatjar.org.apache'
- relocate 'com.google', 'ds3metafatjar.com.google'
- relocate 'com.sun.jna', 'ds3metafatjar.net.java.dev.jna'
-
- dependencies {
- exclude(dependency('org.hamcrest:hamcrest-library:1.3'))
- exclude(dependency('org.mockito:mockito-core:1.10.19'))
- exclude(dependency('junit:junit:4.12'))
- exclude(dependency('org.slf4j:slf4j-api:1.7.22'))
- exclude(dependency('org.slf4j:slf4j-simple:1.7.22'))
- exclude(dependency('org.apache.commons:commons-lang3:3.0'))
- }
-}
-
-artifacts {
- archives shadowJar
-}
-
-dependencies {
- compile group: 'net.java.dev.jna', name: 'jna-platform', version: '4.2.2'
- compile group: 'net.java.dev.jna', name: 'jna', version: '4.2.2'
- compile 'commons-io:commons-io:2.4'
- compile 'org.apache.httpcomponents:httpclient:4.5.1'
-
- testCompile group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'
-}
diff --git a/ds3-metadata/build.gradle.kts b/ds3-metadata/build.gradle.kts
new file mode 100644
index 000000000..46cbcbdb6
--- /dev/null
+++ b/ds3-metadata/build.gradle.kts
@@ -0,0 +1,63 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+plugins {
+ `ds3-java-sdk-library-convention`
+ alias(libs.plugins.shadowPlugin)
+}
+
+description = "This module holds the classes for converting file system " +
+ "metadata to BlackPearl object store metadata so you can preserve and " +
+ "restore file times and OS specific metadata."
+
+dependencies {
+ api(project(":ds3-interfaces"))
+ api(project(":ds3-utils"))
+
+ implementation(libs.guava)
+ implementation(libs.jna)
+ implementation(libs.jnaPlatform)
+ implementation(libs.slf4jApi)
+
+ testImplementation(libs.commonsIo)
+ testImplementation(libs.commonsLang3)
+ testImplementation(libs.junit)
+ testImplementation(libs.junitJupiterApi)
+ testImplementation(libs.httpclient)
+
+ testRuntimeOnly(libs.junitVintageEngine)
+ testRuntimeOnly(libs.slf4jSimple)
+}
+
+tasks.named("shadowJar") {
+ relocate("org.apache", "ds3metafatjar.org.apache")
+ relocate("com.google", "ds3metafatjar.com.google")
+ relocate("com.sun.jna", "ds3metafatjar.net.java.dev.jna")
+ relocate("org.jetbrains", "ds3metafatjar.org.jetbrains")
+ relocate("org.intellij", "ds3metafatjar.org.intellij")
+ relocate("org.codehaus", "ds3metafatjar.org.codehaus")
+ dependencies {
+ exclude(project(":ds3-interfaces")) // this is being excluded since it must be used with the sdk, which already has this dependency included
+ exclude(project(":ds3-utils")) // this is being excluded since it must be used with the sdk, which already has this dependency included
+ exclude(dependency(libs.slf4jApi.get().toString()))
+ exclude(dependency(libs.slf4jSimple.get().toString()))
+ exclude(dependency(libs.hamcrest.get().toString()))
+ exclude(dependency(libs.mockitoCore.get().toString()))
+ exclude(dependency(libs.junit.get().toString()))
+ exclude(dependency(libs.junitJupiterApi.get().toString()))
+ exclude(dependency(libs.commonsLang3.get().toString()))
+ }
+ dependsOn(tasks.jar)
+}
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/AbstractMetadataRestore.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/AbstractMetadataRestore.java
index 89d732ee4..b9e4cb09a 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/AbstractMetadataRestore.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/AbstractMetadataRestore.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -86,10 +86,10 @@ public void restoreOSName() {
* @param lastModifiedTime modified time got from server
* @param lastAccessedTime last aceess time got from server
*/
- private void setFileTimes(final String filePath,
- final String creationTime,
- final String lastModifiedTime,
- final String lastAccessedTime)
+ private static void setFileTimes(final String filePath,
+ final String creationTime,
+ final String lastModifiedTime,
+ final String lastAccessedTime)
throws IOException
{
final BasicFileAttributeView attributes = Files.getFileAttributeView(Paths.get(filePath), BasicFileAttributeView.class);
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/AbstractMetadataStore.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/AbstractMetadataStore.java
index f911bc8f0..97dcc7726 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/AbstractMetadataStore.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/AbstractMetadataStore.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MACMetadataRestore.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MACMetadataRestore.java
index bc0ec1d12..95dadfe1d 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MACMetadataRestore.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MACMetadataRestore.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -77,7 +77,7 @@ public void restoreFileTimes() throws IOException, InterruptedException {
* @param objectName path of the object where we need to restore
* @param creationTime creation time got from server
*/
- private void restoreCreationTimeMAC(final String objectName, final String creationTime) throws IOException, InterruptedException {
+ private static void restoreCreationTimeMAC(final String objectName, final String creationTime) throws IOException, InterruptedException {
final ProcessBuilder processBuilder = new ProcessBuilder("touch", "-t", getDate(Long.parseLong(creationTime), "YYYYMMddHHmm"), objectName);
final Process process = processBuilder.start();
//Wait to get exit value
@@ -94,7 +94,7 @@ private void restoreCreationTimeMAC(final String objectName, final String creati
* @param objectName path of the object where we need to restore
* @param modifiedTime modified time need to restore
*/
- private void restoreModifiedTimeMAC(final String objectName, final String modifiedTime) throws IOException, InterruptedException {
+ private static void restoreModifiedTimeMAC(final String objectName, final String modifiedTime) throws IOException, InterruptedException {
final ProcessBuilder processBuilder = new ProcessBuilder("touch", "-mt", getDate(Long.parseLong(modifiedTime), "YYYYMMddHHmm"), objectName);
final Process process = processBuilder.start();
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetaDataUtil.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetaDataUtil.java
index b6ac53fc4..b784171ee 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetaDataUtil.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetaDataUtil.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataAccessImpl.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataAccessImpl.java
index b245651e3..e37f6eec6 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataAccessImpl.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataAccessImpl.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2016 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -77,11 +77,11 @@ public Map getMetadataValue(final String filename) {
* @param file local path of file
* @return map builder containing the data to be stored on server
*/
- private ImmutableMap storeMetaData(final Path file) throws IOException {
+ private static ImmutableMap storeMetaData(final Path file) throws IOException {
final ImmutableMap.Builder builder = ImmutableMap.builder();
//get metadata store based on os type
- final MetadataStore metadataStore = new MetadataStoreFactory().getOsSpecificMetadataStore(builder);
+ final MetadataStore metadataStore = MetadataStoreFactory.getOsSpecificMetadataStore(builder);
metadataStore.saveOSMetaData(MetaDataUtil.getOS());
final BasicFileAttributes attr = Files.readAttributes(file, BasicFileAttributes.class);
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataKeyConstants.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataKeyConstants.java
index e2e4c7b1f..1f0f84634 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataKeyConstants.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataKeyConstants.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataReceivedListenerImpl.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataReceivedListenerImpl.java
index b282c5194..5d35b3a52 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataReceivedListenerImpl.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataReceivedListenerImpl.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2016 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -73,12 +73,12 @@ public void metadataReceived(final String filename, final Metadata metadata) {
* @param objectName name of the file to be restored
* @param metadata metadata which needs to be set on local file
*/
- private void restoreMetaData(final String objectName, final Metadata metadata) throws IOException, InterruptedException {
+ private static void restoreMetaData(final String objectName, final Metadata metadata) throws IOException, InterruptedException {
final ImmutableList.Builder exceptionBuilder = ImmutableList.builder();
//get metadatarestore on the basis of os
- final MetadataRestore metadataRestore = new MetadataRestoreFactory().getOSSpecificMetadataRestore(metadata, objectName);
+ final MetadataRestore metadataRestore = MetadataRestoreFactory.getOSSpecificMetadataRestore(metadata, objectName);
//restore os name
metadataRestore.restoreOSName();
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataRestoreFactory.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataRestoreFactory.java
index af9a3c67c..d6b5bba4b 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataRestoreFactory.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataRestoreFactory.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -21,7 +21,7 @@
public class MetadataRestoreFactory {
- public MetadataRestore getOSSpecificMetadataRestore(final Metadata metadata, final String filePath) {
+ public static MetadataRestore getOSSpecificMetadataRestore(final Metadata metadata, final String filePath) {
final String localOS = MetaDataUtil.getOS();
if (Platform.isWindows()) {
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataStoreFactory.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataStoreFactory.java
index 01455d291..32b0d87b3 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataStoreFactory.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/MetadataStoreFactory.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -21,7 +21,7 @@
public class MetadataStoreFactory
{
- public MetadataStore getOsSpecificMetadataStore(final ImmutableMap.Builder metadataMap) {
+ public static MetadataStore getOsSpecificMetadataStore(final ImmutableMap.Builder metadataMap) {
if(MetaDataUtil.getOS().contains("Windows")) {
return new WindowsMetadataStore(metadataMap);
}
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PermissionsUtils.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PermissionsUtils.java
index c16303c3d..b808f9c9b 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PermissionsUtils.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PermissionsUtils.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PosixMetadataRestore.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PosixMetadataRestore.java
index 43db943d2..a26012c99 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PosixMetadataRestore.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PosixMetadataRestore.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -91,7 +91,7 @@ private void setOwnerNGroupLnx(final String ownerName, final String groupName) t
* @param filePath path of the file
* @param permissions permissions got from the blackperl server
*/
- private void setPermissionsLnx(final String filePath, final String permissions) throws IOException {
+ private static void setPermissionsLnx(final String filePath, final String permissions) throws IOException {
final Path file = Paths.get(filePath);
final Set perms =
PosixFilePermissions.fromString(permissions);
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PosixMetadataStore.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PosixMetadataStore.java
index e04d4243a..783a1c7a0 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PosixMetadataStore.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/PosixMetadataStore.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataException.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataException.java
index aca646b23..0bbdf1029 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataException.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataException.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataRestore.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataRestore.java
index 9c1bcbfe2..86775a6b6 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataRestore.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataRestore.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -16,9 +16,9 @@
package com.spectralogic.ds3client.metadata;
import com.google.common.collect.ImmutableList;
-import com.spectralogic.ds3client.metadata.jna.Advapi32;
import com.spectralogic.ds3client.networking.Metadata;
import com.spectralogic.ds3client.utils.Guard;
+import com.sun.jna.platform.win32.Advapi32;
import com.sun.jna.platform.win32.WinNT;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -128,7 +128,7 @@ private void setPermissionsForWindows() throws IOException {
* @return map
*/
- private Map defaultOrdinalPermission(){
+ private static Map defaultOrdinalPermission(){
final Map defaultOrdinalMap = new HashMap<>();
defaultOrdinalMap.put("0",AclEntryPermission.READ_DATA);
defaultOrdinalMap.put("1",AclEntryPermission.WRITE_DATA);
@@ -147,9 +147,9 @@ private Map defaultOrdinalPermission(){
return defaultOrdinalMap;
}
- private void restorePermissionByUser(final String permission,
- final String user,
- final ImmutableList.Builder aclEntryBuilder)
+ private static void restorePermissionByUser(final String permission,
+ final String user,
+ final ImmutableList.Builder aclEntryBuilder)
throws IOException
{
final AclEntry.Builder builderWindow = AclEntry.newBuilder();
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataStore.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataStore.java
index 5b1b25982..0e4ae1fe3 100644
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataStore.java
+++ b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/WindowsMetadataStore.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -16,8 +16,8 @@
package com.spectralogic.ds3client.metadata;
import com.google.common.collect.ImmutableMap;
-import com.spectralogic.ds3client.metadata.jna.Advapi32;
import com.spectralogic.ds3client.utils.Guard;
+import com.sun.jna.platform.win32.Advapi32;
import com.sun.jna.platform.win32.WinNT;
import com.sun.jna.ptr.PointerByReference;
import org.slf4j.Logger;
@@ -28,6 +28,7 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.AclEntry;
@@ -95,21 +96,24 @@ private void saveWindowsDescriptors(final Path path) throws IOException {
* @param acl acl got from jna
* @return dacl string
*/
- private String getDaclString(final WinNT.ACL acl) {
- final WinNT.ACCESS_ACEStructure[] aceStructures = acl.getACEStructures();
+ private static String getDaclString(final WinNT.ACL acl) {
+ final WinNT.ACE_HEADER[] aceHeaders = acl.getACEs();
final StringBuilder daclStringBuffer = new StringBuilder();
- for (final WinNT.ACCESS_ACEStructure aceStructure : aceStructures) {
+ for (final WinNT.ACE_HEADER aceHeader : aceHeaders) {
daclStringBuffer.append("(");
- if (aceStructure.AceType == 0) {
+ if (aceHeader.AceType == 0) {
daclStringBuffer.append("A;");
- } else if (aceStructure.AceType == 1) {
+ } else if (aceHeader.AceType == 1) {
daclStringBuffer.append("D;");
- } else if (aceStructure.AceType == 2) {
+ } else if (aceHeader.AceType == 2) {
daclStringBuffer.append("AU;");
}
- daclStringBuffer.append("0x").append(Integer.toHexString(aceStructure.AceFlags)).append(";");
- daclStringBuffer.append("0x").append(Integer.toHexString(aceStructure.Mask)).append(";;;");
- daclStringBuffer.append(aceStructure.getSidString()).append(")");
+ daclStringBuffer.append("0x").append(Integer.toHexString(aceHeader.AceFlags)).append(";");
+ if (aceHeader instanceof WinNT.ACCESS_ACEStructure) {
+ WinNT.ACCESS_ACEStructure accessACEStructure = (WinNT.ACCESS_ACEStructure) aceHeader;
+ daclStringBuffer.append("0x").append(Integer.toHexString(accessACEStructure.Mask)).append(";;;");
+ daclStringBuffer.append(accessACEStructure.getSidString()).append(")");
+ }
}
return daclStringBuffer.toString();
}
@@ -126,7 +130,7 @@ private String saveFlagMetaData(final Path file) throws IOException {
final ProcessBuilder processBuilder = new ProcessBuilder("attrib", file.toString());
final Process process = processBuilder.start();
try (final BufferedReader reader =
- new BufferedReader(new InputStreamReader(process.getInputStream(), Charset.forName("UTF-8")))) {
+ new BufferedReader(new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8))) {
final String flagWindows = reader.readLine();
if (Guard.isStringNullOrEmpty(flagWindows)) {
LOG.error("The flagWindows string was null");
diff --git a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/jna/Advapi32.java b/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/jna/Advapi32.java
deleted file mode 100644
index ee5feb643..000000000
--- a/ds3-metadata/src/main/java/com/spectralogic/ds3client/metadata/jna/Advapi32.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-package com.spectralogic.ds3client.metadata.jna;
-
-import com.sun.jna.Library;
-import com.sun.jna.Native;
-import com.sun.jna.Pointer;
-import com.sun.jna.platform.win32.WinNT;
-import com.sun.jna.ptr.PointerByReference;
-import com.sun.jna.win32.W32APIOptions;
-
-public interface Advapi32 extends Library {
-
- Advapi32 INSTANCE = (Advapi32) Native.loadLibrary("advapi32", Advapi32.class, W32APIOptions.UNICODE_OPTIONS);
-
- int GetNamedSecurityInfo(final String pObjectName, final int ObjectType, final int SecurityInfo,
- final PointerByReference ppsidOwner, final PointerByReference ppsidGroup,
- final PointerByReference ppDacl, final PointerByReference ppSacl,
- final PointerByReference ppSecurityDescriptor);
- boolean ConvertStringSidToSid(final String StringSid, final WinNT.PSIDByReference Sid);
- int SetNamedSecurityInfo(final String pObjectName, final int ObjectType, final int SecurityInfo,
- final Pointer ppsidOwner, final Pointer ppsidGroup,
- final Pointer ppDacl, final Pointer ppSacl);
-}
\ No newline at end of file
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/MockedHeaders.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/MockedHeaders.java
index 9563fe716..fe4853d79 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/MockedHeaders.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/MockedHeaders.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/MockedHeadersReturningKeys.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/MockedHeadersReturningKeys.java
index 60090218c..74d699807 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/MockedHeadersReturningKeys.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/MockedHeadersReturningKeys.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MACMetadataRestore_Test.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MACMetadataRestore_Test.java
index 9b0645bd6..ee5828859 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MACMetadataRestore_Test.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MACMetadataRestore_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -41,7 +41,7 @@ public class MACMetadataRestore_Test {
private final File file = new File(getClass().getClassLoader().getResource("LoremIpsum.txt").getFile());
@Test
- public void restoreFileTimes_Test() throws Exception {
+ public void restoreFileTimesTest() throws Exception {
if (Platform.isMac()) {
final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM-yy:HH:mm");
@@ -62,7 +62,7 @@ public void restoreFileTimes_Test() throws Exception {
}
- private Metadata genMetadata(final Header... headers) {
+ private static Metadata genMetadata(final Header... headers) {
final ImmutableMultimap.Builder mapBuilder = ImmutableMultimap.builder();
for (final Header header : headers) {
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataAccessImpl_Test.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataAccessImpl_Test.java
index 73f1b9f83..6f9d54a2c 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataAccessImpl_Test.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataAccessImpl_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -29,6 +29,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -45,7 +46,7 @@ public class MetadataAccessImpl_Test {
private static final Logger LOG = LoggerFactory.getLogger(MetadataAccessImpl_Test.class);
@Test
- public void testGettingMetadata() throws IOException, InterruptedException {
+ public void testGettingMetadata() throws IOException {
final String tempPathPrefix = null;
final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
@@ -93,7 +94,7 @@ public void testGettingMetadata() throws IOException, InterruptedException {
}
@Test
- public void testMetadataAccessFailureHandler() throws IOException, InterruptedException {
+ public void testMetadataAccessFailureHandler() {
Assume.assumeFalse(Platform.isWindows());
try {
@@ -121,7 +122,7 @@ public void testMetadataAccessFailureHandler() throws IOException, InterruptedEx
}
@Test
- public void testMetadataAccessFailureHandlerWithEventHandler() throws IOException, InterruptedException {
+ public void testMetadataAccessFailureHandlerWithEventHandler() throws IOException {
Assume.assumeFalse(Platform.isWindows());
final String tempPathPrefix = null;
@@ -141,7 +142,7 @@ public void testMetadataAccessFailureHandlerWithEventHandler() throws IOExceptio
final AtomicInteger numTimesFailureHandlerCalled = new AtomicInteger(0);
try (final InputStream inputStream = Runtime.getRuntime().exec("ls -lR").getInputStream()) {
- LOG.info(IOUtils.toString(inputStream));
+ LOG.info(IOUtils.toString(inputStream, Charset.defaultCharset()) );
}
new MetadataAccessImpl(fileMapper.build(),
new FailureEventListener() {
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataReceivedListenerImpl_Test.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataReceivedListenerImpl_Test.java
index 6d60cef59..c42d78f9c 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataReceivedListenerImpl_Test.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataReceivedListenerImpl_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -68,7 +68,7 @@ public void testGettingMetadata() throws IOException, InterruptedException {
// change permissions
if (Platform.isWindows()) {
- Runtime.getRuntime().exec("attrib -A " + filePath.toString()).waitFor();
+ Runtime.getRuntime().exec("attrib -A " + filePath).waitFor();
} else {
final PosixFileAttributes attributes = Files.readAttributes(filePath, PosixFileAttributes.class);
final Set permissions = attributes.permissions();
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataRestoreFactory_Test.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataRestoreFactory_Test.java
index 81b2e95e0..431711f44 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataRestoreFactory_Test.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/MetadataRestoreFactory_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -31,7 +31,7 @@ public void testThatRunningOnMacReturnsMacMetaDataRestore() {
final Metadata metadata = null;
final String filePath = ".";
- final MetadataRestore metadataRestorer = new MetadataRestoreFactory().getOSSpecificMetadataRestore(metadata, filePath);
+ final MetadataRestore metadataRestorer = MetadataRestoreFactory.getOSSpecificMetadataRestore(metadata, filePath);
assertEquals(MACMetadataRestore.class, metadataRestorer.getClass());
}
@@ -43,7 +43,7 @@ public void testThatRunningOnWindowsReturnsWindowsMetaDataRestore() {
final Metadata metadata = null;
final String filePath = ".";
- final MetadataRestore metadataRestorer = new MetadataRestoreFactory().getOSSpecificMetadataRestore(metadata, filePath);
+ final MetadataRestore metadataRestorer = MetadataRestoreFactory.getOSSpecificMetadataRestore(metadata, filePath);
assertEquals(WindowsMetadataRestore.class, metadataRestorer.getClass());
}
@@ -55,7 +55,7 @@ public void testThatRunningOnLinuxReturnsLinuxMetaDataRestore() {
final Metadata metadata = null;
final String filePath = ".";
- final MetadataRestore metadataRestorer = new MetadataRestoreFactory().getOSSpecificMetadataRestore(metadata, filePath);
+ final MetadataRestore metadataRestorer = MetadataRestoreFactory.getOSSpecificMetadataRestore(metadata, filePath);
assertEquals(PosixMetadataRestore.class, metadataRestorer.getClass());
}
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/PosixMetadataRestore_Test.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/PosixMetadataRestore_Test.java
index 07ab02d07..fb4bf9aaf 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/PosixMetadataRestore_Test.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/PosixMetadataRestore_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -53,7 +53,7 @@ public void checkPreconditions() {
private final File file = new File(getClass().getClassLoader().getResource("LoremIpsum.txt").getFile());
@Test
- public void restoreFileTimes_Test() throws Exception{
+ public void restoreFileTimesTest() throws Exception{
final BasicHeader basicHeader[] = new BasicHeader[3];
final BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
basicHeader[0] = new BasicHeader(MetadataKeyConstants.METADATA_PREFIX + MetadataKeyConstants.KEY_CREATION_TIME, String.valueOf(attr.creationTime().toMillis()));
@@ -96,7 +96,7 @@ public void restorePermissions() throws Exception{
Assert.assertEquals(getPermissionInOctal(PosixFilePermissions.toString(fileAttributesAfterRestore.permissions())), basicHeader[0].getValue());
}
- private Metadata genMetadata(final Header... headers) {
+ private static Metadata genMetadata(final Header... headers) {
final ImmutableMultimap.Builder mapBuilder = ImmutableMultimap.builder();
for (final Header header : headers) {
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/PosixMetadataStore_Test.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/PosixMetadataStore_Test.java
index dd2a25af9..82de552bf 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/PosixMetadataStore_Test.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/PosixMetadataStore_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -38,7 +38,7 @@ public class PosixMetadataStore_Test {
private final PosixMetadataStore posixMetadataStore = new PosixMetadataStore(mMetadataMap);
@Test
- public void saveCreationTimeMetaData_Test() throws IOException {
+ public void saveCreationTimeMetaDataTest() throws IOException {
final BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
final long creationTime = attr.creationTime().toMillis();
posixMetadataStore.saveCreationTimeMetaData(attr);
@@ -46,7 +46,7 @@ public void saveCreationTimeMetaData_Test() throws IOException {
}
@Test
- public void saveAccessTimeMetaData_Test() throws IOException {
+ public void saveAccessTimeMetaDataTest() throws IOException {
final BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
final long lastAccessTime = attr.lastAccessTime().toMillis();
posixMetadataStore.saveAccessTimeMetaData(attr);
@@ -55,7 +55,7 @@ public void saveAccessTimeMetaData_Test() throws IOException {
@Test
- public void saveLastModifiedTime_Test() throws IOException {
+ public void saveLastModifiedTimeTest() throws IOException {
final BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
final long lastModifiedTime = attr.lastModifiedTime().toMillis();
posixMetadataStore.saveLastModifiedTime(attr);
@@ -63,7 +63,7 @@ public void saveLastModifiedTime_Test() throws IOException {
}
@Test
- public void saveOSMetaData_Test() throws IOException {
+ public void saveOSMetaDataTest() throws IOException {
final String localOSName = MetaDataUtil.getOS();
posixMetadataStore.saveOSMetaData(localOSName);
Assert.assertEquals(mMetadataMap.build().get(MetadataKeyConstants.METADATA_PREFIX + MetadataKeyConstants.KEY_OS), String.valueOf(localOSName));
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/WindowsMetadataRestore_Test.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/WindowsMetadataRestore_Test.java
index 3da51176b..151d56954 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/WindowsMetadataRestore_Test.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/WindowsMetadataRestore_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -56,7 +56,7 @@ public void checkPreconditions() {
}
@Test
- public void restoreFileTimes_Test() throws Exception {
+ public void restoreFileTimesTest() throws Exception {
final BasicHeader basicHeader[] = new BasicHeader[3];
final Path filePath = ResourceUtils.loadFileResource(FILE_NAME);
@@ -75,7 +75,7 @@ public void restoreFileTimes_Test() throws Exception {
@Test
- public void restoreUserAndOwner_Test() throws Exception {
+ public void restoreUserAndOwnerTest() throws Exception {
final ImmutableMap.Builder metadataMap = new ImmutableMap.Builder<>();
final WindowsMetadataStore windowsMetadataStore = new WindowsMetadataStore(metadataMap);
final Class aClass = WindowsMetadataStore.class;
@@ -117,7 +117,7 @@ public void restoreUserAndOwner_Test() throws Exception {
@Test
- public void restorePermissions_Test() throws NoSuchMethodException, IOException, URISyntaxException, InvocationTargetException, IllegalAccessException, InterruptedException {
+ public void restorePermissionsTest() throws NoSuchMethodException, IOException, URISyntaxException, InvocationTargetException, IllegalAccessException, InterruptedException {
final ImmutableMap.Builder mMetadataMap = new ImmutableMap.Builder<>();
final WindowsMetadataStore windowsMetadataStore = new WindowsMetadataStore(mMetadataMap);
final Class aClass = WindowsMetadataStore.class;
@@ -148,7 +148,7 @@ public void restorePermissions_Test() throws NoSuchMethodException, IOException,
windowsMetadataRestore.restorePermissions();
}
- private Metadata genMetadata(final Header... headers) {
+ private static Metadata genMetadata(final Header... headers) {
final ImmutableMultimap.Builder mapBuilder = ImmutableMultimap.builder();
for (final Header header : headers) {
mapBuilder.put(header.getName(), header.getValue());
diff --git a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/WindowsMetadataStore_Test.java b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/WindowsMetadataStore_Test.java
index e78f90df3..d33ce79e1 100644
--- a/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/WindowsMetadataStore_Test.java
+++ b/ds3-metadata/src/test/java/com/spectralogic/ds3client/metadata/WindowsMetadataStore_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -38,7 +38,7 @@ public class WindowsMetadataStore_Test {
private final WindowsMetadataStore windowsMetadataStore = new WindowsMetadataStore(mMetadataMap);
@Test
- public void saveCreationTimeMetaData_Test() throws IOException {
+ public void saveCreationTimeMetaDataTest() throws IOException {
final BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
final long creationTime = attr.creationTime().toMillis();
windowsMetadataStore.saveCreationTimeMetaData(attr);
@@ -46,7 +46,7 @@ public void saveCreationTimeMetaData_Test() throws IOException {
}
@Test
- public void saveAccessTimeMetaData_Test() throws IOException {
+ public void saveAccessTimeMetaDataTest() throws IOException {
final BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
final long lastAccessTime = attr.lastAccessTime().toMillis();
windowsMetadataStore.saveAccessTimeMetaData(attr);
@@ -55,7 +55,7 @@ public void saveAccessTimeMetaData_Test() throws IOException {
@Test
- public void saveLastModifiedTime_Test() throws IOException {
+ public void saveLastModifiedTimeTest() throws IOException {
final BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
final long lastModifiedTime = attr.lastModifiedTime().toMillis();
windowsMetadataStore.saveLastModifiedTime(attr);
@@ -63,14 +63,14 @@ public void saveLastModifiedTime_Test() throws IOException {
}
@Test
- public void saveOSMetaData_Test() throws IOException {
+ public void saveOSMetaDataTest() throws IOException {
final String localOSName = MetaDataUtil.getOS();
windowsMetadataStore.saveOSMetaData(localOSName);
Assert.assertEquals(mMetadataMap.build().get(METADATA_PREFIX + MetadataKeyConstants.KEY_OS), String.valueOf(localOSName));
}
@Test
- public void saveWinDescriptor_Test() throws Exception {
+ public void saveWinDescriptorTest() throws Exception {
if (MetaDataUtil.getOS().contains("Windows")) {
final Class aClass = WindowsMetadataStore.class;
final Method method = aClass.getDeclaredMethod("saveWindowsDescriptors", new Class[]{Path.class});
@@ -83,7 +83,7 @@ public void saveWinDescriptor_Test() throws Exception {
}
@Test
- public void saveFlagMetadata_Test() throws Exception {
+ public void saveFlagMetadataTest() throws Exception {
if (MetaDataUtil.getOS().contains("Windows")) {
final Class aClass = WindowsMetadataStore.class;
final Method method = aClass.getDeclaredMethod("saveFlagMetaData", new Class[]{Path.class});
@@ -94,7 +94,7 @@ public void saveFlagMetadata_Test() throws Exception {
}
@Test
- public void saveWindowsfilePermissions_Test() throws Exception {
+ public void saveWindowsFilePermissionsTest() throws Exception {
if (MetaDataUtil.getOS().contains("Windows")) {
final Class aClass = WindowsMetadataStore.class;
final Method method = aClass.getDeclaredMethod("saveWindowsfilePermissions", new Class[]{Path.class});
diff --git a/ds3-sdk-integration/README.md b/ds3-sdk-integration/README.md
index 083732e36..6bacecee9 100644
--- a/ds3-sdk-integration/README.md
+++ b/ds3-sdk-integration/README.md
@@ -14,14 +14,14 @@ To run the integrations tests you must be at the root of the project `ds3_java_s
To execute only the unit tests (no device connection required):
- ./gradlew clean ds3-sdk:test
+ ./gradlew clean test
To execute only the integration tests:
- ./gradlew clean ds3-sdk-integration:test
+ ./gradlew clean integrationTest
To run both the integration tests and the unit tests execute:
- ./gradlew clean test
+ ./gradlew clean test integrationTest
The integration tests **should** clean up after themselves. If they do not, that is considered an error.
diff --git a/ds3-sdk-integration/build.gradle.kts b/ds3-sdk-integration/build.gradle.kts
new file mode 100644
index 000000000..0bfe3f53c
--- /dev/null
+++ b/ds3-sdk-integration/build.gradle.kts
@@ -0,0 +1,57 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+plugins {
+ `ds3-java-sdk-internal-convention`
+}
+
+dependencies {
+ implementation(project(":ds3-utils"))
+ implementation(project(":ds3-sdk"))
+
+ implementation(libs.commonsIo)
+ implementation(libs.guava)
+ implementation(libs.slf4jApi)
+ implementation(libs.hamcrest)
+ implementation(libs.junit)
+ implementation(libs.junitJupiterApi)
+
+ testImplementation(project(":ds3-metadata"))
+
+ testImplementation(libs.httpclient)
+ testImplementation(libs.commonsLang3)
+
+ testRuntimeOnly(libs.junitVintageEngine)
+}
+
+sourceSets {
+ create("integrationTest") {
+ compileClasspath += sourceSets.main.get().output
+ runtimeClasspath += sourceSets.main.get().output
+ }
+}
+
+val integrationTest = task("integrationTest") {
+ description = "Run integration tests."
+ group = "verification"
+ testClassesDirs = sourceSets["integrationTest"].output.classesDirs
+ classpath = sourceSets["integrationTest"].runtimeClasspath
+ shouldRunAfter("test")
+}
+
+configurations["integrationTestImplementation"].extendsFrom(configurations.testImplementation.get())
+configurations["integrationTestRuntimeOnly"].extendsFrom(configurations.testRuntimeOnly.get())
+
+tasks.check { dependsOn(integrationTest) }
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/MockedHeaders.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/MockedHeaders.java
similarity index 96%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/MockedHeaders.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/MockedHeaders.java
index b56609b2b..8553d1f61 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/MockedHeaders.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/MockedHeaders.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/MockedWebResponse.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/MockedWebResponse.java
similarity index 96%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/MockedWebResponse.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/MockedWebResponse.java
index 091fc95af..fe7fc3817 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/MockedWebResponse.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/MockedWebResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/helpers/FileSystemHelper_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/helpers/FileSystemHelper_Test.java
similarity index 90%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/helpers/FileSystemHelper_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/helpers/FileSystemHelper_Test.java
index c38e226ef..c2bbb872f 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/helpers/FileSystemHelper_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/helpers/FileSystemHelper_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -15,9 +15,6 @@
package com.spectralogic.ds3client.helpers;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.spectralogic.ds3client.Ds3Client;
import com.spectralogic.ds3client.helpers.events.SameThreadEventRunner;
import com.spectralogic.ds3client.integration.Util;
@@ -31,6 +28,8 @@
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.IOException;
@@ -39,17 +38,16 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import static com.spectralogic.ds3client.integration.Util.deleteAllContents;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.*;
public class FileSystemHelper_Test {
private static final Logger LOG = LoggerFactory.getLogger(FileSystemHelper_Test.class);
@@ -101,7 +99,7 @@ public void testObjectsFitBucketWithNonExistentBucket() {
maxNumObjectTransferAttempts);
final ObjectStorageSpaceVerificationResult result = ds3ClientHelpers.objectsFromBucketWillFitInDirectory(
- "bad bucket name", Arrays.asList(new String[] {}), Paths.get("."));
+ "bad bucket name", Collections.emptyList(), Paths.get("."));
assertEquals(ObjectStorageSpaceVerificationResult.VerificationStatus.BucketDoesNotExist, result.getVerificationStatus());
assertEquals(0, result.getRequiredSpace());
@@ -122,7 +120,7 @@ public void testObjectsFitBucketWithPathNotDirectory() throws IOException {
try {
final ObjectStorageSpaceVerificationResult result = ds3ClientHelpers.objectsFromBucketWillFitInDirectory(
- "bad bucket name", Arrays.asList(new String[]{}), textFile);
+ "bad bucket name", Collections.emptyList(), textFile);
assertEquals(ObjectStorageSpaceVerificationResult.VerificationStatus.PathIsNotADirectory, result.getVerificationStatus());
assertEquals(0, result.getRequiredSpace());
@@ -146,7 +144,7 @@ public void testObjectsFitBucketPathDoesNotExist() throws IOException {
FileUtils.deleteDirectory(directory.toFile());
final ObjectStorageSpaceVerificationResult result = ds3ClientHelpers.objectsFromBucketWillFitInDirectory(
- "bad bucket name", Arrays.asList(new String[]{}), directory);
+ "bad bucket name", Collections.emptyList(), directory);
assertEquals(ObjectStorageSpaceVerificationResult.VerificationStatus.PathDoesNotExist, result.getVerificationStatus());
assertEquals(0, result.getRequiredSpace());
@@ -168,7 +166,7 @@ public void testObjectsFitBucketPathLacksAccess() throws IOException, Interrupte
// Deny write data access to everyone, making the directory unwritable
Runtime.getRuntime().exec("icacls dir /deny Everyone:(WD)").waitFor();
} else {
- Runtime.getRuntime().exec("chmod -w " + directory.toString()).waitFor();
+ Runtime.getRuntime().exec("chmod -w " + directory).waitFor();
final Process lsProcess = Runtime.getRuntime().exec("ls -l");
lsProcess.waitFor();
try (final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(lsProcess.getInputStream()))) {
@@ -183,7 +181,7 @@ public void testObjectsFitBucketPathLacksAccess() throws IOException, Interrupte
try {
final ObjectStorageSpaceVerificationResult result = ds3ClientHelpers.objectsFromBucketWillFitInDirectory(
- "bad bucket name", Arrays.asList(new String[]{}), directory);
+ "bad bucket name", Collections.emptyList(), directory);
LOG.info(result.toString());
@@ -197,7 +195,7 @@ public void testObjectsFitBucketPathLacksAccess() throws IOException, Interrupte
// Grant write data access to everyone, making the directory writable, so we can delete it.
Runtime.getRuntime().exec("icacls dir /grant Everyone:(WD)").waitFor();
} else {
- Runtime.getRuntime().exec("chmod +w " + directory.toString()).waitFor();
+ Runtime.getRuntime().exec("chmod +w " + directory).waitFor();
}
FileUtils.deleteDirectory(directory.toFile());
@@ -224,8 +222,8 @@ private interface ResultVerifier {
void verifyResult(final ObjectStorageSpaceVerificationResult result, final long totalRequiredSize);
}
- private void putObjectThenRunVerification(final FileSystemHelper fileSystemHelper,
- final ResultVerifier resultVerifier)
+ private static void putObjectThenRunVerification(final FileSystemHelper fileSystemHelper,
+ final ResultVerifier resultVerifier)
throws IOException, URISyntaxException
{
try {
@@ -313,4 +311,26 @@ public long getAvailableFileSpace(final Path path) throws IOException {
throw new IOException("IOExceptionAtor");
}
}
+
+ @Test
+ public void createFolderWithSlash() throws IOException {
+ final String folderName = "FolderNameWithSlash/";
+
+ try {
+ HELPERS.createFolder(BUCKET_NAME, folderName);
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void createFolderWithNoSlash() throws IOException {
+ final String folderName = "FolderNameNoSlash";
+
+ try {
+ HELPERS.createFolder(BUCKET_NAME, folderName);
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/helpers/channelbuilders/ObjectStreamBuilder_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/helpers/channelbuilders/ObjectStreamBuilder_Test.java
similarity index 95%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/helpers/channelbuilders/ObjectStreamBuilder_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/helpers/channelbuilders/ObjectStreamBuilder_Test.java
index 90949bbac..7e700a9b2 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/helpers/channelbuilders/ObjectStreamBuilder_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/helpers/channelbuilders/ObjectStreamBuilder_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -82,7 +82,7 @@ public void afterRunningTestMethod() throws IOException {
}
@Test
- public void objectInputStreamBuilder_Test() throws IOException, URISyntaxException {
+ public void objectInputStreamBuilderTest() throws IOException, URISyntaxException {
//Verify that the object was transferred correctly to the BP in beforeRunningTestMethod
final GetObjectDetailsSpectraS3Request objectDetailsRequest =
new GetObjectDetailsSpectraS3Request(OBJ_NAME, BUCKET_NAME);
@@ -93,7 +93,7 @@ public void objectInputStreamBuilder_Test() throws IOException, URISyntaxExcepti
}
@Test
- public void objectOutputStreamBuilder_Test() throws IOException, URISyntaxException {
+ public void objectOutputStreamBuilderTest() throws IOException, URISyntaxException {
//Retrieve the object on the BP using ObjectOutputStreamBuilder and verify contents
final Ds3Object obj = new Ds3Object(OBJ_NAME, OBJ_BYTES.length);
final Ds3ClientHelpers.Job job = HELPERS.startReadJob(BUCKET_NAME, Lists.newArrayList(obj));
diff --git a/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/helpers/channelbuilders/RepeatStringObjectChannelBuilder.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/helpers/channelbuilders/RepeatStringObjectChannelBuilder.java
new file mode 100644
index 000000000..70075b55f
--- /dev/null
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/helpers/channelbuilders/RepeatStringObjectChannelBuilder.java
@@ -0,0 +1,102 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+package com.spectralogic.ds3client.helpers.channelbuilders;
+
+import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
+
+import java.nio.ByteBuffer;
+import java.nio.channels.SeekableByteChannel;
+
+public class RepeatStringObjectChannelBuilder implements Ds3ClientHelpers.ObjectChannelBuilder {
+ private final int bufferSize;
+ private final long sizeOfFiles;
+ private final String inputDataHeader;
+
+ public RepeatStringObjectChannelBuilder(final String inputDataHeader, final int bufferSize, final long sizeOfFile) {
+ this.bufferSize = bufferSize;
+ this.sizeOfFiles = sizeOfFile;
+ this.inputDataHeader = inputDataHeader;
+ }
+
+ @Override
+ public SeekableByteChannel buildChannel(final String key) {
+ return new RepeatStringObjectChannelBuilder.RepeatStringByteChannel(inputDataHeader + key, this.bufferSize, this.sizeOfFiles);
+ }
+
+ private static class RepeatStringByteChannel implements SeekableByteChannel {
+ final private byte[] backingArray;
+ final private int bufferSize;
+ final private long limit;
+ private boolean isOpen;
+ private int position;
+
+ RepeatStringByteChannel(final String inputData, final int bufferSize, final long size) {
+ this.bufferSize = bufferSize;
+ final byte[] bytes = new byte[bufferSize];
+ final byte[] stringBytes = inputData.getBytes();
+ int stringPosition = 0;
+ for (int i = 0; i < bufferSize; i++) {
+ bytes[i] = stringBytes[stringPosition];
+ if (++stringPosition >= inputData.length()) {
+ stringPosition = 0;
+ }
+ }
+
+ backingArray = bytes;
+
+ this.position = 0;
+ this.limit = size;
+ this.isOpen = true;
+ }
+
+ public void close() {
+ this.isOpen = false;
+ }
+
+ public boolean isOpen() {
+ return this.isOpen;
+ }
+
+ public long position() {
+ return (long) this.position;
+ }
+
+ public SeekableByteChannel position(final long newPosition) {
+ this.position = (int) newPosition;
+ return this;
+ }
+
+ public int read(final ByteBuffer dst) {
+ final int amountToRead = Math.min(dst.remaining(), this.bufferSize);
+ dst.put(this.backingArray, 0, amountToRead);
+ return amountToRead;
+ }
+
+ public long size() {
+ return this.limit;
+ }
+
+ public SeekableByteChannel truncate(final long size) {
+ return this;
+ }
+
+ public int write(final ByteBuffer src) {
+ final int amountToWrite = Math.min(src.remaining(), this.bufferSize);
+ src.get(this.backingArray, 0, amountToWrite);
+ return amountToWrite;
+ }
+ }
+}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/AdvancedBucketManagement_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/AdvancedBucketManagement_Test.java
similarity index 71%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/AdvancedBucketManagement_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/AdvancedBucketManagement_Test.java
index 13f4392f1..3fbbc43bc 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/AdvancedBucketManagement_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/AdvancedBucketManagement_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -60,7 +60,7 @@ public static void teardown() throws IOException, SignatureException {
}
@Test
- public void createDeleteDataPolicy_Test() throws IOException, SignatureException {
+ public void createDeleteDataPolicyTest() throws IOException, SignatureException {
final String dataPolicyName = "ds3_java_sdk_create_delete_data_policy";
try {
@@ -86,17 +86,18 @@ public void createDeleteDataPolicy_Test() throws IOException, SignatureException
}
@Test
- public void createDeleteEmptyStorageDomain_Test() throws IOException, SignatureException {
+ public void createDeleteEmptyStorageDomainTest() throws IOException, SignatureException {
final String storageDomainName = "create_delete_empty_storage_domain";
try {
//Create a test storage domain
- final PutStorageDomainSpectraS3Response storageDomainResponse = createStorageDomain(
+ final StorageDomain storageDomain = createStorageDomain(
storageDomainName,
- client);
+ client,
+ true);
- assertThat(storageDomainResponse.getStorageDomainResult(), is(notNullValue()));
- assertThat(storageDomainResponse.getStorageDomainResult().getName(), is(storageDomainName));
+ assertThat(storageDomain, is(notNullValue()));
+ assertThat(storageDomain.getName(), is(storageDomainName));
} finally {
//Delete the test storage domain
deleteStorageDomain(storageDomainName, client);
@@ -104,18 +105,19 @@ public void createDeleteEmptyStorageDomain_Test() throws IOException, SignatureE
}
@Test
- public void createDeletePoolPartition_Test() throws IOException, SignatureException {
+ public void createDeletePoolPartitionTest() throws IOException, SignatureException {
final String poolPartitionName = "create_delete_pool_partition";
try {
//Create the pool partition
- final PutPoolPartitionSpectraS3Response createPoolResponse = createPoolPartition(
+ final PoolPartition poolPartition = createPoolPartition(
poolPartitionName,
PoolType.ONLINE,
- client);
+ client,
+ true);
- assertThat(createPoolResponse.getPoolPartitionResult(), is(notNullValue()));
- assertThat(createPoolResponse.getPoolPartitionResult().getName(), is(poolPartitionName));
+ assertThat(poolPartition, is(notNullValue()));
+ assertThat(poolPartition.getName(), is(poolPartitionName));
//Get the pool partition to verify that was created on the BP
final GetPoolPartitionSpectraS3Response getPoolResponse = client
@@ -130,40 +132,44 @@ public void createDeletePoolPartition_Test() throws IOException, SignatureExcept
}
@Test
- public void createPoolStorageDomainMember_Test() throws IOException, SignatureException {
+ public void createPoolStorageDomainMemberTest() throws IOException, SignatureException {
final String storageDomainName = "create_pool_storage_domain_member_sd";
final String poolPartitionName = "create_pool_storage_domain_member_pp";
UUID storageDomainMemberId = null;
try {
//Create storage domain
- final PutStorageDomainSpectraS3Response createStorageDomain = createStorageDomain(
+ final StorageDomain storageDomain = createStorageDomain(
storageDomainName,
- client);
+ client,
+ true);
//Create pool partition
- final PutPoolPartitionSpectraS3Response createPoolPartition = createPoolPartition(
+ final PoolPartition poolPartition = createPoolPartition(
poolPartitionName,
PoolType.ONLINE,
- client);
+ client,
+ true);
//Create storage domain member linking pool partition to storage domain
- final PutPoolStorageDomainMemberSpectraS3Response createMemberResponse = createPoolStorageDomainMember(
- createStorageDomain.getStorageDomainResult().getId(),
- createPoolPartition.getPoolPartitionResult().getId(),
- client);
- storageDomainMemberId = createMemberResponse.getStorageDomainMemberResult().getId();
- assertThat(createMemberResponse.getStorageDomainMemberResult(), is(notNullValue()));
+ final StorageDomainMember storageDomainMember = createPoolStorageDomainMember(
+ storageDomain.getId(),
+ poolPartition.getId(),
+ client,
+ true);
+
+ assertThat(storageDomainMember, is(notNullValue()));
+ storageDomainMemberId = storageDomainMember.getId();
//Verify that the storage domain member exists
final GetStorageDomainMembersSpectraS3Response getMembers = client.getStorageDomainMembersSpectraS3(
new GetStorageDomainMembersSpectraS3Request()
- .withPoolPartitionId(createPoolPartition.getPoolPartitionResult().getId().toString())
- .withStorageDomainId(createStorageDomain.getStorageDomainResult().getId().toString()));
+ .withPoolPartitionId(poolPartition.getId().toString())
+ .withStorageDomainId(storageDomain.getId().toString()));
final List members = getMembers.getStorageDomainMemberListResult().getStorageDomainMembers();
assertThat(members.size(), is(1));
- assertThat(members.get(0).getPoolPartitionId(), is(createPoolPartition.getPoolPartitionResult().getId()));
- assertThat(members.get(0).getStorageDomainId(), is(createStorageDomain.getStorageDomainResult().getId()));
+ assertThat(members.get(0).getPoolPartitionId(), is(poolPartition.getId()));
+ assertThat(members.get(0).getStorageDomainId(), is(storageDomain.getId()));
} finally {
deleteStorageDomainMember(storageDomainMemberId, client);
deletePoolPartition(poolPartitionName, client);
@@ -172,7 +178,7 @@ public void createPoolStorageDomainMember_Test() throws IOException, SignatureEx
}
@Test
- public void createBucketSpectraS3_Test() throws IOException, SignatureException {
+ public void createBucketSpectraS3Test() throws IOException, SignatureException {
final String bucketName = "create_bucket_spectra_s3";
try {
final PutBucketSpectraS3Response response = client
@@ -186,7 +192,7 @@ public void createBucketSpectraS3_Test() throws IOException, SignatureException
}
@Test
- public void createBucketSpectraS3_WithDataPolicy_Test() throws IOException, SignatureException {
+ public void createBucketSpectraS3WithDataPolicyTest() throws IOException, SignatureException {
final String bucketName = "create_bucket_spectra_s3";
final String dataPolicyName = "create_bucket_spectra_s3_data_policy";
final String storageDomainName = "create_bucket_spectra_s3_storage_domain";
@@ -201,29 +207,33 @@ public void createBucketSpectraS3_WithDataPolicy_Test() throws IOException, Sign
client);
//Create storage domain
- final PutStorageDomainSpectraS3Response storageDomainResponse = createStorageDomain(
+ final StorageDomain storageDomain = createStorageDomain(
storageDomainName,
- client);
+ client,
+ true);
//Create pool partition
- final PutPoolPartitionSpectraS3Response poolPartitionResponse = createPoolPartition(
+ final PoolPartition poolPartition = createPoolPartition(
poolPartitionName,
PoolType.ONLINE,
- client);
+ client,
+ true);
//Create storage domain member linking pool partition to storage domain
- final PutPoolStorageDomainMemberSpectraS3Response memberResponse = createPoolStorageDomainMember(
- storageDomainResponse.getStorageDomainResult().getId(),
- poolPartitionResponse.getPoolPartitionResult().getId(),
- client);
- storageDomainMemberId = memberResponse.getStorageDomainMemberResult().getId();
+ final StorageDomainMember storageDomainMember = createPoolStorageDomainMember(
+ storageDomain.getId(),
+ poolPartition.getId(),
+ client,
+ true);
+ storageDomainMemberId = storageDomainMember.getId();
//create data persistence rule
- final PutDataPersistenceRuleSpectraS3Response dataPersistenceResponse = createDataPersistenceRule(
+ final DataPersistenceRule dataPersistenceRule = createDataPersistenceRule(
dataPolicyResponse.getDataPolicyResult().getId(),
- storageDomainResponse.getStorageDomainResult().getId(),
- client);
- dataPersistenceRuleId = dataPersistenceResponse.getDataPersistenceRuleResult().getDataPolicyId();
+ storageDomain.getId(),
+ client,
+ true);
+ dataPersistenceRuleId = dataPersistenceRule.getDataPolicyId();
//Create bucket with data policy
final PutBucketSpectraS3Response bucketResponse = client
@@ -244,7 +254,7 @@ public void createBucketSpectraS3_WithDataPolicy_Test() throws IOException, Sign
}
@Test
- public void putDuplicateObjects_VersioningKeepLatest_Test() throws IOException,
+ public void putDuplicateObjectsVersioningKeepLatestTest() throws IOException,
SignatureException, URISyntaxException {
final String bucketName = "duplicate_object_versioning_keep_latest";
final String dataPolicyName = "duplicate_object_versioning_keep_latest_dp";
@@ -261,29 +271,33 @@ public void putDuplicateObjects_VersioningKeepLatest_Test() throws IOException,
client);
//Create storage domain
- final PutStorageDomainSpectraS3Response storageDomainResponse = createStorageDomain(
+ final StorageDomain storageDomain = createStorageDomain(
storageDomainName,
- client);
+ client,
+ true);
//Create pool partition
- final PutPoolPartitionSpectraS3Response poolPartitionResponse = createPoolPartition(
+ final PoolPartition poolPartition = createPoolPartition(
poolPartitionName,
PoolType.ONLINE,
- client);
+ client,
+ true);
//Create storage domain member linking pool partition to storage domain
- final PutPoolStorageDomainMemberSpectraS3Response memberResponse = createPoolStorageDomainMember(
- storageDomainResponse.getStorageDomainResult().getId(),
- poolPartitionResponse.getPoolPartitionResult().getId(),
- client);
- storageDomainMemberId = memberResponse.getStorageDomainMemberResult().getId();
+ final StorageDomainMember storageDomainMember = createPoolStorageDomainMember(
+ storageDomain.getId(),
+ poolPartition.getId(),
+ client,
+ true);
+ storageDomainMemberId = storageDomainMember.getId();
//create data persistence rule
- final PutDataPersistenceRuleSpectraS3Response dataPersistenceResponse = createDataPersistenceRule(
+ final DataPersistenceRule dataPersistenceRule = createDataPersistenceRule(
dataPolicyResponse.getDataPolicyResult().getId(),
- storageDomainResponse.getStorageDomainResult().getId(),
- client);
- dataPersistenceRuleId = dataPersistenceResponse.getDataPersistenceRuleResult().getDataPolicyId();
+ storageDomain.getId(),
+ client,
+ true);
+ dataPersistenceRuleId = dataPersistenceRule.getId();
//Create bucket with data policy
client.putBucketSpectraS3(new PutBucketSpectraS3Request(bucketName)
@@ -316,7 +330,7 @@ public void putDuplicateObjects_VersioningKeepLatest_Test() throws IOException,
}
@Test
- public void putDuplicateObjects_VersioningNone_Test() throws IOException,
+ public void putDuplicateObjectsVersioningNoneTest() throws IOException,
SignatureException, URISyntaxException {
final String bucketName = "duplicate_object_versioning_none";
final String dataPolicyName = "duplicate_object_versioning_none_dp";
@@ -333,29 +347,33 @@ public void putDuplicateObjects_VersioningNone_Test() throws IOException,
client);
//Create storage domain
- final PutStorageDomainSpectraS3Response storageDomainResponse = createStorageDomain(
+ final StorageDomain storageDomain = createStorageDomain(
storageDomainName,
- client);
+ client,
+ true);
//Create pool partition
- final PutPoolPartitionSpectraS3Response poolPartitionResponse = createPoolPartition(
+ final PoolPartition poolPartition = createPoolPartition(
poolPartitionName,
PoolType.ONLINE,
- client);
+ client,
+ true);
//Create storage domain member linking pool partition to storage domain
- final PutPoolStorageDomainMemberSpectraS3Response memberResponse = createPoolStorageDomainMember(
- storageDomainResponse.getStorageDomainResult().getId(),
- poolPartitionResponse.getPoolPartitionResult().getId(),
- client);
- storageDomainMemberId = memberResponse.getStorageDomainMemberResult().getId();
+ final StorageDomainMember storageDomainMember = createPoolStorageDomainMember(
+ storageDomain.getId(),
+ poolPartition.getId(),
+ client,
+ true);
+ storageDomainMemberId = storageDomainMember.getId();
//create data persistence rule
- final PutDataPersistenceRuleSpectraS3Response dataPersistenceResponse = createDataPersistenceRule(
+ final DataPersistenceRule dataPersistenceRule = createDataPersistenceRule(
dataPolicyResponse.getDataPolicyResult().getId(),
- storageDomainResponse.getStorageDomainResult().getId(),
- client);
- dataPersistenceRuleId = dataPersistenceResponse.getDataPersistenceRuleResult().getDataPolicyId();
+ storageDomain.getId(),
+ client,
+ true);
+ dataPersistenceRuleId = dataPersistenceRule.getDataPolicyId();
//Create bucket with data policy
client.putBucketSpectraS3(new PutBucketSpectraS3Request(bucketName)
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/CustomParser_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/CustomParser_Test.java
similarity index 68%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/CustomParser_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/CustomParser_Test.java
index 8323abcf5..fb3c5592e 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/CustomParser_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/CustomParser_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -25,7 +25,6 @@
import com.spectralogic.ds3client.commands.spectrads3.GetBulkJobSpectraS3Response;
import com.spectralogic.ds3client.exceptions.ContentLengthNotMatchException;
import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
-import com.spectralogic.ds3client.helpers.channelbuilders.ObjectInputStreamBuilder;
import com.spectralogic.ds3client.integration.test.helpers.TempStorageIds;
import com.spectralogic.ds3client.integration.test.helpers.TempStorageUtil;
import com.spectralogic.ds3client.models.ChecksumType;
@@ -80,13 +79,7 @@ public void beforeRunningTestMethod() throws IOException {
final Ds3Object obj = new Ds3Object(OBJ_NAME, OBJ_BYTES.length);
final Ds3ClientHelpers.Job job = HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(obj));
- job.transfer(new ObjectInputStreamBuilder() {
-
- @Override
- public InputStream buildInputStream(final String key) {
- return new ByteArrayInputStream(OBJ_BYTES);
- }
- });
+ job.transfer(new ObjectInputStreamBuilder());
}
@After
@@ -95,7 +88,7 @@ public void afterRunningTestMethod() throws IOException {
}
@Test
- public void getObjectCustomParser_Test() throws IOException, URISyntaxException {
+ public void getObjectCustomParserTest() throws IOException, URISyntaxException {
final Ds3Object object = new Ds3Object(OBJ_NAME);
final GetBulkJobSpectraS3Response getBulkJobSpectraS3Response = client
.getBulkJobSpectraS3(new GetBulkJobSpectraS3Request(BUCKET_NAME, Lists.newArrayList(object)));
@@ -108,36 +101,13 @@ public void getObjectCustomParser_Test() throws IOException, URISyntaxException
0,
stream);
- client.getObject(request, new Function() {
- @Override
- public GetObjectResponse apply(final GetObjectCustomParserParameters getObjectParserParams) {
- final WebResponse webResponse = getObjectParserParams.getWebResponse();
- final long objectSize = getSizeFromHeaders(webResponse.getHeaders());
- try (final InputStream responseStream = webResponse.getResponseStream()) {
- final long totalBytes = IOUtils.copy(
- responseStream,
- getObjectParserParams.getDestinationChannel(),
- getObjectParserParams.getBufferSize(),
- getObjectParserParams.getObjectName(),
- false);
- getObjectParserParams.getDestinationChannel().close();
-
- if (objectSize != -1 && totalBytes != objectSize) {
- throw new ContentLengthNotMatchException(getObjectParserParams.getObjectName(), objectSize, totalBytes);
- }
-
- } catch (final IOException e) {
- fail();
- }
- return null;
- }
- });
+ client.getObject(request, new GetObjectCustomParserParametersGetObjectResponseFunction());
assertThat(stream.toByteArray(), is(OBJ_BYTES));
}
@SuppressWarnings("deprecation")
@Test (expected = FailedRequestException.class)
- public void getObjectCustomParserNoObject_Test() throws IOException{
+ public void getObjectCustomParserNoObjectTest() throws IOException{
final String objectName = "doesNotExistObject";
final GetObjectRequest request = new GetObjectRequest(
@@ -146,11 +116,46 @@ public void getObjectCustomParserNoObject_Test() throws IOException{
new NullChannel());
//Get object that does not exist
- client.getObject(request, new Function() {
- @Override
- public GetObjectResponse apply(final GetObjectCustomParserParameters getObjectParserParams) {
- return null;
+ client.getObject(request, new NullGetObjectCustomParserParametersGetObjectResponseFunction());
+ }
+
+ private static class ObjectInputStreamBuilder extends com.spectralogic.ds3client.helpers.channelbuilders.ObjectInputStreamBuilder {
+
+ @Override
+ public InputStream buildInputStream(final String key) {
+ return new ByteArrayInputStream(OBJ_BYTES);
+ }
+ }
+
+ private static class GetObjectCustomParserParametersGetObjectResponseFunction implements Function {
+ @Override
+ public GetObjectResponse apply(final GetObjectCustomParserParameters getObjectParserParams) {
+ final WebResponse webResponse = getObjectParserParams.getWebResponse();
+ final long objectSize = getSizeFromHeaders(webResponse.getHeaders());
+ try (final InputStream responseStream = webResponse.getResponseStream()) {
+ final long totalBytes = IOUtils.copy(
+ responseStream,
+ getObjectParserParams.getDestinationChannel(),
+ getObjectParserParams.getBufferSize(),
+ getObjectParserParams.getObjectName(),
+ false);
+ getObjectParserParams.getDestinationChannel().close();
+
+ if (objectSize != -1 && totalBytes != objectSize) {
+ throw new ContentLengthNotMatchException(getObjectParserParams.getObjectName(), objectSize, totalBytes);
+ }
+
+ } catch (final IOException e) {
+ fail();
}
- });
+ return null;
+ }
+ }
+
+ private static class NullGetObjectCustomParserParametersGetObjectResponseFunction implements Function {
+ @Override
+ public GetObjectResponse apply(final GetObjectCustomParserParameters getObjectParserParams) {
+ return null;
+ }
}
}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/DataIntegrity_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/DataIntegrity_Test.java
similarity index 97%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/DataIntegrity_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/DataIntegrity_Test.java
index 85b3be4f0..6240d4983 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/DataIntegrity_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/DataIntegrity_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -173,6 +173,8 @@ public void autoChecksumming() throws IOException {
final SingleChecksumListener listener = new SingleChecksumListener();
+ job.attachChecksumListener(listener);
+ job.removeChecksumListener(listener);
job.attachChecksumListener(listener);
job.transfer(new ResourceObjectPutter("books/"));
@@ -369,7 +371,7 @@ public SeekableByteChannel buildChannel(final String key) throws IOException {
}
}
- private class MultiFileChecksumListener implements ChecksumListener {
+ private static class MultiFileChecksumListener implements ChecksumListener {
private final Map checksumMap;
@@ -387,7 +389,7 @@ public String getChecksum(final String filename) {
}
}
- private class SingleChecksumListener implements ChecksumListener {
+ private static class SingleChecksumListener implements ChecksumListener {
public String getChecksum() {
return checksum;
@@ -401,7 +403,7 @@ public void value(final BulkObject obj, final ChecksumType.Type type, final Stri
}
}
- public void sendAndVerifySingleFile(final String bucketName, final String fileName, final long seed, final int length) throws IOException {
+ public static void sendAndVerifySingleFile(final String bucketName, final String fileName, final long seed, final int length) throws IOException {
try {
HELPERS.ensureBucketExists(bucketName, envDataPolicyId);
diff --git a/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/GetJobManagement_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/GetJobManagement_Test.java
new file mode 100644
index 000000000..629009870
--- /dev/null
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/GetJobManagement_Test.java
@@ -0,0 +1,1515 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+package com.spectralogic.ds3client.integration;
+
+import com.google.common.collect.Lists;
+import com.spectralogic.ds3client.Ds3Client;
+import com.spectralogic.ds3client.Ds3ClientImpl;
+import com.spectralogic.ds3client.commands.GetObjectRequest;
+import com.spectralogic.ds3client.commands.GetObjectResponse;
+import com.spectralogic.ds3client.commands.PutObjectRequest;
+import com.spectralogic.ds3client.commands.spectrads3.GetBulkJobSpectraS3Request;
+import com.spectralogic.ds3client.commands.spectrads3.GetBulkJobSpectraS3Response;
+import com.spectralogic.ds3client.commands.spectrads3.GetJobSpectraS3Request;
+import com.spectralogic.ds3client.commands.spectrads3.GetJobSpectraS3Response;
+import com.spectralogic.ds3client.helpers.ChecksumListener;
+import com.spectralogic.ds3client.helpers.DataTransferredListener;
+import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
+import com.spectralogic.ds3client.helpers.FailureEventListener;
+import com.spectralogic.ds3client.helpers.FileObjectGetter;
+import com.spectralogic.ds3client.helpers.FileObjectPutter;
+
+import com.spectralogic.ds3client.helpers.JobPart;
+import com.spectralogic.ds3client.helpers.MetadataReceivedListener;
+import com.spectralogic.ds3client.helpers.ObjectCompletedListener;
+
+import com.spectralogic.ds3client.helpers.UnrecoverableIOException;
+import com.spectralogic.ds3client.helpers.WaitingForChunksListener;
+import com.spectralogic.ds3client.helpers.events.FailureEvent;
+import com.spectralogic.ds3client.helpers.events.SameThreadEventRunner;
+import com.spectralogic.ds3client.helpers.options.ReadJobOptions;
+import com.spectralogic.ds3client.helpers.options.WriteJobOptions;
+import com.spectralogic.ds3client.helpers.strategy.blobstrategy.BlobStrategy;
+import com.spectralogic.ds3client.helpers.strategy.blobstrategy.ChunkAttemptRetryBehavior;
+import com.spectralogic.ds3client.helpers.strategy.blobstrategy.ChunkAttemptRetryDelayBehavior;
+import com.spectralogic.ds3client.helpers.strategy.blobstrategy.ClientDefinedChunkAttemptRetryDelayBehavior;
+import com.spectralogic.ds3client.helpers.strategy.blobstrategy.GetSequentialBlobStrategy;
+import com.spectralogic.ds3client.helpers.strategy.blobstrategy.MaxChunkAttemptsRetryBehavior;
+import com.spectralogic.ds3client.helpers.strategy.channelstrategy.ChannelStrategy;
+import com.spectralogic.ds3client.helpers.strategy.channelstrategy.SequentialFileWriterChannelStrategy;
+import com.spectralogic.ds3client.helpers.strategy.transferstrategy.EventDispatcher;
+import com.spectralogic.ds3client.helpers.strategy.transferstrategy.EventDispatcherImpl;
+import com.spectralogic.ds3client.helpers.strategy.transferstrategy.MaxNumObjectTransferAttemptsDecorator;
+import com.spectralogic.ds3client.helpers.strategy.transferstrategy.TransferMethod;
+import com.spectralogic.ds3client.helpers.strategy.transferstrategy.TransferRetryDecorator;
+import com.spectralogic.ds3client.helpers.strategy.transferstrategy.TransferStrategy;
+import com.spectralogic.ds3client.helpers.strategy.transferstrategy.TransferStrategyBuilder;
+import com.spectralogic.ds3client.helpers.util.PartialObjectHelpers;
+import com.spectralogic.ds3client.integration.test.helpers.ABMTestHelper;
+import com.spectralogic.ds3client.integration.test.helpers.Ds3ClientShim;
+import com.spectralogic.ds3client.integration.test.helpers.Ds3ClientShimFactory;
+import com.spectralogic.ds3client.integration.test.helpers.TempStorageIds;
+import com.spectralogic.ds3client.integration.test.helpers.TempStorageUtil;
+import com.spectralogic.ds3client.models.BulkObject;
+import com.spectralogic.ds3client.models.ChecksumType;
+import com.spectralogic.ds3client.models.MasterObjectList;
+import com.spectralogic.ds3client.models.Priority;
+import com.spectralogic.ds3client.models.bulk.Ds3Object;
+import com.spectralogic.ds3client.models.bulk.PartialDs3Object;
+import com.spectralogic.ds3client.models.common.Range;
+import com.spectralogic.ds3client.networking.Metadata;
+import com.spectralogic.ds3client.utils.Platform;
+import com.spectralogic.ds3client.utils.ResourceUtils;
+import org.apache.commons.io.FileUtils;
+import org.junit.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URISyntaxException;
+import java.nio.ByteBuffer;
+import java.nio.channels.SeekableByteChannel;
+import java.nio.channels.WritableByteChannel;
+import java.nio.file.AccessDeniedException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardOpenOption;
+import java.security.AccessControlException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static com.spectralogic.ds3client.commands.spectrads3.PutBulkJobSpectraS3Request.MIN_UPLOAD_SIZE_IN_BYTES;
+import static com.spectralogic.ds3client.integration.Util.RESOURCE_BASE_NAME;
+import static com.spectralogic.ds3client.integration.Util.deleteAllContents;
+import static com.spectralogic.ds3client.integration.Util.deleteBucketContents;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.core.IsNull.notNullValue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+public class GetJobManagement_Test {
+
+ private static final Logger LOG = LoggerFactory.getLogger(GetJobManagement_Test.class);
+
+ private static final Ds3Client client = Util.fromEnv();
+ private static final Ds3ClientHelpers HELPERS = Ds3ClientHelpers.wrap(client);
+ private static final String BUCKET_NAME = "Get_Job_Management_Test";
+ private static final String TEST_ENV_NAME = "GetJobManagement_Test";
+ private static final String DISK_FULL_MESSAGE = "There is not enough space on the disk";
+ private static TempStorageIds envStorageIds;
+ private static UUID dataPolicyId;
+
+ @BeforeClass
+ public static void startup() throws Exception {
+ dataPolicyId = TempStorageUtil.setupDataPolicy(TEST_ENV_NAME, false, ChecksumType.Type.MD5, client);
+ envStorageIds = TempStorageUtil.setup(TEST_ENV_NAME, dataPolicyId, client);
+ setupBucket(dataPolicyId);
+ }
+
+ @AfterClass
+ public static void teardown() throws IOException {
+ try {
+ deleteAllContents(client, BUCKET_NAME);
+ } finally {
+ TempStorageUtil.teardown(TEST_ENV_NAME, envStorageIds, client);
+ client.close();
+ }
+ }
+
+ /**
+ * Creates the test bucket with the specified data policy to prevent cascading test failure
+ * when there are multiple data policies
+ */
+ private static void setupBucket(final UUID dataPolicy) {
+ try {
+ HELPERS.ensureBucketExists(BUCKET_NAME, dataPolicy);
+ } catch (final Exception e) {
+ LOG.error("Setting up test environment failed: " + e.getMessage());
+ }
+ }
+
+ @Before
+ public void setupForEachTest() throws Exception {
+ LOG.info("Setting up before test.");
+ putBigFiles();
+ putBeowulf();
+ }
+
+ @After
+ public void teardownForEachtest() throws IOException {
+ LOG.info("Tearing down after test.");
+ deleteBucketContents(client, BUCKET_NAME);
+ }
+
+ private static void putBeowulf() throws Exception {
+ final String book1 = "beowulf.txt";
+ final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
+ final Ds3Object obj = new Ds3Object(book1, Files.size(objPath1));
+ final Ds3ClientHelpers.Job job = HELPERS.startWriteJob(BUCKET_NAME, Lists
+ .newArrayList(obj));
+ final UUID jobId = job.getJobId();
+ final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
+ client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId, 0, Files.size(objPath1)));
+ ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId, client, 20);
+ }
+
+ @SuppressWarnings("deprecation")
+ @Test
+ public void nakedS3Get() throws IOException,
+ URISyntaxException, InterruptedException {
+
+ final WritableByteChannel writeChannel = new NullChannel();
+
+ final GetObjectResponse getObjectResponse = client.getObject(
+ new GetObjectRequest(BUCKET_NAME, "beowulf.txt", writeChannel));
+
+ assertThat(getObjectResponse, is(notNullValue()));
+ assertThat(getObjectResponse.getObjectSize(), is(notNullValue()));
+ }
+
+ @Test
+ public void createReadJob() throws IOException, InterruptedException, URISyntaxException {
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, Lists.newArrayList(
+ new Ds3Object("beowulf.txt", 10)));
+
+ final GetJobSpectraS3Response jobSpectraS3Response = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
+ }
+
+ @Test
+ public void createReadJobWithBigFile() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final String DIR_NAME = "largeFiles/";
+ final String FILE_NAME = "lesmis-copies.txt";
+
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
+
+ final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl)client);
+
+ final int maxNumBlockAllocationRetries = 1;
+ final int maxNumObjectTransferAttempts = 3;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Collections.singletonList(obj));
+
+ final AtomicBoolean dataTransferredEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean objectCompletedEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean checksumEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean metadataEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean waitingForChunksEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean failureEventReceived = new AtomicBoolean(false);
+
+ readJob.attachDataTransferredListener(new DataTransferredListener() {
+ @Override
+ public void dataTransferred(final long size) {
+ dataTransferredEventReceived.set(true);
+ assertEquals(bookSize, size);
+ }
+ });
+ readJob.attachObjectCompletedListener(new ObjectCompletedListener() {
+ @Override
+ public void objectCompleted(final String name) {
+ objectCompletedEventReceived.set(true);
+ }
+ });
+ readJob.attachChecksumListener(new ChecksumListener() {
+ @Override
+ public void value(final BulkObject obj, final ChecksumType.Type type, final String checksum) {
+ checksumEventReceived.set(true);
+ assertEquals("0feqCQBgdtmmgGs9pB/Huw==", checksum);
+ }
+ });
+ readJob.attachMetadataReceivedListener(new MetadataReceivedListener() {
+ @Override
+ public void metadataReceived(final String filename, final Metadata metadata) {
+ metadataEventReceived.set(true);
+ }
+ });
+ readJob.attachWaitingForChunksListener(new WaitingForChunksListener() {
+ @Override
+ public void waiting(final int secondsToWait) {
+ waitingForChunksEventReceived.set(true);
+ }
+ });
+ readJob.attachFailureEventListener(new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ failureEventReceived.set(true);
+ }
+ });
+
+ final GetJobSpectraS3Response jobSpectraS3Response = ds3ClientShim
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
+
+ readJob.transfer(new FileObjectGetter(tempDirectory));
+
+ final File originalFile = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME).toFile();
+ final File fileCopiedFromBP = Paths.get(tempDirectory.toString(), FILE_NAME).toFile();
+ assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
+
+ assertTrue(dataTransferredEventReceived.get());
+ assertTrue(objectCompletedEventReceived.get());
+ assertTrue(checksumEventReceived.get());
+ assertTrue(metadataEventReceived.get());
+ assertFalse(waitingForChunksEventReceived.get());
+ assertFalse(failureEventReceived.get());
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ private static void putBigFiles() throws IOException, URISyntaxException {
+ final String DIR_NAME = "largeFiles/";
+ final String[] FILE_NAMES = new String[] {"lesmis.txt", "lesmis-copies.txt", "GreatExpectations.txt" };
+
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objects = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objects.add(obj);
+ }
+
+ final int maxNumBlockAllocationRetries = 1;
+ final int maxNumObjectTransferAttempts = 3;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, objects);
+ writeJob.transfer(new FileObjectPutter(dirPath));
+ }
+
+ @Test(expected = AccessDeniedException.class)
+ public void testReadRetryBugFixWithUnwritableDirectory() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InterruptedException {
+ Assume.assumeFalse(iAmRoot());
+
+ final String tempPathPrefix = null;
+ final Path tempDirectoryPath = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ final String tempDirectoryName = tempDirectoryPath.toString();
+
+ if (org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS) {
+ // Deny write data access to everyone, making the directory unwritable.
+ Runtime.getRuntime().exec("icacls " + tempDirectoryName + " /deny Everyone:(WD)").waitFor();
+ } else {
+ Runtime.getRuntime().exec("chmod -w " + tempDirectoryName).waitFor();
+ }
+
+ try {
+ disableWritePermissionForRoot(tempDirectoryName);
+
+ final String DIR_NAME = "largeFiles/";
+ final String FILE_NAME = "lesmis-copies.txt";
+
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
+
+ final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl)client);
+
+ final int maxNumBlockAllocationRetries = 1;
+ final int maxNumObjectTransferAttempts = 3;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Collections.singletonList(obj));
+
+ final GetJobSpectraS3Response jobSpectraS3Response = ds3ClientShim
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
+
+ readJob.transfer(new FileObjectGetter(tempDirectoryPath));
+
+ final File originalFile = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME).toFile();
+ final File fileCopiedFromBP = Paths.get(tempDirectoryPath.toString(), FILE_NAME).toFile();
+ assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
+ } finally {
+ enableWritePermissionForRoot(tempDirectoryName);
+
+ if (org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS) {
+ // Grant write data access to everyone, so we can delete the directory
+ Runtime.getRuntime().exec("icacls " + tempDirectoryName + " /grant Everyone:(WD)").waitFor();
+ } else {
+ Runtime.getRuntime().exec("chmod +w " + tempDirectoryName).waitFor();
+ }
+ FileUtils.deleteDirectory(tempDirectoryPath.toFile());
+ }
+ }
+
+ private static void disableWritePermissionForRoot(final String fileOrDirName) {
+ try {
+ if (iAmRoot()) {
+ Runtime.getRuntime().exec("chattr +i " + fileOrDirName).waitFor();
+ }
+ } catch (final IOException | InterruptedException e) {
+ LOG.error("Error setting file immutable: " + fileOrDirName, e);
+ }
+ }
+
+ private static boolean iAmRoot() {
+ if ( ! Platform.isLinux()) {
+ return false;
+ }
+
+ BufferedReader idProcessStdOut = null;
+
+ try {
+ final Process idProcess = Runtime.getRuntime().exec("id");
+ idProcessStdOut = new BufferedReader(new InputStreamReader(idProcess.getInputStream()));
+ final String idProcessResult = idProcessStdOut.readLine();
+ idProcess.waitFor();
+
+ final String[] idFields = idProcessResult.split("=");
+
+ final String[] uidString = idFields[1].split("\\(");
+
+ return uidString[0].equals("0");
+ } catch (final IOException | InterruptedException e) {
+ LOG.error("Error getting user id.", e);
+ } finally {
+ try {
+ if (idProcessStdOut != null) {
+ idProcessStdOut.close();
+ }
+ } catch (final IOException e) {
+ LOG.error("Failure closing stdout for process that gets user id.");
+ }
+ }
+
+ return false;
+ }
+
+ private static void enableWritePermissionForRoot(final String fileOrDirName) {
+ try {
+ if (iAmRoot()) {
+ Runtime.getRuntime().exec("chattr -i " + fileOrDirName).waitFor();
+ }
+ } catch (final IOException | InterruptedException e) {
+ LOG.error("Error setting file immutable: " + fileOrDirName, e);
+ }
+ }
+
+ @Test
+ public void testReadRetrybugWhenChannelThrowsAccessException() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ final String tempPathPrefix = null;
+ final Path tempDirectoryPath = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ final AtomicBoolean caughtException = new AtomicBoolean(false);
+
+ try {
+ final String DIR_NAME = "largeFiles/";
+ final String FILE_NAME = "lesmis-copies.txt";
+
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
+
+ final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl) client);
+
+ final int maxNumBlockAllocationRetries = 1;
+ final int maxNumObjectTransferAttempts = 3;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Collections.singletonList(obj));
+
+ final GetJobSpectraS3Response jobSpectraS3Response = ds3ClientShim
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
+
+ readJob.transfer(new Ds3ClientHelpers.ObjectChannelBuilder() {
+ @Override
+ public SeekableByteChannel buildChannel(final String key) throws IOException {
+ throw new AccessControlException(key);
+ }
+ });
+ } catch (final IOException e) {
+ caughtException.set(true);
+ assertTrue(e.getCause() instanceof AccessControlException);
+ } finally {
+ FileUtils.deleteDirectory(tempDirectoryPath.toFile());
+ }
+
+ assertTrue(caughtException.get());
+ }
+
+ @Test
+ public void testReadRetryBugWhenDiskIsFull() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ final String tempPathPrefix = null;
+ final Path tempDirectoryPath = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final String DIR_NAME = "largeFiles/";
+ final String FILE_NAME = "lesmis-copies.txt";
+
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
+
+ final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl)client);
+
+ final int maxNumBlockAllocationRetries = 1;
+ final int maxNumObjectTransferAttempts = 3;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Collections.singletonList(obj));
+
+ final GetJobSpectraS3Response jobSpectraS3Response = ds3ClientShim
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
+
+ try {
+ readJob.transfer(new FailingChannelBuilder());
+ } catch (final UnrecoverableIOException e) {
+ assertEquals(DISK_FULL_MESSAGE, e.getCause().getMessage());
+ }
+ } finally {
+ FileUtils.deleteDirectory(tempDirectoryPath.toFile());
+ }
+ }
+
+ private static class FailingChannelBuilder implements Ds3ClientHelpers.ObjectChannelBuilder {
+ @Override
+ public SeekableByteChannel buildChannel(final String key) throws IOException {
+ final SeekableByteChannel seekableByteChannel = Files.newByteChannel(Paths.get(key),
+ StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE,
+ StandardOpenOption.DELETE_ON_CLOSE);
+ return new SeekableByteChannelWrapper(seekableByteChannel);
+ }
+ }
+
+ private static class SeekableByteChannelWrapper implements SeekableByteChannel {
+ private final SeekableByteChannel seekableByteChannel;
+
+ private SeekableByteChannelWrapper(final SeekableByteChannel seekableByteChannel) {
+ this.seekableByteChannel = seekableByteChannel;
+ }
+
+ @Override
+ public int read(final ByteBuffer dst) throws IOException {
+ return seekableByteChannel.read(dst);
+ }
+
+ @Override
+ public int write(final ByteBuffer src) throws IOException {
+ throw new IOException(DISK_FULL_MESSAGE);
+ }
+
+ @Override
+ public long position() throws IOException {
+ return seekableByteChannel.position();
+ }
+
+ @Override
+ public SeekableByteChannel position(final long newPosition) throws IOException {
+ return seekableByteChannel.position(newPosition);
+ }
+
+ @Override
+ public long size() throws IOException {
+ return seekableByteChannel.size();
+ }
+
+ @Override
+ public SeekableByteChannel truncate(final long size) throws IOException {
+ return seekableByteChannel.truncate(size);
+ }
+
+ @Override
+ public boolean isOpen() {
+ return seekableByteChannel.isOpen();
+ }
+
+ @Override
+ public void close() throws IOException {
+ seekableByteChannel.close();
+ }
+ }
+
+
+ @Test
+ public void createReadJobWithPriorityOption() throws IOException,
+ InterruptedException, URISyntaxException {
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, Lists.newArrayList(
+ new Ds3Object("beowulf.txt", 10)), ReadJobOptions.create().withPriority(Priority.LOW));
+ final GetJobSpectraS3Response jobSpectraS3Response = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult().getPriority(), is(Priority.LOW));
+ }
+
+ @Test
+ public void testCreatingStreamedReadJobWithPriorityOption() throws IOException,
+ InterruptedException, URISyntaxException {
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJobUsingStreamedBehavior(BUCKET_NAME, Lists.newArrayList(
+ new Ds3Object("beowulf.txt", 10)), ReadJobOptions.create().withPriority(Priority.LOW));
+ final GetJobSpectraS3Response jobSpectraS3Response = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult().getPriority(), is(Priority.LOW));
+ }
+
+ @Test
+ public void createReadJobWithNameOption() throws IOException,
+ URISyntaxException, InterruptedException {
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, Lists.newArrayList(
+ new Ds3Object("beowulf.txt", 10)), ReadJobOptions.create().withName("test_job"));
+ final GetJobSpectraS3Response jobSpectraS3Response = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult().getName(), is("test_job"));
+ }
+
+ @Test
+ public void testCreatingStreamedReadJobWithNameOption() throws IOException,
+ URISyntaxException, InterruptedException {
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJobUsingStreamedBehavior(BUCKET_NAME, Lists.newArrayList(
+ new Ds3Object("beowulf.txt", 10)), ReadJobOptions.create().withName("test_job"));
+ final GetJobSpectraS3Response jobSpectraS3Response = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult().getName(), is("test_job"));
+ }
+
+ @Test
+ public void createReadJobWithNameAndPriorityOptions() throws IOException,
+ URISyntaxException, InterruptedException {
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, Lists.newArrayList(
+ new Ds3Object("beowulf.txt", 10)), ReadJobOptions.create()
+ .withName("test_job").withPriority(Priority.LOW));
+ final GetJobSpectraS3Response jobSpectraS3Response = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult().getName(), is("test_job"));
+ assertThat(jobSpectraS3Response.getMasterObjectListResult().getPriority(), is(Priority.LOW));
+ }
+
+ @Test
+ public void testCreatingStreamedReadJobWithNameAndPriorityOption() throws IOException,
+ URISyntaxException, InterruptedException {
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJobUsingStreamedBehavior(BUCKET_NAME, Lists.newArrayList(
+ new Ds3Object("beowulf.txt", 10)), ReadJobOptions.create()
+ .withName("test_job").withPriority(Priority.LOW));
+ final GetJobSpectraS3Response jobSpectraS3Response = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult().getName(), is("test_job"));
+ assertThat(jobSpectraS3Response.getMasterObjectListResult().getPriority(), is(Priority.LOW));
+ }
+
+ @Test
+ public void testPartialRetriesWithInjectedFailures() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, IOException, URISyntaxException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final List filesToGet = new ArrayList<>();
+
+ final String DIR_NAME = "largeFiles/";
+ final String FILE_NAME = "GreatExpectations.txt";
+
+ final int offsetIntoFirstRange = 10;
+
+ filesToGet.add(new PartialDs3Object(FILE_NAME, Range.byLength(200000, 100000)));
+
+ filesToGet.add(new PartialDs3Object(FILE_NAME, Range.byLength(100000, 100000)));
+
+ filesToGet.add(new PartialDs3Object(FILE_NAME, Range.byLength(offsetIntoFirstRange, 100000)));
+
+ final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl) client);
+
+ final int maxNumBlockAllocationRetries = 1;
+ final int maxNumObjectTransferAttempts = 4;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ final Ds3ClientHelpers.Job job = ds3ClientHelpers.startReadJob(BUCKET_NAME, filesToGet);
+ final AtomicInteger intValue = new AtomicInteger();
+
+ job.attachObjectCompletedListener(new ObjectCompletedListener() {
+ int numPartsCompleted = 0;
+
+ @Override
+ public void objectCompleted(final String name) {
+ assertEquals(1, ++numPartsCompleted);
+ intValue.incrementAndGet();
+ }
+ });
+
+ job.attachDataTransferredListener(new DataTransferredListener() {
+ @Override
+ public void dataTransferred(final long size) {
+ LOG.info("Data transferred size: {}", size);
+ }
+ });
+
+ job.transfer(new FileObjectGetter(tempDirectory));
+
+ assertEquals(1, intValue.get());
+
+ try (final InputStream originalFileStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(DIR_NAME + FILE_NAME)) {
+ final byte[] first300000Bytes = new byte[300000 - offsetIntoFirstRange];
+ originalFileStream.skip(offsetIntoFirstRange);
+ int numBytesRead = originalFileStream.read(first300000Bytes, 0, 300000 - offsetIntoFirstRange);
+
+ assertThat(numBytesRead, is(300000 -offsetIntoFirstRange ));
+
+ try (final InputStream fileReadFromBP = Files.newInputStream(Paths.get(tempDirectory.toString(), FILE_NAME))) {
+ final byte[] first300000BytesFromBP = new byte[300000 - offsetIntoFirstRange];
+
+ numBytesRead = fileReadFromBP.read(first300000BytesFromBP, 0, 300000 - offsetIntoFirstRange);
+ assertThat(numBytesRead, is(300000 - offsetIntoFirstRange));
+
+ assertTrue(Arrays.equals(first300000Bytes, first300000BytesFromBP));
+ }
+ }
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ @Test
+ public void testFiringFailureHandlerWhenGettingChunks()
+ throws URISyntaxException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, IOException
+ {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final AtomicInteger numFailuresRecorded = new AtomicInteger();
+
+ final FailureEventListener failureEventListener = new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ numFailuresRecorded.incrementAndGet();
+ assertEquals(FailureEvent.FailureActivity.GettingObject, failureEvent.doingWhat());
+ }
+ };
+
+ final Ds3ClientHelpers.Job readJob = createReadJobWithObjectsReadyToTransfer(Ds3ClientShimFactory.ClientFailureType.ChunkAllocation);
+
+ readJob.attachFailureEventListener(failureEventListener);
+
+ try {
+ readJob.transfer(new FileObjectGetter(tempDirectory));
+ } catch (final IOException e) {
+ assertEquals(1, numFailuresRecorded.get());
+ }
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ private static Ds3ClientHelpers.Job createReadJobWithObjectsReadyToTransfer(final Ds3ClientShimFactory.ClientFailureType clientFailureType)
+ throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException
+ {
+ final String DIR_NAME = "largeFiles/";
+ final String FILE_NAME = "lesmis-copies.txt";
+
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
+
+ final Ds3Client ds3Client = Ds3ClientShimFactory.makeWrappedDs3Client(clientFailureType, client);
+
+ final int maxNumBlockAllocationRetries = 3;
+ final int maxNumObjectTransferAttempts = 3;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3Client,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ return ds3ClientHelpers.startReadJob(BUCKET_NAME, Collections.singletonList(obj));
+ }
+
+ @Test
+ public void testFiringFailureHandlerWhenGettingObject()
+ throws URISyntaxException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, IOException
+ {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final AtomicInteger numFailuresRecorded = new AtomicInteger();
+
+ final FailureEventListener failureEventListener = new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ numFailuresRecorded.incrementAndGet();
+ assertEquals(FailureEvent.FailureActivity.GettingObject, failureEvent.doingWhat());
+ }
+ };
+
+ final Ds3ClientHelpers.Job readJob = createReadJobWithObjectsReadyToTransfer(Ds3ClientShimFactory.ClientFailureType.GetObject);
+
+ readJob.attachFailureEventListener(failureEventListener);
+
+ try {
+ readJob.transfer(new FileObjectGetter(tempDirectory));
+ } catch (final IOException e) {
+ assertEquals(1, numFailuresRecorded.get());
+ }
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ @Test
+ public void testCreatingReadJobWithStreamedBehavior() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ doReadJobWithJobStarter(new ReadJobStarter() {
+ @Override
+ public Ds3ClientHelpers.Job startReadJob(final Ds3ClientHelpers ds3ClientHelpers, final String bucketName, final Iterable objectsToread)
+ throws IOException
+ {
+ return ds3ClientHelpers.startReadJobUsingStreamedBehavior(BUCKET_NAME, objectsToread);
+ }
+ });
+ }
+
+ private interface ReadJobStarter {
+ Ds3ClientHelpers.Job startReadJob(final Ds3ClientHelpers ds3ClientHelpers, final String bucketName, Iterable objectsToread) throws IOException;
+ }
+
+ private static void doReadJobWithJobStarter(final ReadJobStarter readJobStarter) throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final String DIR_NAME = "largeFiles/";
+ final String FILE_NAME = "lesmis.txt";
+
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
+
+ final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl)client);
+
+ final int maxNumBlockAllocationRetries = 1;
+ final int maxNumObjectTransferAttempts = 3;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ final Ds3ClientHelpers.Job readJob = readJobStarter.startReadJob(ds3ClientHelpers, BUCKET_NAME, Collections.singletonList(obj));
+
+ final AtomicBoolean dataTransferredEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean objectCompletedEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean checksumEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean metadataEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean waitingForChunksEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean failureEventReceived = new AtomicBoolean(false);
+
+ readJob.attachDataTransferredListener(new DataTransferredListener() {
+ @Override
+ public void dataTransferred(final long size) {
+ dataTransferredEventReceived.set(true);
+ assertEquals(bookSize, size);
+ }
+ });
+ readJob.attachObjectCompletedListener(new ObjectCompletedListener() {
+ @Override
+ public void objectCompleted(final String name) {
+ objectCompletedEventReceived.set(true);
+ }
+ });
+ readJob.attachChecksumListener(new ChecksumListener() {
+ @Override
+ public void value(final BulkObject obj, final ChecksumType.Type type, final String checksum) {
+ checksumEventReceived.set(true);
+ assertEquals("69+JXWeZuzl2HFTM6Lbo8A==", checksum);
+ }
+ });
+ readJob.attachMetadataReceivedListener(new MetadataReceivedListener() {
+ @Override
+ public void metadataReceived(final String filename, final Metadata metadata) {
+ metadataEventReceived.set(true);
+ }
+ });
+ readJob.attachWaitingForChunksListener(new WaitingForChunksListener() {
+ @Override
+ public void waiting(final int secondsToWait) {
+ waitingForChunksEventReceived.set(true);
+ }
+ });
+ readJob.attachFailureEventListener(new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ failureEventReceived.set(true);
+ }
+ });
+
+ readJob.transfer(new FileObjectGetter(tempDirectory));
+
+ final File originalFile = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME).toFile();
+ final File fileCopiedFromBP = Paths.get(tempDirectory.toString(), FILE_NAME).toFile();
+ assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
+
+ assertTrue(dataTransferredEventReceived.get());
+ assertTrue(objectCompletedEventReceived.get());
+ assertTrue(checksumEventReceived.get());
+ assertTrue(metadataEventReceived.get());
+ assertFalse(waitingForChunksEventReceived.get());
+ assertFalse(failureEventReceived.get());
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ @Test
+ public void testCreatingReadJobWithRandomAccessBehavior() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ doReadJobWithJobStarter(new ReadJobStarter() {
+ @Override
+ public Ds3ClientHelpers.Job startReadJob(final Ds3ClientHelpers ds3ClientHelpers, final String bucketName, final Iterable objectsToread)
+ throws IOException
+ {
+ return ds3ClientHelpers.startReadJobUsingRandomAccessBehavior(BUCKET_NAME, objectsToread);
+ }
+ });
+ }
+
+ @Test
+ public void testStartReadAllJobUsingStreamedBehavior() throws IOException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final AtomicInteger numFailuresRecorded = new AtomicInteger(0);
+
+ final FailureEventListener failureEventListener = new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ numFailuresRecorded.incrementAndGet();
+ assertEquals(FailureEvent.FailureActivity.GettingObject, failureEvent.doingWhat());
+ }
+ };
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadAllJobUsingStreamedBehavior(BUCKET_NAME);
+ readJob.attachFailureEventListener(failureEventListener);
+ readJob.transfer(new FileObjectGetter(tempDirectory));
+
+ final Collection filesInTempDirectory = FileUtils.listFiles(tempDirectory.toFile(), null, false);
+
+ final List filesWeExpectToBeInTempDirectory = Arrays.asList("beowulf.txt", "lesmis.txt", "lesmis-copies.txt", "GreatExpectations.txt");
+
+ for (final File fileInTempDirectory : filesInTempDirectory) {
+ assertTrue(filesWeExpectToBeInTempDirectory.contains(fileInTempDirectory.getName()));
+ }
+
+ assertEquals(0, numFailuresRecorded.get());
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ @Test
+ public void testStartReadAllJobUsingRandomAccessBehavior() throws IOException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final AtomicInteger numFailuresRecorded = new AtomicInteger(0);
+
+ final FailureEventListener failureEventListener = new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ numFailuresRecorded.incrementAndGet();
+ assertEquals(FailureEvent.FailureActivity.GettingObject, failureEvent.doingWhat());
+ }
+ };
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadAllJobUsingRandomAccessBehavior(BUCKET_NAME);
+ readJob.attachFailureEventListener(failureEventListener);
+ readJob.transfer(new FileObjectGetter(tempDirectory));
+
+ final Collection filesInTempDirectory = FileUtils.listFiles(tempDirectory.toFile(), null, false);
+
+ final List filesWeExpectToBeInTempDirectory = Arrays.asList("beowulf.txt", "lesmis.txt", "lesmis-copies.txt", "GreatExpectations.txt");
+
+ for (final File fileInTempDirectory : filesInTempDirectory) {
+ assertTrue(filesWeExpectToBeInTempDirectory.contains(fileInTempDirectory.getName()));
+ }
+
+ assertEquals(0, numFailuresRecorded.get());
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ @Test
+ public void testGetJobUsingTransferStrategy() throws IOException, InterruptedException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+ final String fileName = "beowulf.txt";
+
+ try {
+ final List objects = Lists.newArrayList(new Ds3Object(fileName));
+
+ final GetBulkJobSpectraS3Request getBulkJobSpectraS3Request = new GetBulkJobSpectraS3Request(BUCKET_NAME, objects);
+
+ final GetBulkJobSpectraS3Response getBulkJobSpectraS3Response = client.getBulkJobSpectraS3(getBulkJobSpectraS3Request);
+
+ final MasterObjectList masterObjectList = getBulkJobSpectraS3Response.getMasterObjectList();
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(masterObjectList)
+ .withChannelBuilder(new FileObjectGetter(tempDirectory))
+ .withRangesForBlobs(PartialObjectHelpers.mapRangesToBlob(masterObjectList.getObjects(),
+ PartialObjectHelpers.getPartialObjectsRanges(objects)));
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makeGetTransferStrategy();
+
+ transferStrategy.transfer();
+
+ final Collection filesInTempDirectory = FileUtils.listFiles(tempDirectory.toFile(), null, false);
+
+ for (final File file : filesInTempDirectory) {
+ assertEquals(fileName, file.getName());
+ }
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ @Test
+ public void testReadJobUsingTransferStrategy() throws IOException, InterruptedException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+ final String fileName = "beowulf.txt";
+
+ try {
+ final List objects = Lists.newArrayList(new Ds3Object(fileName));
+
+ final GetBulkJobSpectraS3Request getBulkJobSpectraS3Request = new GetBulkJobSpectraS3Request(BUCKET_NAME, objects);
+
+ final GetBulkJobSpectraS3Response getBulkJobSpectraS3Response = client.getBulkJobSpectraS3(getBulkJobSpectraS3Request);
+
+ final MasterObjectList masterObjectList = getBulkJobSpectraS3Response.getMasterObjectList();
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(masterObjectList)
+ .withChannelBuilder(new FileObjectGetter(tempDirectory))
+ .withRangesForBlobs(PartialObjectHelpers.mapRangesToBlob(masterObjectList.getObjects(),
+ PartialObjectHelpers.getPartialObjectsRanges(objects)));
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makeGetTransferStrategy();
+
+ Ds3ClientHelpers.wrap(client).startReadJob(transferStrategy).transfer();
+
+ final Collection filesInTempDirectory = FileUtils.listFiles(tempDirectory.toFile(), null, false);
+
+ for (final File file : filesInTempDirectory) {
+ assertEquals(fileName, file.getName());
+ }
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ @Test
+ public void testGetJobWithUserSuppliedBlobStrategy() throws IOException, InterruptedException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+ final String fileName = "beowulf.txt";
+
+ try {
+ final List objects = Lists.newArrayList(new Ds3Object(fileName));
+
+ final GetBulkJobSpectraS3Request getBulkJobSpectraS3Request = new GetBulkJobSpectraS3Request(BUCKET_NAME, objects);
+
+ final GetBulkJobSpectraS3Response getBulkJobSpectraS3Response = client.getBulkJobSpectraS3(getBulkJobSpectraS3Request);
+
+ final MasterObjectList masterObjectList = getBulkJobSpectraS3Response.getMasterObjectList();
+
+ final EventDispatcher eventDispatcher = new EventDispatcherImpl(new SameThreadEventRunner());
+
+ final AtomicInteger numChunkAllocationAttempts = new AtomicInteger(0);
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(masterObjectList)
+ .withChannelBuilder(new FileObjectGetter(tempDirectory))
+ .withRangesForBlobs(PartialObjectHelpers.mapRangesToBlob(masterObjectList.getObjects(),
+ PartialObjectHelpers.getPartialObjectsRanges(objects)))
+ .withBlobStrategy(new UserSuppliedPutBlobStrategy(client,
+ masterObjectList,
+ eventDispatcher,
+ new MaxChunkAttemptsRetryBehavior(5),
+ new ClientDefinedChunkAttemptRetryDelayBehavior(1, eventDispatcher),
+ new Monitorable() {
+ @Override
+ public void monitor() {
+ numChunkAllocationAttempts.getAndIncrement();
+ }
+ }));
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makeGetTransferStrategy();
+
+ transferStrategy.transfer();
+
+ final Collection filesInTempDirectory = FileUtils.listFiles(tempDirectory.toFile(), null, false);
+
+ for (final File file : filesInTempDirectory) {
+ assertEquals(fileName, file.getName());
+ }
+
+ assertEquals(1, numChunkAllocationAttempts.get());
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ private interface Monitorable {
+ void monitor();
+ }
+
+ private static class UserSuppliedPutBlobStrategy implements BlobStrategy {
+ private final BlobStrategy wrappedBlobStrategy;
+ private final Monitorable monitorable;
+
+ private UserSuppliedPutBlobStrategy(final Ds3Client client,
+ final MasterObjectList masterObjectList,
+ final EventDispatcher eventDispatcher,
+ final ChunkAttemptRetryBehavior retryBehavior,
+ final ChunkAttemptRetryDelayBehavior chunkAttemptRetryDelayBehavior,
+ final Monitorable monitorable)
+ {
+ this.monitorable = monitorable;
+
+ wrappedBlobStrategy = new GetSequentialBlobStrategy(client, masterObjectList, eventDispatcher,
+ retryBehavior, chunkAttemptRetryDelayBehavior);
+ }
+
+ @Override
+ public Iterable getWork() throws IOException, InterruptedException {
+ monitorable.monitor();
+
+ return wrappedBlobStrategy.getWork();
+ }
+ }
+
+ @Test
+ public void testGetJobWithUserSuppliedChannelStrategy() throws IOException, InterruptedException {
+ testGetJobWithUserSuppliedChannelStrategy(new TransferStrategyBuilderModifiable() {
+ @Override
+ public TransferStrategyBuilder modify(final TransferStrategyBuilder transferStrategyBuilder) {
+ return transferStrategyBuilder;
+ }
+ });
+ }
+
+ private static void testGetJobWithUserSuppliedChannelStrategy(final TransferStrategyBuilderModifiable transferStrategyBuilderModifiable) throws IOException, InterruptedException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+ final String fileName = "beowulf.txt";
+
+ try {
+ final List objects = Lists.newArrayList(new Ds3Object(fileName));
+
+ final GetBulkJobSpectraS3Request getBulkJobSpectraS3Request = new GetBulkJobSpectraS3Request(BUCKET_NAME, objects);
+
+ final GetBulkJobSpectraS3Response getBulkJobSpectraS3Response = client.getBulkJobSpectraS3(getBulkJobSpectraS3Request);
+
+ final MasterObjectList masterObjectList = getBulkJobSpectraS3Response.getMasterObjectList();
+
+ final AtomicInteger numTimesChannelOpened = new AtomicInteger(0);
+ final AtomicInteger numTimesChannelClosed = new AtomicInteger(0);
+
+ TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(masterObjectList)
+ .withChannelBuilder(new FileObjectGetter(tempDirectory))
+ .withRangesForBlobs(PartialObjectHelpers.mapRangesToBlob(masterObjectList.getObjects(),
+ PartialObjectHelpers.getPartialObjectsRanges(objects)))
+ .withChannelStrategy(new UserSuppliedPutChannelStrategy(new FileObjectGetter(tempDirectory),
+ new ChannelMonitorable() {
+ @Override
+ public void acquired() {
+ numTimesChannelOpened.getAndIncrement();
+ }
+
+ @Override
+ public void released() {
+ numTimesChannelClosed.getAndIncrement();
+ }
+ }));
+
+ transferStrategyBuilder = transferStrategyBuilderModifiable.modify(transferStrategyBuilder);
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makeGetTransferStrategy();
+
+ transferStrategy.transfer();
+
+ final Collection filesInTempDirectory = FileUtils.listFiles(tempDirectory.toFile(), null, false);
+
+ for (final File file : filesInTempDirectory) {
+ assertEquals(fileName, file.getName());
+ }
+
+ assertEquals(1, numTimesChannelOpened.get());
+ assertEquals(1, numTimesChannelClosed.get());
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ private interface TransferStrategyBuilderModifiable {
+ TransferStrategyBuilder modify(final TransferStrategyBuilder transferStrategyBuilder);
+ }
+
+ private interface ChannelMonitorable {
+ void acquired();
+ void released();
+ }
+
+ private static class UserSuppliedPutChannelStrategy implements ChannelStrategy {
+ private final ChannelMonitorable channelMonitorable;
+ private final ChannelStrategy wrappedPutStrategy;
+
+ private UserSuppliedPutChannelStrategy(final Ds3ClientHelpers.ObjectChannelBuilder objectChannelBuilder,
+ final ChannelMonitorable channelMonitorable)
+ {
+ this.channelMonitorable = channelMonitorable;
+ wrappedPutStrategy = new SequentialFileWriterChannelStrategy(objectChannelBuilder);
+ }
+
+ @Override
+ public SeekableByteChannel acquireChannelForBlob(final BulkObject blob) throws IOException {
+ channelMonitorable.acquired();
+ return wrappedPutStrategy.acquireChannelForBlob(blob);
+ }
+
+ @Override
+ public void releaseChannelForBlob(final SeekableByteChannel seekableByteChannel, final BulkObject blob) throws IOException {
+ channelMonitorable.released();
+ wrappedPutStrategy.releaseChannelForBlob(seekableByteChannel, blob);
+ }
+ }
+
+ @Test
+ public void testStreamedGetJobWithUserSuppliedChannelStrategy() throws IOException, InterruptedException {
+ testGetJobWithUserSuppliedChannelStrategy(new TransferStrategyBuilderModifiable() {
+ @Override
+ public TransferStrategyBuilder modify(final TransferStrategyBuilder transferStrategyBuilder) {
+ return transferStrategyBuilder.usingStreamedTransferBehavior();
+ }
+ });
+ }
+
+ @Test
+ public void testRandomAccessGetJobWithUserSuppliedChannelStrategy() throws IOException, InterruptedException {
+ testGetJobWithUserSuppliedChannelStrategy(new TransferStrategyBuilderModifiable() {
+ @Override
+ public TransferStrategyBuilder modify(final TransferStrategyBuilder transferStrategyBuilder) {
+ return transferStrategyBuilder.usingRandomAccessTransferBehavior();
+ }
+ });
+ }
+
+ @Test
+ public void testGetJobUserSuppliedTransferRetryDecorator() throws IOException, InterruptedException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+ final String fileName = "beowulf.txt";
+
+ try {
+ final List objects = Lists.newArrayList(new Ds3Object(fileName));
+
+ final GetBulkJobSpectraS3Request getBulkJobSpectraS3Request = new GetBulkJobSpectraS3Request(BUCKET_NAME, objects);
+
+ final GetBulkJobSpectraS3Response getBulkJobSpectraS3Response = client.getBulkJobSpectraS3(getBulkJobSpectraS3Request);
+
+ final MasterObjectList masterObjectList = getBulkJobSpectraS3Response.getMasterObjectList();
+
+ final AtomicInteger numTimesTransferCalled = new AtomicInteger(0);
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(masterObjectList)
+ .withChannelBuilder(new FileObjectGetter(tempDirectory))
+ .withRangesForBlobs(PartialObjectHelpers.mapRangesToBlob(masterObjectList.getObjects(),
+ PartialObjectHelpers.getPartialObjectsRanges(objects)))
+ .withTransferRetryDecorator(new UserSuppliedTransferRetryDecorator(
+ new Monitorable() {
+ @Override
+ public void monitor() {
+ numTimesTransferCalled.getAndIncrement();
+ }
+ }
+ ));
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makeGetTransferStrategy();
+
+ transferStrategy.transfer();
+
+ final Collection filesInTempDirectory = FileUtils.listFiles(tempDirectory.toFile(), null, false);
+
+ for (final File file : filesInTempDirectory) {
+ assertEquals(fileName, file.getName());
+ }
+
+ assertEquals(1, numTimesTransferCalled.get());
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ private static class UserSuppliedTransferRetryDecorator implements TransferRetryDecorator {
+ private final TransferRetryDecorator transferRetryDecorator;
+ private final Monitorable monitorable;
+
+ private UserSuppliedTransferRetryDecorator(final Monitorable monitorable) {
+ this.transferRetryDecorator = new MaxNumObjectTransferAttemptsDecorator(5);
+ this.monitorable = monitorable;
+ }
+
+ @Override
+ public TransferMethod wrap(final TransferMethod transferMethod) {
+ transferRetryDecorator.wrap(transferMethod);
+ return this;
+ }
+
+ @Override
+ public void transferJobPart(final JobPart jobPart) throws IOException {
+ monitorable.monitor();
+ transferRetryDecorator.transferJobPart(jobPart);
+ }
+ }
+
+ @Test
+ public void testGetJobUserSuppliedChunkAttemptRetryBehavior() throws IOException, InterruptedException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+ final String fileName = "beowulf.txt";
+
+ try {
+ final List objects = Lists.newArrayList(new Ds3Object(fileName));
+
+ final GetBulkJobSpectraS3Request getBulkJobSpectraS3Request = new GetBulkJobSpectraS3Request(BUCKET_NAME, objects);
+
+ final GetBulkJobSpectraS3Response getBulkJobSpectraS3Response = client.getBulkJobSpectraS3(getBulkJobSpectraS3Request);
+
+ final MasterObjectList masterObjectList = getBulkJobSpectraS3Response.getMasterObjectList();
+
+ final AtomicInteger numTimesInvokeCalled = new AtomicInteger(0);
+ final AtomicInteger numTimesResetCalled = new AtomicInteger(0);
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(masterObjectList)
+ .withChannelBuilder(new FileObjectGetter(tempDirectory))
+ .withRangesForBlobs(PartialObjectHelpers.mapRangesToBlob(masterObjectList.getObjects(),
+ PartialObjectHelpers.getPartialObjectsRanges(objects)))
+ .withChunkAttemptRetryBehavior(new UserSuppliedChunkAttemptRetryBehavior(
+ new ChunkAttemptRetryBehaviorMonitorable() {
+ @Override
+ public void invoke() {
+ numTimesInvokeCalled.getAndIncrement();
+ }
+
+ @Override
+ public void reset() {
+ numTimesResetCalled.getAndIncrement();
+ }
+ }
+ ));
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makeGetTransferStrategy();
+
+ transferStrategy.transfer();
+
+ final Collection filesInTempDirectory = FileUtils.listFiles(tempDirectory.toFile(), null, false);
+
+ for (final File file : filesInTempDirectory) {
+ assertEquals(fileName, file.getName());
+ }
+
+ assertEquals(0, numTimesInvokeCalled.get());
+ assertEquals(1, numTimesResetCalled.get());
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+
+ private static class UserSuppliedChunkAttemptRetryBehavior implements ChunkAttemptRetryBehavior {
+ private final ChunkAttemptRetryBehaviorMonitorable chunkAttemptRetryBehaviorMonitorable;
+ private final ChunkAttemptRetryBehavior wrappedChunkAttemptRetryBehavior;
+
+ private UserSuppliedChunkAttemptRetryBehavior(final ChunkAttemptRetryBehaviorMonitorable chunkAttemptRetryBehaviorMonitorable) {
+ this.chunkAttemptRetryBehaviorMonitorable = chunkAttemptRetryBehaviorMonitorable;
+ wrappedChunkAttemptRetryBehavior = new MaxChunkAttemptsRetryBehavior(5);
+ }
+
+ @Override
+ public void invoke() throws IOException {
+ chunkAttemptRetryBehaviorMonitorable.invoke();
+ wrappedChunkAttemptRetryBehavior.invoke();
+ }
+
+ @Override
+ public void reset() {
+ chunkAttemptRetryBehaviorMonitorable.reset();
+ wrappedChunkAttemptRetryBehavior.reset();
+ }
+ }
+
+ private interface ChunkAttemptRetryBehaviorMonitorable {
+ void invoke();
+ void reset();
+ }
+
+ @Test
+ public void testThatFifoIsNotProcessed() throws IOException, InterruptedException {
+ Assume.assumeFalse(Platform.isWindows());
+
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ final String BEOWULF_FILE_NAME = "beowulf.txt";
+
+ final AtomicBoolean caughtException = new AtomicBoolean(false);
+
+ try {
+ Runtime.getRuntime().exec("mkfifo " + Paths.get(tempDirectory.toString(), BEOWULF_FILE_NAME)).waitFor();
+
+ final List ds3Objects = Collections.singletonList(new Ds3Object(BEOWULF_FILE_NAME));
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, ds3Objects);
+ readJob.transfer(new FileObjectPutter(tempDirectory));
+ } catch (final UnrecoverableIOException e) {
+ assertTrue(e.getMessage().contains(BEOWULF_FILE_NAME));
+ caughtException.set(true);
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+
+ assertTrue(caughtException.get());
+ }
+
+ @Test
+ public void testStreamedGetJobWithBlobbedFile() throws Exception {
+ final int chunkSize = MIN_UPLOAD_SIZE_IN_BYTES;
+ final long biggerThanAChunkSize = chunkSize * 2L + 1024;
+
+ final int numIntsInBiggerThanAChunkSize = (int)biggerThanAChunkSize / 4;
+
+ final String originalFileName = "Gracie.bin";
+ final String movedFileName = "Gracie.bak";
+
+ try {
+ final DataOutputStream originalFileStream = new DataOutputStream(new FileOutputStream(originalFileName));
+
+ byte[] bytes = new byte[4];
+
+ for (int i = 0; i < numIntsInBiggerThanAChunkSize; ++i) {
+ bytes[0] = (byte)i;
+ bytes[1] = (byte)(i >> 8);
+ bytes[2] = (byte)(i >> 16);
+ bytes[3] = (byte)(i >> 24);
+ originalFileStream.write(bytes);
+ }
+
+ originalFileStream.close();
+
+ final Ds3Object ds3Object = new Ds3Object();
+ ds3Object.setName(originalFileName);
+ ds3Object.setSize(biggerThanAChunkSize);
+
+ final AtomicLong numBytesTransferred = new AtomicLong(0);
+
+ final WriteJobOptions writeJobOptions = WriteJobOptions.create();
+ writeJobOptions.withMaxUploadSize(chunkSize);
+
+ final Ds3ClientHelpers.Job writeJob = HELPERS.startWriteJob(BUCKET_NAME, Collections.singletonList(ds3Object), writeJobOptions);
+ writeJob.attachDataTransferredListener(numBytesTransferred::addAndGet);
+
+ final CountDownLatch writeCountDownLatch = new CountDownLatch(1);
+
+ writeJob.attachObjectCompletedListener(name -> writeCountDownLatch.countDown());
+
+ writeJob.transfer(new FileObjectPutter(Paths.get(".")));
+
+ writeCountDownLatch.await();
+
+ assertEquals(biggerThanAChunkSize, numBytesTransferred.get());
+
+ Files.move(Paths.get(originalFileName), Paths.get(movedFileName));
+
+ final CountDownLatch readCountdownLatch = new CountDownLatch(1);
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJobUsingStreamedBehavior(BUCKET_NAME, Collections.singletonList(ds3Object));
+ readJob.attachObjectCompletedListener(name -> readCountdownLatch.countDown());
+ readJob.transfer(new FileObjectGetter(Paths.get(".")));
+
+ readCountdownLatch.await();
+
+ assertTrue(FileUtils.contentEquals(new File(movedFileName), new File(originalFileName)));
+ } finally {
+ Files.deleteIfExists(Paths.get(originalFileName));
+ Files.deleteIfExists(Paths.get(movedFileName));
+ }
+ }
+}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/GroupManagement_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/GroupManagement_Test.java
similarity index 96%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/GroupManagement_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/GroupManagement_Test.java
index b955d9c4d..6a003f121 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/GroupManagement_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/GroupManagement_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -58,7 +58,7 @@ public static void teardown() throws IOException, SignatureException {
}
@Test
- public void createDeleteGroup_Test() throws IOException, SignatureException {
+ public void createDeleteGroupTest() throws IOException, SignatureException {
final String groupName = "create_delete_group_sdk_test";
try {
@@ -77,7 +77,7 @@ public void createDeleteGroup_Test() throws IOException, SignatureException {
}
@Test
- public void createDataPolicyForGroup_Test() throws IOException, SignatureException {
+ public void createDataPolicyForGroupTest() throws IOException, SignatureException {
final String groupName = "create_data_policy_for_group_g";
final String dataPolicyName = "create_data_policy_for_group_dp";
UUID aclId = null;
@@ -118,7 +118,7 @@ public void createDataPolicyForGroup_Test() throws IOException, SignatureExcepti
}
@Test
- public void createGroupGroupMember_Test() throws IOException, SignatureException {
+ public void createGroupGroupMemberTest() throws IOException, SignatureException {
final String parentGroupName = "create_group_group_member_parent";
final String childGroupName = "create_group_group_member_child";
@@ -159,7 +159,7 @@ public void createGroupGroupMember_Test() throws IOException, SignatureException
}
@Test
- public void createBucketAclForGroup_Test() throws IOException, SignatureException {
+ public void createBucketAclForGroupTest() throws IOException, SignatureException {
final String bucketName = "create_bucket_acl_for_group_b";
final String groupName = "create_bucket_acl_for_group_g";
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Insecure_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Insecure_Test.java
similarity index 96%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Insecure_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Insecure_Test.java
index 4a3b2813e..0328c9241 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Insecure_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Insecure_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Iterators_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Iterators_Test.java
similarity index 68%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Iterators_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Iterators_Test.java
index b00eef72d..95e61406e 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Iterators_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Iterators_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -15,15 +15,18 @@
package com.spectralogic.ds3client.integration;
+import com.google.common.collect.Lists;
import com.spectralogic.ds3client.Ds3Client;
-import com.spectralogic.ds3client.helpers.pagination.GetBucketLoaderFactory;
import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
+import com.spectralogic.ds3client.helpers.pagination.GetBucketKeyLoaderFactory;
import com.spectralogic.ds3client.helpers.pagination.GetObjectsFullDetailsLoaderFactory;
-import com.spectralogic.ds3client.utils.collections.LazyIterable;
import com.spectralogic.ds3client.integration.test.helpers.TempStorageIds;
import com.spectralogic.ds3client.integration.test.helpers.TempStorageUtil;
import com.spectralogic.ds3client.models.ChecksumType;
+import com.spectralogic.ds3client.models.Contents;
+import com.spectralogic.ds3client.helpers.pagination.FileSystemKey;
import com.spectralogic.ds3client.networking.FailedRequestException;
+import com.spectralogic.ds3client.utils.collections.LazyIterable;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -33,10 +36,10 @@
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Iterator;
+import java.util.List;
import java.util.UUID;
-import static com.spectralogic.ds3client.integration.Util.deleteAllContents;
-import static com.spectralogic.ds3client.integration.Util.loadBookTestData;
+import static com.spectralogic.ds3client.integration.Util.*;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
@@ -47,6 +50,7 @@ public class Iterators_Test {
private static final Ds3ClientHelpers HELPERS = Ds3ClientHelpers.wrap(CLIENT);
private static final String TEST_ENV_NAME = "lazy_iterator_test";
private static final int RETRIES = 5;
+ private static final String TEST_DELIMITER = null;
private static TempStorageIds envStorageIds;
private static UUID envDataPolicyId;
@@ -67,13 +71,31 @@ public static void teardown() throws IOException {
LOG.info("Finished test teardown...");
}
+ @Test
+ public void iterateWithDelimiter() throws IOException, URISyntaxException {
+ try {
+ HELPERS.ensureBucketExists(TEST_ENV_NAME, envDataPolicyId);
+ loadBookTestDataWithPrefix(CLIENT, TEST_ENV_NAME, "books/");
+ final Iterable fileSystemKeysIterator = Ds3ClientHelpers.wrap(CLIENT).remoteListDirectory(TEST_ENV_NAME, "books/", null, 100);
+ final List fileSystemKeys = Lists.newArrayList(fileSystemKeysIterator);
+ assertThat(fileSystemKeys.size(), is(4));
+
+ loadBookTestDataWithPrefix(CLIENT, TEST_ENV_NAME, "books/more/");
+ final Iterable anotherFileSystemKeysIterator = Ds3ClientHelpers.wrap(CLIENT).remoteListDirectory(TEST_ENV_NAME, "books/", null, 100);
+ final List anotherFileSystemKeys = Lists.newArrayList(anotherFileSystemKeysIterator);
+ assertThat(anotherFileSystemKeys.size(), is(5));
+ } finally {
+ deleteAllContents(CLIENT, TEST_ENV_NAME);
+ }
+ }
+
@Test
public void emptyGetBucket() throws IOException {
final String prefix = "";
final String nextMarker = null;
final int maxKeys = 100;
- emptyTest(new GetBucketLoaderFactory(CLIENT, TEST_ENV_NAME, prefix, nextMarker, maxKeys, RETRIES));
+ emptyTest(new GetBucketKeyLoaderFactory(CLIENT, TEST_ENV_NAME, prefix, TEST_DELIMITER, nextMarker, maxKeys, RETRIES, GetBucketKeyLoaderFactory.contentsFunction));
}
@Test
@@ -81,7 +103,7 @@ public void singlePageGetBucket() throws IOException, URISyntaxException {
final String prefix = "";
final String nextMarker = null;
final int maxKeys = 100;
- paginate(new GetBucketLoaderFactory(CLIENT, TEST_ENV_NAME, prefix, nextMarker, maxKeys, RETRIES));
+ paginate(new GetBucketKeyLoaderFactory(CLIENT, TEST_ENV_NAME, prefix, TEST_DELIMITER, nextMarker, maxKeys, RETRIES, GetBucketKeyLoaderFactory.contentsFunction));
}
@@ -90,36 +112,36 @@ public void multiPageGetBucket() throws IOException, URISyntaxException {
final String prefix = "";
final String nextMarker = null;
final int maxKeys = 2;
- paginate(new GetBucketLoaderFactory(CLIENT, TEST_ENV_NAME, prefix, nextMarker, maxKeys, RETRIES));
+ paginate(new GetBucketKeyLoaderFactory(CLIENT, TEST_ENV_NAME, prefix, nextMarker, TEST_DELIMITER, maxKeys, RETRIES, GetBucketKeyLoaderFactory.contentsFunction));
}
@Test
public void failedRequestGetBucket() {
- testFailedRequest(new GetBucketLoaderFactory(CLIENT, "Unknown_Bucket",null, null, 1000, 5));
+ testFailedRequest(new GetBucketKeyLoaderFactory(CLIENT, "Unknown_Bucket",null, TEST_DELIMITER,null, 1000, 5, GetBucketKeyLoaderFactory.contentsFunction));
}
@Test
public void emptyGetObjects() throws IOException {
- emptyTest(new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, "", 10, RETRIES, true));
+ emptyTest(new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, 10, RETRIES, true));
}
@Test
public void singlePageGetObjectsIterator() throws IOException, URISyntaxException {
- paginate(new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, "", 10, RETRIES, true));
+ paginate(new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, 10, RETRIES, true));
}
@Test
public void failedGetObjectsWithFullDetails() throws IOException, URISyntaxException {
- testFailedRequest(new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, "", 10, RETRIES, true));
+ testFailedRequest(new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, 10, RETRIES, true));
}
@Test
public void multiPageGetObjectsWithFullDetails() throws IOException, URISyntaxException {
- paginate(new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, "", 2, RETRIES, true));
+ paginate(new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, 2, RETRIES, true));
}
- private void emptyTest(final LazyIterable.LazyLoaderFactory> lazyLoaderFactory) throws IOException {
+ private static void emptyTest(final LazyIterable.LazyLoaderFactory> lazyLoaderFactory) throws IOException {
HELPERS.ensureBucketExists(TEST_ENV_NAME, envDataPolicyId);
try {
final LazyIterable> iterable = new LazyIterable<>(lazyLoaderFactory);
@@ -132,7 +154,7 @@ private void emptyTest(final LazyIterable.LazyLoaderFactory> lazyLoaderFactory
}
}
- private void paginate(final LazyIterable.LazyLoaderFactory> loaderFactory) throws IOException, URISyntaxException {
+ private static void paginate(final LazyIterable.LazyLoaderFactory> loaderFactory) throws IOException, URISyntaxException {
HELPERS.ensureBucketExists(TEST_ENV_NAME, envDataPolicyId);
loadBookTestData(CLIENT, TEST_ENV_NAME);
try {
@@ -154,7 +176,7 @@ private void paginate(final LazyIterable.LazyLoaderFactory> loaderFactory) thr
}
}
- private void testFailedRequest(final LazyIterable.LazyLoaderFactory> loaderFactory) {
+ private static void testFailedRequest(final LazyIterable.LazyLoaderFactory> loaderFactory) {
final LazyIterable> iterable = new LazyIterable<>(loaderFactory);
final Iterator> iterator = iterable.iterator();
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Metadata_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Metadata_Test.java
similarity index 98%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Metadata_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Metadata_Test.java
index 00733373e..6be9c54b1 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Metadata_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Metadata_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -125,7 +125,7 @@ public void multipleMetadataFields() throws IOException {
@Test
public void escapedMetadataWithSpaces() throws IOException {
final String stringWithSpaces = "percent encoded space";
- final String escapedWithSpaces = MetadataStringManipulation.toEncodedString(stringWithSpaces);
+ final String escapedWithSpaces = MetadataStringManipulation.toEncodedKeyString(stringWithSpaces);
final Metadata metadata = processMetadataRequest(
"metadataBucket",
@@ -145,7 +145,7 @@ public void escapedMetadataWithSpaces() throws IOException {
@Test
public void escapedMetadataWithSymbols() throws IOException {
- final String escapedWithSymbols = MetadataStringManipulation.toEncodedString(STRING_WITH_SYMBOLS);
+ final String escapedWithSymbols = MetadataStringManipulation.toEncodedKeyString(STRING_WITH_SYMBOLS);
final Metadata metadata = processMetadataRequest(
"metadataBucket",
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/NotificationsIntegration_test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/NotificationsIntegration_test.java
similarity index 99%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/NotificationsIntegration_test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/NotificationsIntegration_test.java
index 3156e00f0..3d01ff4e9 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/NotificationsIntegration_test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/NotificationsIntegration_test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java
new file mode 100644
index 000000000..564b55e33
--- /dev/null
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java
@@ -0,0 +1,2173 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+package com.spectralogic.ds3client.integration;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.spectralogic.ds3client.Ds3Client;
+import com.spectralogic.ds3client.Ds3ClientBuilder;
+import com.spectralogic.ds3client.Ds3ClientImpl;
+import com.spectralogic.ds3client.commands.*;
+import com.spectralogic.ds3client.commands.spectrads3.*;
+import com.spectralogic.ds3client.commands.spectrads3.notifications.*;
+import com.spectralogic.ds3client.exceptions.Ds3NoMoreRetriesException;
+import com.spectralogic.ds3client.helpers.*;
+import com.spectralogic.ds3client.helpers.channelbuilders.ObjectInputStreamBuilder;
+import com.spectralogic.ds3client.helpers.events.FailureEvent;
+import com.spectralogic.ds3client.helpers.events.SameThreadEventRunner;
+import com.spectralogic.ds3client.helpers.options.WriteJobOptions;
+import com.spectralogic.ds3client.helpers.pagination.GetBucketKeyLoaderFactory;
+import com.spectralogic.ds3client.helpers.strategy.blobstrategy.*;
+import com.spectralogic.ds3client.helpers.strategy.channelstrategy.ChannelStrategy;
+import com.spectralogic.ds3client.helpers.strategy.channelstrategy.SequentialFileReaderChannelStrategy;
+import com.spectralogic.ds3client.helpers.strategy.transferstrategy.*;
+import com.spectralogic.ds3client.integration.test.helpers.*;
+import com.spectralogic.ds3client.integration.test.helpers.Ds3ClientShimFactory.ClientFailureType;
+import com.spectralogic.ds3client.metadata.MetadataAccessImpl;
+import com.spectralogic.ds3client.models.*;
+import com.spectralogic.ds3client.models.Objects;
+import com.spectralogic.ds3client.models.bulk.Ds3Object;
+import com.spectralogic.ds3client.utils.ByteArraySeekableByteChannel;
+import com.spectralogic.ds3client.utils.Platform;
+import com.spectralogic.ds3client.utils.ResourceUtils;
+import com.spectralogic.ds3client.utils.collections.LazyIterable;
+import com.spectralogic.ds3client.utils.hashing.ChecksumUtils;
+import com.spectralogic.ds3client.utils.hashing.Hasher;
+import org.apache.commons.io.FileUtils;
+import org.junit.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URISyntaxException;
+import java.nio.channels.ByteChannel;
+import java.nio.channels.Channels;
+import java.nio.channels.SeekableByteChannel;
+import java.nio.file.Files;
+import java.nio.file.NoSuchFileException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static com.spectralogic.ds3client.commands.spectrads3.PutBulkJobSpectraS3Request.MIN_UPLOAD_SIZE_IN_BYTES;
+import static com.spectralogic.ds3client.integration.Util.RESOURCE_BASE_NAME;
+import static com.spectralogic.ds3client.integration.Util.cancelAllJobsForBucket;
+import static com.spectralogic.ds3client.integration.Util.deleteAllContents;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+public class PutJobManagement_Test {
+ private static final Logger LOG = LoggerFactory.getLogger(PutJobManagement_Test.class);
+
+ private static final Ds3Client client = Util.fromEnv();
+ private static final Ds3ClientHelpers HELPERS = Ds3ClientHelpers.wrap(client);
+ private static final String BUCKET_NAME = "Put_Job_Management_Test";
+ private static final String TEST_ENV_NAME = "PutJobManagement_Test";
+ private static TempStorageIds envStorageIds;
+ private static UUID envDataPolicyId;
+
+ private static final String SOURCE_DIRECTORY = "little_files/";
+ private static final String SOURCE_FILE_BASE_NAME = "tape";
+ private static final String SOURCE_FILE_EXTENSION = "png";
+ private static final String SOURCE_FILE_NAME = SOURCE_FILE_BASE_NAME + "." + SOURCE_FILE_EXTENSION;
+
+ @BeforeClass
+ public static void startup() throws IOException {
+ envDataPolicyId = TempStorageUtil.setupDataPolicy(TEST_ENV_NAME, false, ChecksumType.Type.MD5, client);
+ envStorageIds = TempStorageUtil.setup(TEST_ENV_NAME, envDataPolicyId, client);
+ }
+
+ @Before
+ public void setupBucket() throws IOException {
+ HELPERS.ensureBucketExists(BUCKET_NAME, envDataPolicyId);
+ }
+
+ @AfterClass
+ public static void teardown() throws IOException {
+ TempStorageUtil.teardown(TEST_ENV_NAME, envStorageIds, client);
+ client.close();
+ }
+
+ @SuppressWarnings("deprecation")
+ @Test
+ public void nakedS3Put() throws IOException, URISyntaxException {
+ try {
+ final Path beowulfPath = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + "beowulf.txt");
+ final SeekableByteChannel beowulfChannel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel("beowulf.txt");
+ final PutObjectResponse putObjectResponse = client.putObject(new PutObjectRequest(BUCKET_NAME, "beowulf.txt",
+ beowulfChannel, Files.size(beowulfPath)));
+ assertThat(putObjectResponse, is(notNullValue()));
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ @Test
+ public void nakedS3PutEmptyFile() throws IOException, URISyntaxException {
+ try {
+ final String fileName = "emptyFile.txt";
+
+ final ByteArraySeekableByteChannel channel = new ByteArraySeekableByteChannel(0);
+ final PutObjectResponse putObjectResponse = client.putObject(
+ new PutObjectRequest(BUCKET_NAME, fileName, channel, 0));
+ assertThat(putObjectResponse, is(notNullValue()));
+
+ final GetBucketResponse request = client.getBucket(new GetBucketRequest(BUCKET_NAME));
+ final ListBucketResult result = request.getListBucketResult();
+
+ assertThat(result.getObjects().size(), is(1));
+ final Contents contents = result.getObjects().get(0);
+ assertThat(contents.getKey(), is(fileName));
+ assertThat(contents.getSize(), is((long) 0));
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ @Test
+ public void nakedS3PutFolder() throws IOException, URISyntaxException {
+ try {
+ final String fileName = "NakedS3Folder/";
+
+ final ByteArraySeekableByteChannel channel = new ByteArraySeekableByteChannel(0);
+ final PutObjectResponse putObjectResponse = client.putObject(
+ new PutObjectRequest(BUCKET_NAME, fileName, channel, 0));
+
+ assertThat(putObjectResponse, is(notNullValue()));
+ final GetBucketResponse request = client.getBucket(new GetBucketRequest(BUCKET_NAME));
+ final ListBucketResult result = request.getListBucketResult();
+ assertThat(result.getObjects().size(), is(1));
+
+ final Contents contents = result.getObjects().get(0);
+ assertThat(contents.getKey(), is(fileName));
+ assertThat(contents.getSize(), is((long) 0));
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void getActiveJobs() throws IOException, URISyntaxException {
+ try {
+ final UUID jobID = HELPERS
+ .startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2))).getJobId();
+ final GetActiveJobsSpectraS3Response activeJobsResponse = client.
+ getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request());
+ final ArrayList activeJobsUUIDs = new ArrayList<>();
+ for (final ActiveJob job : activeJobsResponse.getActiveJobListResult().getActiveJobs()) {
+ activeJobsUUIDs.add(job.getId());
+ }
+ assertThat(activeJobsUUIDs, contains(jobID));
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void getJobs() throws IOException {
+ try {
+ final UUID jobID = HELPERS
+ .startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2))).getJobId();
+ final GetJobsSpectraS3Response getJobsResponse = client.
+ getJobsSpectraS3(new GetJobsSpectraS3Request());
+ final ArrayList jobUUIDs = new ArrayList<>();
+ for (final Job job : getJobsResponse.getJobListResult().getJobs()) {
+ jobUUIDs.add(job.getJobId());
+ }
+ assertThat(jobUUIDs, contains(jobID));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void modifyJobPriority() throws IOException {
+ try {
+ final Ds3ClientHelpers.Job job =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2)),
+ WriteJobOptions.create().withPriority(Priority.LOW));
+
+ client.modifyJobSpectraS3(new ModifyJobSpectraS3Request(job.getJobId().toString())
+ .withPriority(Priority.HIGH));
+
+ final GetJobSpectraS3Response response = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(job.getJobId().toString()));
+
+ assertThat(response.getMasterObjectListResult().getPriority(), is(Priority.HIGH));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void modifyJobName() throws IOException {
+
+ try {
+ final Ds3ClientHelpers.Job job =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
+
+ client.modifyJobSpectraS3(new ModifyJobSpectraS3Request(job.getJobId().toString())
+ .withName("newName"));
+
+ final GetJobSpectraS3Response response = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(job.getJobId().toString()));
+
+ assertThat(response.getMasterObjectListResult().getName(), is("newName"));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void modifyJobCreationDate() throws IOException {
+
+ try {
+ final Ds3ClientHelpers.Job job =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
+ final GetJobSpectraS3Response jobResponse = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(job.getJobId().toString()));
+
+ final Date originalDate = jobResponse.getMasterObjectListResult().getStartDate();
+ final Date newDate = new Date(originalDate.getTime() - 1000);
+
+ client.modifyJobSpectraS3(new ModifyJobSpectraS3Request(job.getJobId().toString())
+ .withCreatedAt(newDate));
+
+ final GetJobSpectraS3Response responseAfterModify = client
+ .getJobSpectraS3(new GetJobSpectraS3Request(job.getJobId().toString()));
+
+ assertThat(responseAfterModify.getMasterObjectListResult().getStartDate(), is(newDate));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void cancelJob() throws IOException {
+
+ try {
+ final Ds3ClientHelpers.Job job =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
+
+ final CancelJobSpectraS3Response response = client
+ .cancelJobSpectraS3(new CancelJobSpectraS3Request(job.getJobId().toString()));
+ assertThat(response, is(notNullValue()));
+
+ assertTrue(client.getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request())
+ .getActiveJobListResult().getActiveJobs().isEmpty());
+
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void clearAllCanceledJobs() throws IOException {
+
+ try {
+ final Ds3ClientHelpers.Job job =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
+ client.cancelJobSpectraS3(new CancelJobSpectraS3Request(job.getJobId().toString()));
+ client.clearAllCanceledJobsSpectraS3(new ClearAllCanceledJobsSpectraS3Request());
+ final List canceledJobsList = client.
+ getCanceledJobsSpectraS3(new GetCanceledJobsSpectraS3Request())
+ .getCanceledJobListResult().getCanceledJobs();
+
+ assertTrue(canceledJobsList.isEmpty());
+
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void truncatePutJob() throws Exception {
+
+ final int testTimeOutSeconds = 5;
+ final String book1 = "beowulf.txt";
+ final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
+ final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
+ final Ds3Object obj2 = new Ds3Object("place_holder", 5000000);
+
+ try {
+ final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(obj1, obj2));
+ final UUID jobId = putJob.getJobId();
+ final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
+
+ client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId, 0, Files.size(objPath1)));
+ ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId, client, 20);
+
+ final TruncateJobSpectraS3Response truncateJobSpectraS3Response = client.truncateJobSpectraS3(
+ new TruncateJobSpectraS3Request(jobId.toString()));
+ assertThat(truncateJobSpectraS3Response, is(notNullValue()));
+
+ final GetJobSpectraS3Response truncatedJob = client.getJobSpectraS3(new GetJobSpectraS3Request(jobId.toString()));
+ assertEquals(truncatedJob.getMasterObjectListResult().getOriginalSizeInBytes(), Files.size(objPath1));
+
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void cancelJobWithForce() throws Exception {
+
+ final int testTimeOutSeconds = 5;
+
+ final String book1 = "beowulf.txt";
+ final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
+ final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
+ final Ds3Object obj2 = new Ds3Object("place_holder", 5000000);
+
+ try {
+ final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(obj1, obj2));
+ final UUID jobId = putJob.getJobId();
+ final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
+
+ client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId, 0, Files.size(objPath1)));
+ ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId, client, 20);
+
+ final CancelJobSpectraS3Response responseWithForce = client
+ .cancelJobSpectraS3(new CancelJobSpectraS3Request(jobId.toString()));
+ assertThat(responseWithForce, is(notNullValue()));
+
+ //Allow for lag time before canceled job appears~1.5 seconds in unloaded system
+ final long startTimeCanceledUpdate = System.nanoTime();
+ boolean jobCanceled = false;
+ while (!jobCanceled) {
+ Thread.sleep(500);
+ final GetCanceledJobsSpectraS3Response canceledJobs = client.getCanceledJobsSpectraS3(new GetCanceledJobsSpectraS3Request());
+ for (final CanceledJob canceledJob : canceledJobs.getCanceledJobListResult().getCanceledJobs()) {
+ if (canceledJob.getId().equals(jobId)) {
+ jobCanceled = true;
+ }
+ }
+ assertThat((System.nanoTime() - startTimeCanceledUpdate) / 1000000000, lessThan((long) testTimeOutSeconds));
+ }
+
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void cancelAllJobs() throws IOException {
+
+ try {
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
+ final List objectsTwo = Lists.newArrayList(new Ds3Object("testTwo", 2));
+ HELPERS.startWriteJob(BUCKET_NAME, objectsTwo);
+ client.cancelAllJobsSpectraS3(new CancelAllJobsSpectraS3Request());
+
+ assertTrue(client.getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request())
+ .getActiveJobListResult().getActiveJobs().isEmpty());
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void truncateAllJobs() throws Exception {
+
+ final int testTimeOutSeconds = 5;
+ final String book1 = "beowulf.txt";
+ final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
+ final String book2 = "ulysses.txt";
+ final Path objPath2 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book2);
+ final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
+ final Ds3Object obj2 = new Ds3Object("place_holder_1", 5000000);
+ final Ds3Object obj3 = new Ds3Object(book2, Files.size(objPath2));
+ final Ds3Object obj4 = new Ds3Object("place_holder_2", 5000000);
+
+ try {
+ final Ds3ClientHelpers.Job putJob1 = HELPERS.startWriteJob(BUCKET_NAME, Lists
+ .newArrayList(obj1, obj2));
+ final UUID jobId1 = putJob1.getJobId();
+ final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
+ client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId1.toString(), 0, Files.size(objPath1)));
+
+ final Ds3ClientHelpers.Job putJob2 = HELPERS.startWriteJob(BUCKET_NAME, Lists
+ .newArrayList(obj3, obj4));
+ final UUID jobId2 = putJob2.getJobId();
+ final SeekableByteChannel book2Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book2);
+ client.putObject(new PutObjectRequest(BUCKET_NAME, book2, book2Channel, jobId2.toString(), 0, Files.size(objPath2)));
+
+ HELPERS.startWriteJob(BUCKET_NAME, Lists
+ .newArrayList(new Ds3Object("place_holder_3", 1000000)));
+
+ ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId1, client, 20);
+ ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId2, client, 20);
+
+ final TruncateAllJobsSpectraS3Response truncateAllJobsSpectraS3Response = client
+ .truncateAllJobsSpectraS3(new TruncateAllJobsSpectraS3Request());
+
+ assertThat(truncateAllJobsSpectraS3Response, is(notNullValue()));
+
+ final GetJobSpectraS3Response truncatedJob1 = client.getJobSpectraS3(new GetJobSpectraS3Request(jobId1.toString()));
+ assertEquals(truncatedJob1.getMasterObjectListResult().getOriginalSizeInBytes(), Files.size(objPath1));
+
+ final GetJobSpectraS3Response truncatedJob2 = client.getJobSpectraS3(new GetJobSpectraS3Request(jobId2.toString()));
+ assertEquals(truncatedJob2.getMasterObjectListResult().getOriginalSizeInBytes(), Files.size(objPath2));
+
+ assertThat(client.getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request())
+ .getActiveJobListResult().getActiveJobs().size(), is(2));
+
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void cancelAllJobsWithForce() throws Exception {
+
+ final int testTimeOutSeconds = 5;
+ final String book1 = "beowulf.txt";
+ final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
+ final String book2 = "ulysses.txt";
+ final Path objPath2 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book2);
+ final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
+ final Ds3Object obj2 = new Ds3Object("place_holder_1", 5000000);
+ final Ds3Object obj3 = new Ds3Object(book2, Files.size(objPath2));
+ final Ds3Object obj4 = new Ds3Object("place_holder_2", 5000000);
+
+ try {
+ final Ds3ClientHelpers.Job putJob1 = HELPERS.startWriteJob(BUCKET_NAME, Lists
+ .newArrayList(obj1, obj2));
+ final UUID jobId1 = putJob1.getJobId();
+ final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
+ client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId1.toString(), 0, Files.size(objPath1)));
+
+ final Ds3ClientHelpers.Job putJob2 = HELPERS.startWriteJob(BUCKET_NAME, Lists
+ .newArrayList(obj3, obj4));
+ final UUID jobId2 = putJob2.getJobId();
+ final SeekableByteChannel book2Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book2);
+ client.putObject(new PutObjectRequest(BUCKET_NAME, book2, book2Channel, jobId2.toString(), 0, Files.size(objPath2)));
+
+ HELPERS.startWriteJob(BUCKET_NAME, Lists
+ .newArrayList(new Ds3Object("place_holder_3", 1000000)));
+
+ ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId1, client, 20);
+ ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId2, client, 20);
+
+ client.cancelAllJobsSpectraS3(new CancelAllJobsSpectraS3Request());
+
+ assertTrue(client.getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request())
+ .getActiveJobListResult().getActiveJobs().isEmpty());
+
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void getCanceledJobs() throws IOException {
+
+ try {
+ final Ds3ClientHelpers.Job jobOne =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2)));
+ final UUID jobOneId = jobOne.getJobId();
+ client.cancelJobSpectraS3(new CancelJobSpectraS3Request(jobOneId.toString()));
+
+ final GetCanceledJobsSpectraS3Response getCanceledJobsResponse = client
+ .getCanceledJobsSpectraS3(new GetCanceledJobsSpectraS3Request());
+
+ final List canceledJobsUUIDs = new ArrayList<>();
+ for (final CanceledJob job : getCanceledJobsResponse.getCanceledJobListResult().getCanceledJobs()) {
+ canceledJobsUUIDs.add(job.getId());
+ }
+
+ assertTrue(canceledJobsUUIDs.contains(jobOneId));
+
+ } finally {
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void getJobChunksReady() throws IOException {
+
+ try {
+ final Ds3Object ds3Object = new Ds3Object("test", 2);
+ final Ds3ClientHelpers.Job jobOne =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(ds3Object));
+ final UUID jobOneId = jobOne.getJobId();
+
+ final GetJobChunksReadyForClientProcessingSpectraS3Response response = client
+ .getJobChunksReadyForClientProcessingSpectraS3
+ (new GetJobChunksReadyForClientProcessingSpectraS3Request(jobOneId.toString()));
+
+ final List chunkNames = new ArrayList<>();
+ for (final Objects objectList : response.getMasterObjectListResult().getObjects()) {
+ for (final BulkObject bulkObject : objectList.getObjects()) {
+ chunkNames.add(bulkObject.getName());
+ }
+ }
+
+ assertThat(chunkNames, contains(ds3Object.getName()));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void getJobChunk() throws IOException {
+
+ try {
+ final Ds3Object ds3Object = new Ds3Object("test", 2);
+ final Ds3ClientHelpers.Job jobOne =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(ds3Object));
+ final UUID jobOneId = jobOne.getJobId();
+
+ final GetJobChunksReadyForClientProcessingSpectraS3Response response = client
+ .getJobChunksReadyForClientProcessingSpectraS3
+ (new GetJobChunksReadyForClientProcessingSpectraS3Request(jobOneId));
+
+ final UUID aJobChunkID = response.getMasterObjectListResult().getObjects().get(0).getChunkId();
+
+ final GetJobChunkSpectraS3Response getJobChunkSpectraS3Response = client.getJobChunkSpectraS3(
+ new GetJobChunkSpectraS3Request(aJobChunkID));
+
+ assertThat(getJobChunkSpectraS3Response.getObjectsResult(), is(notNullValue()));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void aggregateTwoJobs() throws IOException {
+
+ try {
+ final WriteJobOptions writeJobOptions = WriteJobOptions.create().withAggregating();
+
+ final Ds3ClientHelpers.Job jobOne =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2)), writeJobOptions);
+ final UUID jobOneId = jobOne.getJobId();
+
+ final Ds3ClientHelpers.Job jobTwo =
+ HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test2", 2)), writeJobOptions);
+ final UUID jobTwoId = jobTwo.getJobId();
+
+ assertThat(jobOneId, is(jobTwoId));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void testPutJobOptionsWithStreamingBehavior() throws IOException {
+
+ try {
+ final WriteJobOptions writeJobOptions = WriteJobOptions.create().withAggregating();
+
+ final Ds3ClientHelpers.Job jobOne = HELPERS.startWriteJobUsingStreamedBehavior(BUCKET_NAME,
+ Lists.newArrayList(new Ds3Object("test", 2)),
+ writeJobOptions);
+ final UUID jobOneId = jobOne.getJobId();
+
+ final Ds3ClientHelpers.Job jobTwo = HELPERS.startWriteJobUsingStreamedBehavior(BUCKET_NAME,
+ Lists.newArrayList(new Ds3Object("test2", 2)),
+ writeJobOptions);
+ final UUID jobTwoId = jobTwo.getJobId();
+
+ assertThat(jobOneId, is(jobTwoId));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void testPutJobOptionsWithRandomAccessBehavior() throws IOException {
+
+ try {
+ final WriteJobOptions writeJobOptions = WriteJobOptions.create().withAggregating();
+
+ final Ds3ClientHelpers.Job jobOne = HELPERS.startWriteJobUsingRandomAccessBehavior(BUCKET_NAME,
+ Lists.newArrayList(new Ds3Object("test", 2)),
+ writeJobOptions);
+ final UUID jobOneId = jobOne.getJobId();
+
+ final Ds3ClientHelpers.Job jobTwo = HELPERS.startWriteJobUsingRandomAccessBehavior(BUCKET_NAME,
+ Lists.newArrayList(new Ds3Object("test2", 2)),
+ writeJobOptions);
+ final UUID jobTwoId = jobTwo.getJobId();
+
+ assertThat(jobOneId, is(jobTwoId));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void allocateJobChunk() throws IOException {
+
+ try {
+ final PutBulkJobSpectraS3Response putBulkResponse = client.
+ putBulkJobSpectraS3(new PutBulkJobSpectraS3Request(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2))));
+ final UUID chunkUUID = putBulkResponse.getMasterObjectList().getObjects().get(0).getChunkId();
+ final AllocateJobChunkSpectraS3Response allocateResponse = client
+ .allocateJobChunkSpectraS3(new AllocateJobChunkSpectraS3Request(chunkUUID.toString()));
+
+ assertThat(allocateResponse.getStatus(), is(AllocateJobChunkSpectraS3Response.Status.ALLOCATED));
+
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void putObjectCachedNotification() throws IOException {
+ final PutObjectCachedNotificationRegistrationSpectraS3Response putNotificationResponse = client
+ .putObjectCachedNotificationRegistrationSpectraS3
+ (new PutObjectCachedNotificationRegistrationSpectraS3Request("test@test.test"));
+
+ assertThat(putNotificationResponse.getS3ObjectCachedNotificationRegistrationResult(), is(notNullValue()));
+ }
+
+ @Test
+ public void getObjectCachedNotification() throws IOException {
+
+ final PutObjectCachedNotificationRegistrationSpectraS3Response putNotificationResponse = client
+ .putObjectCachedNotificationRegistrationSpectraS3
+ (new PutObjectCachedNotificationRegistrationSpectraS3Request("test@test.test"));
+ final GetObjectCachedNotificationRegistrationSpectraS3Response getNotificationResponse = client
+ .getObjectCachedNotificationRegistrationSpectraS3(
+ (new GetObjectCachedNotificationRegistrationSpectraS3Request
+ (putNotificationResponse.getS3ObjectCachedNotificationRegistrationResult().getId().toString())));
+
+ assertThat(getNotificationResponse.getS3ObjectCachedNotificationRegistrationResult(), is(notNullValue()));
+ }
+
+ @Test
+ public void getCompletedJobs() throws IOException {
+ final GetCompletedJobsSpectraS3Response getCompletedJobsResponse = client.
+ getCompletedJobsSpectraS3(new GetCompletedJobsSpectraS3Request());
+
+ assertThat(getCompletedJobsResponse.getCompletedJobListResult(), is(notNullValue()));
+ }
+
+ @Test
+ public void clearCompletedJobs() throws IOException {
+ final ClearAllCompletedJobsSpectraS3Response clearAllCompletedJobsResponse = client
+ .clearAllCompletedJobsSpectraS3(new ClearAllCompletedJobsSpectraS3Request());
+
+ assertThat(clearAllCompletedJobsResponse, is(notNullValue()));
+ }
+
+ @Test
+ public void putJobCreatedNotification() throws IOException {
+ UUID notificationUUID = null;
+ try {
+ final PutJobCreatedNotificationRegistrationSpectraS3Response response = client
+ .putJobCreatedNotificationRegistrationSpectraS3(new PutJobCreatedNotificationRegistrationSpectraS3Request("test@test.test"));
+ notificationUUID = response.getJobCreatedNotificationRegistrationResult().getId();
+ assertThat(response.getJobCreatedNotificationRegistrationResult(), is(notNullValue()));
+
+ } finally {
+ if (notificationUUID != null) {
+ client.deleteJobCreatedNotificationRegistrationSpectraS3(
+ new DeleteJobCreatedNotificationRegistrationSpectraS3Request(notificationUUID));
+ }
+ }
+ }
+
+ @Test
+ public void getJobCreatedNotification() throws IOException {
+ UUID notificationUUID = null;
+ try {
+ notificationUUID = client.putJobCreatedNotificationRegistrationSpectraS3(
+ new PutJobCreatedNotificationRegistrationSpectraS3Request("test@test.test"))
+ .getJobCreatedNotificationRegistrationResult().getId();
+
+ final GetJobCreatedNotificationRegistrationSpectraS3Response response = client
+ .getJobCreatedNotificationRegistrationSpectraS3(new
+ GetJobCreatedNotificationRegistrationSpectraS3Request(notificationUUID));
+
+ assertThat(response.getJobCreatedNotificationRegistrationResult(), is(notNullValue()));
+
+ } finally {
+ if (notificationUUID != null) {
+ client.deleteJobCreatedNotificationRegistrationSpectraS3(
+ new DeleteJobCreatedNotificationRegistrationSpectraS3Request(notificationUUID));
+ }
+ }
+ }
+
+ @Test
+ public void deleteJobCreatedNotification() throws IOException {
+ final UUID notificationUUID = client.putJobCreatedNotificationRegistrationSpectraS3(
+ new PutJobCreatedNotificationRegistrationSpectraS3Request("test@test.test"))
+ .getJobCreatedNotificationRegistrationResult().getId();
+
+ final DeleteJobCreatedNotificationRegistrationSpectraS3Response response = client
+ .deleteJobCreatedNotificationRegistrationSpectraS3(new DeleteJobCreatedNotificationRegistrationSpectraS3Request(notificationUUID));
+
+ assertThat(response, is(notNullValue()));
+ }
+
+ @Test
+ public void putJobCompletedNotification() throws IOException {
+ UUID notificationUUID = null;
+ try {
+ final PutJobCompletedNotificationRegistrationSpectraS3Response response = client
+ .putJobCompletedNotificationRegistrationSpectraS3(
+ new PutJobCompletedNotificationRegistrationSpectraS3Request("test@test.test"));
+ notificationUUID = response.getJobCompletedNotificationRegistrationResult().getId();
+ assertThat(response.getJobCompletedNotificationRegistrationResult(), is(notNullValue()));
+ } finally {
+ if (notificationUUID != null) {
+ client.deleteJobCompletedNotificationRegistrationSpectraS3(
+ new DeleteJobCompletedNotificationRegistrationSpectraS3Request(notificationUUID));
+ }
+ }
+ }
+
+ @Test
+ public void getJobCompletedNotification() throws IOException {
+ UUID notificationUUID = null;
+ try {
+ notificationUUID = client.putJobCompletedNotificationRegistrationSpectraS3(
+ new PutJobCompletedNotificationRegistrationSpectraS3Request("test@test.test"))
+ .getJobCompletedNotificationRegistrationResult().getId();
+
+ final GetJobCompletedNotificationRegistrationSpectraS3Response response = client
+ .getJobCompletedNotificationRegistrationSpectraS3(
+ new GetJobCompletedNotificationRegistrationSpectraS3Request(notificationUUID));
+
+ assertThat(response.getJobCompletedNotificationRegistrationResult(), is(notNullValue()));
+
+ } finally {
+ if (notificationUUID != null) {
+ client.deleteJobCompletedNotificationRegistrationSpectraS3(
+ new DeleteJobCompletedNotificationRegistrationSpectraS3Request(notificationUUID));
+ }
+ }
+ }
+
+ @Test
+ public void deleteJobCompletedNotification() throws IOException {
+ final UUID notificationUUID = client.putJobCompletedNotificationRegistrationSpectraS3(
+ new PutJobCompletedNotificationRegistrationSpectraS3Request("test@test.test"))
+ .getJobCompletedNotificationRegistrationResult().getId();
+
+ final DeleteJobCompletedNotificationRegistrationSpectraS3Response response = client
+ .deleteJobCompletedNotificationRegistrationSpectraS3(
+ new DeleteJobCompletedNotificationRegistrationSpectraS3Request(notificationUUID));
+
+ assertThat(response, is(notNullValue()));
+ }
+
+ @Test
+ public void testWriteJobWithRetries() throws Exception {
+ final int maxNumObjectTransferAttempts = 3;
+ final boolean computeChecksumWithUserSuppliedFunction = false;
+
+ transferAndCheckFileContent(maxNumObjectTransferAttempts,
+ new ObjectTransferExceptionHandler() {
+ @Override
+ public boolean handleException(final Throwable t) {
+ t.printStackTrace();
+ fail("Got unexpected exception: " + t.getMessage());
+ return false;
+ }
+ }, computeChecksumWithUserSuppliedFunction);
+ }
+
+ private static void transferAndCheckFileContent(final int maxNumObjectTransferAttempts,
+ final ObjectTransferExceptionHandler objectTransferExceptionHandler,
+ final boolean computeChecksumWithUserSuppliedFunction)
+ throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, IOException, URISyntaxException
+ {
+ final String userAgent = "Agent Provocateur";
+
+ final Ds3Client clientWithUserAgent = Ds3ClientBuilder.fromEnv()
+ .withUserAgent(userAgent)
+ .withHttps(false)
+ .build();
+
+ final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl) clientWithUserAgent);
+
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final String DIR_NAME = "largeFiles/";
+ final String[] FILE_NAMES = new String[]{"lesmis-copies.txt"};
+
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objects = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objects.add(obj);
+ }
+
+ final int maxNumBlockAllocationRetries = 1;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ final AtomicInteger numTimesObjectCompletedEventCalled = new AtomicInteger(0);
+ final AtomicInteger numTimesDataTransferredEventCalled = new AtomicInteger(0);
+ final AtomicBoolean dataTransferredEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean objectCompletedEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean checksumEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean waitingForChunksEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean failureEventReceived = new AtomicBoolean(false);
+ final AtomicBoolean checksumFunctionCalled = new AtomicBoolean(false);
+
+ final WriteJobOptions writeJobOptions = WriteJobOptions.create()
+ .withChecksumType(ChecksumType.Type.MD5);
+
+ final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, objects, writeJobOptions);
+
+ if (computeChecksumWithUserSuppliedFunction) {
+ writeJob.withChecksum(new ChecksumFunction() {
+ @Override
+ public String compute(final BulkObject obj, final ByteChannel channel) {
+ checksumFunctionCalled.set(true);
+ try {
+ final InputStream dataStream = new BufferedInputStream(Channels.newInputStream(channel));
+
+ dataStream.mark(Integer.MAX_VALUE);
+
+ final Hasher hasher = ChecksumUtils.getHasher(ChecksumType.Type.MD5);
+
+ final String checksum = ChecksumUtils.hashInputStream(hasher, dataStream);
+
+ LOG.info("Computed checksum for blob: {}", checksum);
+
+ dataStream.reset();
+
+ return checksum;
+ } catch (final IOException e) {
+ LOG.error("Error calculating checksum for: " + obj.getName(), e);
+ fail("Error calculating checksum for: " + obj.getName());
+ }
+
+ return null;
+ }
+ });
+ }
+
+ writeJob.attachFailureEventListener(new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ failureEventReceived.set(true);
+ }
+ });
+
+ writeJob.attachChecksumListener(new ChecksumListener() {
+ @Override
+ public void value(final BulkObject obj, final ChecksumType.Type type, final String checksum) {
+ checksumEventReceived.set(true);
+ assertEquals("0feqCQBgdtmmgGs9pB/Huw==", checksum);
+ }
+ });
+
+ writeJob.attachObjectCompletedListener(new ObjectCompletedListener() {
+ private int numCompletedObjects = 0;
+
+ @Override
+ public void objectCompleted(final String name) {
+ objectCompletedEventReceived.set(true);
+ assertTrue(bookTitles.contains(name));
+ assertEquals(1, ++numCompletedObjects);
+ numTimesObjectCompletedEventCalled.getAndIncrement();
+ }
+ });
+
+ writeJob.attachDataTransferredListener(new DataTransferredListener() {
+ @Override
+ public void dataTransferred(final long size) {
+ dataTransferredEventReceived.set(true);
+ assertEquals(objects.get(0).getSize(), size);
+ numTimesDataTransferredEventCalled.getAndIncrement();
+ }
+ });
+
+ writeJob.attachWaitingForChunksListener(new WaitingForChunksListener() {
+ @Override
+ public void waiting(final int secondsToWait) {
+ waitingForChunksEventReceived.set(true);
+ }
+ });
+
+ boolean shouldContinueTest = true;
+
+ try {
+ writeJob.transfer(new FileObjectPutter(dirPath));
+ } catch (final Throwable t) {
+ shouldContinueTest = objectTransferExceptionHandler.handleException(t);
+ }
+
+ if (!shouldContinueTest) {
+ return;
+ }
+
+ if (computeChecksumWithUserSuppliedFunction) {
+ assertTrue(checksumFunctionCalled.get());
+ } else {
+ assertFalse(checksumFunctionCalled.get());
+ }
+ assertTrue(dataTransferredEventReceived.get());
+ assertTrue(objectCompletedEventReceived.get());
+ assertTrue(checksumEventReceived.get());
+ assertFalse(waitingForChunksEventReceived.get());
+ assertFalse(failureEventReceived.get());
+
+ assertEquals(1, numTimesObjectCompletedEventCalled.get());
+ assertEquals(1, numTimesDataTransferredEventCalled.get());
+
+ final GetBucketResponse request = ds3ClientShim.getBucket(new GetBucketRequest(BUCKET_NAME));
+ final ListBucketResult result = request.getListBucketResult();
+
+ assertEquals(bookTitles.size(), result.getObjects().size());
+
+ for (final Contents contents : result.getObjects()) {
+ assertTrue(bookTitles.contains(contents.getKey()));
+ }
+
+ final Ds3ClientHelpers.Job readJob = Ds3ClientHelpers.wrap(ds3ClientShim, 1)
+ .startReadAllJob(BUCKET_NAME);
+ readJob.attachObjectCompletedListener(new ObjectCompletedListener() {
+ @Override
+ public void objectCompleted(final String name) {
+ assertTrue(bookTitles.contains(name));
+
+ try {
+ final File originalFile = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAMES[0]).toFile();
+ final File fileCopiedFromBP = Paths.get(tempDirectory.toString(), FILE_NAMES[0]).toFile();
+ assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
+ } catch (final URISyntaxException | IOException e) {
+ fail("Failure trying to compare file we wrote to file we read.");
+ }
+ }
+ });
+
+ readJob.transfer(new FileObjectGetter(tempDirectory));
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ deleteAllContents(ds3ClientShim, BUCKET_NAME);
+ }
+ }
+
+ private interface ObjectTransferExceptionHandler {
+ boolean handleException(final Throwable t);
+ }
+
+ @Test
+ public void testWriteJobWithZeroLengthObject() throws Exception {
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), null);
+ final Path tempFile = Files.createTempFile(tempDirectory, "EmptyFile", null);
+ final String fileName = tempFile.getFileName().toString();
+
+ try {
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+
+ final ImmutableList objects = ImmutableList.of(new Ds3Object(fileName, 0));
+
+ final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, objects);
+ writeJob.transfer(new FileObjectPutter(tempDirectory));
+
+ final GetBucketResponse request = client.getBucket(new GetBucketRequest(BUCKET_NAME));
+ final ListBucketResult result = request.getListBucketResult();
+ assertThat(result.getObjects().size(), is(1));
+
+ final Contents contents = result.getObjects().get(0);
+ assertThat(contents.getKey(), is(fileName));
+ assertThat(contents.getSize(), is((long) 0));
+
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void testWriteJobWithRetriesAndUserDefinedChecksum() throws Exception {
+ final int maxNumObjectTransferAttempts = 3;
+ final boolean computeChecksumWithUserSuppliedFunction = true;
+
+ transferAndCheckFileContent(maxNumObjectTransferAttempts,
+ new ObjectTransferExceptionHandler() {
+ @Override
+ public boolean handleException(final Throwable t) {
+ t.printStackTrace();
+ fail("Got unexpected exception: " + t.getMessage());
+ return false;
+ }
+ }, computeChecksumWithUserSuppliedFunction);
+ }
+
+ @Test(timeout = 30000)
+ public void testWriteJobWithRetriesThrowsDs3NoMoreRetriesException() throws Exception {
+ final int maxNumObjectTransferAttempts = 1;
+ final boolean computeChecksumWithUserSuppliedFunction = false;
+
+ transferAndCheckFileContent(maxNumObjectTransferAttempts,
+ new ObjectTransferExceptionHandler() {
+ @Override
+ public boolean handleException(final Throwable t) {
+ if (!(t instanceof Ds3NoMoreRetriesException)) {
+ fail("Got exception of unexpected type: " + t.getMessage());
+ return true;
+ }
+
+ return false;
+ }
+ }, computeChecksumWithUserSuppliedFunction);
+ }
+
+ @Test(timeout = 30000)
+ public void testFiringOnFailureEventWithFailedChunkAllocation()
+ throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final AtomicInteger numFailureEventsFired = new AtomicInteger(0);
+
+ final int maxNumObjectTransferAttempts = 1;
+ final Ds3ClientHelpers.Job writeJob = createWriteJobWithObjectsReadyToTransfer(maxNumObjectTransferAttempts,
+ ClientFailureType.ChunkAllocation);
+
+ final FailureEventListener failureEventListener = new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ numFailureEventsFired.getAndIncrement();
+ assertEquals(FailureEvent.FailureActivity.PuttingObject, failureEvent.doingWhat());
+ }
+ };
+
+ writeJob.attachFailureEventListener(failureEventListener);
+
+ try {
+ writeJob.transfer(new FileObjectPutter(tempDirectory));
+ } catch (final Ds3NoMoreRetriesException e) {
+ assertEquals(1, numFailureEventsFired.get());
+ }
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ static Ds3ClientHelpers.Job createWriteJobWithObjectsReadyToTransfer(final int maxNumObjectTransferAttempts,
+ final ClientFailureType clientFailureType)
+ throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ final String DIR_NAME = "largeFiles/";
+ final String[] FILE_NAMES = new String[]{"lesmis-copies.txt"};
+
+ final List bookTitles = new ArrayList<>();
+ final List objects = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objects.add(obj);
+ }
+
+ final Ds3Client ds3Client = Ds3ClientShimFactory.makeWrappedDs3Client(clientFailureType, client);
+
+ final int maxNumBlockAllocationRetries = 3;
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3Client,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ return ds3ClientHelpers.startWriteJob(BUCKET_NAME, objects);
+ }
+
+ @Test(timeout = 30000)
+ public void testFiringWaitingForChunksEventWithFailedChunkAllocation()
+ throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final AtomicInteger numFailureEventsFired = new AtomicInteger(0);
+ final AtomicInteger numWaitingForChunksEventsFired = new AtomicInteger(0);
+
+ final int maxNumObjectTransferAttempts = 1;
+ final Ds3ClientHelpers.Job writeJob = createWriteJobWithObjectsReadyToTransfer(maxNumObjectTransferAttempts,
+ ClientFailureType.ChunkAllocation);
+
+ final FailureEventListener failureEventListener = new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ numFailureEventsFired.getAndIncrement();
+ assertEquals(FailureEvent.FailureActivity.PuttingObject, failureEvent.doingWhat());
+ }
+ };
+
+ writeJob.attachFailureEventListener(failureEventListener);
+
+ writeJob.attachWaitingForChunksListener(new WaitingForChunksListener() {
+ @Override
+ public void waiting(final int secondsToWait) {
+ numWaitingForChunksEventsFired.getAndIncrement();
+ }
+ });
+
+ try {
+ writeJob.transfer(new FileObjectPutter(tempDirectory));
+ } catch (final Ds3NoMoreRetriesException e) {
+ assertThat(numWaitingForChunksEventsFired.get(), is(greaterThanOrEqualTo(1)));
+ }
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void testFiringOnFailureEventWithFailedPutObject()
+ throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final AtomicInteger numFailureEventsFired = new AtomicInteger();
+
+ final int maxNumObjectTransferAttempts = 1;
+ final Ds3ClientHelpers.Job writeJob = createWriteJobWithObjectsReadyToTransfer(maxNumObjectTransferAttempts,
+ ClientFailureType.PutObject);
+
+ final FailureEventListener failureEventListener = new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ numFailureEventsFired.incrementAndGet();
+ assertEquals(FailureEvent.FailureActivity.PuttingObject, failureEvent.doingWhat());
+ }
+ };
+
+ writeJob.attachFailureEventListener(failureEventListener);
+
+ try {
+ writeJob.transfer(new FileObjectPutter(tempDirectory));
+ } catch (final IOException | RuntimeException e) {
+ assertEquals(1, numFailureEventsFired.get());
+ }
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void testPutJobUsingTransferStrategy() throws IOException, InterruptedException, URISyntaxException {
+ final String DIR_NAME = "books/";
+ final String[] FILE_NAMES = new String[]{"beowulf.txt"};
+
+ try {
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objectsToWrite = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objectsToWrite.add(obj);
+ }
+
+ final PutBulkJobSpectraS3Request request = new PutBulkJobSpectraS3Request(BUCKET_NAME, Lists.newArrayList(objectsToWrite));
+ final PutBulkJobSpectraS3Response putBulkJobSpectraS3Response = client.putBulkJobSpectraS3(request);
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(putBulkJobSpectraS3Response.getMasterObjectList())
+ .withChannelBuilder(new FileObjectPutter(dirPath));
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makePutTransferStrategy();
+
+ transferStrategy.transfer();
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+ final Iterable bucketContentsIterable = ds3ClientHelpers.listObjects(BUCKET_NAME);
+
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(FILE_NAMES[0], bucketContents.getKey());
+ }
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void testWriteJobUsingTransferStrategy() throws IOException, InterruptedException, URISyntaxException {
+ final String DIR_NAME = "books/";
+ final String[] FILE_NAMES = new String[]{"beowulf.txt"};
+
+ try {
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objectsToWrite = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objectsToWrite.add(obj);
+ }
+
+ final PutBulkJobSpectraS3Request request = new PutBulkJobSpectraS3Request(BUCKET_NAME, Lists.newArrayList(objectsToWrite));
+ final PutBulkJobSpectraS3Response putBulkJobSpectraS3Response = client.putBulkJobSpectraS3(request);
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(putBulkJobSpectraS3Response.getMasterObjectList())
+ .withChannelBuilder(new FileObjectPutter(dirPath));
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makePutTransferStrategy();
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+
+ final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(transferStrategy);
+
+ writeJob.transfer();
+
+ final Iterable bucketContentsIterable = ds3ClientHelpers.listObjects(BUCKET_NAME);
+
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(FILE_NAMES[0], bucketContents.getKey());
+ }
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void testPutJobWithUserSuppliedBlobStrategy() throws IOException, InterruptedException, URISyntaxException {
+ final String DIR_NAME = "books/";
+ final String[] FILE_NAMES = new String[]{"beowulf.txt"};
+
+ try {
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objectsToWrite = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objectsToWrite.add(obj);
+ }
+
+ final PutBulkJobSpectraS3Request request = new PutBulkJobSpectraS3Request(BUCKET_NAME, Lists.newArrayList(objectsToWrite));
+ final PutBulkJobSpectraS3Response putBulkJobSpectraS3Response = client.putBulkJobSpectraS3(request);
+
+ final MasterObjectList masterObjectList = putBulkJobSpectraS3Response.getMasterObjectList();
+
+ final EventDispatcher eventDispatcher = new EventDispatcherImpl(new SameThreadEventRunner());
+
+ final AtomicInteger numChunkAllocationAttempts = new AtomicInteger(0);
+
+ final BlobStrategy blobStrategy = new UserSuppliedPutBlobStrategy(client,
+ masterObjectList,
+ eventDispatcher,
+ new MaxChunkAttemptsRetryBehavior(5),
+ new ClientDefinedChunkAttemptRetryDelayBehavior(1, eventDispatcher),
+ new Monitorable() {
+ @Override
+ public void monitor() {
+ numChunkAllocationAttempts.incrementAndGet();
+ }
+ });
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(masterObjectList)
+ .withChannelBuilder(new FileObjectPutter(dirPath))
+ .withBlobStrategy(blobStrategy);
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makePutTransferStrategy();
+ transferStrategy.transfer();
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+ final Iterable bucketContentsIterable = ds3ClientHelpers.listObjects(BUCKET_NAME);
+
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(FILE_NAMES[0], bucketContents.getKey());
+ }
+
+ assertEquals(1, numChunkAllocationAttempts.get());
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ private interface Monitorable {
+ void monitor();
+ }
+
+ private static class UserSuppliedPutBlobStrategy implements BlobStrategy {
+ private final BlobStrategy wrappedBlobStrategy;
+ private final Monitorable monitorable;
+
+ private UserSuppliedPutBlobStrategy(final Ds3Client client,
+ final MasterObjectList masterObjectList,
+ final EventDispatcher eventDispatcher,
+ final ChunkAttemptRetryBehavior retryBehavior,
+ final ChunkAttemptRetryDelayBehavior chunkAttemptRetryDelayBehavior,
+ final Monitorable monitorable)
+ {
+ this.monitorable = monitorable;
+
+ wrappedBlobStrategy = new PutSequentialBlobStrategy(client, masterObjectList, eventDispatcher, retryBehavior, chunkAttemptRetryDelayBehavior);
+ }
+
+ @Override
+ public Iterable getWork() throws IOException, InterruptedException {
+ monitorable.monitor();
+
+ return wrappedBlobStrategy.getWork();
+ }
+ }
+
+ @Test
+ public void testPutJobWithUserSuppliedChannelStrategy() throws IOException, InterruptedException, URISyntaxException {
+ testPutJobWithUserSuppliedChannelStrategy(new TransferStrategyBuilderModifiable() {
+ @Override
+ public TransferStrategyBuilder modify(final TransferStrategyBuilder transferStrategyBuilder) {
+ return transferStrategyBuilder;
+ }
+ });
+ }
+
+ private static void testPutJobWithUserSuppliedChannelStrategy(final TransferStrategyBuilderModifiable strategyBuilderModifiable) throws IOException, InterruptedException, URISyntaxException {
+ final String DIR_NAME = "books/";
+ final String[] FILE_NAMES = new String[]{"beowulf.txt"};
+
+ try {
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objectsToWrite = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objectsToWrite.add(obj);
+ }
+
+ final PutBulkJobSpectraS3Request request = new PutBulkJobSpectraS3Request(BUCKET_NAME, Lists.newArrayList(objectsToWrite));
+ final PutBulkJobSpectraS3Response putBulkJobSpectraS3Response = client.putBulkJobSpectraS3(request);
+
+ final MasterObjectList masterObjectList = putBulkJobSpectraS3Response.getMasterObjectList();
+
+ final AtomicInteger numTimesChannelOpened = new AtomicInteger(0);
+ final AtomicInteger numTimesChannelClosed = new AtomicInteger(0);
+
+ final Ds3ClientHelpers.ObjectChannelBuilder objectChannelBuilder = new FileObjectPutter(dirPath);
+ final ChannelStrategy channelStrategy = new UserSuppliedPutChannelStrategy(objectChannelBuilder,
+ new ChannelMonitorable() {
+ @Override
+ public void acquired() {
+ numTimesChannelOpened.incrementAndGet();
+ }
+
+ @Override
+ public void released() {
+ numTimesChannelClosed.incrementAndGet();
+ }
+ });
+
+ TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(masterObjectList)
+ .withChannelStrategy(channelStrategy);
+
+ transferStrategyBuilder = strategyBuilderModifiable.modify(transferStrategyBuilder);
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makePutTransferStrategy();
+ transferStrategy.transfer();
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+ final Iterable bucketContentsIterable = ds3ClientHelpers.listObjects(BUCKET_NAME);
+
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(FILE_NAMES[0], bucketContents.getKey());
+ }
+
+ assertEquals(1, numTimesChannelOpened.get());
+ assertEquals(1, numTimesChannelClosed.get());
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ private interface TransferStrategyBuilderModifiable {
+ TransferStrategyBuilder modify(final TransferStrategyBuilder transferStrategyBuilder);
+ }
+
+ private interface ChannelMonitorable {
+ void acquired();
+ void released();
+ }
+
+ private static class UserSuppliedPutChannelStrategy implements ChannelStrategy {
+ private final ChannelMonitorable channelMonitorable;
+ private final ChannelStrategy wrappedPutStrategy;
+
+
+ private UserSuppliedPutChannelStrategy(final Ds3ClientHelpers.ObjectChannelBuilder objectChannelBuilder,
+ final ChannelMonitorable channelMonitorable)
+ {
+ this.channelMonitorable = channelMonitorable;
+ wrappedPutStrategy = new SequentialFileReaderChannelStrategy(objectChannelBuilder);
+ }
+
+ @Override
+ public SeekableByteChannel acquireChannelForBlob(final BulkObject blob) throws IOException {
+ channelMonitorable.acquired();
+ return wrappedPutStrategy.acquireChannelForBlob(blob);
+ }
+
+ @Override
+ public void releaseChannelForBlob(final SeekableByteChannel seekableByteChannel, final BulkObject blob) throws IOException {
+ channelMonitorable.released();
+ wrappedPutStrategy.releaseChannelForBlob(seekableByteChannel, blob);
+ }
+ }
+
+ @Test
+ public void testStreamingPutJobWithUserSuppliedChannelStrategy() throws IOException, InterruptedException, URISyntaxException {
+ testPutJobWithUserSuppliedChannelStrategy(new TransferStrategyBuilderModifiable() {
+ @Override
+ public TransferStrategyBuilder modify(final TransferStrategyBuilder transferStrategyBuilder) {
+ return transferStrategyBuilder.usingStreamedTransferBehavior();
+ }
+ });
+ }
+
+ @Test
+ public void testRandomAccessPutJobWithUserSuppliedChannelStrategy() throws IOException, InterruptedException, URISyntaxException {
+ testPutJobWithUserSuppliedChannelStrategy(new TransferStrategyBuilderModifiable() {
+ @Override
+ public TransferStrategyBuilder modify(final TransferStrategyBuilder transferStrategyBuilder) {
+ return transferStrategyBuilder.usingRandomAccessTransferBehavior();
+ }
+ });
+ }
+
+ @Test
+ public void testPutJobWithUserSuppliedTransferRetryDecorator() throws IOException, InterruptedException, URISyntaxException {
+ final String DIR_NAME = "books/";
+ final String[] FILE_NAMES = new String[]{"beowulf.txt"};
+
+ try {
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objectsToWrite = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objectsToWrite.add(obj);
+ }
+
+ final AtomicInteger numTimesTransferCalled = new AtomicInteger(0);
+
+ final PutBulkJobSpectraS3Request request = new PutBulkJobSpectraS3Request(BUCKET_NAME, Lists.newArrayList(objectsToWrite));
+ final PutBulkJobSpectraS3Response putBulkJobSpectraS3Response = client.putBulkJobSpectraS3(request);
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(putBulkJobSpectraS3Response.getMasterObjectList())
+ .withChannelBuilder(new FileObjectPutter(dirPath))
+ .withTransferRetryDecorator(new UserSuppliedTransferRetryDecorator(new Monitorable() {
+ @Override
+ public void monitor() {
+ numTimesTransferCalled.getAndIncrement();
+ }
+ }));
+
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makePutTransferStrategy();
+
+ transferStrategy.transfer();
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+ final Iterable bucketContentsIterable = ds3ClientHelpers.listObjects(BUCKET_NAME);
+
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(FILE_NAMES[0], bucketContents.getKey());
+ }
+
+ assertEquals(1, numTimesTransferCalled.get());
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ private static class UserSuppliedTransferRetryDecorator implements TransferRetryDecorator {
+ private final TransferRetryDecorator transferRetryDecorator;
+ private final Monitorable monitorable;
+
+ private UserSuppliedTransferRetryDecorator(final Monitorable monitorable) {
+ this.transferRetryDecorator = new MaxNumObjectTransferAttemptsDecorator(5);
+ this.monitorable = monitorable;
+ }
+
+ @Override
+ public TransferMethod wrap(final TransferMethod transferMethod) {
+ transferRetryDecorator.wrap(transferMethod);
+ return this;
+ }
+
+ @Override
+ public void transferJobPart(final JobPart jobPart) throws IOException {
+ monitorable.monitor();
+ transferRetryDecorator.transferJobPart(jobPart);
+ }
+ }
+
+ @Test
+ public void testPutJobWithUserSuppliedChunkAttemptRetryBehavior() throws IOException, InterruptedException, URISyntaxException {
+ final String DIR_NAME = "books/";
+ final String[] FILE_NAMES = new String[]{"beowulf.txt"};
+
+ try {
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objectsToWrite = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objectsToWrite.add(obj);
+ }
+
+ final PutBulkJobSpectraS3Request request = new PutBulkJobSpectraS3Request(BUCKET_NAME, Lists.newArrayList(objectsToWrite));
+ final PutBulkJobSpectraS3Response putBulkJobSpectraS3Response = client.putBulkJobSpectraS3(request);
+
+ final AtomicInteger numTimesInvokeCalled = new AtomicInteger(0);
+ final AtomicInteger numTimesResetCalled = new AtomicInteger(0);
+
+ final TransferStrategyBuilder transferStrategyBuilder = new TransferStrategyBuilder()
+ .withDs3Client(client)
+ .withMasterObjectList(putBulkJobSpectraS3Response.getMasterObjectList())
+ .withChannelBuilder(new FileObjectPutter(dirPath))
+ .withChunkAttemptRetryBehavior(
+ new UserSuppliedChunkAttemptRetryBehavior(new ChunkAttemptRetryBehaviorMonitorable() {
+ @Override
+ public void invoke() {
+ numTimesInvokeCalled.getAndIncrement();
+ }
+
+ @Override
+ public void reset() {
+ numTimesResetCalled.getAndIncrement();
+ }
+ }));
+
+ final TransferStrategy transferStrategy = transferStrategyBuilder.makePutTransferStrategy();
+
+ transferStrategy.transfer();
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+ final Iterable bucketContentsIterable = ds3ClientHelpers.listObjects(BUCKET_NAME);
+
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(FILE_NAMES[0], bucketContents.getKey());
+ }
+
+ assertEquals(0, numTimesInvokeCalled.get());
+ assertEquals(1, numTimesResetCalled.get());
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ private static class UserSuppliedChunkAttemptRetryBehavior implements ChunkAttemptRetryBehavior {
+ private final ChunkAttemptRetryBehaviorMonitorable chunkAttemptRetryBehaviorMonitorable;
+ private final ChunkAttemptRetryBehavior wrappedChunkAttemptRetryBehavior;
+
+ private UserSuppliedChunkAttemptRetryBehavior(final ChunkAttemptRetryBehaviorMonitorable chunkAttemptRetryBehaviorMonitorable) {
+ this.chunkAttemptRetryBehaviorMonitorable = chunkAttemptRetryBehaviorMonitorable;
+ wrappedChunkAttemptRetryBehavior = new MaxChunkAttemptsRetryBehavior(5);
+ }
+
+ @Override
+ public void invoke() throws IOException {
+ chunkAttemptRetryBehaviorMonitorable.invoke();
+ wrappedChunkAttemptRetryBehavior.invoke();
+ }
+
+ @Override
+ public void reset() {
+ chunkAttemptRetryBehaviorMonitorable.reset();
+ wrappedChunkAttemptRetryBehavior.reset();
+ }
+ }
+
+ private interface ChunkAttemptRetryBehaviorMonitorable {
+ void invoke();
+ void reset();
+ }
+
+ @Test
+ public void testPutJobUsingStreamedTransferStrategy() throws IOException, URISyntaxException {
+ final String DIR_NAME = "books/";
+ final String[] FILE_NAMES = new String[]{"beowulf.txt"};
+
+ try {
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objectsToWrite = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objectsToWrite.add(obj);
+ }
+
+ final Ds3ClientHelpers.Job writeJob = HELPERS.startWriteJobUsingStreamedBehavior(BUCKET_NAME, objectsToWrite);
+ writeJob.transfer(new FileObjectPutter(dirPath));
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+ final Iterable bucketContentsIterable = ds3ClientHelpers.listObjects(BUCKET_NAME);
+
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(FILE_NAMES[0], bucketContents.getKey());
+ }
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ public static class StreamObjectPutter extends ObjectInputStreamBuilder {
+ final InputStream _is;
+
+ public StreamObjectPutter(final InputStream is) {
+ _is = is;
+ }
+
+ @Override
+ public InputStream buildInputStream(final String key) {
+ return _is;
+ }
+ }
+
+ @Test
+ public void testPutJobUsingStreamedTransferStrategyAboveChunk() throws IOException, URISyntaxException {
+ final String DIR_NAME = "books/";
+ final String[] FILE_NAMES = new String[]{"Paw-3.1.9.zip"};
+
+ try {
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List objectsToWrite = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ objectsToWrite.add(obj);
+ }
+
+ final Ds3ClientHelpers.Job writeJob = HELPERS.startWriteJobUsingStreamedBehavior(BUCKET_NAME, objectsToWrite, WriteJobOptions.create());
+ writeJob.transfer(new StreamObjectPutter(new FileInputStream(dirPath.resolve("Paw-3.1.9.zip").toFile())));
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+ final Iterable bucketContentsIterable = ds3ClientHelpers.listObjects(BUCKET_NAME);
+
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(FILE_NAMES[0], bucketContents.getKey());
+ }
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void testPutJobUsingRandomAccessTransferStrategy() throws IOException, URISyntaxException {
+ final String DIR_NAME = "books/";
+ final String[] FILE_NAMES = new String[]{"beowulf.txt"};
+
+ try {
+ final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
+
+ final List bookTitles = new ArrayList<>();
+ final List objectsToWrite = new ArrayList<>();
+ for (final String book : FILE_NAMES) {
+ final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
+ final long bookSize = Files.size(objPath);
+ final Ds3Object obj = new Ds3Object(book, bookSize);
+
+ bookTitles.add(book);
+ objectsToWrite.add(obj);
+ }
+
+ final Ds3ClientHelpers.Job writeJob = HELPERS.startWriteJobUsingRandomAccessBehavior(BUCKET_NAME, objectsToWrite);
+ writeJob.transfer(new FileObjectPutter(dirPath));
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+ final Iterable bucketContentsIterable = ds3ClientHelpers.listObjects(BUCKET_NAME);
+
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(FILE_NAMES[0], bucketContents.getKey());
+ }
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ @Test
+ public void testThatMetadataAccessDoesNotTerminateTransfer() throws IOException, URISyntaxException, InterruptedException {
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ final String fileName = "Gracie.txt";
+
+ final Path filePath = Paths.get(tempDirectory.toString(), fileName);
+
+ final List ds3Objects = new ArrayList<>();
+ ds3Objects.add(new Ds3Object(fileName));
+
+ try {
+ if ( ! Platform.isWindows()) {
+ tempDirectory.toFile().setExecutable(false);
+ } else {
+ Runtime.getRuntime().exec("icacls " + tempDirectory + "/deny Everyone(RD)").waitFor();
+ }
+
+ final int maxNumBlockAllocationRetries = 3;
+ final int maxNumObjectTransferAttempts = 3;
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client,
+ maxNumBlockAllocationRetries,
+ maxNumObjectTransferAttempts);
+
+ final AtomicInteger numTimesFailureHandlerCalled = new AtomicInteger(0);
+
+ final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, ds3Objects);
+ writeJob.withMetadata(new MetadataAccessImpl(ImmutableMap.builder().put(fileName, filePath).build(),
+ new FailureEventListener() {
+ @Override
+ public void onFailure(final FailureEvent failureEvent) {
+ numTimesFailureHandlerCalled.incrementAndGet();
+ assertEquals(FailureEvent.FailureActivity.RecordingMetadata, failureEvent.doingWhat());
+ assertEquals(client.getConnectionDetails().getEndpoint(), failureEvent.usingSystemWithEndpoint());
+ }
+ },
+ client.getConnectionDetails().getEndpoint()));
+ writeJob.transfer(new FileObjectGetter(Paths.get(".")));
+
+ assertEquals(1, numTimesFailureHandlerCalled.get());
+ } finally {
+ if ( ! Platform.isWindows()) {
+ tempDirectory.toFile().setExecutable(true);
+ } else {
+ Runtime.getRuntime().exec("icacls " + tempDirectory + "/grant Everyone(RD)").waitFor();
+ }
+
+ deleteAllContents(client, BUCKET_NAME);
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ Files.delete(Paths.get(fileName));
+ }
+ }
+
+ @Test
+ public void testPutting15000Files() throws IOException, URISyntaxException {
+ final String tempPathPrefix = null;
+ Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ try {
+ final ImmutableList ds3Objects = copyFilesAndGenerateDsObjects(tempDirectory);
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+ final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, ds3Objects);
+
+ writeJob.transfer(new FileObjectPutter(tempDirectory));
+
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+
+ tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Lists.newArrayList(
+ new Ds3Object(SOURCE_FILE_NAME, Files.size(sourceFilePath()))));
+
+ final GetJobSpectraS3Response jobSpectraS3Response = client.getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
+
+ assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
+
+ readJob.transfer(new FileObjectGetter(tempDirectory));
+
+ final File originalFile = ResourceUtils.loadFileResource(SOURCE_DIRECTORY + SOURCE_FILE_NAME).toFile();
+ final File fileCopiedFromBP = Paths.get(tempDirectory.toString(), SOURCE_FILE_NAME).toFile();
+ assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
+ } catch (final org.apache.http.client.ClientProtocolException e) {
+ fail("This test makes sure that we don't run out of connections when transferring lots of small files. Oops.");
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+ }
+
+ private static Path sourceFilePath() throws IOException, URISyntaxException {
+ return ResourceUtils.loadFileResource(SOURCE_DIRECTORY + SOURCE_FILE_NAME);
+ }
+
+ private static ImmutableList copyFilesAndGenerateDsObjects(final Path destinationDirectory) throws IOException, URISyntaxException {
+ final Path sourceFilePath = ResourceUtils.loadFileResource(SOURCE_DIRECTORY + SOURCE_FILE_NAME);
+
+ final ImmutableList fileNames = generateFileNames(SOURCE_FILE_BASE_NAME, SOURCE_FILE_EXTENSION, 15000);
+ copyFiles(sourceFilePath, destinationDirectory, fileNames);
+
+ return generateDs3Objects(destinationDirectory, fileNames);
+ }
+
+ private static ImmutableList generateFileNames(final String baseFileName, final String baseFileExtension, final int numFileNames) {
+ final ImmutableList.Builder listBuilder = ImmutableList.builder();
+
+ listBuilder.add(baseFileName + "." + baseFileExtension);
+
+ for (int i = 1; i < numFileNames; ++i) {
+ listBuilder.add(baseFileName + i + "." + baseFileExtension);
+ }
+
+ return listBuilder.build();
+ }
+
+ private static void copyFiles(final Path sourceFilePath, final Path destinationDirectory, final ImmutableList fileNames) throws IOException {
+ for (final String fileName : fileNames) {
+ Files.copy(sourceFilePath, Paths.get(destinationDirectory.toString(), fileName));
+ }
+ }
+
+ private static ImmutableList generateDs3Objects(final Path destinationDirectory, final ImmutableList fileNames) throws IOException {
+ final ImmutableList.Builder listBuilder = ImmutableList.builder();
+
+ for (final String fileName : fileNames) {
+ final Path filePath = Paths.get(destinationDirectory.toString(), fileName);
+ final long fileSize = Files.size(filePath);
+ final Ds3Object ds3Object = new Ds3Object(fileName, fileSize);
+
+ listBuilder.add(ds3Object);
+ }
+
+ return listBuilder.build();
+ }
+
+ @Test
+ public void testCancelingJob() throws URISyntaxException, InterruptedException {
+ final String tempPathPrefix = null;
+ Path tempDirectory;
+
+ try {
+ tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+ } catch (final IOException e) {
+ fail("Could not create temp folder.");
+ return;
+ }
+
+ try {
+ final ImmutableList ds3Objects = copyFilesAndGenerateDsObjects(tempDirectory);
+
+ final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
+
+ final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, ds3Objects);
+
+ final AtomicBoolean caughtExceptionWhileCanceling = new AtomicBoolean(false);
+ final AtomicBoolean cancelHandlerCalled = new AtomicBoolean(false);
+ final CountDownLatch countDownLatch = new CountDownLatch(1);
+
+ final AtomicBoolean hasBeenCancelled = new AtomicBoolean(false);
+ writeJob.attachDataTransferredListener(dataTransferred -> {
+ if(hasBeenCancelled.compareAndSet(false, true)) {
+ new Thread(() -> {
+ try {
+ writeJob.cancel();
+ } catch (IOException e) {
+ fail();
+ } finally {
+ countDownLatch.countDown();
+ }
+ }).start();
+ }
+ });
+
+ writeJob.attachCanceledEventObserver(new CanceledEventObserver(eventData -> {
+ cancelHandlerCalled.set(true);
+ assertEquals(writeJob.getJobId(), eventData);
+ }));
+
+ writeJob.transfer(new FileObjectPutter(tempDirectory));
+
+ countDownLatch.await();
+
+ assertFalse(caughtExceptionWhileCanceling.get());
+ assertTrue(cancelHandlerCalled.get());
+
+ final String prefix = "";
+ final String nextMarker = null;
+ final int maxKeys = 15000;
+ final String delimiter = null;
+ final int numRetries = 5;
+
+ final GetBucketKeyLoaderFactory getBucketKeyLoaderFactory = new GetBucketKeyLoaderFactory<>(client, BUCKET_NAME, prefix, delimiter, nextMarker, maxKeys, numRetries, GetBucketKeyLoaderFactory.contentsFunction);
+ final LazyIterable> iterable = new LazyIterable<>(getBucketKeyLoaderFactory);
+ final int numThingsInBucket = Iterables.size(iterable);
+
+ assertTrue(numThingsInBucket < maxKeys);
+
+ final GetCanceledJobSpectraS3Response getCanceledJobSpectraS3Response = client.getCanceledJobSpectraS3(new GetCanceledJobSpectraS3Request(writeJob.getJobId().toString()));
+ final CanceledJob canceledJob = getCanceledJobSpectraS3Response.getCanceledJobResult();
+ assertEquals(writeJob.getJobId(), canceledJob.getId());
+ } catch (final org.apache.http.client.ClientProtocolException e) {
+ fail("This test makes sure that we don't run out of connections when transferring lots of small files. Oops.");
+ } catch (final IOException e) {
+ fail("IOException from something other than job cancelation.");
+ } finally {
+ try {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ deleteAllContents(client, BUCKET_NAME);
+ } catch (final IOException e) {
+ LOG.error("Failure cleaning up.", e);
+ }
+ }
+ }
+
+ @Test
+ public void testThatFifoIsNotProcessed() throws IOException, InterruptedException {
+ Assume.assumeFalse(Platform.isWindows());
+
+ final String tempPathPrefix = null;
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ final String A_FILE_NAME = "aFile.txt";
+ final String C_FILE_NAME = "cFile.txt";
+ final String FIFO_NAME = "bFifo";
+
+ final AtomicBoolean caughtException = new AtomicBoolean(false);
+
+ try {
+ Files.createFile(Paths.get(tempDirectory.toString(), A_FILE_NAME));
+ Runtime.getRuntime().exec("mkfifo " + Paths.get(tempDirectory.toString(), FIFO_NAME)).waitFor();
+ Files.createFile(Paths.get(tempDirectory.toString(), C_FILE_NAME));
+
+ final List ds3Objects = Arrays.asList(new Ds3Object(A_FILE_NAME),
+ new Ds3Object(FIFO_NAME),
+ new Ds3Object(C_FILE_NAME));
+
+ final Ds3ClientHelpers.Job writeJob = HELPERS.startWriteJob(BUCKET_NAME, ds3Objects);
+ writeJob.transfer(new FileObjectPutter(tempDirectory));
+ } catch (final UnrecoverableIOException e) {
+ assertTrue(e.getMessage().contains(FIFO_NAME));
+ caughtException.set(true);
+ } finally {
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+
+ assertTrue(caughtException.get());
+ }
+
+ @Test
+ public void testThatNonExistentFileDoesNotStopPutJob() throws IOException {
+ final String tempPathPrefix = null;
+ final Path tempDirectoryForFilesToPut = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+ final Path tempDirectoryForFilesToGet = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
+
+ final String A_FILE_NAME = "aFile.txt";
+ final String B_FILE_NAME = "bFile.txt";
+ final String C_FILE_NAME = "cFile.txt";
+
+ final Path aFilePutPath = Files.createFile(Paths.get(tempDirectoryForFilesToPut.toString(), A_FILE_NAME));
+ final Path cFilePutPath = Files.createFile(Paths.get(tempDirectoryForFilesToPut.toString(), C_FILE_NAME));
+
+ final AtomicBoolean caughtNoSuchFileException = new AtomicBoolean(false);
+ final AtomicBoolean getJobRan = new AtomicBoolean(false);
+
+ try {
+ FileUtils.writeStringToFile(aFilePutPath.toFile(), "aFile");
+ FileUtils.writeStringToFile(cFilePutPath.toFile(), "cFile");
+
+ final int sizeOfNonExistentFile = 5;
+
+ final List ds3Objects = Arrays.asList(new Ds3Object(A_FILE_NAME, Files.size(aFilePutPath)),
+ new Ds3Object(B_FILE_NAME, sizeOfNonExistentFile),
+ new Ds3Object(C_FILE_NAME, Files.size(cFilePutPath)));
+
+ final Ds3ClientHelpers.Job writeJob = HELPERS.startWriteJob(BUCKET_NAME, ds3Objects);
+ writeJob.transfer(new FileObjectPutter(tempDirectoryForFilesToPut));
+ } catch (final NoSuchFileException e) {
+ caughtNoSuchFileException.set(true);
+
+ final Path aFileGetPath = Files.createFile(Paths.get(tempDirectoryForFilesToGet.toString(), A_FILE_NAME));
+ final Path cFileGetPath = Files.createFile(Paths.get(tempDirectoryForFilesToGet.toString(), C_FILE_NAME));
+
+ final List ds3Objects = Arrays.asList(new Ds3Object(A_FILE_NAME), new Ds3Object(C_FILE_NAME));
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, ds3Objects);
+ readJob.transfer(new FileObjectGetter(tempDirectoryForFilesToGet));
+
+ getJobRan.set(true);
+
+ assertTrue(FileUtils.contentEquals(aFileGetPath.toFile(), aFilePutPath.toFile()));
+ assertTrue(FileUtils.contentEquals(cFileGetPath.toFile(), cFilePutPath.toFile()));
+ } finally {
+ FileUtils.deleteDirectory(tempDirectoryForFilesToGet.toFile());
+ FileUtils.deleteDirectory(tempDirectoryForFilesToPut.toFile());
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+ }
+
+ assertTrue(caughtNoSuchFileException.get());
+ assertTrue(getJobRan.get());
+ }
+
+ @Test(timeout = 30000)
+ public void testStreamedPutJobWithBlobbedFile() throws Exception {
+ final int chunkSize = MIN_UPLOAD_SIZE_IN_BYTES;
+ final long biggerThanAChunkSize = chunkSize * 2L + 1024;
+
+ final int numIntsInBiggerThanAChunkSize = (int)biggerThanAChunkSize / 4;
+
+ final String originalFileName = "Gracie.bin";
+ final String movedFileName = "Gracie.bak";
+
+ try {
+ final DataOutputStream originalFileStream = new DataOutputStream(new FileOutputStream(originalFileName));
+
+ byte[] bytes = new byte[4];
+
+ for (int i = 0; i < numIntsInBiggerThanAChunkSize; ++i) {
+ bytes[0] = (byte)i;
+ bytes[1] = (byte)(i >> 8);
+ bytes[2] = (byte)(i >> 16);
+ bytes[3] = (byte)(i >> 24);
+ originalFileStream.write(bytes);
+ }
+
+ originalFileStream.close();
+
+ final Ds3Object ds3Object = new Ds3Object();
+ ds3Object.setName(originalFileName);
+ ds3Object.setSize(biggerThanAChunkSize);
+
+ final AtomicLong numBytesTransferred = new AtomicLong(0);
+
+ final WriteJobOptions writeJobOptions = WriteJobOptions.create();
+ writeJobOptions.withMaxUploadSize(chunkSize);
+
+ final Ds3ClientHelpers.Job writeJob = HELPERS.startWriteJobUsingStreamedBehavior(BUCKET_NAME, Collections.singletonList(ds3Object), writeJobOptions);
+ writeJob.attachDataTransferredListener(numBytesTransferred::addAndGet);
+
+ final CountDownLatch writeCountDownLatch = new CountDownLatch(1);
+
+ writeJob.attachObjectCompletedListener(name -> writeCountDownLatch.countDown());
+
+ writeJob.transfer(new FileObjectPutter(Paths.get(".")));
+
+ writeCountDownLatch.await();
+
+ assertEquals(biggerThanAChunkSize, numBytesTransferred.get());
+
+ Files.move(Paths.get(originalFileName), Paths.get(movedFileName));
+
+ final CountDownLatch readCountdownLatch = new CountDownLatch(1);
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, Collections.singletonList(ds3Object));
+ readJob.attachObjectCompletedListener(name -> readCountdownLatch.countDown());
+ readJob.transfer(new FileObjectGetter(Paths.get(".")));
+
+ readCountdownLatch.await();
+
+ assertTrue(FileUtils.contentEquals(new File(movedFileName), new File(originalFileName)));
+ } finally {
+ cancelAllJobsForBucket(client, BUCKET_NAME);
+ deleteAllContents(client, BUCKET_NAME);
+
+ Files.deleteIfExists(Paths.get(originalFileName));
+ Files.deleteIfExists(Paths.get(movedFileName));
+ }
+ }
+}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Regression_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Regression_Test.java
similarity index 95%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Regression_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Regression_Test.java
index 43b8e1442..f8d7ff014 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Regression_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Regression_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -89,6 +89,7 @@ public void testMarkerWithSpaces() throws IOException {
new Ds3Object("obj4 also has spaces.txt", 1024));
final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(bucketName, objects);
+ putJob.transfer(new RandomDataChannelBuilder(objects));
final Iterable objs = HELPERS.listObjects(bucketName, null, "obj3 has spaces.txt");
boolean foundObj4 = false;
@@ -97,7 +98,7 @@ public void testMarkerWithSpaces() throws IOException {
if (obj.getKey().equals("obj4 also has spaces.txt")) foundObj4 = true;
LOG.info("marker with spaces size: " + obj.getSize());
}
- assertTrue(Iterables.size(objs) == 1);
+ assertThat(Iterables.size(objs), is(1));
assertTrue(foundObj4);
final CancelJobSpectraS3Response cancelJobResponse = client
@@ -122,6 +123,7 @@ public void testPrefixWithSpaces() throws IOException {
new Ds3Object("has spaces obj4.txt", 1024));
final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(bucketName, objects);
+ putJob.transfer(new RandomDataChannelBuilder(objects));
final Iterable objs = HELPERS.listObjects(bucketName, "has spaces");
boolean foundObj2 = false;
@@ -132,7 +134,7 @@ public void testPrefixWithSpaces() throws IOException {
if (obj.getKey().equals("has spaces obj2.txt")) foundObj2 = true;
if (obj.getKey().equals("has spaces obj4.txt")) foundObj4 = true;
}
- assertTrue(Iterables.size(objs) == 2);
+ assertThat(Iterables.size(objs), is(2));
assertTrue(foundObj2);
assertTrue(foundObj4);
@@ -158,6 +160,7 @@ public void testPrefixForDirectoriesWithSpaces() throws IOException {
new Ds3Object("dir 2/has spaces obj4.txt", 1024));
final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(bucketName, objects);
+ putJob.transfer(new RandomDataChannelBuilder(objects));
final Iterable dir1Objs = HELPERS.listObjects(bucketName, "dir1/");
boolean foundObj1 = false;
@@ -168,7 +171,7 @@ public void testPrefixForDirectoriesWithSpaces() throws IOException {
if (obj.getKey().equals("dir1/obj1_no_spaces.txt")) foundObj1 = true;
if (obj.getKey().equals("dir1/has spaces obj2.txt")) foundObj2 = true;
}
- assertTrue(Iterables.size(dir1Objs) == 2);
+ assertThat(Iterables.size(dir1Objs), is(2));
assertTrue(foundObj1);
assertTrue(foundObj2);
@@ -181,7 +184,7 @@ public void testPrefixForDirectoriesWithSpaces() throws IOException {
if (obj.getKey().equals("dir 2/obj3_no_spaces.txt")) foundObj3 = true;
if (obj.getKey().equals("dir 2/has spaces obj4.txt")) foundObj4 = true;
}
- assertTrue(Iterables.size(objsDir2) == 2);
+ assertThat(Iterables.size(objsDir2), is(2));
assertTrue(foundObj3);
assertTrue(foundObj4);
@@ -206,6 +209,7 @@ public void testPrefixForNestedDirectories() throws IOException {
new Ds3Object("dir1/dir 2/has spaces obj4.txt", 1024));
final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(bucketName, objects);
+ putJob.transfer(new RandomDataChannelBuilder(objects));
final Iterable dir1Objs = HELPERS.listObjects(bucketName, "dir1/");
boolean foundObj1 = false;
@@ -216,7 +220,7 @@ public void testPrefixForNestedDirectories() throws IOException {
if (obj.getKey().equals("dir1/obj1_no_spaces.txt")) foundObj1 = true;
if (obj.getKey().equals("dir1/has spaces obj2.txt")) foundObj2 = true;
}
- assertTrue(Iterables.size(dir1Objs) == 4);
+ assertThat(Iterables.size(dir1Objs), is(4));
assertTrue(foundObj1);
assertTrue(foundObj2);
@@ -229,7 +233,7 @@ public void testPrefixForNestedDirectories() throws IOException {
if (obj.getKey().equals("dir1/dir 2/obj3_no_spaces.txt")) foundObj3 = true;
if (obj.getKey().equals("dir1/dir 2/has spaces obj4.txt")) foundObj4 = true;
}
- assertTrue(Iterables.size(objsDir2) == 2);
+ assertThat(Iterables.size(objsDir2), is(2));
assertTrue(foundObj3);
assertTrue(foundObj4);
@@ -243,7 +247,7 @@ public void testPrefixForNestedDirectories() throws IOException {
@Test
public void emptyObjectTest() throws IOException {
- Util.assumeVersion1_2(client);
+ Util.assumeVersionOneDotTwo(client);
final String bucketName = "emptyObject";
final List objects = Collections.singletonList(new Ds3Object("obj1.txt", 0));
diff --git a/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/ResourceTest.kt b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/ResourceTest.kt
new file mode 100644
index 000000000..cf977b8fe
--- /dev/null
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/ResourceTest.kt
@@ -0,0 +1,114 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+package com.spectralogic.ds3client.integration
+
+import com.spectralogic.ds3client.commands.spectrads3.PutBucketSpectraS3Request
+import com.spectralogic.ds3client.helpers.DeleteBucket
+import com.spectralogic.ds3client.helpers.Ds3ClientHelpers
+import com.spectralogic.ds3client.helpers.channelbuilders.RepeatStringObjectChannelBuilder
+import com.spectralogic.ds3client.integration.test.helpers.TempStorageIds
+import com.spectralogic.ds3client.integration.test.helpers.TempStorageUtil
+import com.spectralogic.ds3client.models.ChecksumType
+import com.spectralogic.ds3client.models.bulk.Ds3Object
+import org.junit.AfterClass
+import org.junit.BeforeClass
+import org.junit.Test
+import java.io.IOException
+import org.hamcrest.MatcherAssert.assertThat
+import org.hamcrest.Matchers.lessThan
+
+class ResourceTest {
+ private companion object {
+ private val numBuckets = 100
+ private val numObjects = 1024
+ private val numThreads = numObjects
+ private val objectSize = 1024 * 10
+ private val baseBucketName = "putLotsaBuckets"
+ private val baseFileName = "file"
+ private val objectData = "Gracie"
+ private val dataBufferSize = 1024
+ private val ds3Client = Util.fromEnv()
+ private val policyPrefix = ResourceTest::class.java.simpleName
+ private var envStorageIds : TempStorageIds? = null
+
+ @BeforeClass
+ @JvmStatic
+ @Throws(IOException::class)
+ fun startup() {
+ val envDataPolicyId = TempStorageUtil.setupDataPolicy(policyPrefix, false, ChecksumType.Type.MD5, ds3Client)
+ envStorageIds = TempStorageUtil.setup(policyPrefix, envDataPolicyId, ds3Client)
+ }
+
+ @AfterClass
+ @JvmStatic
+ @Throws(IOException::class)
+ fun teardown() {
+ TempStorageUtil.teardown(policyPrefix, envStorageIds, ds3Client)
+ ds3Client.close()
+ }
+ }
+
+ @Test
+ fun putLotsaBuckets() {
+ val bucketNames = generateBucketNames()
+
+ try {
+ createBuckets(bucketNames)
+ populateBuckets(bucketNames)
+ assertThat(Thread.activeCount(), lessThan(numThreads * 2))
+ } finally {
+ deleteBuckets(bucketNames)
+ }
+ }
+
+ private fun generateBucketNames() : List {
+ return (1 .. numBuckets)
+ .map { index -> baseBucketName + index }
+ .toList()
+ }
+
+ private fun createBuckets(bucketNames: List) {
+ bucketNames.forEach({ bucketName -> ds3Client.putBucketSpectraS3(PutBucketSpectraS3Request(bucketName)) })
+ }
+
+ @Throws(IOException::class)
+ private fun populateBuckets(bucketNames: List) {
+ bucketNames
+ .forEach({ bucketName ->
+ Ds3ClientHelpers
+ .wrap(ds3Client)
+ .startWriteJob(bucketName, generateDs3Objects())
+ .withMaxParallelRequests(numThreads)
+ .transfer(RepeatStringObjectChannelBuilder(objectData, objectData.length * 512, dataBufferSize.toLong()))
+ })
+
+ }
+
+ private fun generateDs3Objects(): List {
+ return (1 .. numObjects)
+ .map { index ->
+ val ds3Object = Ds3Object()
+ ds3Object.name = baseFileName + index
+ ds3Object.size = objectSize.toLong()
+ ds3Object
+ }
+ .toList()
+ }
+
+ private fun deleteBuckets(bucketNames: List) {
+ bucketNames.forEach({ bucketName -> DeleteBucket.deleteBucket(Ds3ClientHelpers.wrap(ds3Client), bucketName) })
+ }
+}
\ No newline at end of file
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Smoke_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Smoke_Test.java
similarity index 84%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Smoke_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Smoke_Test.java
index aa0e5aa26..5633e212f 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Smoke_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/Smoke_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -35,6 +35,7 @@
import com.spectralogic.ds3client.networking.Metadata;
import com.spectralogic.ds3client.utils.ByteArraySeekableByteChannel;
import com.spectralogic.ds3client.utils.ResourceUtils;
+import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -42,17 +43,16 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.SeekableByteChannel;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.nio.file.*;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -60,9 +60,11 @@
import static com.spectralogic.ds3client.integration.Util.*;
import static com.spectralogic.ds3client.integration.test.helpers.ABMTestHelper.*;
+import static com.spectralogic.ds3client.utils.Guard.isNotNullAndNotEmpty;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.junit.Assume.assumeThat;
+import static org.junit.Assume.assumeTrue;
public class Smoke_Test {
@@ -139,8 +141,8 @@ public void getObjects() throws IOException, URISyntaxException {
assertThat(response.getS3ObjectListResult().getS3Objects().size(), is(4));
assertTrue(s3ObjectExists(response.getS3ObjectListResult().getS3Objects(), "beowulf.txt"));
- assertThat(response.getPagingTruncated(), is(nullValue()));
- assertThat(response.getPagingTotalResultCount(), is(nullValue()));
+ assertThat(response.getPagingTruncated(), is(0));
+ assertThat(response.getPagingTotalResultCount(), is(4));
} finally {
deleteAllContents(client,bucketName);
}
@@ -503,6 +505,72 @@ public void testRecoverWriteJob() throws IOException, JobRecoveryException, URIS
}
}
+ @Test
+ public void testRecoverWriteJobUsingStreamedBehavior() throws IOException, JobRecoveryException, URISyntaxException {
+ runWriteRecoveryTest(new RecoveryJobFactory() {
+ @Override
+ public Ds3ClientHelpers.Job makeRecoveryJob(final Ds3ClientHelpers ds3ClientHelpers, final UUID jobId) throws JobRecoveryException, IOException {
+ return ds3ClientHelpers.recoverWriteJobUsingStreamedBehavior(jobId);
+ }
+ });
+ }
+
+ private static void runWriteRecoveryTest(final RecoveryJobFactory recoveryJobFactory) throws IOException, JobRecoveryException, URISyntaxException {
+ final String bucketName = "test_recover_write_job_bucket";
+ final String book1 = "beowulf.txt";
+ final String book2 = "ulysses.txt";
+
+ try {
+ HELPERS.ensureBucketExists(bucketName, envDataPolicyId);
+
+ final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
+ final Path objPath2 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book2);
+ final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
+ final Ds3Object obj2 = new Ds3Object(book2, Files.size(objPath2));
+
+ final Map blobCollection = new HashMap<>();
+ blobCollection.put(book1, obj1);
+ blobCollection.put(book2, obj2);
+
+ final Ds3ClientHelpers.Job job = Ds3ClientHelpers.wrap(client).startWriteJob(bucketName, Lists.newArrayList(obj1, obj2));
+
+ final PutObjectResponse putResponse1 = client.putObject(new PutObjectRequest(
+ job.getBucketName(),
+ book1,
+ new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1),
+ job.getJobId().toString(),
+ 0,
+ Files.size(objPath1)));
+ assertThat(putResponse1, is(notNullValue()));
+
+ // Interuption...
+ final Ds3ClientHelpers.Job recoverJob = recoveryJobFactory.makeRecoveryJob(HELPERS, job.getJobId());
+
+ recoverJob.transfer(new ResourceObjectPutter(RESOURCE_BASE_NAME));
+
+ final Iterable bucketContentsIterable = HELPERS.listObjects(bucketName);
+ for (final Contents bucketContents : bucketContentsIterable) {
+ assertEquals(blobCollection.get(bucketContents.getKey()).getSize(), bucketContents.getSize());
+ }
+ } finally {
+ deleteAllContents(client, bucketName);
+ }
+ }
+
+ private interface RecoveryJobFactory {
+ Ds3ClientHelpers.Job makeRecoveryJob(final Ds3ClientHelpers ds3ClientHelpers, final UUID jobId) throws JobRecoveryException, IOException;
+ }
+
+ @Test
+ public void testRecoverWriteJobUsingRandomAccessBehavior() throws IOException, JobRecoveryException, URISyntaxException {
+ runWriteRecoveryTest(new RecoveryJobFactory() {
+ @Override
+ public Ds3ClientHelpers.Job makeRecoveryJob(final Ds3ClientHelpers ds3ClientHelpers, final UUID jobId) throws JobRecoveryException, IOException {
+ return ds3ClientHelpers.recoverWriteJobUsingRandomAccessBehavior(jobId);
+ }
+ });
+ }
+
@Test (expected = JobRecoveryNotActiveException.class)
public void testRecoverWriteJobCanceledJob() throws IOException, URISyntaxException, JobRecoveryException {
final String bucketName = "test_canceled_recover_write_job_bucket";
@@ -562,29 +630,33 @@ public void verifySendCrc32cChecksum() throws IOException, URISyntaxException {
client);
//Create storage domain
- final PutStorageDomainSpectraS3Response storageDomainResponse = createStorageDomain(
+ final StorageDomain storageDomain = createStorageDomain(
storageDomainName,
- client);
+ client,
+ true);
//Create pool partition
- final PutPoolPartitionSpectraS3Response poolPartitionResponse = createPoolPartition(
+ final PoolPartition poolPartition = createPoolPartition(
poolPartitionName,
PoolType.ONLINE,
- client);
+ client,
+ true);
//Create storage domain member linking pool partition to storage domain
- final PutPoolStorageDomainMemberSpectraS3Response memberResponse = createPoolStorageDomainMember(
- storageDomainResponse.getStorageDomainResult().getId(),
- poolPartitionResponse.getPoolPartitionResult().getId(),
- client);
- storageDomainMemberId = memberResponse.getStorageDomainMemberResult().getId();
+ final StorageDomainMember storageDomainMember = createPoolStorageDomainMember(
+ storageDomain.getId(),
+ poolPartition.getId(),
+ client,
+ true);
+ storageDomainMemberId = storageDomainMember.getId();
//create data persistence rule
- final PutDataPersistenceRuleSpectraS3Response dataPersistenceResponse = createDataPersistenceRule(
+ final DataPersistenceRule dataPersistenceRule = createDataPersistenceRule(
dataPolicyResponse.getDataPolicyResult().getId(),
- storageDomainResponse.getStorageDomainResult().getId(),
- client);
- dataPersistenceRuleId = dataPersistenceResponse.getDataPersistenceRuleResult().getDataPolicyId();
+ storageDomain.getId(),
+ client,
+ true);
+ dataPersistenceRuleId = dataPersistenceRule.getDataPolicyId();
//Create bucket with data policy
client.putBucketSpectraS3(new PutBucketSpectraS3Request(bucketName)
@@ -726,6 +798,86 @@ public void testRecoverReadJob() throws IOException, JobRecoveryException, URISy
}
}
+ @Test
+ public void testRecoverReadJobUsingStreamedBehavior() throws IOException, JobRecoveryException, URISyntaxException {
+ runReadRecoveryJob(new RecoveryJobFactory() {
+ @Override
+ public Ds3ClientHelpers.Job makeRecoveryJob(final Ds3ClientHelpers ds3ClientHelpers, final UUID jobId) throws JobRecoveryException, IOException {
+ return ds3ClientHelpers.recoverReadJobsingStreamedBehavior(jobId);
+ }
+ });
+ }
+
+ private static void runReadRecoveryJob(final RecoveryJobFactory recoveryJobFactory) throws IOException, JobRecoveryException, URISyntaxException {
+ final String bucketName = "test_recover_read_job_bucket";
+ final String book1 = "beowulf.txt";
+ final String book2 = "ulysses.txt";
+ final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
+ final Path objPath2 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book2);
+ final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
+ final Ds3Object obj2 = new Ds3Object(book2, Files.size(objPath2));
+
+ final Path dirPath = FileSystems.getDefault().getPath("output");
+ if (!Files.exists(dirPath)) {
+ Files.createDirectory(dirPath);
+ }
+
+ try {
+ HELPERS.ensureBucketExists(bucketName, envDataPolicyId);
+
+ final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(bucketName, Lists.newArrayList(obj1, obj2));
+ putJob.transfer(new ResourceObjectPutter(RESOURCE_BASE_NAME));
+
+ final FileChannel channel1 = FileChannel.open(
+ dirPath.resolve(book1),
+ StandardOpenOption.WRITE,
+ StandardOpenOption.CREATE,
+ StandardOpenOption.TRUNCATE_EXISTING
+ );
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(bucketName, Lists.newArrayList(obj1, obj2));
+ final GetObjectResponse readResponse1 = client.getObject(
+ new GetObjectRequest(
+ bucketName,
+ book1,
+ channel1,
+ readJob.getJobId().toString(),
+ 0));
+
+ assertThat(readResponse1, is(notNullValue()));
+
+ // Interruption...
+ final Ds3ClientHelpers.Job recoverJob = recoveryJobFactory.makeRecoveryJob(HELPERS, readJob.getJobId());
+
+ recoverJob.transfer(new FileObjectGetter(dirPath));
+
+ final Map blobCollection = new HashMap<>();
+ blobCollection.put(book1, obj1);
+ blobCollection.put(book2, obj2);
+
+ final Collection filesInTempDirectory = FileUtils.listFiles(dirPath.toFile(), null, false);
+ for (final File fileInTempDirectory : filesInTempDirectory) {
+ assertEquals(blobCollection.get(fileInTempDirectory.getName()).getSize(), fileInTempDirectory.length());
+ }
+ } finally {
+ deleteAllContents(client, bucketName);
+ for( final Path tempFile : Files.newDirectoryStream(dirPath) ){
+ Files.delete(tempFile);
+ }
+ Files.delete(dirPath);
+ }
+ }
+
+ @Test
+ public void testRecoverReadJobUsingRandomAccessBehavior() throws IOException, JobRecoveryException, URISyntaxException {
+ runReadRecoveryJob(new RecoveryJobFactory() {
+ @Override
+ public Ds3ClientHelpers.Job makeRecoveryJob(final Ds3ClientHelpers ds3ClientHelpers, final UUID jobId) throws JobRecoveryException, IOException {
+ return ds3ClientHelpers.recoverReadJobUsingRandomAccessBehavior(jobId);
+ }
+ });
+ }
+
@Test (expected = JobRecoveryNotActiveException.class)
public void testRecoverReadJobCanceledJob() throws IOException, JobRecoveryException, URISyntaxException {
final String bucketName = "test_canceled_recover_read_job_bucket";
@@ -788,7 +940,7 @@ public void testRecoverReadJobDoesNotExist() throws IOException, JobRecoveryExce
@Test
public void putDirectory() throws IOException {
- assumeVersion1_2(client);
+ assumeVersionOneDotTwo(client);
final String bucketName = "putDir";
@@ -820,13 +972,13 @@ public SeekableByteChannel buildChannel(final String key) throws IOException {
@Test
public void putDirectoryWithOtherObjects() throws IOException {
- assumeVersion1_2(client);
+ assumeVersionOneDotTwo(client);
final String bucketName = "mixedPutDir";
try {
- final byte[] content = "I'm text with some more data so that it gets flushed to the output cache.".getBytes(Charset.forName("UTF-8"));
+ final byte[] content = "I'm text with some more data so that it gets flushed to the output cache.".getBytes(StandardCharsets.UTF_8);
final List objs = Lists.newArrayList(new Ds3Object("dir/"), new Ds3Object("obj.txt", content.length));
@@ -1057,7 +1209,7 @@ public void partialGetWithBookOverChunkBoundry() throws IOException, URISyntaxEx
final String bucketName = "partialGetOnBook";
final Path filePath = Files.createTempFile("ds3", FILE_NAME);
- LOG.info("TempFile for partial get of book: " + filePath.toAbsolutePath().toString());
+ LOG.info("TempFile for partial get of book: " + filePath.toAbsolutePath());
try {
@@ -1086,9 +1238,9 @@ public SeekableByteChannel buildChannel(final String key) throws IOException {
final Path expectedResultPath = Paths.get(Smoke_Test.class.getResource("/largeFiles/output").toURI());
assertThat(Files.size(filePath), is(200L));
- final String partialFile = new String(Files.readAllBytes(filePath), Charset.forName("UTF-8"));
- final String expectedResult = new String(Files.readAllBytes(expectedResultPath), Charset.forName("UTF-8"));
- assertThat(partialFile, is(expectedResult.substring(0, expectedResult.length())));
+ final String partialFile = new String(Files.readAllBytes(filePath), StandardCharsets.UTF_8);
+ final String expectedResult = new String(Files.readAllBytes(expectedResultPath), StandardCharsets.UTF_8);
+ assertThat(partialFile, is(expectedResult));
} finally {
deleteAllContents(client, bucketName);
Files.delete(filePath);
@@ -1328,6 +1480,41 @@ public SeekableByteChannel buildChannel(final String key) throws IOException {
}
}
+ @Test
+ public void testQuestionMarkInQueryParam() throws IOException {
+ final String bucketName = "TestQuestionMarkInQueryParam";
+ final String objectName = "Test?Question?Mark";
+ try {
+ HELPERS.ensureBucketExists(bucketName, envDataPolicyId);
+
+ final List objs = Lists.newArrayList(new Ds3Object(objectName, 10));
+
+ final Ds3ClientHelpers.Job job = HELPERS.startWriteJob(bucketName, objs);
+
+ job.transfer(new Ds3ClientHelpers.ObjectChannelBuilder() {
+ @Override
+ public SeekableByteChannel buildChannel(final String key) throws IOException {
+
+ final byte[] randomData = IOUtils.toByteArray(new RandomDataInputStream(124345, 10));
+ final ByteBuffer randomBuffer = ByteBuffer.wrap(randomData);
+
+ final ByteArraySeekableByteChannel channel = new ByteArraySeekableByteChannel(10);
+ channel.write(randomBuffer);
+
+ return channel;
+ }
+ });
+
+ final GetObjectsDetailsSpectraS3Response getObjectsSpectraS3Response = client
+ .getObjectsDetailsSpectraS3(new GetObjectsDetailsSpectraS3Request().withName(objectName));
+
+ assertThat(getObjectsSpectraS3Response.getS3ObjectListResult().getS3Objects().size(), is(1));
+
+ } finally {
+ deleteAllContents(client, bucketName);
+ }
+ }
+
@Test
public void testPercentInQueryParam() throws IOException {
final String bucketName = "TestPercentInQueryParam";
@@ -1471,4 +1658,19 @@ public void testGetObjectsWithFullDetails() throws IOException, URISyntaxExcepti
deleteAllContents(client, bucketName);
}
}
+
+ @Test
+ public void getBlobsOnTape() throws IOException {
+ final GetTapesSpectraS3Response getTapes = client.getTapesSpectraS3(new GetTapesSpectraS3Request());
+
+ // There must be at least one tape on the BP to run this test
+ assumeTrue(isNotNullAndNotEmpty(getTapes.getTapeListResult().getTapes()));
+
+ final UUID tapeId = getTapes.getTapeListResult().getTapes().get(0).getId();
+
+ final GetBlobsOnTapeSpectraS3Response getBlobs = client
+ .getBlobsOnTapeSpectraS3(new GetBlobsOnTapeSpectraS3Request(tapeId));
+
+ assertThat(getBlobs.getBulkObjectListResult(), is(notNullValue()));
+ }
}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/SpectraS3PaginationLoader_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/SpectraS3PaginationLoader_Test.java
similarity index 90%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/SpectraS3PaginationLoader_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/SpectraS3PaginationLoader_Test.java
index d7772930d..e7ea737bb 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/SpectraS3PaginationLoader_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/SpectraS3PaginationLoader_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -17,7 +17,6 @@
import com.google.common.collect.ImmutableList;
import com.spectralogic.ds3client.Ds3Client;
-import com.spectralogic.ds3client.commands.spectrads3.PutBulkJobSpectraS3Request;
import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
import com.spectralogic.ds3client.helpers.pagination.GetObjectsFullDetailsLoaderFactory;
import com.spectralogic.ds3client.integration.test.helpers.TempStorageIds;
@@ -39,7 +38,6 @@
import java.util.UUID;
import static com.spectralogic.ds3client.integration.Util.deleteAllContents;
-import static com.spectralogic.ds3client.integration.Util.insecureFromEnv;
import static junit.framework.TestCase.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -77,9 +75,12 @@ public void basicPagination() throws IOException {
// test setup
HELPERS.ensureBucketExists(TEST_ENV_NAME);
final int numObjects = 55;
- CLIENT.putBulkJobSpectraS3(new PutBulkJobSpectraS3Request(TEST_ENV_NAME, createTestList(numObjects)));
- final GetObjectsFullDetailsLoaderFactory loaderFactory = new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, "", 10, RETRIES, false);
+ final List objects = createTestList(numObjects);
+ final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(TEST_ENV_NAME, objects);
+ putJob.transfer(new RandomDataChannelBuilder(objects));
+
+ final GetObjectsFullDetailsLoaderFactory loaderFactory = new GetObjectsFullDetailsLoaderFactory(CLIENT, TEST_ENV_NAME, 10, RETRIES, false);
final Set foundItems = new HashSet<>();
@@ -98,7 +99,7 @@ public void basicPagination() throws IOException {
}
}
- private List createTestList(final int numObjects) {
+ private static List createTestList(final int numObjects) {
final ImmutableList.Builder builder = ImmutableList.builder();
for (int i = 0; i < numObjects; i++) {
builder.add(new Ds3Object("obj." + i, i+1));
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/UsersAndGroups_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/UsersAndGroups_Test.java
similarity index 93%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/UsersAndGroups_Test.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/UsersAndGroups_Test.java
index 6cc097024..b1d8a01f9 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/UsersAndGroups_Test.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/UsersAndGroups_Test.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -33,7 +33,9 @@
import java.security.SignatureException;
import java.util.UUID;
+import static com.spectralogic.ds3client.integration.Util.assumeVersion4orHigher;
import static com.spectralogic.ds3client.integration.Util.deleteAllContents;
+import static com.spectralogic.ds3client.integration.test.helpers.TempStorageUtil.DEFAULT_USER;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;
@@ -75,7 +77,7 @@ private static void setupBucket(final UUID dataPolicy) {
try {
HELPERS.ensureBucketExists(BUCKET_NAME, dataPolicy);
spectraUUID = client.getUserSpectraS3(
- new GetUserSpectraS3Request("spectra")).getSpectraUserResult().getId();
+ new GetUserSpectraS3Request(DEFAULT_USER)).getSpectraUserResult().getId();
administratorsUUID = client.getGroupSpectraS3(
new GetGroupSpectraS3Request("Administrators")).getGroupResult().getId();
} catch (final Exception e) {
@@ -89,16 +91,16 @@ public void getUserWithUUID() throws IOException, SignatureException {
final GetUserSpectraS3Response getSpectraResponse = client
.getUserSpectraS3(new GetUserSpectraS3Request(spectraUUID));
- assertThat(getSpectraResponse.getSpectraUserResult().getName(), is("spectra"));
+ assertThat(getSpectraResponse.getSpectraUserResult().getName(), is(DEFAULT_USER));
}
@Test
public void getUserWithString() throws IOException, SignatureException {
final GetUserSpectraS3Response getSpectraResponse = client
- .getUserSpectraS3(new GetUserSpectraS3Request("spectra"));
+ .getUserSpectraS3(new GetUserSpectraS3Request(DEFAULT_USER));
- assertThat(getSpectraResponse.getSpectraUserResult().getName(), is("spectra"));
+ assertThat(getSpectraResponse.getSpectraUserResult().getName(), is(DEFAULT_USER));
}
@Test
@@ -114,7 +116,7 @@ public void getUsers() throws IOException, SignatureException {
public void getUsersWithName() throws IOException, SignatureException {
final GetUsersSpectraS3Response getUsersResponse = client.getUsersSpectraS3(
- new GetUsersSpectraS3Request().withName("spectra"));
+ new GetUsersSpectraS3Request().withName(DEFAULT_USER));
assertThat(getUsersResponse.getSpectraUserListResult(), is(notNullValue()));
}
@@ -175,10 +177,13 @@ public void getUsersWithCombination() throws IOException, SignatureException {
}
@Test
- public void ModifyUserDefaultDataPolicy() throws IOException, SignatureException {
+ public void modifyUserDefaultDataPolicy() throws IOException, SignatureException {
final GetUserSpectraS3Response getSpectraResponse = client
.getUserSpectraS3(new GetUserSpectraS3Request(spectraUUID));
+
+ assertThat(getSpectraResponse.getSpectraUserResult(), is(notNullValue()));
+
final ModifyUserSpectraS3Response modifyUserSpectraS3Response = client
.modifyUserSpectraS3(new ModifyUserSpectraS3Request(spectraUUID)
.withDefaultDataPolicyId(dataPolicyId));
@@ -187,7 +192,7 @@ public void ModifyUserDefaultDataPolicy() throws IOException, SignatureException
}
@Test
- public void ModifyUserName() throws IOException, SignatureException {
+ public void modifyUserName() throws IOException, SignatureException {
final GetUserSpectraS3Response getSpectraResponse = client
.getUserSpectraS3(new GetUserSpectraS3Request(spectraUUID));
@@ -202,7 +207,7 @@ public void ModifyUserName() throws IOException, SignatureException {
@Test
- public void ModifyUserNameAndDataPolicy() throws IOException, SignatureException {
+ public void modifyUserNameAndDataPolicy() throws IOException, SignatureException {
final GetUserSpectraS3Response getSpectraResponse = client
.getUserSpectraS3(new GetUserSpectraS3Request(spectraUUID));
@@ -216,7 +221,7 @@ public void ModifyUserNameAndDataPolicy() throws IOException, SignatureException
}
@Test
- public void RegenerateUserSecretKey() throws IOException, SignatureException {
+ public void megenerateUserSecretKey() throws IOException, SignatureException {
try {
client.regenerateUserSecretKeySpectraS3(
new RegenerateUserSecretKeySpectraS3Request(UUID.randomUUID()));
@@ -339,7 +344,7 @@ public void getGroupsWithPageStartMarker() throws IOException, SignatureExceptio
.withPageStartMarker(UUID.randomUUID()));
fail("The above should not be found and throw exception.");
} catch (final FailedRequestException e) {
- assertThat(e.getStatusCode(), is(410));
+ assertThat(e.getStatusCode(), is(404));
}
}
@@ -467,7 +472,7 @@ public void getUserGroupMembersWithMemberUserIDString() throws IOException, Sign
final GetGroupMembersSpectraS3Response getGroupMembersSpectraS3Response = client
.getGroupMembersSpectraS3(new GetGroupMembersSpectraS3Request()
- .withMemberUserId("spectra"));
+ .withMemberUserId(DEFAULT_USER));
assertThat(getGroupMembersSpectraS3Response.getGroupMemberListResult(), is(notNullValue()));
}
@@ -545,22 +550,30 @@ public void getGroupGroupMembersWithLastPage() throws IOException, SignatureExce
@Test
public void getGroupGroupMembersWithPageStartMarkerUUID() throws IOException, SignatureException {
+ assumeVersion4orHigher(client);
- final GetGroupMembersSpectraS3Response getGroupMembersSpectraS3Response = client
- .getGroupMembersSpectraS3(new GetGroupMembersSpectraS3Request()
- .withPageStartMarker(UUID.randomUUID()));
+ try {
+ client.getGroupMembersSpectraS3(new GetGroupMembersSpectraS3Request()
+ .withPageStartMarker(UUID.randomUUID()));
+ fail("The above should not be found and throw exception.");
- assertThat(getGroupMembersSpectraS3Response.getGroupMemberListResult(), is(notNullValue()));
+ } catch (final FailedRequestException e) {
+ assertThat(e.getStatusCode(), is(404));
+ }
}
@Test
public void getGroupGroupMembersWithPageStartMarkerString() throws IOException, SignatureException {
+ assumeVersion4orHigher(client);
- final GetGroupMembersSpectraS3Response getGroupMembersSpectraS3Response = client
- .getGroupMembersSpectraS3(new GetGroupMembersSpectraS3Request()
- .withPageStartMarker(UUID.randomUUID().toString()));
+ try {
+ client.getGroupMembersSpectraS3(new GetGroupMembersSpectraS3Request()
+ .withPageStartMarker(UUID.randomUUID().toString()));
+ fail("The above should not be found and throw exception.");
- assertThat(getGroupMembersSpectraS3Response.getGroupMemberListResult(), is(notNullValue()));
+ } catch (final FailedRequestException e) {
+ assertThat(e.getStatusCode(), is(404));
+ }
}
@Test
@@ -612,7 +625,7 @@ public void putUserGroupMember() throws IOException, SignatureException {
new PutGroupSpectraS3Request("test_group"));
putUserGroupMemberSpectraS3Response = client
- .putUserGroupMemberSpectraS3(new PutUserGroupMemberSpectraS3Request("test_group", "spectra"));
+ .putUserGroupMemberSpectraS3(new PutUserGroupMemberSpectraS3Request("test_group", DEFAULT_USER));
assertThat(putUserGroupMemberSpectraS3Response.getGroupMemberResult(), is(notNullValue()));
@@ -688,7 +701,7 @@ public void putGlobalBucketAclForUserString() throws IOException, SignatureExcep
try {
putGlobalBucketAclForUserSpectraS3Response = client.putGlobalBucketAclForUserSpectraS3(
new PutGlobalBucketAclForUserSpectraS3Request(BucketAclPermission.DELETE,
- "spectra"));
+ DEFAULT_USER));
assertThat(putGlobalBucketAclForUserSpectraS3Response.getBucketAclResult(), is(notNullValue()));
@@ -789,7 +802,7 @@ public void getBucketAclsWithUserUUID() throws IOException, SignatureException {
@Test
public void getBucketAclsWithUserIDString() throws IOException, SignatureException {
final GetBucketAclsSpectraS3Response getBucketAclsSpectraS3Response = client
- .getBucketAclsSpectraS3(new GetBucketAclsSpectraS3Request().withUserId("spectra"));
+ .getBucketAclsSpectraS3(new GetBucketAclsSpectraS3Request().withUserId(DEFAULT_USER));
assertThat(getBucketAclsSpectraS3Response.getBucketAclListResult(), is(notNullValue()));
}
@@ -850,20 +863,29 @@ public void getBucketAclsWithLastPage() throws IOException, SignatureException {
@Test
public void getBucketAclsWithPageStartMarkerUUID() throws IOException, SignatureException {
- final GetBucketAclsSpectraS3Response getBucketAclsSpectraS3Response = client
- .getBucketAclsSpectraS3(new GetBucketAclsSpectraS3Request()
- .withPageStartMarker(UUID.randomUUID()));
+ assumeVersion4orHigher(client);
- assertThat(getBucketAclsSpectraS3Response.getBucketAclListResult(), is(notNullValue()));
+ try {
+ client.getBucketAclsSpectraS3(new GetBucketAclsSpectraS3Request()
+ .withPageStartMarker(UUID.randomUUID()));
+ fail("The above should not be found and throw exception.");
+
+ } catch (final FailedRequestException e) {
+ assertThat(e.getStatusCode(), is(404));
+ }
}
@Test
public void getBucketAclsWithPageStartMarkerString() throws IOException, SignatureException {
- final GetBucketAclsSpectraS3Response getBucketAclsSpectraS3Response = client
- .getBucketAclsSpectraS3(new GetBucketAclsSpectraS3Request()
- .withPageStartMarker(UUID.randomUUID().toString()));
+ assumeVersion4orHigher(client);
- assertThat(getBucketAclsSpectraS3Response.getBucketAclListResult(), is(notNullValue()));
+ try {
+ client.getBucketAclsSpectraS3(new GetBucketAclsSpectraS3Request()
+ .withPageStartMarker(UUID.randomUUID().toString()));
+ fail("The above should not be found and throw exception.");
+ } catch (final FailedRequestException e) {
+ assertThat(e.getStatusCode(), is(404));
+ }
}
@Test
@@ -912,7 +934,7 @@ public void putGlobalDataPolicyAclForUserString() throws IOException, SignatureE
PutGlobalDataPolicyAclForUserSpectraS3Response putGlobalDataPolicyAclForUserSpectraS3Response = null;
try {
putGlobalDataPolicyAclForUserSpectraS3Response = client.putGlobalDataPolicyAclForUserSpectraS3(
- new PutGlobalDataPolicyAclForUserSpectraS3Request("spectra"));
+ new PutGlobalDataPolicyAclForUserSpectraS3Request(DEFAULT_USER));
assertThat(putGlobalDataPolicyAclForUserSpectraS3Response.getDataPolicyAclResult(), is(notNullValue()));
@@ -971,7 +993,7 @@ public void deleteDataPolicyAcl() throws IOException, SignatureException {
= null;
try {
putGlobalDataPolicyAclForUserSpectraS3Response = client.putGlobalDataPolicyAclForUserSpectraS3(
- new PutGlobalDataPolicyAclForUserSpectraS3Request("spectra"));
+ new PutGlobalDataPolicyAclForUserSpectraS3Request(DEFAULT_USER));
final DeleteDataPolicyAclSpectraS3Response deleteDataPolicyAclSpectraS3Response = client
.deleteDataPolicyAclSpectraS3(new DeleteDataPolicyAclSpectraS3Request(
@@ -998,7 +1020,7 @@ public void getDataPolicyAcl() throws IOException, SignatureException {
try {
putGlobalDataPolicyAclForUserSpectraS3Response = client
.putGlobalDataPolicyAclForUserSpectraS3(
- new PutGlobalDataPolicyAclForUserSpectraS3Request("spectra"));
+ new PutGlobalDataPolicyAclForUserSpectraS3Request(DEFAULT_USER));
final GetDataPolicyAclSpectraS3Response getDataPolicyAclSpectraS3Response = client
.getDataPolicyAclSpectraS3(new GetDataPolicyAclSpectraS3Request(
@@ -1114,7 +1136,7 @@ public void getDataPolicyAclsWithUserString() throws IOException, SignatureExcep
final GetDataPolicyAclsSpectraS3Response getDataPolicyAclsSpectraS3Response = client
.getDataPolicyAclsSpectraS3(new GetDataPolicyAclsSpectraS3Request()
- .withUserId("spectra"));
+ .withUserId(DEFAULT_USER));
assertThat(getDataPolicyAclsSpectraS3Response.getDataPolicyAclListResult(), is(notNullValue()));
}
@@ -1181,22 +1203,28 @@ public void getDataPolicyAclsWithPageLength() throws IOException, SignatureExcep
@Test
public void getDataPolicyAclsWithPageStartMarkerString() throws IOException, SignatureException {
+ assumeVersion4orHigher(client);
- final GetDataPolicyAclsSpectraS3Response getDataPolicyAclsSpectraS3Response = client
- .getDataPolicyAclsSpectraS3(new GetDataPolicyAclsSpectraS3Request()
- .withPageStartMarker(UUID.randomUUID().toString()));
-
- assertThat(getDataPolicyAclsSpectraS3Response.getDataPolicyAclListResult(), is(notNullValue()));
+ try {
+ client.getDataPolicyAclsSpectraS3(new GetDataPolicyAclsSpectraS3Request()
+ .withPageStartMarker(UUID.randomUUID().toString()));
+ fail("The above should not be found and throw exception.");
+ } catch (final FailedRequestException e) {
+ assertThat(e.getStatusCode(), is(404));
+ }
}
@Test
public void getDataPolicyAclsWithPageStartMarkerUUID() throws IOException, SignatureException {
+ assumeVersion4orHigher(client);
- final GetDataPolicyAclsSpectraS3Response getDataPolicyAclsSpectraS3Response = client
- .getDataPolicyAclsSpectraS3(new GetDataPolicyAclsSpectraS3Request()
- .withPageStartMarker(UUID.randomUUID()));
-
- assertThat(getDataPolicyAclsSpectraS3Response.getDataPolicyAclListResult(), is(notNullValue()));
+ try {
+ client.getDataPolicyAclsSpectraS3(new GetDataPolicyAclsSpectraS3Request()
+ .withPageStartMarker(UUID.randomUUID()));
+ fail("The above should not be found and throw exception.");
+ } catch (final FailedRequestException e) {
+ assertThat(e.getStatusCode(), is(404));
+ }
}
@Test
diff --git a/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/VersionedObject_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/VersionedObject_Test.java
new file mode 100644
index 000000000..d0830be24
--- /dev/null
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/VersionedObject_Test.java
@@ -0,0 +1,191 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+package com.spectralogic.ds3client.integration;
+
+import com.spectralogic.ds3client.Ds3Client;
+import com.spectralogic.ds3client.commands.GetBucketRequest;
+import com.spectralogic.ds3client.commands.GetBucketResponse;
+import com.spectralogic.ds3client.commands.spectrads3.DeleteBucketSpectraS3Request;
+import com.spectralogic.ds3client.commands.spectrads3.GetBulkJobSpectraS3Request;
+import com.spectralogic.ds3client.commands.spectrads3.StageObjectsJobSpectraS3Request;
+import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
+import com.spectralogic.ds3client.helpers.FileObjectGetter;
+import com.spectralogic.ds3client.integration.test.helpers.TempStorageIds;
+import com.spectralogic.ds3client.integration.test.helpers.TempStorageUtil;
+import com.spectralogic.ds3client.models.ChecksumType;
+import com.spectralogic.ds3client.models.VersioningLevel;
+import com.spectralogic.ds3client.models.bulk.Ds3Object;
+import com.spectralogic.ds3client.utils.ResourceUtils;
+import org.apache.commons.io.FileUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static com.spectralogic.ds3client.integration.Util.*;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+public class VersionedObject_Test {
+
+ private static final Logger LOG = LoggerFactory.getLogger(SpectraS3PaginationLoader_Test.class);
+
+ private static final Ds3Client CLIENT = Util.fromEnv();
+ private static final Ds3ClientHelpers HELPERS = Ds3ClientHelpers.wrap(CLIENT);
+ private static final String TEST_ENV_NAME = "java_versioned_object_test";
+
+ private static TempStorageIds envStorageIds;
+ private static UUID envDataPolicyId;
+
+ @BeforeClass
+ public static void startup() throws IOException {
+ LOG.info("Starting test Setup...");
+
+ // Create data policy with versioning
+ envDataPolicyId = TempStorageUtil.setupDataPolicy(
+ TEST_ENV_NAME,
+ false,
+ ChecksumType.Type.MD5,
+ VersioningLevel.KEEP_MULTIPLE_VERSIONS,
+ CLIENT);
+
+ envStorageIds = TempStorageUtil.setup(TEST_ENV_NAME, envDataPolicyId, CLIENT);
+ LOG.info("Finished test Setup...");
+ }
+
+ @AfterClass
+ public static void teardown() throws IOException {
+ LOG.info("Starting test teardown...");
+ TempStorageUtil.teardown(TEST_ENV_NAME, envStorageIds, CLIENT);
+ CLIENT.close();
+ LOG.info("Finished test teardown...");
+ }
+
+ @Test
+ public void getObjectsWithVersioning() throws IOException, URISyntaxException {
+ try {
+ HELPERS.ensureBucketExists(TEST_ENV_NAME, envDataPolicyId);
+ final String objectName = "object_with_versions";
+
+ // Put different content for object twice
+ loadTestBook(CLIENT, BOOKS[0], objectName, TEST_ENV_NAME); // putting beowulf as content
+ loadTestBook(CLIENT, BOOKS[1], objectName, TEST_ENV_NAME); // putting sherlock holmes as content
+
+ // Get the version of the objects
+ final GetBucketRequest getBucketRequest = new GetBucketRequest(TEST_ENV_NAME).withVersions(true);
+ final GetBucketResponse getBucketResponse = CLIENT.getBucket(getBucketRequest);
+
+ assertThat(getBucketResponse.getListBucketResult().getObjects().size(), is(0));
+ assertThat(getBucketResponse.getListBucketResult().getVersionedObjects().size(), is(2));
+
+ // Create bulk get job with both versions of object specified
+ final List objects = getBucketResponse.getListBucketResult().getVersionedObjects().stream()
+ .map(obj -> new Ds3Object(obj.getKey(), obj.getVersionId()))
+ .collect(Collectors.toList());
+
+ final GetBulkJobSpectraS3Request getBulkRequest = new GetBulkJobSpectraS3Request(TEST_ENV_NAME, objects);
+ CLIENT.getBulkJobSpectraS3(getBulkRequest);
+
+ } finally {
+ cancelAllJobsForBucket(CLIENT, TEST_ENV_NAME);
+ deleteAllContents(CLIENT, TEST_ENV_NAME);
+ }
+ }
+
+ @Test
+ public void stageObjectsWithVersioning() throws IOException, URISyntaxException {
+ try {
+ HELPERS.ensureBucketExists(TEST_ENV_NAME, envDataPolicyId);
+ final String objectName = "object_with_versions";
+
+ // Put different content for object twice
+ loadTestBook(CLIENT, BOOKS[0], objectName, TEST_ENV_NAME); // putting beowulf as content
+ loadTestBook(CLIENT, BOOKS[1], objectName, TEST_ENV_NAME); // putting sherlock holmes as content
+
+ // Get the version of the objects
+ final GetBucketRequest getBucketRequest = new GetBucketRequest(TEST_ENV_NAME).withVersions(true);
+ final GetBucketResponse getBucketResponse = CLIENT.getBucket(getBucketRequest);
+
+ assertThat(getBucketResponse.getListBucketResult().getObjects().size(), is(0));
+ assertThat(getBucketResponse.getListBucketResult().getVersionedObjects().size(), is(2));
+
+ // Create bulk get job with both versions of object specified
+ final List objects = getBucketResponse.getListBucketResult().getVersionedObjects().stream()
+ .map(obj -> new Ds3Object(obj.getKey(), obj.getVersionId()))
+ .collect(Collectors.toList());
+
+ final StageObjectsJobSpectraS3Request stageRequest = new StageObjectsJobSpectraS3Request(TEST_ENV_NAME, objects);
+ CLIENT.stageObjectsJobSpectraS3(stageRequest);
+
+ } finally {
+ CLIENT.deleteBucketSpectraS3(new DeleteBucketSpectraS3Request(TEST_ENV_NAME).withForce(true));
+ }
+ }
+
+ @Test
+ public void getObjectsWithVersioningUsingHelpers() throws IOException, URISyntaxException, InterruptedException {
+ // Create temp directory for files we will retrieve from bp
+ final Path tempDirectory = Files.createTempDirectory(Paths.get("."), null);
+
+ try {
+ HELPERS.ensureBucketExists(TEST_ENV_NAME, envDataPolicyId);
+ final String objectName = "object_with_versions";
+
+ // Put different content for object twice
+ loadTestBook(CLIENT, BOOKS[0], objectName, TEST_ENV_NAME); // putting beowulf as content
+ loadTestBook(CLIENT, BOOKS[1], objectName, TEST_ENV_NAME); // putting sherlock holmes as content
+
+ // Get the version of the objects
+ final GetBucketRequest getBucketRequest = new GetBucketRequest(TEST_ENV_NAME).withVersions(true);
+ final GetBucketResponse getBucketResponse = CLIENT.getBucket(getBucketRequest);
+
+ assertThat(getBucketResponse.getListBucketResult().getObjects().size(), is(0));
+ assertThat(getBucketResponse.getListBucketResult().getVersionedObjects().size(), is(2));
+
+ // Create bulk get job with the oldest version of the object
+ final List objects = getBucketResponse.getListBucketResult().getVersionedObjects().stream()
+ .filter(obj -> !obj.getIsLatest()) // filters out the latest version of the object
+ .map(obj -> new Ds3Object(obj.getKey(), obj.getVersionId()))
+ .collect(Collectors.toList());
+
+ final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(TEST_ENV_NAME, objects);
+
+ readJob.transfer(new FileObjectGetter(tempDirectory));
+
+ // Check content is beowulf, which was the first version of content
+ final File originalFile = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + BOOKS[0]).toFile();
+ final File fileCopiedFromBP = Paths.get(tempDirectory.toString(), objectName).toFile();
+ assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
+
+ } finally {
+ cancelAllJobsForBucket(CLIENT, TEST_ENV_NAME);
+ deleteAllContents(CLIENT, TEST_ENV_NAME);
+ FileUtils.deleteDirectory(tempDirectory.toFile());
+ }
+ }
+}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/ABMTestHelper.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/ABMTestHelper.java
similarity index 87%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/ABMTestHelper.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/ABMTestHelper.java
index 6dc8b6e02..6552c7712 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/ABMTestHelper.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/ABMTestHelper.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -23,6 +23,7 @@
import org.slf4j.LoggerFactory;
import java.io.IOException;
+import java.util.List;
import java.util.UUID;
import static org.apache.http.util.TextUtils.isEmpty;
@@ -162,14 +163,19 @@ public static void deleteBucketsWithDataPolicy(
* partition with the same name does not currently exist. If a partition
* already exists with the specified name, an error is thrown.
*/
- public static PutPoolPartitionSpectraS3Response createPoolPartition(
+ public static PoolPartition createPoolPartition(
final String poolPartitionName,
final PoolType poolType,
- final Ds3Client client) throws IOException {
+ final Ds3Client client,
+ boolean failIfAlreadyExists) throws IOException {
//Check if pool partition already exists
try {
- client.getPoolPartitionSpectraS3(new GetPoolPartitionSpectraS3Request(poolPartitionName));
- fail("Pool partition already exists, terminating to prevent conflict: " + poolPartitionName);
+ final GetPoolPartitionSpectraS3Response getPoolPartition = client.getPoolPartitionSpectraS3(
+ new GetPoolPartitionSpectraS3Request(poolPartitionName));
+ if (failIfAlreadyExists) {
+ fail("Pool partition already exists, terminating to prevent conflict: " + poolPartitionName);
+ }
+ return getPoolPartition.getPoolPartitionResult();
} catch (final IOException e) {
//Pass: expected pool partition to not exist
}
@@ -177,7 +183,7 @@ public static PutPoolPartitionSpectraS3Response createPoolPartition(
//Create the pool partition
return client.putPoolPartitionSpectraS3(new PutPoolPartitionSpectraS3Request(
poolPartitionName,
- poolType));
+ poolType)).getPoolPartitionResult();
}
/**
@@ -212,19 +218,24 @@ public static void deletePoolPartition(
* Creates a storage domain if one does not already exist with the specified name. If a
* storage domain already exists with the specified name, an error is thrown.
*/
- public static PutStorageDomainSpectraS3Response createStorageDomain(
+ public static StorageDomain createStorageDomain(
final String storageDomainName,
- final Ds3Client client) throws IOException {
+ final Ds3Client client,
+ boolean failIfAlreadyExists) throws IOException {
//Check if storage domain already exists
try {
- client.getStorageDomainSpectraS3(new GetStorageDomainSpectraS3Request(storageDomainName));
- fail("Storage domain already exists, terminating to prevent conflict: " + storageDomainName);
+ final GetStorageDomainSpectraS3Response getStorageDomain = client.getStorageDomainSpectraS3(
+ new GetStorageDomainSpectraS3Request(storageDomainName));
+ if (failIfAlreadyExists) {
+ fail("Storage domain already exists, terminating to prevent conflict: " + storageDomainName);
+ }
+ return getStorageDomain.getStorageDomainResult();
} catch (final IOException e) {
//Pass: expected storage domain to not exist
}
//Create the storage domain
- return client.putStorageDomainSpectraS3(new PutStorageDomainSpectraS3Request(storageDomainName));
+ return client.putStorageDomainSpectraS3(new PutStorageDomainSpectraS3Request(storageDomainName)).getStorageDomainResult();
}
/**
@@ -260,17 +271,23 @@ public static void deleteStorageDomain(
* storage domain and pool partition. If a storage domain member already exists,an
* error is thrown.
*/
- public static PutPoolStorageDomainMemberSpectraS3Response createPoolStorageDomainMember(
+ public static StorageDomainMember createPoolStorageDomainMember(
final UUID storageDomainId,
final UUID poolPartitionId,
- final Ds3Client client) throws IOException {
+ final Ds3Client client,
+ boolean failIfAlreadyExists) throws IOException {
//Check if storage domain member already exists between specified storage domain and pool partition
try {
final GetStorageDomainMembersSpectraS3Response getMembers = client.getStorageDomainMembersSpectraS3(
new GetStorageDomainMembersSpectraS3Request()
.withPoolPartitionId(poolPartitionId.toString())
.withStorageDomainId(storageDomainId.toString()));
- assertThat(getMembers.getStorageDomainMemberListResult().getStorageDomainMembers().size(), is(0));
+ if (failIfAlreadyExists) {
+ assertThat(getMembers.getStorageDomainMemberListResult().getStorageDomainMembers().size(), is(0));
+ }
+ if (!getMembers.getStorageDomainMemberListResult().getStorageDomainMembers().isEmpty()) {
+ return getMembers.getStorageDomainMemberListResult().getStorageDomainMembers().get(0);
+ }
} catch (final IOException e) {
//Pass: expected storage domain member to not exist
}
@@ -278,7 +295,7 @@ public static PutPoolStorageDomainMemberSpectraS3Response createPoolStorageDomai
//Create the storage domain
return client.putPoolStorageDomainMemberSpectraS3(new PutPoolStorageDomainMemberSpectraS3Request(
poolPartitionId.toString(),
- storageDomainId.toString()));
+ storageDomainId.toString())).getStorageDomainMemberResult();
}
/**
@@ -298,14 +315,14 @@ public static void deleteStorageDomainMember(
client.deleteStorageDomainMemberSpectraS3(
new DeleteStorageDomainMemberSpectraS3Request(memberId.toString()));
} catch (final IOException|AssertionError e) {
- LOG.error("Storage domain member was not deleted as expected: " + memberId.toString());
+ LOG.error("Storage domain member was not deleted as expected: " + memberId);
}
//Verify that the storage domain member was deleted
try {
client.getStorageDomainMemberSpectraS3(
new GetStorageDomainMemberSpectraS3Request(memberId.toString()));
- LOG.error("Storage domain member still exists despite deletion attempt: " + memberId.toString());
+ LOG.error("Storage domain member still exists despite deletion attempt: " + memberId);
} catch (final IOException e) {
//Pass: expected storage domain member to not exist
}
@@ -315,23 +332,29 @@ public static void deleteStorageDomainMember(
* Creates a data persistence rule to link the specified data policy and storage domain,
* if said rule does not already exist.
*/
- public static PutDataPersistenceRuleSpectraS3Response createDataPersistenceRule(
+ public static DataPersistenceRule createDataPersistenceRule(
final UUID dataPolicyId,
final UUID storageDomainId,
- final Ds3Client client) throws IOException {
+ final Ds3Client client,
+ boolean failIfAlreadyExists) throws IOException {
//Check if data persistence rule already exists
final GetDataPersistenceRulesSpectraS3Response response = client.getDataPersistenceRulesSpectraS3(
new GetDataPersistenceRulesSpectraS3Request()
.withDataPolicyId(dataPolicyId.toString())
.withStorageDomainId(storageDomainId.toString()));
- assertThat(response.getDataPersistenceRuleListResult().getDataPersistenceRules().size(), is(0));
+ if (failIfAlreadyExists) {
+ assertThat(response.getDataPersistenceRuleListResult().getDataPersistenceRules().size(), is(0));
+ }
+ if (!response.getDataPersistenceRuleListResult().getDataPersistenceRules().isEmpty()) {
+ return response.getDataPersistenceRuleListResult().getDataPersistenceRules().get(0);
+ }
//Create the data persistence rule
return client.putDataPersistenceRuleSpectraS3(new PutDataPersistenceRuleSpectraS3Request(
dataPolicyId.toString(),
DataIsolationLevel.STANDARD,
storageDomainId.toString(),
- DataPersistenceRuleType.PERMANENT));
+ DataPersistenceRuleType.PERMANENT)).getDataPersistenceRuleResult();
}
/**
@@ -352,14 +375,14 @@ public static void deleteDataPersistenceRule(
client.deleteDataPersistenceRuleSpectraS3(
new DeleteDataPersistenceRuleSpectraS3Request(dataPersistenceRuleId.toString()));
} catch (final IOException|AssertionError e) {
- LOG.error("Data persistence rule was not deleted as expected: " + dataPersistenceRuleId.toString());
+ LOG.error("Data persistence rule was not deleted as expected: " + dataPersistenceRuleId);
}
//Verify that the data persistence rule was deleted
try {
client.getDataPersistenceRuleSpectraS3(
new GetDataPersistenceRuleSpectraS3Request(dataPersistenceRuleId.toString()));
- LOG.error("Data persistence rule still exists despite deletion attempt: " + dataPersistenceRuleId.toString());
+ LOG.error("Data persistence rule still exists despite deletion attempt: " + dataPersistenceRuleId);
} catch (final IOException e) {
//Pass: expected data persistence rule to not exist
}
@@ -452,13 +475,13 @@ public static void deleteDataPolicyAclForGroup(
try {
client.deleteDataPolicyAclSpectraS3(new DeleteDataPolicyAclSpectraS3Request(aclId.toString()));
} catch (final IOException|AssertionError e) {
- LOG.error("Data policy Acl was not deleted as expected: " + aclId.toString());
+ LOG.error("Data policy Acl was not deleted as expected: " + aclId);
}
//Verify that the Acl was deleted
try {
client.getDataPolicyAclSpectraS3(new GetDataPolicyAclSpectraS3Request(aclId.toString()));
- LOG.error("Data policy Acl still exists despite deletion attempt: " + aclId.toString());
+ LOG.error("Data policy Acl still exists despite deletion attempt: " + aclId);
} catch (final IOException e) {
//Pass: expected data policy acl to not exist
}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShim.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShim.java
similarity index 83%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShim.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShim.java
index 968aff108..2472f972f 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShim.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShim.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -36,7 +36,9 @@
public class Ds3ClientShim extends Ds3ClientImpl {
private static Method getNetClientMethod = null;
- int numRetries = 0;
+ private final int maxNumRetries;
+
+ private int numRetries = 0;
static {
try {
@@ -48,17 +50,27 @@ public class Ds3ClientShim extends Ds3ClientImpl {
getNetClientMethod.setAccessible(true);
}
- public Ds3ClientShim(final NetworkClient netClient) {
+ public Ds3ClientShim(final NetworkClient netClient, final int maxNumRetries) {
super(netClient);
+
+ this.maxNumRetries = maxNumRetries;
+ }
+
+ public Ds3ClientShim(final NetworkClient netClient) {
+ this(netClient, 1);
}
public Ds3ClientShim(final Ds3ClientImpl ds3ClientImpl) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
- this((NetworkClient)getNetClientMethod.invoke(ds3ClientImpl));
+ this((NetworkClient)getNetClientMethod.invoke(ds3ClientImpl), 1);
+ }
+
+ public Ds3ClientShim(final Ds3ClientImpl ds3ClientImpl, final int maxNumRetries) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ this((NetworkClient)getNetClientMethod.invoke(ds3ClientImpl), maxNumRetries);
}
@Override
public PutObjectResponse putObject(final PutObjectRequest request) throws IOException {
- if (numRetries++ >= 1) {
+ if (numRetries++ >= maxNumRetries) {
return super.putObject(request);
}
@@ -67,7 +79,7 @@ public PutObjectResponse putObject(final PutObjectRequest request) throws IOExce
@Override
public GetObjectResponse getObject(final GetObjectRequest request) throws IOException {
- if (numRetries++ >= 1) {
+ if (numRetries++ >= maxNumRetries) {
return super.getObject(request);
}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimFactory.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimFactory.java
similarity index 96%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimFactory.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimFactory.java
index a25106d12..e4d70fbc1 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimFactory.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimFactory.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedChunkAllocation.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedChunkAllocation.java
similarity index 70%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedChunkAllocation.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedChunkAllocation.java
index 3fdabded5..8af6c3ae0 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedChunkAllocation.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedChunkAllocation.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -17,10 +17,7 @@
import com.spectralogic.ds3client.Ds3ClientImpl;
import com.spectralogic.ds3client.MockedWebResponse;
-import com.spectralogic.ds3client.commands.parsers.AllocateJobChunkSpectraS3ResponseParser;
import com.spectralogic.ds3client.commands.parsers.GetJobChunksReadyForClientProcessingSpectraS3ResponseParser;
-import com.spectralogic.ds3client.commands.spectrads3.AllocateJobChunkSpectraS3Request;
-import com.spectralogic.ds3client.commands.spectrads3.AllocateJobChunkSpectraS3Response;
import com.spectralogic.ds3client.commands.spectrads3.GetJobChunksReadyForClientProcessingSpectraS3Request;
import com.spectralogic.ds3client.commands.spectrads3.GetJobChunksReadyForClientProcessingSpectraS3Response;
@@ -36,21 +33,11 @@ public Ds3ClientShimWithFailedChunkAllocation(final Ds3ClientImpl ds3ClientImpl)
super(ds3ClientImpl);
}
- @Override
- public AllocateJobChunkSpectraS3Response allocateJobChunkSpectraS3(final AllocateJobChunkSpectraS3Request request)
- throws IOException
- {
- final AllocateJobChunkSpectraS3Response allocateJobChunkSpectraS3Response =
- new AllocateJobChunkSpectraS3ResponseParser()
- .parseXmlResponse(new MockedWebResponse("A response", 307, makeFailingResponseHeaders()));
-
- return allocateJobChunkSpectraS3Response;
- }
- private Map makeFailingResponseHeaders() {
+ private static Map makeFailingResponseHeaders() {
final Map headers = new HashMap<>();
headers.put("content-NONE", "text/xml");
- headers.put("Retry-After", "1");
+ headers.put("Retry-After", "0");
return headers;
}
@@ -61,7 +48,7 @@ public GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyFo
{
final GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyForClientProcessingSpectraS3Response =
new GetJobChunksReadyForClientProcessingSpectraS3ResponseParser()
- .parseXmlResponse(new MockedWebResponse("A response", 307, makeFailingResponseHeaders()));
+ .parseXmlResponse(new MockedWebResponse("", 200, makeFailingResponseHeaders()));
return getJobChunksReadyForClientProcessingSpectraS3Response;
}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedGetObject.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedGetObject.java
similarity index 92%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedGetObject.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedGetObject.java
index e9ed0d142..c23f045bf 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedGetObject.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedGetObject.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -20,7 +20,6 @@
import com.spectralogic.ds3client.commands.GetObjectRequest;
import com.spectralogic.ds3client.commands.GetObjectResponse;
import com.spectralogic.ds3client.models.JobNode;
-import com.spectralogic.ds3client.networking.ConnectionDetails;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
@@ -41,7 +40,6 @@ public GetObjectResponse getObject(final GetObjectRequest request) throws IOExce
@Override
public Ds3Client newForNode(final JobNode node) {
- final ConnectionDetails newConnectionDetails;
try {
final Ds3Client newClient = super.newForNode(node);
return new Ds3ClientShimWithFailedGetObject((Ds3ClientImpl)newClient);
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedPutObject.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedPutObject.java
similarity index 95%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedPutObject.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedPutObject.java
index 9e2a75fa9..b28a705b7 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedPutObject.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/Ds3ClientShimWithFailedPutObject.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/JobStatusHelper.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/JobStatusHelper.java
similarity index 97%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/JobStatusHelper.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/JobStatusHelper.java
index 02db191ab..127917c08 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/JobStatusHelper.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/JobStatusHelper.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/NotificationCleanupTestHelper.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/NotificationCleanupTestHelper.java
similarity index 93%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/NotificationCleanupTestHelper.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/NotificationCleanupTestHelper.java
index c77c892b8..6b6818495 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/NotificationCleanupTestHelper.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/NotificationCleanupTestHelper.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -44,7 +44,7 @@ public static void deleteObjectCachedNotification(final UUID id, final Ds3Client
client.deleteObjectCachedNotificationRegistrationSpectraS3(
new DeleteObjectCachedNotificationRegistrationSpectraS3Request(id));
} catch (final IOException e) {
- LOG.error("Object Cached Notification Registration was not deleted as expected: " + id.toString());
+ LOG.error("Object Cached Notification Registration was not deleted as expected: " + id);
}
}
@@ -62,7 +62,7 @@ public static void deleteJobCompletedNotification(final UUID id, final Ds3Client
client.deleteJobCompletedNotificationRegistrationSpectraS3(
new DeleteJobCompletedNotificationRegistrationSpectraS3Request(id));
} catch (final IOException e) {
- LOG.error("Job Completed Notification Registration was not deleted as expected: " + id.toString());
+ LOG.error("Job Completed Notification Registration was not deleted as expected: " + id);
}
}
@@ -80,7 +80,7 @@ public static void deleteJobCreatedNotification(final UUID id, final Ds3Client c
client.deleteJobCreatedNotificationRegistrationSpectraS3(
new DeleteJobCreatedNotificationRegistrationSpectraS3Request(id));
} catch (final IOException e) {
- LOG.error("Job Created Notification Registration was not deleted as expected: " + id.toString());
+ LOG.error("Job Created Notification Registration was not deleted as expected: " + id);
}
}
@@ -98,7 +98,7 @@ public static void deleteObjectLostNotification(final UUID id, final Ds3Client c
client.deleteObjectLostNotificationRegistrationSpectraS3(
new DeleteObjectLostNotificationRegistrationSpectraS3Request(id));
} catch (final IOException e) {
- LOG.error("Object Lost Notification Registration was not deleted as expected: " + id.toString());
+ LOG.error("Object Lost Notification Registration was not deleted as expected: " + id);
}
}
@@ -116,7 +116,7 @@ public static void deleteObjectPersistedNotification(final UUID id, final Ds3Cli
client.deleteObjectPersistedNotificationRegistrationSpectraS3(
new DeleteObjectPersistedNotificationRegistrationSpectraS3Request(id));
} catch (final IOException e) {
- LOG.error("Object Persisted Notification Registration was not deleted as expected: " + id.toString());
+ LOG.error("Object Persisted Notification Registration was not deleted as expected: " + id);
}
}
@@ -134,7 +134,7 @@ public static void deleteTapePartitionFailureNotification(final UUID id, final D
client.deleteTapePartitionFailureNotificationRegistrationSpectraS3(
new DeleteTapePartitionFailureNotificationRegistrationSpectraS3Request(id));
} catch (final IOException e) {
- LOG.error("Tape Partition Failure Notification Registration was not deleted as expected: " + id.toString());
+ LOG.error("Tape Partition Failure Notification Registration was not deleted as expected: " + id);
}
}
@@ -152,7 +152,7 @@ public static void deleteTapeFailureNotification(final UUID id, final Ds3Client
client.deleteTapeFailureNotificationRegistrationSpectraS3(
new DeleteTapeFailureNotificationRegistrationSpectraS3Request(id));
} catch (final IOException e) {
- LOG.error("Tape Failure Notification Registration was not deleted as expected: " + id.toString());
+ LOG.error("Tape Failure Notification Registration was not deleted as expected: " + id);
}
}
}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageIds.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageIds.java
similarity index 90%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageIds.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageIds.java
index 51ed48a2e..c226e408e 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageIds.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageIds.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -23,8 +23,8 @@
* These IDs are stored for teardown of testing environment.
*/
public class TempStorageIds {
- private UUID storageDomainMemberId;
- private UUID dataPersistenceRuleId;
+ private final UUID storageDomainMemberId;
+ private final UUID dataPersistenceRuleId;
public TempStorageIds(final UUID storageDomainMemberId, final UUID dataPersistenceRuleId) {
this.storageDomainMemberId = storageDomainMemberId;
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageUtil.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageUtil.java
similarity index 60%
rename from ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageUtil.java
rename to ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageUtil.java
index 34d4af2e7..4904eff78 100644
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageUtil.java
+++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/test/helpers/TempStorageUtil.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -17,8 +17,7 @@
import com.spectralogic.ds3client.Ds3Client;
import com.spectralogic.ds3client.commands.spectrads3.*;
-import com.spectralogic.ds3client.models.ChecksumType;
-import com.spectralogic.ds3client.models.PoolType;
+import com.spectralogic.ds3client.models.*;
import java.io.IOException;
import java.util.UUID;
@@ -30,12 +29,14 @@
* and partition for use in the integration tests to avoid error if the BP does not currently
* have a partition available for running the unit tests.
*/
-public class TempStorageUtil {
+public final class TempStorageUtil {
private static final String DATA_POLICY_NAME = "_dp";
private static final String STORAGE_DOMAIN_NAME = "_sd";
private static final String POOL_PARTITION_NAME = "_pp";
+ public static final String DEFAULT_USER = "Administrator";
+
/**
* Sets up a temporary data policy with a temporary storage domain and partition
* for use in integration tests where the user may not currently have access to
@@ -48,29 +49,33 @@ public static TempStorageIds setup(
final UUID dataPolicyId,
final Ds3Client client) throws IOException {
//Create storage domain
- final PutStorageDomainSpectraS3Response storageDomainResponse = createStorageDomain(
+ final StorageDomain storageDomain = createStorageDomain(
testSetName + STORAGE_DOMAIN_NAME,
- client);
+ client,
+ false);
//Create pool partition
- final PutPoolPartitionSpectraS3Response poolPartitionResponse = createPoolPartition(
+ final PoolPartition poolPartition = createPoolPartition(
testSetName + POOL_PARTITION_NAME,
PoolType.ONLINE,
- client);
+ client,
+ false);
//Create storage domain member linking pool partition to storage domain
- final PutPoolStorageDomainMemberSpectraS3Response memberResponse = createPoolStorageDomainMember(
- storageDomainResponse.getStorageDomainResult().getId(),
- poolPartitionResponse.getPoolPartitionResult().getId(),
- client);
- final UUID storageDomainMemberId = memberResponse.getStorageDomainMemberResult().getId();
+ final StorageDomainMember storageDomainMember = createPoolStorageDomainMember(
+ storageDomain.getId(),
+ poolPartition.getId(),
+ client,
+ false);
+ final UUID storageDomainMemberId = storageDomainMember.getId();
//create data persistence rule
- final PutDataPersistenceRuleSpectraS3Response dataPersistenceResponse = createDataPersistenceRule(
+ final DataPersistenceRule dataPersistenceRule = createDataPersistenceRule(
dataPolicyId,
- storageDomainResponse.getStorageDomainResult().getId(),
- client);
- final UUID dataPersistenceRuleId = dataPersistenceResponse.getDataPersistenceRuleResult().getDataPolicyId();
+ storageDomain.getId(),
+ client,
+ false);
+ final UUID dataPersistenceRuleId = dataPersistenceRule.getDataPolicyId();
return new TempStorageIds(storageDomainMemberId, dataPersistenceRuleId);
}
@@ -98,11 +103,45 @@ public static UUID setupDataPolicy(
final boolean withEndToEndCrcRequired,
final ChecksumType.Type checksumType,
final Ds3Client client) throws IOException {
+ try {
+ return client.getDataPolicySpectraS3(
+ new GetDataPolicySpectraS3Request(testSetName + DATA_POLICY_NAME)).getDataPolicyResult().getId();
+ } catch (final IOException e) {
+ // Pass: Expected data policy to not exist
+ }
+
+
final PutDataPolicySpectraS3Response dataPolicyResponse = client.putDataPolicySpectraS3(
new PutDataPolicySpectraS3Request(testSetName + DATA_POLICY_NAME)
.withEndToEndCrcRequired(withEndToEndCrcRequired)
.withChecksumType(checksumType).withAlwaysForcePutJobCreation(true));
- client.modifyUserSpectraS3(new ModifyUserSpectraS3Request("spectra")
+ client.modifyUserSpectraS3(new ModifyUserSpectraS3Request(DEFAULT_USER)
+ .withDefaultDataPolicyId(dataPolicyResponse.getDataPolicyResult().getId()));
+ return dataPolicyResponse.getDataPolicyResult().getId();
+ }
+
+ /**
+ * Creates a Data Policy with the specified checksum type, end-to-end crc, and versioning
+ */
+ public static UUID setupDataPolicy(
+ final String testSetName,
+ final boolean withEndToEndCrcRequired,
+ final ChecksumType.Type checksumType,
+ final VersioningLevel versioningLevel,
+ final Ds3Client client) throws IOException {
+ try {
+ return client.getDataPolicySpectraS3(
+ new GetDataPolicySpectraS3Request(testSetName + DATA_POLICY_NAME)).getDataPolicyResult().getId();
+ } catch (final IOException e) {
+ // Pass: Expected data policy to not exist
+ }
+
+ final PutDataPolicySpectraS3Response dataPolicyResponse = client.putDataPolicySpectraS3(
+ new PutDataPolicySpectraS3Request(testSetName + DATA_POLICY_NAME)
+ .withEndToEndCrcRequired(withEndToEndCrcRequired)
+ .withChecksumType(checksumType).withAlwaysForcePutJobCreation(true)
+ .withVersioning(versioningLevel));
+ client.modifyUserSpectraS3(new ModifyUserSpectraS3Request(DEFAULT_USER)
.withDefaultDataPolicyId(dataPolicyResponse.getDataPolicyResult().getId()));
return dataPolicyResponse.getDataPolicyResult().getId();
}
diff --git a/ds3-sdk-integration/src/test/resources/.gitattributes b/ds3-sdk-integration/src/integrationTest/resources/.gitattributes
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/.gitattributes
rename to ds3-sdk-integration/src/integrationTest/resources/.gitattributes
diff --git a/ds3-sdk-integration/src/integrationTest/resources/books/Paw-3.1.9.zip b/ds3-sdk-integration/src/integrationTest/resources/books/Paw-3.1.9.zip
new file mode 100644
index 000000000..acd861b3e
Binary files /dev/null and b/ds3-sdk-integration/src/integrationTest/resources/books/Paw-3.1.9.zip differ
diff --git a/ds3-sdk-integration/src/test/resources/books/beowulf.txt b/ds3-sdk-integration/src/integrationTest/resources/books/beowulf.txt
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/books/beowulf.txt
rename to ds3-sdk-integration/src/integrationTest/resources/books/beowulf.txt
diff --git a/ds3-sdk-integration/src/test/resources/books/sherlock_holmes.txt b/ds3-sdk-integration/src/integrationTest/resources/books/sherlock_holmes.txt
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/books/sherlock_holmes.txt
rename to ds3-sdk-integration/src/integrationTest/resources/books/sherlock_holmes.txt
diff --git a/ds3-sdk-integration/src/test/resources/books/tale_of_two_cities.txt b/ds3-sdk-integration/src/integrationTest/resources/books/tale_of_two_cities.txt
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/books/tale_of_two_cities.txt
rename to ds3-sdk-integration/src/integrationTest/resources/books/tale_of_two_cities.txt
diff --git a/ds3-sdk-integration/src/test/resources/books/ulysses.txt b/ds3-sdk-integration/src/integrationTest/resources/books/ulysses.txt
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/books/ulysses.txt
rename to ds3-sdk-integration/src/integrationTest/resources/books/ulysses.txt
diff --git a/ds3-sdk-integration/src/test/resources/largeFiles/GreatExpectations.txt b/ds3-sdk-integration/src/integrationTest/resources/largeFiles/GreatExpectations.txt
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/largeFiles/GreatExpectations.txt
rename to ds3-sdk-integration/src/integrationTest/resources/largeFiles/GreatExpectations.txt
diff --git a/ds3-sdk-integration/src/test/resources/largeFiles/lesmis-copies.txt b/ds3-sdk-integration/src/integrationTest/resources/largeFiles/lesmis-copies.txt
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/largeFiles/lesmis-copies.txt
rename to ds3-sdk-integration/src/integrationTest/resources/largeFiles/lesmis-copies.txt
diff --git a/ds3-sdk-integration/src/test/resources/largeFiles/lesmis.txt b/ds3-sdk-integration/src/integrationTest/resources/largeFiles/lesmis.txt
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/largeFiles/lesmis.txt
rename to ds3-sdk-integration/src/integrationTest/resources/largeFiles/lesmis.txt
diff --git a/ds3-sdk-integration/src/test/resources/largeFiles/output b/ds3-sdk-integration/src/integrationTest/resources/largeFiles/output
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/largeFiles/output
rename to ds3-sdk-integration/src/integrationTest/resources/largeFiles/output
diff --git a/ds3-sdk-integration/src/test/resources/little_files/tape.png b/ds3-sdk-integration/src/integrationTest/resources/little_files/tape.png
similarity index 100%
rename from ds3-sdk-integration/src/test/resources/little_files/tape.png
rename to ds3-sdk-integration/src/integrationTest/resources/little_files/tape.png
diff --git a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/NullChannel.java b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/NullChannel.java
index ba031cabc..49d542673 100644
--- a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/NullChannel.java
+++ b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/NullChannel.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/RandomDataChannelBuilder.java b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/RandomDataChannelBuilder.java
new file mode 100644
index 000000000..07b23b643
--- /dev/null
+++ b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/RandomDataChannelBuilder.java
@@ -0,0 +1,67 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+package com.spectralogic.ds3client.integration;
+
+import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
+import com.spectralogic.ds3client.models.bulk.Ds3Object;
+import com.spectralogic.ds3client.utils.ByteArraySeekableByteChannel;
+import org.apache.commons.io.IOUtils;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.SeekableByteChannel;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Creates a channel builder that generates random data. All object keys and sizes need to be specified.
+ */
+public class RandomDataChannelBuilder implements Ds3ClientHelpers.ObjectChannelBuilder {
+
+ private static final int seed = 12345;
+ private final Map objectMap = new HashMap<>();
+
+ public RandomDataChannelBuilder() {
+ }
+
+ public RandomDataChannelBuilder(final List objects) {
+ for (final Ds3Object obj : objects) {
+ this.objectMap.put(obj.getName(), obj.getSize());
+ }
+ }
+
+ RandomDataChannelBuilder withObject(final String key, final Long size) {
+ this.objectMap.put(key, size);
+ return this;
+ }
+
+ @Override
+ public SeekableByteChannel buildChannel(final String key) throws IOException {
+ if (!this.objectMap.containsKey(key)) {
+ throw new IllegalArgumentException(String.format("Object with name '%s' was not defined for this channel builder.", key));
+ }
+
+ final Long size = this.objectMap.get(key);
+ final byte[] randomData = IOUtils.toByteArray(new RandomDataInputStream(seed, size));
+ final ByteBuffer randomBuffer = ByteBuffer.wrap(randomData);
+
+ final ByteArraySeekableByteChannel channel = new ByteArraySeekableByteChannel(size.intValue());
+ channel.write(randomBuffer);
+
+ return channel;
+ }
+}
diff --git a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/RandomDataInputStream.java b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/RandomDataInputStream.java
index e117c8a0b..b7884fc0c 100644
--- a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/RandomDataInputStream.java
+++ b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/RandomDataInputStream.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/ResourceObjectPutter.java b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/ResourceObjectPutter.java
index 50317671c..79f33e92e 100644
--- a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/ResourceObjectPutter.java
+++ b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/ResourceObjectPutter.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/TransferredListener.java b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/TransferredListener.java
index 0e64dc149..a1a10c010 100644
--- a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/TransferredListener.java
+++ b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/TransferredListener.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/Util.java b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/Util.java
index a28570dd7..993736342 100644
--- a/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/Util.java
+++ b/ds3-sdk-integration/src/main/java/com/spectralogic/ds3client/integration/Util.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -15,14 +15,16 @@
package com.spectralogic.ds3client.integration;
+import com.google.common.collect.ImmutableList;
import com.spectralogic.ds3client.Ds3Client;
import com.spectralogic.ds3client.Ds3ClientBuilder;
-import com.spectralogic.ds3client.commands.DeleteBucketRequest;
-import com.spectralogic.ds3client.commands.DeleteObjectRequest;
-import com.spectralogic.ds3client.commands.spectrads3.GetSystemInformationSpectraS3Request;
+import com.spectralogic.ds3client.commands.spectrads3.*;
+import com.spectralogic.ds3client.helpers.DeleteBucket;
import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
import com.spectralogic.ds3client.helpers.channelbuilders.PrefixAdderObjectChannelBuilder;
-import com.spectralogic.ds3client.models.Contents;
+import com.spectralogic.ds3client.models.Bucket;
+import com.spectralogic.ds3client.models.Job;
+import com.spectralogic.ds3client.models.JobStatus;
import com.spectralogic.ds3client.models.bulk.Ds3Object;
import com.spectralogic.ds3client.utils.ResourceUtils;
import org.slf4j.Logger;
@@ -30,16 +32,19 @@
import java.io.IOException;
import java.net.URISyntaxException;
+import java.nio.channels.FileChannel;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.List;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assume.assumeThat;
+import static org.junit.Assume.assumeTrue;
-public class Util {
+public final class Util {
private static final Logger LOG = LoggerFactory.getLogger(Util.class);
public static final String RESOURCE_BASE_NAME = "books/";
public static final String[] BOOKS = {"beowulf.txt", "sherlock_holmes.txt", "tale_of_two_cities.txt", "ulysses.txt"};
@@ -58,12 +63,34 @@ public static Ds3Client insecureFromEnv() {
return builder.build();
}
- public static void assumeVersion1_2(final Ds3Client client) throws IOException {
+ /**
+ * Goes through all buckets on a BP and attempts to delete them and all their contents. It cancels all active jobs
+ * associated with this bucket. Created for cleaning up after cascade failures in functional tests.
+ *
+ * USE ONLY WHEN DELETING ALL BUCKETS AND ALL CONTENT IS YOUR GOAL.
+ */
+ public static void forceCleanupBucketsOnBP(final Ds3Client client) throws IOException {
+ final GetBucketsSpectraS3Request request = new GetBucketsSpectraS3Request();
+ final GetBucketsSpectraS3Response response = client.getBucketsSpectraS3(request);
+
+ for (final Bucket bucket : response.getBucketListResult().getBuckets()) {
+ cancelAllJobsForBucket(client, bucket.getName());
+ client.deleteBucketSpectraS3(new DeleteBucketSpectraS3Request(bucket.getName()).withForce(true));
+ }
+ }
+
+ public static void assumeVersionOneDotTwo(final Ds3Client client) throws IOException {
final int majorVersion = Integer.parseInt(client.getSystemInformationSpectraS3(
new GetSystemInformationSpectraS3Request()).getSystemInformationResult().getBuildInformation().getVersion().split("\\.")[0]);
assumeThat(majorVersion, is(1));
}
+ public static void assumeVersion4orHigher(final Ds3Client client) throws IOException {
+ final int majorVersion = Integer.parseInt(client.getSystemInformationSpectraS3(
+ new GetSystemInformationSpectraS3Request()).getSystemInformationResult().getBuildInformation().getVersion().split("\\.")[0]);
+ assumeTrue(majorVersion >= 4);
+ }
+
public static void loadBookTestData(final Ds3Client client, final String bucketName) throws IOException, URISyntaxException {
LOG.info("Loading test data...");
getLoadJob(client, bucketName, RESOURCE_BASE_NAME)
@@ -71,6 +98,19 @@ public static void loadBookTestData(final Ds3Client client, final String bucketN
LOG.info("Finished loading test data...");
}
+ /**
+ * Loads a single test book to a BP with the specified object name.
+ */
+ public static void loadTestBook(final Ds3Client client, final String fileName, final String objectName, final String bucketName) throws IOException, URISyntaxException {
+ final Path filePath = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + fileName);
+ final Ds3Object obj = new Ds3Object(objectName, Files.size(filePath));
+
+ final Ds3ClientHelpers helpers = Ds3ClientHelpers.wrap(client);
+
+ final Ds3ClientHelpers.Job job = helpers.startWriteJob(bucketName, ImmutableList.of(obj));
+ job.transfer(key -> FileChannel.open(filePath, StandardOpenOption.READ));
+ }
+
public static Ds3ClientHelpers.Job getLoadJob(final Ds3Client client, final String bucketName, final String resourceBaseName) throws IOException, URISyntaxException {
final Ds3ClientHelpers helpers = Ds3ClientHelpers.wrap(client);
@@ -103,14 +143,29 @@ public static void loadBookTestDataWithPrefix(final Ds3Client client, final Stri
}
public static void deleteAllContents(final Ds3Client client, final String bucketName) throws IOException {
+ Ds3ClientHelpers.wrap(client).deleteBucket(bucketName);
+ }
+
+ public static void deleteBucketContents(final Ds3Client client, final String bucketName) throws IOException {
final Ds3ClientHelpers helpers = Ds3ClientHelpers.wrap(client);
+ DeleteBucket.INSTANCE.deleteBucketContents(helpers, bucketName);
+ }
- final Iterable objects = helpers.listObjects(bucketName);
- for(final Contents contents : objects) {
- client.deleteObject(new DeleteObjectRequest(bucketName, contents.getKey()));
+ // Cancels all in-progress jobs associated with a bucket
+ public static void cancelAllJobsForBucket(final Ds3Client client, final String bucketName) {
+ try {
+ final GetJobsSpectraS3Response getJobs = client.getJobsSpectraS3(new GetJobsSpectraS3Request().withBucketId(bucketName));
+
+ if (getJobs.getJobListResult() == null || getJobs.getJobListResult().getJobs() == null) {
+ return;
+ }
+ for (final Job job : getJobs.getJobListResult().getJobs()) {
+ if (job.getStatus() == JobStatus.IN_PROGRESS) {
+ client.cancelJobSpectraS3(new CancelJobSpectraS3Request(job.getJobId()));
+ }
+ }
+ } catch (final IOException e) {
+ LOG.debug("Could not cancel jobs for bucket '%s': %s", bucketName, e.getMessage());
}
-
- client.deleteBucket(new DeleteBucketRequest(bucketName));
}
-
}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/helpers/JobImpl_Test.java b/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/helpers/JobImpl_Test.java
deleted file mode 100644
index 3db21e966..000000000
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/helpers/JobImpl_Test.java
+++ /dev/null
@@ -1,728 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-package com.spectralogic.ds3client.helpers;
-
-import com.spectralogic.ds3client.Ds3Client;
-import com.spectralogic.ds3client.Ds3ClientImpl;
-import com.spectralogic.ds3client.commands.DeleteObjectRequest;
-import com.spectralogic.ds3client.integration.Util;
-import com.spectralogic.ds3client.integration.test.helpers.Ds3ClientShim;
-import com.spectralogic.ds3client.integration.test.helpers.TempStorageIds;
-import com.spectralogic.ds3client.integration.test.helpers.TempStorageUtil;
-import com.spectralogic.ds3client.models.ChecksumType;
-import com.spectralogic.ds3client.models.Contents;
-import com.spectralogic.ds3client.models.bulk.Ds3Object;
-import com.spectralogic.ds3client.utils.ResourceUtils;
-import com.spectralogic.ds3client.IntValue;
-
-import org.apache.commons.io.FileUtils;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URISyntaxException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import static com.spectralogic.ds3client.integration.Util.deleteAllContents;
-
-public class JobImpl_Test {
- private static final Logger LOG = LoggerFactory.getLogger(JobImpl_Test.class);
-
- private static final Ds3Client client = Util.fromEnv();
- private static final Ds3ClientHelpers HELPERS = Ds3ClientHelpers.wrap(client);
- private static final String BUCKET_NAME = "JobImpl_Test";
- private static final String TEST_ENV_NAME = "JobImpl_Test";
- private static TempStorageIds envStorageIds;
- private static UUID dataPolicyId;
-
- private static final String DIR_NAME = "largeFiles/";
- private static final String[] FILE_NAMES = new String[]{"lesmis-copies.txt"};
-
- private long bookSize = -1;
- private final List bookTitles = new ArrayList<>();
- private final List objects = new ArrayList<>();
-
- private static Path dirPath;
-
- @BeforeClass
- public static void startup() throws Exception {
- dataPolicyId = TempStorageUtil.setupDataPolicy(TEST_ENV_NAME, false, ChecksumType.Type.MD5, client);
- envStorageIds = TempStorageUtil.setup(TEST_ENV_NAME, dataPolicyId, client);
- setupBucket(dataPolicyId);
- dirPath = ResourceUtils.loadFileResource(DIR_NAME);
- }
-
- @AfterClass
- public static void teardown() throws IOException {
- try {
- deleteAllContents(client, BUCKET_NAME);
- } finally {
- TempStorageUtil.teardown(TEST_ENV_NAME, envStorageIds, client);
- client.close();
- }
- }
-
- @Before
- public void beforeRunningTestMethod() {
- try {
- for (final String book : FILE_NAMES) {
- final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
- bookSize = Files.size(objPath);
- final Ds3Object obj = new Ds3Object(book, bookSize);
- bookTitles.add(book);
- objects.add(obj);
- }
- } catch (final Throwable t) {
- fail("Error running beforeRunningTestMethod: " + t.getMessage());
- }
- }
-
- @After
- public void afterRunningTestMethod() {
- bookTitles.clear();
- objects.clear();
-
- try {
- deleteBigFileFromBlackPearlBucket();
- } catch (final Throwable t) {
- fail("Error deleting file from black pearl: " + t.getMessage());
- }
- }
-
- private void deleteBigFileFromBlackPearlBucket() throws IOException {
- final Ds3ClientHelpers helpers = Ds3ClientHelpers.wrap(client);
-
- final Iterable objects = helpers.listObjects(BUCKET_NAME);
- for (final Contents contents : objects) {
- if (contents.getKey().equals(FILE_NAMES[0])) {
- client.deleteObject(new DeleteObjectRequest(BUCKET_NAME, contents.getKey()));
- }
- }
- }
-
- /**
- * Creates the test bucket with the specified data policy to prevent cascading test failure
- * when there are multiple data policies
- */
- private static void setupBucket(final UUID dataPolicy) {
- try {
- HELPERS.ensureBucketExists(BUCKET_NAME, dataPolicy);
- } catch (final Exception e) {
- LOG.error("Setting up test environment failed: " + e.getMessage());
- }
- }
-
- /**
- * This test verifies that object completed callback handler are added to the correct set.
- * There are 2 sets: 1 for events we create to let us know when to close channels we have opened;
- * and 1 for events clients have registered. It's important that we fire the events that close
- * channels before calling client events, so that clients can rely on the channels having been
- * closed.
- * @throws IOException
- * @throws URISyntaxException
- * @throws NoSuchMethodException
- * @throws IllegalAccessException
- * @throws InvocationTargetException
- * @throws NoSuchFieldException
- * @throws ClassNotFoundException
- */
- @Test
- public void testWriteObjectCompletionEventsPopulateCorrectJobPartTracker()
- throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, NoSuchFieldException, ClassNotFoundException
- {
- final IntValue intValue = new IntValue();
-
-
-
- final ObjectCompletedListener objectCompletedListener = new ObjectCompletedListener() {
- private int numCompletedObjects = 0;
-
- @Override
- public void objectCompleted(final String name) {
- intValue.increment();
- assertTrue(bookTitles.contains(name));
- assertEquals(1, ++numCompletedObjects);
- }
- };
-
- // This is used just to make sure the callback handler ends up in the right place.
- final DataTransferredListener dataTransferredListener = new DataTransferredListener() {
- @Override
- public void dataTransferred(final long size) {
-
- }
- };
-
- final JobImplJobPartDecoratorPair jobImplJobPartDecoratorPair = createJobPartDecoratorAndEnsureObjectPartTrackersPopulated(
- objectCompletedListener,
- dataTransferredListener,
- AccessMode.ForWriting);
-
- // trigger the callback
-
- jobImplJobPartDecoratorPair.getJobPartTrackerDecorator().completePart(FILE_NAMES[0], new ObjectPart(0, bookSize));
-
- assertEquals(1, intValue.getValue());
- }
-
- private enum AccessMode {
- ForReading,
- ForWriting
- }
-
- private JobImplJobPartDecoratorPair createJobPartDecoratorAndEnsureObjectPartTrackersPopulated
- (
- final ObjectCompletedListener objectCompletedListener,
- final DataTransferredListener dataTransferredListener,
- final AccessMode accessMode
- )
- throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, NoSuchFieldException, ClassNotFoundException
- {
- final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl) client);
-
- final int maxNumBlockAllocationRetries = 1;
- final int maxNumObjectTransferAttempts = 3;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job job;
-
- if (accessMode == AccessMode.ForWriting) {
- job = ds3ClientHelpers.startWriteJob(BUCKET_NAME, objects);
- } else {
- job = ds3ClientHelpers.startReadJob(BUCKET_NAME, objects);
- }
-
- job.attachObjectCompletedListener(objectCompletedListener);
-
- job.attachDataTransferredListener(dataTransferredListener);
- return getJobImplJobPartDecoratorAndEnsureObjectPartTrackersPopulated(job);
- }
-
- private JobImplJobPartDecoratorPair getJobImplJobPartDecoratorAndEnsureObjectPartTrackersPopulated(final Ds3ClientHelpers.Job job)
- throws NoSuchFieldException, IllegalAccessException
- {
- // Check that the client has one callback registered
- final Field partTrackerField = job.getClass().getSuperclass().getDeclaredField("jobPartTracker");
- partTrackerField.setAccessible(true);
- final JobImpl.JobPartTrackerDecorator jobPartTrackerDecorator = (JobImpl.JobPartTrackerDecorator) partTrackerField.get(job);
-
- final Field clientJobPartTrackerField = jobPartTrackerDecorator.getClass().getDeclaredField("clientJobPartTracker");
- clientJobPartTrackerField.setAccessible(true);
- final JobPartTrackerImpl clientJobPartTrackerImpl = (JobPartTrackerImpl) clientJobPartTrackerField.get(jobPartTrackerDecorator);
-
- final Field clientTackersField = clientJobPartTrackerImpl.getClass().getDeclaredField("trackers");
- clientTackersField.setAccessible(true);
- final Map clientTrackers = (Map) clientTackersField.get(clientJobPartTrackerImpl);
- final ObjectPartTrackerImpl clientObjectPartTrackerImpl = (ObjectPartTrackerImpl) clientTrackers.get(FILE_NAMES[0]);
-
- final Field clientObjectCompletedListenersField = clientObjectPartTrackerImpl.getClass().getDeclaredField("objectCompletedListeners");
- clientObjectCompletedListenersField.setAccessible(true);
- final Set clientObjectCompletedListeners = (Set) clientObjectCompletedListenersField.get(clientObjectPartTrackerImpl);
-
- assertEquals(1, clientObjectCompletedListeners.size());
-
- // Data transfer listeners
- final Field clientDataTransferListenersField = clientObjectPartTrackerImpl.getClass().getDeclaredField("dataTransferredListeners");
- clientDataTransferListenersField.setAccessible(true);
- final Set clientDataTransferredListeners = (Set) clientDataTransferListenersField.get(clientObjectPartTrackerImpl);
-
- assertEquals(1, clientDataTransferredListeners.size());
-
- // Check that we have no internal callbacks registered. Registering internal callbacks doesn't happen until you
- // call transfer
-
- final Field internalJobPartTrackerField = jobPartTrackerDecorator.getClass().getDeclaredField("internalJobPartTracker");
- internalJobPartTrackerField.setAccessible(true);
- final JobPartTrackerImpl internalJobPartTrackerImpl = (JobPartTrackerImpl) internalJobPartTrackerField.get(jobPartTrackerDecorator);
-
- final Field internalTackersField = internalJobPartTrackerImpl.getClass().getDeclaredField("trackers");
- internalTackersField.setAccessible(true);
- final Map internalTrackers = (Map) internalTackersField.get(internalJobPartTrackerImpl);
- final ObjectPartTrackerImpl internalObjectPartTrackerImpl = (ObjectPartTrackerImpl) internalTrackers.get(FILE_NAMES[0]);
-
- final Field internalObjectCompletedListenersField = internalObjectPartTrackerImpl.getClass().getDeclaredField("objectCompletedListeners");
- internalObjectCompletedListenersField.setAccessible(true);
- final Set internalObjectCompletedListeners = (Set) internalObjectCompletedListenersField.get(internalObjectPartTrackerImpl);
-
- assertEquals(0, internalObjectCompletedListeners.size());
-
- // Data transfer listeners
- final Field internalDataTransferListenersField = internalObjectPartTrackerImpl.getClass().getDeclaredField("dataTransferredListeners");
- internalDataTransferListenersField.setAccessible(true);
- final Set internalDataTransferredListeners = (Set) internalDataTransferListenersField.get(internalObjectPartTrackerImpl);
-
- assertEquals(0, internalDataTransferredListeners.size());
-
- return new JobImplJobPartDecoratorPair(jobPartTrackerDecorator, (JobImpl) job);
- }
-
- private final class JobImplJobPartDecoratorPair {
- private final JobImpl.JobPartTrackerDecorator jobPartTrackerDecorator;
- private final JobImpl job;
-
- private JobImplJobPartDecoratorPair(final JobImpl.JobPartTrackerDecorator jobPartTrackerDecorator,
- final JobImpl job) {
- this.jobPartTrackerDecorator = jobPartTrackerDecorator;
- this.job = job;
- }
-
- public JobImpl.JobPartTrackerDecorator getJobPartTrackerDecorator() {
- return jobPartTrackerDecorator;
- }
-
- public JobImpl getJob() {
- return job;
- }
- }
-
-
-
- /**
- * This test verifies that there is 1 object completed callback handler registered in the internal job part
- * tracker. This callback handler does not exist until you call transfer on the write job.
- * @throws NoSuchMethodException
- * @throws IOException
- * @throws ClassNotFoundException
- * @throws URISyntaxException
- * @throws IllegalAccessException
- * @throws InvocationTargetException
- * @throws NoSuchFieldException
- */
- @Test
- public void testWriteObjectCompletionPopulatesInternalJobPartTrackers()
- throws NoSuchMethodException, IOException, ClassNotFoundException, URISyntaxException, IllegalAccessException, InvocationTargetException, NoSuchFieldException
- {
- final IntValue intValue = new IntValue();
-
- final ObjectCompletedListener objectCompletedListener = new ObjectCompletedListener() {
- private int numCompletedObjects = 0;
-
- @Override
- public void objectCompleted(final String name) {
- intValue.increment();
- assertTrue(bookTitles.contains(name));
- assertEquals(1, ++numCompletedObjects);
- }
- };
-
- final DataTransferredListener dataTransferredListener = new DataTransferredListener() {
- @Override
- public void dataTransferred(final long size) {
-
- }
- };
-
- final JobImplJobPartDecoratorPair jobImplJobPartDecoratorPair = createJobPartDecoratorAndEnsureObjectPartTrackersPopulated(
- objectCompletedListener,
- dataTransferredListener,
- AccessMode.ForWriting);
-
- jobImplJobPartDecoratorPair.getJob().transfer(new FileObjectPutter(dirPath));
-
- final Field partTrackerField = jobImplJobPartDecoratorPair.getJob().getClass().getSuperclass().getDeclaredField("jobPartTracker");
- partTrackerField.setAccessible(true);
- final JobImpl.JobPartTrackerDecorator jobPartTrackerDecorator = (JobImpl.JobPartTrackerDecorator)partTrackerField.get(jobImplJobPartDecoratorPair.getJob());
-
- final Field internalJobPartTrackerField = jobPartTrackerDecorator.getClass().getDeclaredField("internalJobPartTracker");
- internalJobPartTrackerField.setAccessible(true);
- final JobPartTrackerImpl internalJobPartTrackerImpl = (JobPartTrackerImpl)internalJobPartTrackerField.get(jobPartTrackerDecorator);
-
- final Field internalTackersField = internalJobPartTrackerImpl.getClass().getDeclaredField("trackers");
- internalTackersField.setAccessible(true);
- final Map internalTrackers = (Map)internalTackersField.get(internalJobPartTrackerImpl);
- final ObjectPartTrackerImpl internalObjectPartTrackerImpl = (ObjectPartTrackerImpl)internalTrackers.get(FILE_NAMES[0]);
-
- final Field internalObjectCompletedListenersField = internalObjectPartTrackerImpl.getClass().getDeclaredField("objectCompletedListeners");
- internalObjectCompletedListenersField.setAccessible(true);
- final Set internalObjectCompletedListeners = (Set)internalObjectCompletedListenersField.get(internalObjectPartTrackerImpl);
-
- assertEquals(1, internalObjectCompletedListeners.size());
- }
-
- @Test
- public void testWriteObjectCompletionFiresInternalHandlersFirst()
- throws NoSuchMethodException, IOException, ClassNotFoundException, URISyntaxException, IllegalAccessException, InvocationTargetException, NoSuchFieldException {
- final IntValue intValue = new IntValue();
-
- final ObjectCompletedListener objectCompletedListener = new ObjectCompletedListener() {
- private int numCompletedObjects = 0;
-
- @Override
- public void objectCompleted(final String name) {
- intValue.increment();
- assertTrue(bookTitles.contains(name));
- assertEquals(1, ++numCompletedObjects);
- }
- };
-
- final DataTransferredListener dataTransferredListener = new DataTransferredListener() {
- @Override
- public void dataTransferred(final long size) {
-
- }
- };
-
- final JobImplJobPartDecoratorPair jobImplJobPartDecoratorPair = createJobPartDecoratorAndEnsureObjectPartTrackersPopulated(
- objectCompletedListener,
- dataTransferredListener,
- AccessMode.ForWriting);
-
- final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
-
- final JobPartDecoratorInterceptor jobPartDecoratorInterceptor = new JobPartDecoratorInterceptor(jobImplJobPartDecoratorPair);
- jobPartDecoratorInterceptor.transfer(new FileObjectPutter(dirPath));
- assertTrue(jobPartDecoratorInterceptor.bothHandlersFired());
- }
-
- private static final class JobPartDecoratorInterceptor implements JobPartTracker {
- private final JobImplJobPartDecoratorPair jobImplJobPartDecoratorPair;
- private final ObjectCompletedCallbackTracker objectCompletedCallbackTracker;
-
- private JobPartDecoratorInterceptor(final JobImplJobPartDecoratorPair jobImplJobPartDecoratorPair)
- throws NoSuchFieldException, IllegalAccessException
- {
- this.jobImplJobPartDecoratorPair = jobImplJobPartDecoratorPair;
- this.objectCompletedCallbackTracker = new ObjectCompletedCallbackTracker();
-
- // Replace the job part trackers in JobPartTrackerDecorator with JobPartTrackerInterceptor
- final JobImpl.JobPartTrackerDecorator jobPartTrackerDecorator = jobImplJobPartDecoratorPair.getJobPartTrackerDecorator();
-
- final Field internalJobPartTrackerField = jobPartTrackerDecorator.getClass().getDeclaredField("internalJobPartTracker");
- internalJobPartTrackerField.setAccessible(true);
- final JobPartTrackerInterceptor internalJobPartTrackerInterceptor = new JobPartTrackerInterceptor(
- (JobPartTracker)internalJobPartTrackerField.get(jobPartTrackerDecorator),
- objectCompletedCallbackTracker.getInternalObjectCompletedHandler());
- internalJobPartTrackerField.set(jobPartTrackerDecorator, internalJobPartTrackerInterceptor);
-
- final Field clientJobPartTrackerField = jobPartTrackerDecorator.getClass().getDeclaredField("clientJobPartTracker");
- clientJobPartTrackerField.setAccessible(true);
- final JobPartTrackerInterceptor clientJobPartTrackerInterceptor = new JobPartTrackerInterceptor(
- (JobPartTracker)clientJobPartTrackerField.get(jobPartTrackerDecorator),
- objectCompletedCallbackTracker.getClientObjectCompletedHandler());
- clientJobPartTrackerField.set(jobPartTrackerDecorator, clientJobPartTrackerInterceptor);
- }
-
- @Override
- public void completePart(final String key, final ObjectPart objectPart) {
- jobImplJobPartDecoratorPair.getJobPartTrackerDecorator().completePart(key, objectPart);
- }
-
- @Override
- public boolean containsPart(final String key, final ObjectPart objectPart) {
- return jobImplJobPartDecoratorPair.getJobPartTrackerDecorator().containsPart(key, objectPart);
- }
-
- @Override
- public JobPartTracker attachDataTransferredListener(final DataTransferredListener listener) {
- return jobImplJobPartDecoratorPair.getJobPartTrackerDecorator().attachDataTransferredListener(listener);
- }
-
- @Override
- public JobPartTracker attachObjectCompletedListener(final ObjectCompletedListener listener) {
- return jobImplJobPartDecoratorPair.getJobPartTrackerDecorator().attachObjectCompletedListener(listener);
- }
-
- @Override
- public void removeDataTransferredListener(final DataTransferredListener listener) {
- jobImplJobPartDecoratorPair.getJobPartTrackerDecorator().removeDataTransferredListener(listener);
- }
-
- @Override
- public void removeObjectCompletedListener(final ObjectCompletedListener listener) {
- jobImplJobPartDecoratorPair.getJobPartTrackerDecorator().removeObjectCompletedListener(listener);
- }
-
- private void transfer(final Ds3ClientHelpers.ObjectChannelBuilder channelBuilder) throws IOException {
- jobImplJobPartDecoratorPair.getJob().transfer(channelBuilder);
- }
-
- private boolean bothHandlersFired() {
- return objectCompletedCallbackTracker.bothHandlersFired();
- }
- }
-
- private static class ObjectCompletedCallbackTracker {
- private final BooleanValue internalObjectCompletedHandlerCalled = new BooleanValue();
- private final BooleanValue clientObjectCompletedHandlerCalled = new BooleanValue();
-
- private final ObjectCompletedCallbackRecorder clientObjectCompletedHandler = new ObjectCompletedCallbackRecorder() {
- @Override
- public void onObjectCompletedCalled() {
- clientObjectCompletedHandlerCalled.setValue(true);
-
- if ( ! internalObjectCompletedHandlerCalled.getValue()) {
- throw new IllegalStateException("Client object completed handler called before closing channels.");
- }
- }
- };
-
- private final ObjectCompletedCallbackRecorder internalObjectCompletedHandler = new ObjectCompletedCallbackRecorder() {
- @Override
- public void onObjectCompletedCalled() {
- internalObjectCompletedHandlerCalled.setValue(true);
-
- if (clientObjectCompletedHandlerCalled.getValue()) {
- throw new IllegalStateException("Client object completed handler called before closing channels.");
- }
- }
- };
-
- public ObjectCompletedCallbackRecorder getClientObjectCompletedHandler() {
- return clientObjectCompletedHandler;
- }
-
- public ObjectCompletedCallbackRecorder getInternalObjectCompletedHandler() {
- return internalObjectCompletedHandler;
- }
-
- public boolean bothHandlersFired() {
- return internalObjectCompletedHandlerCalled.getValue() && clientObjectCompletedHandlerCalled.getValue();
- }
- }
-
- private static class BooleanValue {
- private boolean value = false;
-
- private boolean getValue() {
- return this.value;
- }
-
- private boolean setValue(final boolean value) {
- this.value = value;
- return getValue();
- }
- }
-
- private interface ObjectCompletedCallbackRecorder {
- void onObjectCompletedCalled();
- }
-
- private static final class JobPartTrackerInterceptor implements JobPartTracker {
- private final JobPartTracker jobPartTracker;
- private final ObjectCompletedCallbackRecorder objectCompletedCallbackRecorder;
-
- private JobPartTrackerInterceptor(final JobPartTracker jobPartTracker, final ObjectCompletedCallbackRecorder objectCompletedCallbackRecorder) {
- this.jobPartTracker = jobPartTracker;
- this.objectCompletedCallbackRecorder = objectCompletedCallbackRecorder;
- }
-
- @Override
- public void completePart(final String key, final ObjectPart objectPart) {
- objectCompletedCallbackRecorder.onObjectCompletedCalled();
- jobPartTracker.completePart(key, objectPart);
- }
-
- @Override
- public boolean containsPart(final String key, final ObjectPart objectPart) {
- return jobPartTracker.containsPart(key, objectPart);
- }
-
- @Override
- public JobPartTracker attachDataTransferredListener(final DataTransferredListener listener) {
- return jobPartTracker.attachDataTransferredListener(listener);
- }
-
- @Override
- public JobPartTracker attachObjectCompletedListener(final ObjectCompletedListener listener) {
- return jobPartTracker.attachObjectCompletedListener(listener);
- }
-
- @Override
- public void removeDataTransferredListener(final DataTransferredListener listener) {
- jobPartTracker.removeDataTransferredListener(listener);
- }
-
- @Override
- public void removeObjectCompletedListener(final ObjectCompletedListener listener) {
- jobPartTracker.removeObjectCompletedListener(listener);
- }
- }
-
- @Test
- public void testWriteObjectRemovesEventsFromCorrectPartTracker()
- throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, NoSuchFieldException, ClassNotFoundException
- {
- final IntValue intValue = new IntValue();
-
- final ObjectCompletedListener objectCompletedListener = new ObjectCompletedListener() {
- private int numCompletedObjects = 0;
-
- @Override
- public void objectCompleted(final String name) {
- intValue.increment();
- assertTrue(bookTitles.contains(name));
- assertEquals(1, ++numCompletedObjects);
- }
- };
-
- // This is used just to make sure the callback handler ends up in the right place.
- final DataTransferredListener dataTransferredListener = new DataTransferredListener() {
- @Override
- public void dataTransferred(final long size) {
-
- }
- };
-
- final JobImplJobPartDecoratorPair jobImplJobPartDecoratorPair = createJobPartDecoratorAndEnsureObjectPartTrackersPopulated(
- objectCompletedListener,
- dataTransferredListener,
- AccessMode.ForWriting);
-
- jobImplJobPartDecoratorPair.getJob().removeObjectCompletedListener(objectCompletedListener);
-
- final JobImpl job = jobImplJobPartDecoratorPair.getJob();
-
- final Field partTrackerField = job.getClass().getSuperclass().getDeclaredField("jobPartTracker");
- partTrackerField.setAccessible(true);
- final JobImpl.JobPartTrackerDecorator jobPartTrackerDecorator = (JobImpl.JobPartTrackerDecorator) partTrackerField.get(job);
-
- final Field clientJobPartTrackerField = jobPartTrackerDecorator.getClass().getDeclaredField("clientJobPartTracker");
- clientJobPartTrackerField.setAccessible(true);
- final JobPartTrackerImpl clientJobPartTrackerImpl = (JobPartTrackerImpl) clientJobPartTrackerField.get(jobPartTrackerDecorator);
-
- final Field clientTackersField = clientJobPartTrackerImpl.getClass().getDeclaredField("trackers");
- clientTackersField.setAccessible(true);
- final Map clientTrackers = (Map) clientTackersField.get(clientJobPartTrackerImpl);
- final ObjectPartTrackerImpl clientObjectPartTrackerImpl = (ObjectPartTrackerImpl) clientTrackers.get(FILE_NAMES[0]);
-
- final Field clientObjectCompletedListenersField = clientObjectPartTrackerImpl.getClass().getDeclaredField("objectCompletedListeners");
- clientObjectCompletedListenersField.setAccessible(true);
- final Set clientObjectCompletedListeners = (Set) clientObjectCompletedListenersField.get(clientObjectPartTrackerImpl);
-
- assertEquals(0, clientObjectCompletedListeners.size());
-
- // Data transfer listeners
- job.removeDataTransferredListener(dataTransferredListener);
- final Field clientDataTransferListenersField = clientObjectPartTrackerImpl.getClass().getDeclaredField("dataTransferredListeners");
- clientDataTransferListenersField.setAccessible(true);
- final Set clientDataTransferredListeners = (Set) clientDataTransferListenersField.get(clientObjectPartTrackerImpl);
-
- assertEquals(0, clientDataTransferredListeners.size());
- }
-
- @Test
- public void testReadObjectCompletionEventsPopulateCorrectJobPartTracker()
- throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, NoSuchFieldException, ClassNotFoundException
- {
- putBigFileIntoBlackPearl();
-
- final IntValue intValue = new IntValue();
-
- final ObjectCompletedListener objectCompletedListener = new ObjectCompletedListener() {
- private int numCompletedObjects = 0;
-
- @Override
- public void objectCompleted(final String name) {
- intValue.increment();
- assertTrue(bookTitles.contains(name));
- assertEquals(1, ++numCompletedObjects);
- }
- };
-
- // This is used just to make sure the callback handler ends up in the right place.
- final DataTransferredListener dataTransferredListener = new DataTransferredListener() {
- @Override
- public void dataTransferred(final long size) {
-
- }
- };
-
- final JobImplJobPartDecoratorPair jobImplJobPartDecoratorPair = createJobPartDecoratorAndEnsureObjectPartTrackersPopulated(
- objectCompletedListener,
- dataTransferredListener,
- AccessMode.ForReading);
-
- // trigger the callback
-
- jobImplJobPartDecoratorPair.getJobPartTrackerDecorator().completePart(FILE_NAMES[0], new ObjectPart(0, bookSize));
-
- assertEquals(1, intValue.getValue());
- }
-
- private void putBigFileIntoBlackPearl() throws IOException, URISyntaxException {
- final int maxNumBlockAllocationRetries = 1;
- final int maxNumObjectTransferAttempts = 3;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, objects);
- writeJob.transfer(new FileObjectPutter(dirPath));
- }
-
- @Test
- public void testReadObjectCompletionFiresInternalHandlersFirst()
- throws NoSuchMethodException, IOException, ClassNotFoundException, URISyntaxException, IllegalAccessException, InvocationTargetException, NoSuchFieldException
- {
- putBigFileIntoBlackPearl();
-
- final String tempPathPrefix = null;
- final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- final IntValue intValue = new IntValue();
-
- final ObjectCompletedListener objectCompletedListener = new ObjectCompletedListener() {
- private int numCompletedObjects = 0;
-
- @Override
- public void objectCompleted(final String name) {
- intValue.increment();
- assertTrue(bookTitles.contains(name));
- assertEquals(1, ++numCompletedObjects);
- }
- };
-
- final DataTransferredListener dataTransferredListener = new DataTransferredListener() {
- @Override
- public void dataTransferred(final long size) {
-
- }
- };
-
- try {
- final JobImplJobPartDecoratorPair jobImplJobPartDecoratorPair = createJobPartDecoratorAndEnsureObjectPartTrackersPopulated(
- objectCompletedListener,
- dataTransferredListener,
- AccessMode.ForReading);
-
- final JobPartDecoratorInterceptor jobPartDecoratorInterceptor = new JobPartDecoratorInterceptor(jobImplJobPartDecoratorPair);
- jobPartDecoratorInterceptor.transfer(new FileObjectGetter(tempDirectory));
- assertTrue(jobPartDecoratorInterceptor.bothHandlersFired());
- } finally {
- FileUtils.deleteDirectory(tempDirectory.toFile());
- }
- }
-}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/GetJobManagement_Test.java b/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/GetJobManagement_Test.java
deleted file mode 100644
index dc4c47469..000000000
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/GetJobManagement_Test.java
+++ /dev/null
@@ -1,683 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-package com.spectralogic.ds3client.integration;
-
-import com.google.common.collect.Lists;
-import com.spectralogic.ds3client.Ds3Client;
-import com.spectralogic.ds3client.Ds3ClientImpl;
-import com.spectralogic.ds3client.IntValue;
-import com.spectralogic.ds3client.commands.DeleteObjectRequest;
-import com.spectralogic.ds3client.commands.GetObjectRequest;
-import com.spectralogic.ds3client.commands.GetObjectResponse;
-import com.spectralogic.ds3client.commands.PutObjectRequest;
-import com.spectralogic.ds3client.commands.spectrads3.GetJobSpectraS3Request;
-import com.spectralogic.ds3client.commands.spectrads3.GetJobSpectraS3Response;
-import com.spectralogic.ds3client.helpers.*;
-import com.spectralogic.ds3client.helpers.events.FailureEvent;
-import com.spectralogic.ds3client.helpers.options.ReadJobOptions;
-import com.spectralogic.ds3client.integration.test.helpers.*;
-import com.spectralogic.ds3client.models.ChecksumType;
-import com.spectralogic.ds3client.models.Contents;
-import com.spectralogic.ds3client.models.Priority;
-import com.spectralogic.ds3client.models.bulk.Ds3Object;
-import com.spectralogic.ds3client.models.bulk.PartialDs3Object;
-import com.spectralogic.ds3client.models.common.Range;
-import com.spectralogic.ds3client.utils.Platform;
-import com.spectralogic.ds3client.utils.ResourceUtils;
-import org.apache.commons.io.FileUtils;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URISyntaxException;
-import java.nio.ByteBuffer;
-import java.nio.channels.SeekableByteChannel;
-import java.nio.channels.WritableByteChannel;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardOpenOption;
-import java.security.AccessControlException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.UUID;
-
-import static com.spectralogic.ds3client.integration.Util.RESOURCE_BASE_NAME;
-import static com.spectralogic.ds3client.integration.Util.deleteAllContents;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.notNullValue;
-import static org.junit.Assert.*;
-
-public class GetJobManagement_Test {
-
- private static final Logger LOG = LoggerFactory.getLogger(GetJobManagement_Test.class);
-
- private static final Ds3Client client = Util.fromEnv();
- private static final Ds3ClientHelpers HELPERS = Ds3ClientHelpers.wrap(client);
- private static final String BUCKET_NAME = "Get_Job_Management_Test";
- private static final String TEST_ENV_NAME = "GetJobManagement_Test";
- private static final String DISK_FULL_MESSAGE = "There is not enough space on the disk";
- private static TempStorageIds envStorageIds;
- private static UUID dataPolicyId;
-
- @BeforeClass
- public static void startup() throws Exception {
- dataPolicyId = TempStorageUtil.setupDataPolicy(TEST_ENV_NAME, false, ChecksumType.Type.MD5, client);
- envStorageIds = TempStorageUtil.setup(TEST_ENV_NAME, dataPolicyId, client);
- setupBucket(dataPolicyId);
- }
-
- @AfterClass
- public static void teardown() throws IOException {
- try {
- deleteAllContents(client, BUCKET_NAME);
- } finally {
- TempStorageUtil.teardown(TEST_ENV_NAME, envStorageIds, client);
- client.close();
- }
- }
-
- /**
- * Creates the test bucket with the specified data policy to prevent cascading test failure
- * when there are multiple data policies
- */
- private static void setupBucket(final UUID dataPolicy) {
- try {
- HELPERS.ensureBucketExists(BUCKET_NAME, dataPolicy);
- putBeowulf();
- } catch (final Exception e) {
- LOG.error("Setting up test environment failed: " + e.getMessage());
- }
- }
-
- private static void putBeowulf() throws Exception {
- final String book1 = "beowulf.txt";
- final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
- final Ds3Object obj = new Ds3Object(book1, Files.size(objPath1));
- final Ds3ClientHelpers.Job job = HELPERS.startWriteJob(BUCKET_NAME, Lists
- .newArrayList(obj));
- final UUID jobId = job.getJobId();
- final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
- client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId, 0, Files.size(objPath1)));
- ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId, client, 20);
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void nakedS3Get() throws IOException,
- URISyntaxException, InterruptedException {
-
- final WritableByteChannel writeChannel = new NullChannel();
-
- final GetObjectResponse getObjectResponse = client.getObject(
- new GetObjectRequest(BUCKET_NAME, "beowulf.txt", writeChannel));
-
- assertThat(getObjectResponse, is(notNullValue()));
- assertThat(getObjectResponse.getObjectSize(), is(notNullValue()));
- }
-
- @Test
- public void createReadJob() throws IOException, InterruptedException, URISyntaxException {
-
- final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, Lists.newArrayList(
- new Ds3Object("beowulf.txt", 10)));
-
- final GetJobSpectraS3Response jobSpectraS3Response = client
- .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
-
- assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
- }
-
- @Test
- public void createReadJobWithBigFile() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
- putBigFiles();
-
- final String tempPathPrefix = null;
- final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final String DIR_NAME = "largeFiles/";
- final String FILE_NAME = "lesmis-copies.txt";
-
- final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
- final long bookSize = Files.size(objPath);
- final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
-
- final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl)client);
-
- final int maxNumBlockAllocationRetries = 1;
- final int maxNumObjectTransferAttempts = 3;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Arrays.asList(obj));
-
- final GetJobSpectraS3Response jobSpectraS3Response = ds3ClientShim
- .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
-
- assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
-
- readJob.transfer(new FileObjectGetter(tempDirectory));
-
- final File originalFile = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME).toFile();
- final File fileCopiedFromBP = Paths.get(tempDirectory.toString(), FILE_NAME).toFile();
- assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
- } finally {
- FileUtils.deleteDirectory(tempDirectory.toFile());
- deleteBigFileFromBlackPearlBucket();
- }
- }
-
- private void putBigFiles() throws IOException, URISyntaxException {
- final String DIR_NAME = "largeFiles/";
- final String[] FILE_NAMES = new String[] { "lesmis-copies.txt", "GreatExpectations.txt" };
-
- final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
-
- final List bookTitles = new ArrayList<>();
- final List objects = new ArrayList<>();
- for (final String book : FILE_NAMES) {
- final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
- final long bookSize = Files.size(objPath);
- final Ds3Object obj = new Ds3Object(book, bookSize);
-
- bookTitles.add(book);
- objects.add(obj);
- }
-
- final int maxNumBlockAllocationRetries = 1;
- final int maxNumObjectTransferAttempts = 3;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, objects);
- writeJob.transfer(new FileObjectPutter(dirPath));
- }
-
- private void deleteBigFileFromBlackPearlBucket() throws IOException {
- final Ds3ClientHelpers helpers = Ds3ClientHelpers.wrap(client);
-
- final Iterable objects = helpers.listObjects(BUCKET_NAME);
- for (final Contents contents : objects) {
- if (contents.getKey().equals("lesmis-copies.txt") || contents.getKey().equals("GreatExpectations.txt")) {
- client.deleteObject(new DeleteObjectRequest(BUCKET_NAME, contents.getKey()));
- }
- }
- }
-
- @Test(expected = RuntimeException.class)
- public void testReadRetrybugFixWithUnwritableDirectory() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InterruptedException {
- putBigFiles();
-
- final String tempPathPrefix = null;
- final Path tempDirectoryPath = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- final String tempDirectoryName = tempDirectoryPath.toString();
-
- if (org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS) {
- // Deny write data access to everyone, making the directory unwritable.
- Runtime.getRuntime().exec("icacls " + tempDirectoryName + " /deny Everyone:(WD)").waitFor();
- } else {
- Runtime.getRuntime().exec("chmod -w " + tempDirectoryName).waitFor();
- }
-
- try {
- disableWritePermissionForRoot(tempDirectoryName);
-
- final String DIR_NAME = "largeFiles/";
- final String FILE_NAME = "lesmis-copies.txt";
-
- final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
- final long bookSize = Files.size(objPath);
- final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
-
- final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl)client);
-
- final int maxNumBlockAllocationRetries = 1;
- final int maxNumObjectTransferAttempts = 3;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Arrays.asList(obj));
-
- final GetJobSpectraS3Response jobSpectraS3Response = ds3ClientShim
- .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
-
- assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
-
- readJob.transfer(new FileObjectGetter(tempDirectoryPath));
-
- final File originalFile = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME).toFile();
- final File fileCopiedFromBP = Paths.get(tempDirectoryPath.toString(), FILE_NAME).toFile();
- assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
- } finally {
- enableWritePermissionForRoot(tempDirectoryName);
-
- if (org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS) {
- // Grant write data access to everyone, so we can delete the directory
- Runtime.getRuntime().exec("icacls " + tempDirectoryName + " /grant Everyone:(WD)").waitFor();
- } else {
- Runtime.getRuntime().exec("chmod +w " + tempDirectoryName).waitFor();
- }
- FileUtils.deleteDirectory(tempDirectoryPath.toFile());
- deleteBigFileFromBlackPearlBucket();
- }
- }
-
- private void disableWritePermissionForRoot(final String fileOrDirName) {
- try {
- if (iAmRoot()) {
- Runtime.getRuntime().exec("chattr +i " + fileOrDirName).waitFor();
- }
- } catch (final IOException | InterruptedException e) {
- LOG.error("Error setting file immutable: " + fileOrDirName, e);
- }
- }
-
- private boolean iAmRoot() {
- if ( ! Platform.isLinux()) {
- return false;
- }
-
- try {
- final Process whoamiProcess = Runtime.getRuntime().exec("id | cut -d \"(\" -f 1 | cut -d \"=\" -f 2");
- whoamiProcess.waitFor();
-
- try (final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(whoamiProcess.getInputStream()))) {
-
- final String userId = bufferedReader.readLine();
-
- return userId.equals("0");
- }
- } catch (final IOException | InterruptedException e) {
- LOG.error("Error getting user id.", e);
- }
-
- return false;
- }
-
- private void enableWritePermissionForRoot(final String fileOrDirName) {
- try {
- if (iAmRoot()) {
- Runtime.getRuntime().exec("chattr -i " + fileOrDirName).waitFor();
- }
- } catch (final IOException | InterruptedException e) {
- LOG.error("Error setting file immutable: " + fileOrDirName, e);
- }
- }
-
- @Test(expected = AccessControlException.class)
- public void testReadRetrybugWhenChannelThrowsAccessException() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
- putBigFiles();
-
- final String tempPathPrefix = null;
- final Path tempDirectoryPath = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final String DIR_NAME = "largeFiles/";
- final String FILE_NAME = "lesmis-copies.txt";
-
- final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
- final long bookSize = Files.size(objPath);
- final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
-
- final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl)client);
-
- final int maxNumBlockAllocationRetries = 1;
- final int maxNumObjectTransferAttempts = 3;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Arrays.asList(obj));
-
- final GetJobSpectraS3Response jobSpectraS3Response = ds3ClientShim
- .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
-
- assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
-
- readJob.transfer(new Ds3ClientHelpers.ObjectChannelBuilder() {
- @Override
- public SeekableByteChannel buildChannel(final String key) throws IOException {
- throw new AccessControlException(key);
- }
- });
- } finally {
- FileUtils.deleteDirectory(tempDirectoryPath.toFile());
- deleteBigFileFromBlackPearlBucket();
- }
- }
-
- @Test
- public void testReadRetryBugWhenDiskIsFull() throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
- putBigFiles();
-
- final String tempPathPrefix = null;
- final Path tempDirectoryPath = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final String DIR_NAME = "largeFiles/";
- final String FILE_NAME = "lesmis-copies.txt";
-
- final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
- final long bookSize = Files.size(objPath);
- final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
-
- final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl)client);
-
- final int maxNumBlockAllocationRetries = 1;
- final int maxNumObjectTransferAttempts = 3;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Arrays.asList(obj));
-
- final GetJobSpectraS3Response jobSpectraS3Response = ds3ClientShim
- .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
-
- assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
-
- try {
- readJob.transfer(new FailingChannelBuilder());
- } catch (final UnrecoverableIOException e) {
- assertEquals(DISK_FULL_MESSAGE, e.getCause().getMessage());
- }
- } finally {
- FileUtils.deleteDirectory(tempDirectoryPath.toFile());
- deleteBigFileFromBlackPearlBucket();
- }
- }
-
- private static class FailingChannelBuilder implements Ds3ClientHelpers.ObjectChannelBuilder {
- @Override
- public SeekableByteChannel buildChannel(final String key) throws IOException {
- final String filePath = key;
- final SeekableByteChannel seekableByteChannel = Files.newByteChannel(Paths.get(filePath),
- StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE,
- StandardOpenOption.DELETE_ON_CLOSE);
- return new SeekableByteChannelWrapper(seekableByteChannel);
- }
- }
-
- private static class SeekableByteChannelWrapper implements SeekableByteChannel {
- private final SeekableByteChannel seekableByteChannel;
-
- private SeekableByteChannelWrapper(final SeekableByteChannel seekableByteChannel) {
- this.seekableByteChannel = seekableByteChannel;
- }
-
- @Override
- public int read(final ByteBuffer dst) throws IOException {
- return seekableByteChannel.read(dst);
- }
-
- @Override
- public int write(final ByteBuffer src) throws IOException {
- throw new IOException(DISK_FULL_MESSAGE);
- }
-
- @Override
- public long position() throws IOException {
- return seekableByteChannel.position();
- }
-
- @Override
- public SeekableByteChannel position(final long newPosition) throws IOException {
- return seekableByteChannel.position(newPosition);
- }
-
- @Override
- public long size() throws IOException {
- return seekableByteChannel.size();
- }
-
- @Override
- public SeekableByteChannel truncate(final long size) throws IOException {
- return seekableByteChannel.truncate(size);
- }
-
- @Override
- public boolean isOpen() {
- return seekableByteChannel.isOpen();
- }
-
- @Override
- public void close() throws IOException {
- seekableByteChannel.close();
- }
- }
-
-
- @Test
- public void createReadJobWithPriorityOption() throws IOException,
- InterruptedException, URISyntaxException {
-
- final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, Lists.newArrayList(
- new Ds3Object("beowulf.txt", 10)), ReadJobOptions.create().withPriority(Priority.LOW));
- final GetJobSpectraS3Response jobSpectraS3Response = client
- .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
-
- assertThat(jobSpectraS3Response.getMasterObjectListResult().getPriority(), is(Priority.LOW));
- }
-
- @Test
- public void createReadJobWithNameOption() throws IOException,
- URISyntaxException, InterruptedException {
-
- final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, Lists.newArrayList(
- new Ds3Object("beowulf.txt", 10)), ReadJobOptions.create().withName("test_job"));
- final GetJobSpectraS3Response jobSpectraS3Response = client
- .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
-
- assertThat(jobSpectraS3Response.getMasterObjectListResult().getName(), is("test_job"));
- }
-
- @Test
- public void createReadJobWithNameAndPriorityOptions() throws IOException,
- URISyntaxException, InterruptedException {
-
- final Ds3ClientHelpers.Job readJob = HELPERS.startReadJob(BUCKET_NAME, Lists.newArrayList(
- new Ds3Object("beowulf.txt", 10)), ReadJobOptions.create()
- .withName("test_job").withPriority(Priority.LOW));
- final GetJobSpectraS3Response jobSpectraS3Response = client
- .getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
-
- assertThat(jobSpectraS3Response.getMasterObjectListResult().getName(), is("test_job"));
- assertThat(jobSpectraS3Response.getMasterObjectListResult().getPriority(), is(Priority.LOW));
- }
-
- @Test
- public void testPartialRetriesWithInjectedFailures() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, IOException, URISyntaxException {
- putBigFiles();
-
- final String tempPathPrefix = null;
- final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final List filesToGet = new ArrayList<>();
-
- final String DIR_NAME = "largeFiles/";
- final String FILE_NAME = "GreatExpectations.txt";
-
- final int offsetIntoFirstRange = 10;
-
- filesToGet.add(new PartialDs3Object(FILE_NAME, Range.byLength(200000, 100000)));
-
- filesToGet.add(new PartialDs3Object(FILE_NAME, Range.byLength(100000, 100000)));
-
- filesToGet.add(new PartialDs3Object(FILE_NAME, Range.byLength(offsetIntoFirstRange, 100000)));
-
- final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl) client);
-
- final int maxNumBlockAllocationRetries = 1;
- final int maxNumObjectTransferAttempts = 4;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job job = ds3ClientHelpers.startReadJob(BUCKET_NAME, filesToGet);
- final IntValue intValue = new IntValue();
-
- job.attachObjectCompletedListener(new ObjectCompletedListener() {
- int numPartsCompleted = 0;
-
- @Override
- public void objectCompleted(final String name) {
- assertEquals(1, ++numPartsCompleted);
- intValue.increment();
- }
- });
-
- job.attachDataTransferredListener(new DataTransferredListener() {
- @Override
- public void dataTransferred(final long size) {
- LOG.info("Data transferred size: {}", size);
- }
- });
-
- job.transfer(new FileObjectGetter(tempDirectory));
-
- assertEquals(1, intValue.getValue());
-
- try (final InputStream originalFileStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(DIR_NAME + FILE_NAME)) {
- final byte[] first300000Bytes = new byte[300000 - offsetIntoFirstRange];
- originalFileStream.skip(10);
- int numBytesRead = originalFileStream.read(first300000Bytes, 0, 300000 - offsetIntoFirstRange);
-
- assertThat(numBytesRead, is(300000 -offsetIntoFirstRange ));
-
- try (final InputStream fileReadFromBP = Files.newInputStream(Paths.get(tempDirectory.toString(), FILE_NAME))) {
- final byte[] first300000BytesFromBP = new byte[300000 - offsetIntoFirstRange];
-
- numBytesRead = fileReadFromBP.read(first300000BytesFromBP, 0, 300000 - offsetIntoFirstRange);
- assertThat(numBytesRead, is(300000 - offsetIntoFirstRange));
-
- assertTrue(Arrays.equals(first300000Bytes, first300000BytesFromBP));
- }
- }
- } finally {
- FileUtils.deleteDirectory(tempDirectory.toFile());
- deleteBigFileFromBlackPearlBucket();
- }
- }
-
-
- @Test
- public void testFiringFailureHandlerWhenGettingChunks()
- throws URISyntaxException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, IOException
- {
- putBigFiles();
-
- final String tempPathPrefix = null;
- final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final IntValue numFailuresRecorded = new IntValue();
-
- final FailureEventListener failureEventListener = new FailureEventListener() {
- @Override
- public void onFailure(final FailureEvent failureEvent) {
- numFailuresRecorded.increment();
- assertEquals(FailureEvent.FailureActivity.GettingObject, failureEvent.doingWhat());
- }
- };
-
- final Ds3ClientHelpers.Job readJob = createReadJobWithObjectsReadyToTransfer(Ds3ClientShimFactory.ClientFailureType.ChunkAllocation);
-
- readJob.attachFailureEventListener(failureEventListener);
-
- try {
- readJob.transfer(new FileObjectGetter(tempDirectory));
- } catch (final IOException e) {
- assertEquals(1, numFailuresRecorded.getValue());
- }
- } finally {
- FileUtils.deleteDirectory(tempDirectory.toFile());
- deleteBigFileFromBlackPearlBucket();
- }
- }
-
- private Ds3ClientHelpers.Job createReadJobWithObjectsReadyToTransfer(final Ds3ClientShimFactory.ClientFailureType clientFailureType)
- throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException
- {
- final String DIR_NAME = "largeFiles/";
- final String FILE_NAME = "lesmis-copies.txt";
-
- final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAME);
- final long bookSize = Files.size(objPath);
- final Ds3Object obj = new Ds3Object(FILE_NAME, bookSize);
-
- final Ds3Client ds3Client = Ds3ClientShimFactory.makeWrappedDs3Client(clientFailureType, client);
-
- final int maxNumBlockAllocationRetries = 3;
- final int maxNumObjectTransferAttempts = 3;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3Client,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Arrays.asList(obj));
-
- return readJob;
- }
-
- @Test
- public void testFiringFailureHandlerWhenGettingObject()
- throws URISyntaxException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, IOException
- {
- putBigFiles();
-
- final String tempPathPrefix = null;
- final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final IntValue numFailuresRecorded = new IntValue();
-
- final FailureEventListener failureEventListener = new FailureEventListener() {
- @Override
- public void onFailure(final FailureEvent failureEvent) {
- numFailuresRecorded.increment();
- assertEquals(FailureEvent.FailureActivity.GettingObject, failureEvent.doingWhat());
- }
- };
-
- final Ds3ClientHelpers.Job readJob = createReadJobWithObjectsReadyToTransfer(Ds3ClientShimFactory.ClientFailureType.GetObject);
-
- readJob.attachFailureEventListener(failureEventListener);
-
- try {
- readJob.transfer(new FileObjectGetter(tempDirectory));
- } catch (final IOException e) {
- assertEquals(1, numFailuresRecorded.getValue());
- }
- } finally {
- FileUtils.deleteDirectory(tempDirectory.toFile());
- deleteBigFileFromBlackPearlBucket();
- }
- }
-}
diff --git a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java b/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java
deleted file mode 100644
index e8f00744a..000000000
--- a/ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java
+++ /dev/null
@@ -1,1168 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-package com.spectralogic.ds3client.integration;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.spectralogic.ds3client.Ds3Client;
-import com.spectralogic.ds3client.Ds3ClientBuilder;
-import com.spectralogic.ds3client.Ds3ClientImpl;
-import com.spectralogic.ds3client.IntValue;
-import com.spectralogic.ds3client.commands.*;
-import com.spectralogic.ds3client.commands.spectrads3.*;
-import com.spectralogic.ds3client.commands.spectrads3.notifications.*;
-import com.spectralogic.ds3client.exceptions.Ds3NoMoreRetriesException;
-import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
-import com.spectralogic.ds3client.helpers.FailureEventListener;
-import com.spectralogic.ds3client.helpers.FileObjectGetter;
-import com.spectralogic.ds3client.helpers.FileObjectPutter;
-import com.spectralogic.ds3client.helpers.ObjectCompletedListener;
-import com.spectralogic.ds3client.helpers.events.FailureEvent;
-import com.spectralogic.ds3client.helpers.options.WriteJobOptions;
-import com.spectralogic.ds3client.integration.test.helpers.ABMTestHelper;
-import com.spectralogic.ds3client.integration.test.helpers.Ds3ClientShimFactory;
-import com.spectralogic.ds3client.integration.test.helpers.TempStorageIds;
-import com.spectralogic.ds3client.integration.test.helpers.TempStorageUtil;
-import com.spectralogic.ds3client.metadata.MetadataAccessImpl;
-import com.spectralogic.ds3client.models.*;
-import com.spectralogic.ds3client.models.bulk.Ds3Object;
-import com.spectralogic.ds3client.networking.FailedRequestException;
-import com.spectralogic.ds3client.utils.ByteArraySeekableByteChannel;
-import com.spectralogic.ds3client.utils.Platform;
-import com.spectralogic.ds3client.utils.ResourceUtils;
-
-import com.spectralogic.ds3client.integration.test.helpers.Ds3ClientShimFactory.ClientFailureType;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.junit.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URISyntaxException;
-import java.nio.ByteBuffer;
-import java.nio.channels.SeekableByteChannel;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import com.spectralogic.ds3client.integration.test.helpers.Ds3ClientShim;
-
-import static com.spectralogic.ds3client.integration.Util.RESOURCE_BASE_NAME;
-import static com.spectralogic.ds3client.integration.Util.deleteAllContents;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-public class PutJobManagement_Test {
-
- private static final Ds3Client client = Util.fromEnv();
- private static final Ds3ClientHelpers HELPERS = Ds3ClientHelpers.wrap(client);
- private static final String BUCKET_NAME = "Put_Job_Management_Test";
-
- private static final String TEST_ENV_NAME = "PutJobManagement_Test";
- private static TempStorageIds envStorageIds;
- private static UUID envDataPolicyId;
-
- @BeforeClass
- public static void startup() throws IOException {
- envDataPolicyId = TempStorageUtil.setupDataPolicy(TEST_ENV_NAME, false, ChecksumType.Type.MD5, client);
- envStorageIds = TempStorageUtil.setup(TEST_ENV_NAME, envDataPolicyId, client);
- }
-
- @Before
- public void setupBucket() throws IOException {
- HELPERS.ensureBucketExists(BUCKET_NAME, envDataPolicyId);
- }
-
- @AfterClass
- public static void teardown() throws IOException {
- TempStorageUtil.teardown(TEST_ENV_NAME, envStorageIds, client);
- client.close();
- }
-
- private long getCacheBytesAvailable() throws IOException {
- long cacheAvailableBytes = 0;
- final List cacheFilesystemInformationList = client.getCacheStateSpectraS3(
- new GetCacheStateSpectraS3Request()).getCacheInformationResult().getFilesystems();
- for (final CacheFilesystemInformation filesystemInformation : cacheFilesystemInformationList) {
- if (filesystemInformation.getAvailableCapacityInBytes() > cacheAvailableBytes) {
- cacheAvailableBytes = filesystemInformation.getAvailableCapacityInBytes();
- }
- }
- return cacheAvailableBytes;
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void nakedS3Put() throws IOException, URISyntaxException {
- try {
- final Path beowulfPath = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + "beowulf.txt");
- final SeekableByteChannel beowulfChannel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel("beowulf.txt");
- final PutObjectResponse putObjectResponse = client.putObject(new PutObjectRequest(BUCKET_NAME, "beowulf.txt",
- beowulfChannel, Files.size(beowulfPath)));
- assertThat(putObjectResponse, is(notNullValue()));
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void getActiveJobs() throws IOException, URISyntaxException {
- try {
- final UUID jobID = HELPERS
- .startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2))).getJobId();
- final GetActiveJobsSpectraS3Response activeJobsResponse = client.
- getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request());
- final ArrayList activeJobsUUIDs = new ArrayList<>();
- for (final ActiveJob job : activeJobsResponse.getActiveJobListResult().getActiveJobs()) {
- activeJobsUUIDs.add(job.getId());
- }
- assertThat(activeJobsUUIDs, contains(jobID));
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void getJobs() throws IOException {
- try {
- final UUID jobID = HELPERS
- .startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2))).getJobId();
- final GetJobsSpectraS3Response getJobsResponse = client.
- getJobsSpectraS3(new GetJobsSpectraS3Request());
- final ArrayList jobUUIDs = new ArrayList<>();
- for (final Job job : getJobsResponse.getJobListResult().getJobs()) {
- jobUUIDs.add(job.getJobId());
- }
- assertThat(jobUUIDs, contains(jobID));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void modifyJobPriority() throws IOException {
- try {
- final Ds3ClientHelpers.Job job =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2)),
- WriteJobOptions.create().withPriority(Priority.LOW));
-
- client.modifyJobSpectraS3(new ModifyJobSpectraS3Request(job.getJobId().toString())
- .withPriority(Priority.HIGH));
-
- final GetJobSpectraS3Response response = client
- .getJobSpectraS3(new GetJobSpectraS3Request(job.getJobId().toString()));
-
- assertThat(response.getMasterObjectListResult().getPriority(), is(Priority.HIGH));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void modifyJobName() throws IOException {
-
- try {
- final Ds3ClientHelpers.Job job =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
-
- client.modifyJobSpectraS3(new ModifyJobSpectraS3Request(job.getJobId().toString())
- .withName("newName"));
-
- final GetJobSpectraS3Response response = client
- .getJobSpectraS3(new GetJobSpectraS3Request(job.getJobId().toString()));
-
- assertThat(response.getMasterObjectListResult().getName(), is("newName"));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void modifyJobCreationDate() throws IOException {
-
- try {
- final Ds3ClientHelpers.Job job =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
- final GetJobSpectraS3Response jobResponse = client
- .getJobSpectraS3(new GetJobSpectraS3Request(job.getJobId().toString()));
-
- final Date originalDate = jobResponse.getMasterObjectListResult().getStartDate();
- final Date newDate = new Date(originalDate.getTime() - 1000);
-
- client.modifyJobSpectraS3(new ModifyJobSpectraS3Request(job.getJobId().toString())
- .withCreatedAt(newDate));
-
- final GetJobSpectraS3Response responseAfterModify = client
- .getJobSpectraS3(new GetJobSpectraS3Request(job.getJobId().toString()));
-
- assertThat(responseAfterModify.getMasterObjectListResult().getStartDate(), is(newDate));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void cancelJob() throws IOException {
-
- try {
- final Ds3ClientHelpers.Job job =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
-
- final CancelJobSpectraS3Response response = client
- .cancelJobSpectraS3(new CancelJobSpectraS3Request(job.getJobId().toString()));
- assertThat(response, is(notNullValue()));
-
- assertTrue(client.getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request())
- .getActiveJobListResult().getActiveJobs().isEmpty());
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void clearAllCanceledJobs() throws IOException {
-
- try {
- final Ds3ClientHelpers.Job job =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
- client.cancelJobSpectraS3(new CancelJobSpectraS3Request(job.getJobId().toString()));
- client.clearAllCanceledJobsSpectraS3(new ClearAllCanceledJobsSpectraS3Request());
- final List canceledJobsList = client.
- getCanceledJobsSpectraS3(new GetCanceledJobsSpectraS3Request())
- .getCanceledJobListResult().getCanceledJobs();
-
- assertTrue(canceledJobsList.isEmpty());
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void truncatePutJob() throws Exception {
-
- final int testTimeOutSeconds = 5;
- final String book1 = "beowulf.txt";
- final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
- final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
- final Ds3Object obj2 = new Ds3Object("place_holder", 5000000);
-
- try {
- final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(obj1, obj2));
- final UUID jobId = putJob.getJobId();
- final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
-
- client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId, 0, Files.size(objPath1)));
- ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId, client, 20);
-
- final TruncateJobSpectraS3Response truncateJobSpectraS3Response = client.truncateJobSpectraS3(
- new TruncateJobSpectraS3Request(jobId.toString()));
- assertThat(truncateJobSpectraS3Response, is(notNullValue()));
-
- final GetJobSpectraS3Response truncatedJob = client.getJobSpectraS3(new GetJobSpectraS3Request(jobId.toString()));
- assertEquals(truncatedJob.getMasterObjectListResult().getOriginalSizeInBytes(), Files.size(objPath1));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void cancelJobWithForce() throws Exception {
-
- final int testTimeOutSeconds = 5;
-
- final String book1 = "beowulf.txt";
- final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
- final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
- final Ds3Object obj2 = new Ds3Object("place_holder", 5000000);
-
- try {
- final Ds3ClientHelpers.Job putJob = HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(obj1, obj2));
- final UUID jobId = putJob.getJobId();
- final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
-
- client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId, 0, Files.size(objPath1)));
- ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId, client, 20);
-
- final CancelJobSpectraS3Response responseWithForce = client
- .cancelJobSpectraS3(new CancelJobSpectraS3Request(jobId.toString()));
- assertThat(responseWithForce, is(notNullValue()));
-
- //Allow for lag time before canceled job appears~1.5 seconds in unloaded system
- final long startTimeCanceledUpdate = System.nanoTime();
- boolean jobCanceled = false;
- while (!jobCanceled) {
- Thread.sleep(500);
- final GetCanceledJobsSpectraS3Response canceledJobs = client.getCanceledJobsSpectraS3(new GetCanceledJobsSpectraS3Request());
- for (final CanceledJob canceledJob : canceledJobs.getCanceledJobListResult().getCanceledJobs()) {
- if (canceledJob.getId().equals(jobId)) {
- jobCanceled = true;
- }
- }
- assertThat((System.nanoTime() - startTimeCanceledUpdate) / 1000000000, lessThan((long) testTimeOutSeconds));
- }
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void cancelAllJobs() throws IOException {
-
- try {
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("testOne", 2)));
- final List objectsTwo = Lists.newArrayList(new Ds3Object("testTwo", 2));
- HELPERS.startWriteJob(BUCKET_NAME, objectsTwo);
- client.cancelAllJobsSpectraS3(new CancelAllJobsSpectraS3Request());
-
- assertTrue(client.getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request())
- .getActiveJobListResult().getActiveJobs().isEmpty());
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void truncateAllJobs() throws Exception {
-
- final int testTimeOutSeconds = 5;
- final String book1 = "beowulf.txt";
- final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
- final String book2 = "ulysses.txt";
- final Path objPath2 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book2);
- final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
- final Ds3Object obj2 = new Ds3Object("place_holder_1", 5000000);
- final Ds3Object obj3 = new Ds3Object(book2, Files.size(objPath2));
- final Ds3Object obj4 = new Ds3Object("place_holder_2", 5000000);
-
- try {
- final Ds3ClientHelpers.Job putJob1 = HELPERS.startWriteJob(BUCKET_NAME, Lists
- .newArrayList(obj1, obj2));
- final UUID jobId1 = putJob1.getJobId();
- final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
- client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId1.toString(), 0, Files.size(objPath1)));
-
- final Ds3ClientHelpers.Job putJob2 = HELPERS.startWriteJob(BUCKET_NAME, Lists
- .newArrayList(obj3, obj4));
- final UUID jobId2 = putJob2.getJobId();
- final SeekableByteChannel book2Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book2);
- client.putObject(new PutObjectRequest(BUCKET_NAME, book2, book2Channel, jobId2.toString(), 0, Files.size(objPath2)));
-
- HELPERS.startWriteJob(BUCKET_NAME, Lists
- .newArrayList(new Ds3Object("place_holder_3", 1000000)));
-
- ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId1, client, 20);
- ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId2, client, 20);
-
- final TruncateAllJobsSpectraS3Response truncateAllJobsSpectraS3Response = client
- .truncateAllJobsSpectraS3(new TruncateAllJobsSpectraS3Request());
-
- assertThat(truncateAllJobsSpectraS3Response, is(notNullValue()));
-
- final GetJobSpectraS3Response truncatedJob1 = client.getJobSpectraS3(new GetJobSpectraS3Request(jobId1.toString()));
- assertEquals(truncatedJob1.getMasterObjectListResult().getOriginalSizeInBytes(), Files.size(objPath1));
-
- final GetJobSpectraS3Response truncatedJob2 = client.getJobSpectraS3(new GetJobSpectraS3Request(jobId2.toString()));
- assertEquals(truncatedJob2.getMasterObjectListResult().getOriginalSizeInBytes(), Files.size(objPath2));
-
- assertThat(client.getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request())
- .getActiveJobListResult().getActiveJobs().size(), is(2));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void cancelAllJobsWithForce() throws Exception {
-
- final int testTimeOutSeconds = 5;
- final String book1 = "beowulf.txt";
- final Path objPath1 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book1);
- final String book2 = "ulysses.txt";
- final Path objPath2 = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + book2);
- final Ds3Object obj1 = new Ds3Object(book1, Files.size(objPath1));
- final Ds3Object obj2 = new Ds3Object("place_holder_1", 5000000);
- final Ds3Object obj3 = new Ds3Object(book2, Files.size(objPath2));
- final Ds3Object obj4 = new Ds3Object("place_holder_2", 5000000);
-
- try {
- final Ds3ClientHelpers.Job putJob1 = HELPERS.startWriteJob(BUCKET_NAME, Lists
- .newArrayList(obj1, obj2));
- final UUID jobId1 = putJob1.getJobId();
- final SeekableByteChannel book1Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book1);
- client.putObject(new PutObjectRequest(BUCKET_NAME, book1, book1Channel, jobId1.toString(), 0, Files.size(objPath1)));
-
- final Ds3ClientHelpers.Job putJob2 = HELPERS.startWriteJob(BUCKET_NAME, Lists
- .newArrayList(obj3, obj4));
- final UUID jobId2 = putJob2.getJobId();
- final SeekableByteChannel book2Channel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel(book2);
- client.putObject(new PutObjectRequest(BUCKET_NAME, book2, book2Channel, jobId2.toString(), 0, Files.size(objPath2)));
-
- HELPERS.startWriteJob(BUCKET_NAME, Lists
- .newArrayList(new Ds3Object("place_holder_3", 1000000)));
-
- ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId1, client, 20);
- ABMTestHelper.waitForJobCachedSizeToBeMoreThanZero(jobId2, client, 20);
-
- client.cancelAllJobsSpectraS3(new CancelAllJobsSpectraS3Request());
-
- assertTrue(client.getActiveJobsSpectraS3(new GetActiveJobsSpectraS3Request())
- .getActiveJobListResult().getActiveJobs().isEmpty());
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void getCanceledJobs() throws IOException {
-
- try {
- final Ds3ClientHelpers.Job jobOne =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2)));
- final UUID jobOneId = jobOne.getJobId();
- client.cancelJobSpectraS3(new CancelJobSpectraS3Request(jobOneId.toString()));
-
- final GetCanceledJobsSpectraS3Response getCanceledJobsResponse = client
- .getCanceledJobsSpectraS3(new GetCanceledJobsSpectraS3Request());
-
- final List canceledJobsUUIDs = new ArrayList<>();
- for (final CanceledJob job : getCanceledJobsResponse.getCanceledJobListResult().getCanceledJobs()) {
- canceledJobsUUIDs.add(job.getId());
- }
-
- assertTrue(canceledJobsUUIDs.contains(jobOneId));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void getJobChunksReady() throws IOException {
-
- try {
- final Ds3Object ds3Object = new Ds3Object("test", 2);
- final Ds3ClientHelpers.Job jobOne =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(ds3Object));
- final UUID jobOneId = jobOne.getJobId();
-
- final GetJobChunksReadyForClientProcessingSpectraS3Response response = client
- .getJobChunksReadyForClientProcessingSpectraS3
- (new GetJobChunksReadyForClientProcessingSpectraS3Request(jobOneId.toString()));
-
- final List chunkNames = new ArrayList<>();
- for (final Objects objectList : response.getMasterObjectListResult().getObjects()) {
- for (final BulkObject bulkObject : objectList.getObjects()) {
- chunkNames.add(bulkObject.getName());
- }
- }
-
- assertThat(chunkNames, contains(ds3Object.getName()));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void getJobChunk() throws IOException {
-
- try {
- final Ds3Object ds3Object = new Ds3Object("test", 2);
- final Ds3ClientHelpers.Job jobOne =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(ds3Object));
- final UUID jobOneId = jobOne.getJobId();
-
- final GetJobChunksReadyForClientProcessingSpectraS3Response response = client
- .getJobChunksReadyForClientProcessingSpectraS3
- (new GetJobChunksReadyForClientProcessingSpectraS3Request(jobOneId));
-
- final UUID aJobChunkID = response.getMasterObjectListResult().getObjects().get(0).getChunkId();
-
- final GetJobChunkSpectraS3Response getJobChunkSpectraS3Response = client.getJobChunkSpectraS3(
- new GetJobChunkSpectraS3Request(aJobChunkID));
-
- assertThat(getJobChunkSpectraS3Response.getObjectsResult(), is(notNullValue()));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void aggregateTwoJobs() throws IOException {
-
- try {
- final WriteJobOptions writeJobOptions = WriteJobOptions.create().withAggregating();
-
- final Ds3ClientHelpers.Job jobOne =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2)), writeJobOptions);
- final UUID jobOneId = jobOne.getJobId();
-
- final Ds3ClientHelpers.Job jobTwo =
- HELPERS.startWriteJob(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test2", 2)), writeJobOptions);
- final UUID jobTwoId = jobTwo.getJobId();
-
- assertThat(jobOneId, is(jobTwoId));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void allocateJobChunk() throws IOException {
-
- try {
- final PutBulkJobSpectraS3Response putBulkResponse = client.
- putBulkJobSpectraS3(new PutBulkJobSpectraS3Request(BUCKET_NAME, Lists.newArrayList(new Ds3Object("test", 2))));
- final UUID chunkUUID = putBulkResponse.getMasterObjectList().getObjects().get(0).getChunkId();
- final AllocateJobChunkSpectraS3Response allocateResponse = client
- .allocateJobChunkSpectraS3(new AllocateJobChunkSpectraS3Request(chunkUUID.toString()));
-
- assertThat(allocateResponse.getStatus(), is(AllocateJobChunkSpectraS3Response.Status.ALLOCATED));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void putObjectCachedNotification() throws IOException {
- final PutObjectCachedNotificationRegistrationSpectraS3Response putNotificationResponse = client
- .putObjectCachedNotificationRegistrationSpectraS3
- (new PutObjectCachedNotificationRegistrationSpectraS3Request("test@test.test"));
-
- assertThat(putNotificationResponse.getS3ObjectCachedNotificationRegistrationResult(), is(notNullValue()));
- }
-
- @Test
- public void getObjectCachedNotification() throws IOException {
-
- final PutObjectCachedNotificationRegistrationSpectraS3Response putNotificationResponse = client
- .putObjectCachedNotificationRegistrationSpectraS3
- (new PutObjectCachedNotificationRegistrationSpectraS3Request("test@test.test"));
- final GetObjectCachedNotificationRegistrationSpectraS3Response getNotificationResponse = client
- .getObjectCachedNotificationRegistrationSpectraS3(
- (new GetObjectCachedNotificationRegistrationSpectraS3Request
- (putNotificationResponse.getS3ObjectCachedNotificationRegistrationResult().getId().toString())));
-
- assertThat(getNotificationResponse.getS3ObjectCachedNotificationRegistrationResult(), is(notNullValue()));
- }
-
- @Test
- public void getCompletedJobs() throws IOException {
- final GetCompletedJobsSpectraS3Response getCompletedJobsResponse = client.
- getCompletedJobsSpectraS3(new GetCompletedJobsSpectraS3Request());
-
- assertThat(getCompletedJobsResponse.getCompletedJobListResult(), is(notNullValue()));
- }
-
- @Test
- public void clearCompletedJobs() throws IOException {
- final ClearAllCompletedJobsSpectraS3Response clearAllCompletedJobsResponse = client
- .clearAllCompletedJobsSpectraS3(new ClearAllCompletedJobsSpectraS3Request());
-
- assertThat(clearAllCompletedJobsResponse, is(notNullValue()));
- }
-
- @Test
- public void putJobCreatedNotification() throws IOException {
- UUID notificationUUID = null;
- try {
- final PutJobCreatedNotificationRegistrationSpectraS3Response response = client
- .putJobCreatedNotificationRegistrationSpectraS3(new PutJobCreatedNotificationRegistrationSpectraS3Request("test@test.test"));
- notificationUUID = response.getJobCreatedNotificationRegistrationResult().getId();
- assertThat(response.getJobCreatedNotificationRegistrationResult(), is(notNullValue()));
-
- } finally {
- if (notificationUUID != null) {
- client.deleteJobCreatedNotificationRegistrationSpectraS3(
- new DeleteJobCreatedNotificationRegistrationSpectraS3Request(notificationUUID));
- }
- }
- }
-
- @Test
- public void getJobCreatedNotification() throws IOException {
- UUID notificationUUID = null;
- try {
- notificationUUID = client.putJobCreatedNotificationRegistrationSpectraS3(
- new PutJobCreatedNotificationRegistrationSpectraS3Request("test@test.test"))
- .getJobCreatedNotificationRegistrationResult().getId();
-
- final GetJobCreatedNotificationRegistrationSpectraS3Response response = client
- .getJobCreatedNotificationRegistrationSpectraS3(new
- GetJobCreatedNotificationRegistrationSpectraS3Request(notificationUUID));
-
- assertThat(response.getJobCreatedNotificationRegistrationResult(), is(notNullValue()));
-
- } finally {
- if (notificationUUID != null) {
- client.deleteJobCreatedNotificationRegistrationSpectraS3(
- new DeleteJobCreatedNotificationRegistrationSpectraS3Request(notificationUUID));
- }
- }
- }
-
- @Test
- public void deleteJobCreatedNotification() throws IOException {
- final UUID notificationUUID = client.putJobCreatedNotificationRegistrationSpectraS3(
- new PutJobCreatedNotificationRegistrationSpectraS3Request("test@test.test"))
- .getJobCreatedNotificationRegistrationResult().getId();
-
- final DeleteJobCreatedNotificationRegistrationSpectraS3Response response = client
- .deleteJobCreatedNotificationRegistrationSpectraS3(new DeleteJobCreatedNotificationRegistrationSpectraS3Request(notificationUUID));
-
- assertThat(response, is(notNullValue()));
- }
-
- @Test
- public void putJobCompletedNotification() throws IOException {
- UUID notificationUUID = null;
- try {
- final PutJobCompletedNotificationRegistrationSpectraS3Response response = client
- .putJobCompletedNotificationRegistrationSpectraS3(
- new PutJobCompletedNotificationRegistrationSpectraS3Request("test@test.test"));
- notificationUUID = response.getJobCompletedNotificationRegistrationResult().getId();
- assertThat(response.getJobCompletedNotificationRegistrationResult(), is(notNullValue()));
- } finally {
- if (notificationUUID != null) {
- client.deleteJobCompletedNotificationRegistrationSpectraS3(
- new DeleteJobCompletedNotificationRegistrationSpectraS3Request(notificationUUID));
- }
- }
- }
-
- @Test
- public void getJobCompletedNotification() throws IOException {
- UUID notificationUUID = null;
- try {
- notificationUUID = client.putJobCompletedNotificationRegistrationSpectraS3(
- new PutJobCompletedNotificationRegistrationSpectraS3Request("test@test.test"))
- .getJobCompletedNotificationRegistrationResult().getId();
-
- final GetJobCompletedNotificationRegistrationSpectraS3Response response = client
- .getJobCompletedNotificationRegistrationSpectraS3(
- new GetJobCompletedNotificationRegistrationSpectraS3Request(notificationUUID));
-
- assertThat(response.getJobCompletedNotificationRegistrationResult(), is(notNullValue()));
-
- } finally {
- if (notificationUUID != null) {
- client.deleteJobCompletedNotificationRegistrationSpectraS3(
- new DeleteJobCompletedNotificationRegistrationSpectraS3Request(notificationUUID));
- }
- }
- }
-
- @Test
- public void deleteJobCompletedNotification() throws IOException {
- final UUID notificationUUID = client.putJobCompletedNotificationRegistrationSpectraS3(
- new PutJobCompletedNotificationRegistrationSpectraS3Request("test@test.test"))
- .getJobCompletedNotificationRegistrationResult().getId();
-
- final DeleteJobCompletedNotificationRegistrationSpectraS3Response response = client
- .deleteJobCompletedNotificationRegistrationSpectraS3(
- new DeleteJobCompletedNotificationRegistrationSpectraS3Request(notificationUUID));
-
- assertThat(response, is(notNullValue()));
- }
-
- @Test
- public void initiateMultipartUpload() throws IOException {
- try {
- final InitiateMultiPartUploadResponse multiPartUploadResponse = client.initiateMultiPartUpload(
- new InitiateMultiPartUploadRequest(BUCKET_NAME, "beowulf"));
-
- assertThat(multiPartUploadResponse.getInitiateMultipartUploadResult(), is(notNullValue()));
- } catch (final FailedRequestException e) {
-
- assertThat(getCacheBytesAvailable(), lessThan(5000000000000L));
- assertThat(e.getStatusCode(), is(400));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void abortMultipartUpload() throws IOException {
- String uploadID = null;
- try {
- try {
- final InitiateMultiPartUploadResponse multiPartUploadResponse = client.initiateMultiPartUpload(
- new InitiateMultiPartUploadRequest(BUCKET_NAME, "beowulf"));
- uploadID = multiPartUploadResponse.getInitiateMultipartUploadResult().getUploadId();
- } catch (final FailedRequestException e) {
- assertThat(getCacheBytesAvailable(), lessThan(5000000000000L));
- assertThat(e.getStatusCode(), is(400));
- }
-
- final UUID uuid;
- if (uploadID != null) {
- uuid = UUID.fromString(uploadID);
- } else {
- uuid = UUID.randomUUID();
- }
-
- final AbortMultiPartUploadResponse abortResponse = client.abortMultiPartUpload(
- new AbortMultiPartUploadRequest(BUCKET_NAME, "beowulf", uuid));
-
- assertThat(abortResponse, is(notNullValue()));
-
- } catch (final FailedRequestException e) {
-
- assertThat(e.getStatusCode(), is(404));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test //TODO expand positive test if test target >5 TB cache is available
- public void listMultiPartUploadParts() throws IOException {
- try {
- final ListMultiPartUploadPartsResponse response = client.listMultiPartUploadParts(
- new ListMultiPartUploadPartsRequest(BUCKET_NAME, "beowulf", UUID.randomUUID()));
-
- assertThat(response.getListPartsResult(), is(notNullValue()));
- assertTrue(response.getListPartsResult().getParts().isEmpty());
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test //TODO expand positive test if test target >5 TB cache is available
- public void completeMultiPartUpload() throws IOException {
- try {
- client.completeMultiPartUpload(
- //Passing in a null request payload, which is sufficient for checking error code
- new CompleteMultiPartUploadRequest(BUCKET_NAME, "beowulf", null, UUID.randomUUID()));
-
- fail("Response should have failed because upload part does not exist");
-
- } catch (final FailedRequestException e) {
-
- assertThat(e.getStatusCode(), is(404));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test //TODO expand positive test if test target >5 TB cache is available
- public void listMultiPartUploads() throws IOException {
- try {
- final ListMultiPartUploadsResponse response = client.listMultiPartUploads(
- new ListMultiPartUploadsRequest(BUCKET_NAME));
-
- assertThat(response.getListMultiPartUploadsResult(), is(notNullValue()));
- assertTrue(response.getListMultiPartUploadsResult().getUploads().isEmpty());
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test //TODO expand positive test if test target >5 TB cache is available
- public void putMultiPartUploadPart() throws IOException {
- try {
- final int length = 1024;
- final Ds3Object obj = new Ds3Object("obj.txt", length);
- final byte[] randomData = IOUtils.toByteArray(new RandomDataInputStream(System.currentTimeMillis(), obj.getSize()));
- final ByteBuffer randomBuffer = ByteBuffer.wrap(randomData);
-
- final ByteArraySeekableByteChannel channel = new ByteArraySeekableByteChannel(length);
- channel.write(randomBuffer);
-
- client.putMultiPartUploadPart(
- new PutMultiPartUploadPartRequest(BUCKET_NAME, obj.getName(), channel, 5, length, UUID.randomUUID()));
-
- fail("Response should have failed because part does not exist");
-
- } catch (final FailedRequestException e) {
-
- assertThat(e.getStatusCode(), is(404));
-
- } finally {
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void testWriteJobWithRetries() throws Exception {
- final int maxNumObjectTransferAttempts = 3;
- transferAndCheckFileContent(maxNumObjectTransferAttempts,
- new ObjectTransferExceptionHandler() {
- @Override
- public boolean handleException(final Throwable t) {
- fail("Got unexpected exception: " + t.getMessage());
- return false;
- }
- });
- }
-
- private void transferAndCheckFileContent(final int maxNumObjectTransferAttempts,
- final ObjectTransferExceptionHandler objectTransferExceptionHandler)
- throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, IOException, URISyntaxException
- {
- final String userAgent = "Agent Provocateur";
-
- final Ds3Client clientWithUserAgent = Ds3ClientBuilder.fromEnv()
- .withUserAgent(userAgent)
- .withHttps(false)
- .build();
-
- final Ds3ClientShim ds3ClientShim = new Ds3ClientShim((Ds3ClientImpl) clientWithUserAgent);
-
- final String tempPathPrefix = null;
- final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final String DIR_NAME = "largeFiles/";
- final String[] FILE_NAMES = new String[]{"lesmis.txt"};
-
- final Path dirPath = ResourceUtils.loadFileResource(DIR_NAME);
-
- final List bookTitles = new ArrayList<>();
- final List objects = new ArrayList<>();
- for (final String book : FILE_NAMES) {
- final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
- final long bookSize = Files.size(objPath);
- final Ds3Object obj = new Ds3Object(book, bookSize);
-
- bookTitles.add(book);
- objects.add(obj);
- }
-
- final int maxNumBlockAllocationRetries = 1;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3ClientShim,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final IntValue intValue = new IntValue();
-
- final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, objects);
- writeJob.attachObjectCompletedListener(new ObjectCompletedListener() {
- private int numCompletedObjects = 0;
-
- @Override
- public void objectCompleted(final String name) {
- assertTrue(bookTitles.contains(name));
- assertEquals(1, ++numCompletedObjects);
- intValue.increment();
- }
- });
-
- boolean shouldContinueTest = true;
-
- try {
- writeJob.transfer(new FileObjectPutter(dirPath));
- } catch (final Throwable t) {
- shouldContinueTest = objectTransferExceptionHandler.handleException(t);
- }
-
- if (!shouldContinueTest) {
- return;
- }
-
- assertEquals(1, intValue.getValue());
-
- final GetBucketResponse request = ds3ClientShim.getBucket(new GetBucketRequest(BUCKET_NAME));
- final ListBucketResult result = request.getListBucketResult();
-
- assertEquals(bookTitles.size(), result.getObjects().size());
-
- for (final Contents contents : result.getObjects()) {
- assertTrue(bookTitles.contains(contents.getKey()));
- }
-
- final Ds3ClientHelpers.Job readJob = Ds3ClientHelpers.wrap(ds3ClientShim, 1)
- .startReadAllJob(BUCKET_NAME);
- readJob.attachObjectCompletedListener(new ObjectCompletedListener() {
- @Override
- public void objectCompleted(final String name) {
- assertTrue(bookTitles.contains(name));
-
- try {
- final File originalFile = ResourceUtils.loadFileResource(DIR_NAME + FILE_NAMES[0]).toFile();
- final File fileCopiedFromBP = Paths.get(tempDirectory.toString(), FILE_NAMES[0]).toFile();
- assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
- } catch (final URISyntaxException | IOException e) {
- fail("Failure trying to compare file we wrote to file we read.");
- }
- }
- });
-
- readJob.transfer(new FileObjectGetter(tempDirectory));
- } finally {
- FileUtils.deleteDirectory(tempDirectory.toFile());
- deleteAllContents(ds3ClientShim, BUCKET_NAME);
- }
- }
-
- private interface ObjectTransferExceptionHandler {
- boolean handleException(final Throwable t);
- }
-
- @Test
- public void testWriteJobWithRetriesThrowsDs3NoMoreRetriesException() throws Exception {
- final int maxNumObjectTransferAttempts = 1;
- transferAndCheckFileContent(maxNumObjectTransferAttempts,
- new ObjectTransferExceptionHandler() {
- @Override
- public boolean handleException(final Throwable t) {
- if (!(t instanceof Ds3NoMoreRetriesException)) {
- fail("Got exception of unexpected type: " + t.getMessage());
- return true;
- }
-
- return false;
- }
- });
- }
-
- @Test
- public void testFiringOnFailureEventWithFailedChunkAllocation()
- throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
- final String tempPathPrefix = null;
- final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final IntValue numFailureEventsFired = new IntValue();
-
- final int maxNumObjectTransferAttempts = 1;
- final Ds3ClientHelpers.Job writeJob = createWriteJobWithObjectsReadyToTransfer(maxNumObjectTransferAttempts,
- ClientFailureType.ChunkAllocation);
-
- final FailureEventListener failureEventListener = new FailureEventListener() {
- @Override
- public void onFailure(final FailureEvent failureEvent) {
- numFailureEventsFired.increment();
- assertEquals(FailureEvent.FailureActivity.PuttingObject, failureEvent.doingWhat());
- }
- };
-
- writeJob.attachFailureEventListener(failureEventListener);
-
- try {
- writeJob.transfer(new FileObjectPutter(tempDirectory));
- } catch (final Ds3NoMoreRetriesException e) {
- assertEquals(1, numFailureEventsFired.getValue());
- }
- } finally {
- FileUtils.deleteDirectory(tempDirectory.toFile());
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- Ds3ClientHelpers.Job createWriteJobWithObjectsReadyToTransfer(final int maxNumObjectTransferAttempts,
- final ClientFailureType clientFailureType)
- throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
- final String DIR_NAME = "largeFiles/";
- final String[] FILE_NAMES = new String[]{"lesmis-copies.txt"};
-
- final List bookTitles = new ArrayList<>();
- final List objects = new ArrayList<>();
- for (final String book : FILE_NAMES) {
- final Path objPath = ResourceUtils.loadFileResource(DIR_NAME + book);
- final long bookSize = Files.size(objPath);
- final Ds3Object obj = new Ds3Object(book, bookSize);
-
- bookTitles.add(book);
- objects.add(obj);
- }
-
- final Ds3Client ds3Client = Ds3ClientShimFactory.makeWrappedDs3Client(clientFailureType, client);
-
- final int maxNumBlockAllocationRetries = 3;
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(ds3Client,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, objects);
-
- return writeJob;
- }
-
- @Test
- public void testFiringOnFailureEventWithFailedPutObject()
- throws IOException, URISyntaxException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
- final String tempPathPrefix = null;
- final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final IntValue numFailureEventsFired = new IntValue();
-
- final int maxNumObjectTransferAttempts = 1;
- final Ds3ClientHelpers.Job writeJob = createWriteJobWithObjectsReadyToTransfer(maxNumObjectTransferAttempts,
- ClientFailureType.PutObject);
-
- final FailureEventListener failureEventListener = new FailureEventListener() {
- @Override
- public void onFailure(final FailureEvent failureEvent) {
- numFailureEventsFired.increment();
- assertEquals(FailureEvent.FailureActivity.PuttingObject, failureEvent.doingWhat());
- }
- };
-
- writeJob.attachFailureEventListener(failureEventListener);
-
- try {
- writeJob.transfer(new FileObjectPutter(tempDirectory));
- } catch (final RuntimeException e) {
- assertEquals(1, numFailureEventsFired.getValue());
- }
- } finally {
- FileUtils.deleteDirectory(tempDirectory.toFile());
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-
- @Test
- public void testThatMetadataAccessDoesNotTerminateTransfer() throws IOException, URISyntaxException, InterruptedException {
- final String tempPathPrefix = null;
- final Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- final String fileName = "Gracie.txt";
-
- final Path filePath = Paths.get(tempDirectory.toString(), fileName);
-
- final List ds3Objects = new ArrayList<>();
- ds3Objects.add(new Ds3Object(fileName));
-
- try {
- if ( ! Platform.isWindows()) {
- tempDirectory.toFile().setExecutable(false);
- } else {
- Runtime.getRuntime().exec("icacls " + tempDirectory.toString() + "/deny Everyone(RD)").waitFor();
- }
-
- final int maxNumBlockAllocationRetries = 3;
- final int maxNumObjectTransferAttempts = 3;
-
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client,
- maxNumBlockAllocationRetries,
- maxNumObjectTransferAttempts);
-
- final AtomicInteger numTimesFailureHandlerCalled = new AtomicInteger(0);
-
- final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, ds3Objects);
- writeJob.withMetadata(new MetadataAccessImpl(ImmutableMap.builder().put(fileName, filePath).build(),
- new FailureEventListener() {
- @Override
- public void onFailure(final FailureEvent failureEvent) {
- numTimesFailureHandlerCalled.incrementAndGet();
- assertEquals(FailureEvent.FailureActivity.RecordingMetadata, failureEvent.doingWhat());
- assertEquals(client.getConnectionDetails().getEndpoint(), failureEvent.usingSystemWithEndpoint());
- }
- },
- client.getConnectionDetails().getEndpoint()));
- writeJob.transfer(new FileObjectGetter(Paths.get(".")));
-
- assertEquals(1, numTimesFailureHandlerCalled.get());
- } finally {
- if ( ! Platform.isWindows()) {
- tempDirectory.toFile().setExecutable(true);
- } else {
- Runtime.getRuntime().exec("icacls " + tempDirectory.toString() + "/grant Everyone(RD)").waitFor();
- }
-
- deleteAllContents(client, BUCKET_NAME);
- FileUtils.deleteDirectory(tempDirectory.toFile());
- Files.delete(Paths.get(fileName));
- }
- }
-
- @Test
- public void testPutting15000Files() throws IOException, URISyntaxException {
- final String tempPathPrefix = null;
- Path tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- try {
- final String sourceDirectory = "little_files/";
- final String sourceFileName = "tape.png";
-
- final Path sourceFilePath = ResourceUtils.loadFileResource(sourceDirectory + sourceFileName);
-
- Files.copy(sourceFilePath, Paths.get(tempDirectory.toString(), sourceFileName));
-
- final List fileNames = new ArrayList<>(15001);
- fileNames.add(sourceFileName);
-
- for (int i = 1; i <= 15000; ++i) {
- final String destinationFileName = "tape" + i + ".png";
- fileNames.add(destinationFileName);
- Files.copy(sourceFilePath, Paths.get(tempDirectory.toString(), destinationFileName));
- }
-
- final List ds3Objects = new ArrayList<>();
-
- for (final String fileName : fileNames) {
- final Path filePath = Paths.get(tempDirectory.toString(), fileName);
- final long fileSize = Files.size(filePath);
- final Ds3Object ds3Object = new Ds3Object(fileName, fileSize);
-
- ds3Objects.add(ds3Object);
- }
-
- final Ds3ClientHelpers ds3ClientHelpers = Ds3ClientHelpers.wrap(client);
- final Ds3ClientHelpers.Job writeJob = ds3ClientHelpers.startWriteJob(BUCKET_NAME, ds3Objects);
-
- writeJob.transfer(new FileObjectPutter(tempDirectory));
-
- FileUtils.deleteDirectory(tempDirectory.toFile());
-
- tempDirectory = Files.createTempDirectory(Paths.get("."), tempPathPrefix);
-
- final Ds3ClientHelpers.Job readJob = ds3ClientHelpers.startReadJob(BUCKET_NAME, Lists.newArrayList(
- new Ds3Object(sourceFileName, Files.size(sourceFilePath))));
-
- final GetJobSpectraS3Response jobSpectraS3Response = client.getJobSpectraS3(new GetJobSpectraS3Request(readJob.getJobId()));
-
- assertThat(jobSpectraS3Response.getMasterObjectListResult(), is(notNullValue()));
-
- readJob.transfer(new FileObjectGetter(tempDirectory));
-
- final File originalFile = ResourceUtils.loadFileResource(sourceDirectory + sourceFileName).toFile();
- final File fileCopiedFromBP = Paths.get(tempDirectory.toString(), sourceFileName).toFile();
- assertTrue(FileUtils.contentEquals(originalFile, fileCopiedFromBP));
- } catch (final org.apache.http.client.ClientProtocolException e) {
- fail("This test makes sure that we don't run out of connections when transferring lots of small files. Oops");
- } finally {
- FileUtils.deleteDirectory(tempDirectory.toFile());
- deleteAllContents(client, BUCKET_NAME);
- }
- }
-}
diff --git a/ds3-sdk-samples/build.gradle.kts b/ds3-sdk-samples/build.gradle.kts
new file mode 100644
index 000000000..e06d4df38
--- /dev/null
+++ b/ds3-sdk-samples/build.gradle.kts
@@ -0,0 +1,30 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+plugins {
+ `ds3-java-sdk-internal-convention`
+ `application`
+}
+
+dependencies {
+ implementation(project(":ds3-sdk"))
+ implementation(project(":ds3-utils"))
+
+ implementation(libs.guava)
+}
+
+application {
+ mainClass.set("com.spectralogic.ds3client.samples.PartialObjectGetExample")
+}
\ No newline at end of file
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkGetWithMetadata.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkGetWithMetadata.java
index fbe635f5a..fea3d13ab 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkGetWithMetadata.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkGetWithMetadata.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -71,6 +71,6 @@ private static void printMetadata(final String objectName, final Metadata metada
.append("> ");
}
- System.out.println(builder.toString());
+ System.out.println(builder);
}
}
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutExample.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutExample.java
index 942dcf0aa..b59724940 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutExample.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutExample.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutWithChecksums.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutWithChecksums.java
index 52f37cc02..349271d3a 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutWithChecksums.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutWithChecksums.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutWithMetadata.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutWithMetadata.java
index 6d1c7fe6a..227cf21bd 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutWithMetadata.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/BulkPutWithMetadata.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -57,7 +57,7 @@ public static void main(final String[] args) throws IOException {
public Map getMetadataValue(final String objectName) {
// Return a map of the metadata that you want assigned to the request object
final Map metadata = new HashMap<>();
- metadata.put("file-format", "txt");
+ metadata.put("File-Format", "txt");
return metadata;
}
});
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3BulkGetExample.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3BulkGetExample.java
index ae8080a56..03127abf4 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3BulkGetExample.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3BulkGetExample.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3PutObjectRelativePathExample.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3PutObjectRelativePathExample.java
index 252fe4bf9..42bbec3db 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3PutObjectRelativePathExample.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3PutObjectRelativePathExample.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3ServiceListExample.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3ServiceListExample.java
index c4d8a777b..0f1f5b487 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3ServiceListExample.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/Ds3ServiceListExample.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -26,7 +26,6 @@
import com.spectralogic.ds3client.networking.FailedRequestUsingMgmtPortException;
import java.io.IOException;
-import java.net.UnknownHostException;
import java.security.SignatureException;
import java.net.UnknownHostException;
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/PartialObjectGetExample.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/PartialObjectGetExample.java
index e3523df09..16b39243e 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/PartialObjectGetExample.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/PartialObjectGetExample.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/PutEmptyFolderExample.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/PutEmptyFolderExample.java
index 2cb921e58..d2177a58d 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/PutEmptyFolderExample.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/PutEmptyFolderExample.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -19,8 +19,6 @@
import com.spectralogic.ds3client.Ds3ClientBuilder;
import com.spectralogic.ds3client.commands.PutObjectRequest;
import com.spectralogic.ds3client.commands.PutObjectResponse;
-import com.spectralogic.ds3client.commands.spectrads3.GetBucketSpectraS3Request;
-import com.spectralogic.ds3client.commands.spectrads3.GetBucketSpectraS3Response;
import com.spectralogic.ds3client.helpers.Ds3ClientHelpers;
import com.spectralogic.ds3client.models.Contents;
import com.spectralogic.ds3client.networking.FailedRequestException;
diff --git a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/RecoverJobExample.java b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/RecoverJobExample.java
index d4e4ee4e7..bf37a38f0 100644
--- a/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/RecoverJobExample.java
+++ b/ds3-sdk-samples/src/main/java/com/spectralogic/ds3client/samples/RecoverJobExample.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/build.gradle b/ds3-sdk/build.gradle
deleted file mode 100644
index 6688a07f5..000000000
--- a/ds3-sdk/build.gradle
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-import java.nio.file.Files
-import java.nio.file.Path
-
-buildscript {
- repositories { jcenter() }
- dependencies {
- classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
- }
-}
-
-apply plugin: 'com.github.johnrengelman.shadow'
-
-shadowJar {
- relocate 'com.google', 'ds3fatjar.com.google'
- relocate 'org.apache', 'ds3fatjar.org.apache'
- relocate 'org.codehaus', 'ds3fatjar.org.codehaus'
- relocate 'com.fasterxml', 'ds3fatjar.com.fasterxml'
- dependencies {
- exclude(dependency('org.hamcrest:hamcrest-library:1.3'))
- exclude(dependency('org.mockito:mockito-core:1.10.19'))
- exclude(dependency('junit:junit:4.12'))
- exclude(dependency('org.slf4j:slf4j-api:1.7.22'))
- exclude(dependency('org.slf4j:slf4j-simple:1.7.22'))
- exclude(dependency('org.apache.commons:commons-lang3:3.0'))
- }
-}
-
-artifacts {
- archives shadowJar
-}
-
-task genConfigProperties {
- doLast {
- def productionBuild = System.getenv('productionBuild')
- if (productionBuild == null) { productionBuild = 'false' }
-
- File configFile = new File(sourceSets.main.output.resourcesDir, "/ds3_sdk.properties")
- Path configPath = sourceSets.main.output.resourcesDir.toPath()
- if (!Files.exists(configPath)) {
- Files.createDirectories(configPath)
- }
-
- configFile.withWriter{out ->
- out.writeLine("productionBuild=" + productionBuild.toString())
- out.writeLine("version=" + version.toString())
- out.writeLine("build.date=" + new Date().toString())
- }
- }
-}
-
-task zip(type: Zip) {
- from configurations.runtime.allArtifacts.files
- from configurations.runtime
- into (project.name + "-" + project.version)
-}
-
-zip.dependsOn jar
-
-jar {
- from sourceSets.main.allJava
-}
-
-jar.dependsOn genConfigProperties
-
-dependencies {
- compile 'org.apache.httpcomponents:httpclient:4.5.1'
- compile 'org.codehaus.woodstox:woodstox-core-asl:4.4.1'
- compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.7.1'
- compile 'com.google.guava:guava:20.0'
- compile 'com.google.code.findbugs:annotations:3.0.1'
- testCompile 'org.hamcrest:hamcrest-library:1.3'
- testCompile group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'
-}
diff --git a/ds3-sdk/build.gradle.kts b/ds3-sdk/build.gradle.kts
new file mode 100644
index 000000000..e1afa6e9e
--- /dev/null
+++ b/ds3-sdk/build.gradle.kts
@@ -0,0 +1,98 @@
+/*
+ * ******************************************************************************
+ * Copyright 2002 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+import java.time.Instant
+
+plugins {
+ `ds3-java-sdk-library-convention`
+ alias(libs.plugins.shadowPlugin)
+ alias(libs.plugins.gitVersionPlugin)
+}
+
+description = "The BlackPearl SDK module holds the classes used to " +
+ "communicate with the BlackPearl dataport."
+
+dependencies {
+ implementation(platform(libs.jacksonBom))
+
+ api(project(":ds3-interfaces"))
+ api(project(":ds3-utils"))
+
+ implementation(libs.kotlinStdLib)
+ implementation(libs.commonsIo)
+ implementation(libs.guava)
+ implementation(libs.httpclient)
+ implementation(libs.jacksonDatatypeJdk8)
+ implementation(libs.jacksonDataformatXml)
+ implementation(libs.slf4jApi)
+ implementation(libs.findbugs)
+ implementation(libs.woodstoxCoreAsl)
+
+ testImplementation(platform(libs.mockitoBom))
+
+ testImplementation(libs.junit)
+ testImplementation(libs.junitJupiterApi)
+ testImplementation(libs.hamcrest)
+ testImplementation(libs.mockitoCore)
+
+ testRuntimeOnly(libs.junitVintageEngine)
+ testRuntimeOnly(libs.slf4jSimple)
+}
+
+val versionDetails: groovy.lang.Closure by extra
+
+val genConfigProperties by tasks.registering(WriteProperties::class,) {
+ group = BasePlugin.BUILD_GROUP
+ description = "Create properties file with build information."
+ val getProdBuild = { value: String? -> value ?: "false" }
+ val gitDetails = versionDetails()
+ property("productionBuild", getProdBuild(System.getenv("productionBuild")))
+ property("version", version.toString())
+ property("build.date", Instant.now())
+ property("git.commitHash", gitDetails.gitHash)
+ outputFile = file("${buildDir}/ds3_sdk.properties")
+ encoding = "UTF-8"
+}
+
+tasks.jar {
+ dependsOn(genConfigProperties)
+}
+
+tasks.named("shadowJar") {
+ relocate("com.ctc", "ds3fatjar.com.ctc")
+ relocate("com.fasterxml", "ds3fatjar.com.fasterxml")
+ relocate("com.google", "ds3fatjar.com.google")
+ relocate("edu.umd", "ds3fatjar.edu.emd")
+ relocate("kotlin", "ds3fatjar.kotlin")
+ relocate("net.jcip", "ds3fatjar.net.jcip")
+ relocate("org.apache", "ds3fatjar.org.apache")
+ relocate("org.codehaus", "ds3fatjar.org.codehaus")
+ relocate("org.intellij", "ds3fatjar.org.intellij")
+ relocate("org.jetbrains", "ds3fatjar.org.jetbrains")
+ dependencies {
+ exclude(dependency(libs.slf4jApi.get().toString()))
+ }
+ mergeServiceFiles()
+ dependsOn(tasks.jar)
+}
+
+val allProjectJars by tasks.registering(Zip::class) {
+ group = "distribution"
+ description = "Create zip file containing all SDK jars and its dependencies."
+ archiveFileName.set(project.name + "-" + project.version + ".zip")
+ destinationDirectory.set(layout.buildDirectory.dir("dist"))
+ from(configurations.runtimeClasspath)
+ dependsOn(tasks.jar)
+}
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/BulkCommand.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/BulkCommand.java
index f3696985d..7e9370234 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/BulkCommand.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/BulkCommand.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/ConnectionDetailsImpl.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/ConnectionDetailsImpl.java
index 9f931d38a..1376cc703 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/ConnectionDetailsImpl.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/ConnectionDetailsImpl.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -117,8 +117,7 @@ public static ConnectionDetails newForNode(final JobNode node, final ConnectionD
}
private static String buildAuthority(final JobNode node, final ConnectionDetails connectionDetails) {
- return node.getEndPoint() + ":" + Integer.toString(
- connectionDetails.isHttps() ? node.getHttpsPort() : node.getHttpPort());
+ return node.getEndPoint() + ":" + (connectionDetails.isHttps() ? node.getHttpsPort() : node.getHttpPort());
}
private final String endpoint;
@@ -199,7 +198,7 @@ public String getUserAgent() {
return Guard.isStringNullOrEmpty(userAgent) ? getDefaultSdkVersion() : userAgent;
}
- private String getDefaultSdkVersion() {
+ private static String getDefaultSdkVersion() {
final String sdkVersion = PropertyUtils.getSdkVersion();
if (Guard.isStringNullOrEmpty(sdkVersion)) {
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java
index 0268450de..f641645f6 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -37,12 +37,7 @@ public interface Ds3Client extends Closeable {
- AbortMultiPartUploadResponse abortMultiPartUpload(final AbortMultiPartUploadRequest request)
- throws IOException;
-
-
-
- CompleteMultiPartUploadResponse completeMultiPartUpload(final CompleteMultiPartUploadRequest request)
+ CompleteBlobResponse completeBlob(final CompleteBlobRequest request)
throws IOException;
@@ -52,11 +47,6 @@ PutBucketResponse putBucket(final PutBucketRequest request)
- PutMultiPartUploadPartResponse putMultiPartUploadPart(final PutMultiPartUploadPartRequest request)
- throws IOException;
-
-
-
PutObjectResponse putObject(final PutObjectRequest request)
throws IOException;
@@ -95,21 +85,6 @@ HeadBucketResponse headBucket(final HeadBucketRequest request)
HeadObjectResponse headObject(final HeadObjectRequest request)
throws IOException;
-
-
- InitiateMultiPartUploadResponse initiateMultiPartUpload(final InitiateMultiPartUploadRequest request)
- throws IOException;
-
-
-
- ListMultiPartUploadPartsResponse listMultiPartUploadParts(final ListMultiPartUploadPartsRequest request)
- throws IOException;
-
-
-
- ListMultiPartUploadsResponse listMultiPartUploads(final ListMultiPartUploadsRequest request)
- throws IOException;
-
@ResponsePayloadModel("BucketAcl")
@Action("CREATE")
@Resource("BUCKET_ACL")
@@ -240,6 +215,19 @@ GetBucketsSpectraS3Response getBucketsSpectraS3(final GetBucketsSpectraS3Request
ModifyBucketSpectraS3Response modifyBucketSpectraS3(final ModifyBucketSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("CacheThrottleRule")
+ @Action("CREATE")
+ @Resource("CACHE_THROTTLE_RULE")
+
+ PutCacheThrottleRuleSpectraS3Response putCacheThrottleRuleSpectraS3(final PutCacheThrottleRuleSpectraS3Request request)
+ throws IOException;
+
+ @Action("DELETE")
+ @Resource("CACHE_THROTTLE_RULE")
+
+ DeleteCacheThrottleRuleSpectraS3Response deleteCacheThrottleRuleSpectraS3(final DeleteCacheThrottleRuleSpectraS3Request request)
+ throws IOException;
+
@Action("BULK_MODIFY")
@Resource("CACHE_FILESYSTEM")
@@ -267,6 +255,20 @@ GetCacheFilesystemsSpectraS3Response getCacheFilesystemsSpectraS3(final GetCache
GetCacheStateSpectraS3Response getCacheStateSpectraS3(final GetCacheStateSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("CacheThrottleRule")
+ @Action("SHOW")
+ @Resource("CACHE_THROTTLE_RULE")
+
+ GetCacheThrottleRuleSpectraS3Response getCacheThrottleRuleSpectraS3(final GetCacheThrottleRuleSpectraS3Request request)
+ throws IOException;
+
+ @ResponsePayloadModel("CacheThrottleRuleList")
+ @Action("LIST")
+ @Resource("CACHE_THROTTLE_RULE")
+
+ GetCacheThrottleRulesSpectraS3Response getCacheThrottleRulesSpectraS3(final GetCacheThrottleRulesSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("CacheFilesystem")
@Action("MODIFY")
@Resource("CACHE_FILESYSTEM")
@@ -274,6 +276,13 @@ GetCacheStateSpectraS3Response getCacheStateSpectraS3(final GetCacheStateSpectra
ModifyCacheFilesystemSpectraS3Response modifyCacheFilesystemSpectraS3(final ModifyCacheFilesystemSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("CacheThrottleRule")
+ @Action("MODIFY")
+ @Resource("CACHE_THROTTLE_RULE")
+
+ ModifyCacheThrottleRuleSpectraS3Response modifyCacheThrottleRuleSpectraS3(final ModifyCacheThrottleRuleSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("CapacitySummaryContainer")
@Action("LIST")
@Resource("CAPACITY_SUMMARY")
@@ -723,6 +732,8 @@ VerifyUserIsMemberOfGroupSpectraS3Response verifyUserIsMemberOfGroupSpectraS3(fi
@Action("MODIFY")
@Resource("JOB_CHUNK")
+ /** @deprecated Use {@link #getJobChunksReadyForClientProcessingSpectraS3(GetJobChunksReadyForClientProcessingSpectraS3Request)} instead */
+ @Deprecated
AllocateJobChunkSpectraS3Response allocateJobChunkSpectraS3(final AllocateJobChunkSpectraS3Request request)
throws IOException;
@@ -762,6 +773,13 @@ ClearAllCanceledJobsSpectraS3Response clearAllCanceledJobsSpectraS3(final ClearA
ClearAllCompletedJobsSpectraS3Response clearAllCompletedJobsSpectraS3(final ClearAllCompletedJobsSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("MasterObjectList")
+ @Action("MODIFY")
+ @Resource("JOB")
+
+ CloseAggregatingJobSpectraS3Response closeAggregatingJobSpectraS3(final CloseAggregatingJobSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("MasterObjectList")
@Action("MODIFY")
@Resource("BUCKET")
@@ -783,6 +801,12 @@ PutBulkJobSpectraS3Response putBulkJobSpectraS3(final PutBulkJobSpectraS3Request
VerifyBulkJobSpectraS3Response verifyBulkJobSpectraS3(final VerifyBulkJobSpectraS3Request request)
throws IOException;
+ @Action("DELETE")
+ @Resource("JOB_CREATION_FAILED")
+
+ DeleteJobCreationFailureSpectraS3Response deleteJobCreationFailureSpectraS3(final DeleteJobCreationFailureSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("ActiveJob")
@Action("SHOW")
@Resource("ACTIVE_JOB")
@@ -846,6 +870,20 @@ GetJobChunkSpectraS3Response getJobChunkSpectraS3(final GetJobChunkSpectraS3Requ
GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyForClientProcessingSpectraS3(final GetJobChunksReadyForClientProcessingSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("JobCreationFailedList")
+ @Action("LIST")
+ @Resource("JOB_CREATION_FAILED")
+
+ GetJobCreationFailuresSpectraS3Response getJobCreationFailuresSpectraS3(final GetJobCreationFailuresSpectraS3Request request)
+ throws IOException;
+
+ @ResponsePayloadModel("JobEntryList")
+ @Action("LIST")
+ @Resource("JOB_CHUNK_DAO")
+
+ GetJobEntriesSpectraS3Response getJobEntriesSpectraS3(final GetJobEntriesSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("MasterObjectList")
@Action("SHOW")
@Resource("JOB")
@@ -853,6 +891,13 @@ GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyForClient
GetJobSpectraS3Response getJobSpectraS3(final GetJobSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("JobSummaryApiBean")
+ @Action("SHOW")
+ @Resource("JOB")
+
+ GetJobSummarySpectraS3Response getJobSummarySpectraS3(final GetJobSummarySpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("String")
@Action("SHOW")
@Resource("JOB")
@@ -888,6 +933,13 @@ ModifyJobSpectraS3Response modifyJobSpectraS3(final ModifyJobSpectraS3Request re
ReplicatePutJobSpectraS3Response replicatePutJobSpectraS3(final ReplicatePutJobSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("MasterObjectList")
+ @Action("MODIFY")
+ @Resource("BUCKET")
+
+ StageObjectsJobSpectraS3Response stageObjectsJobSpectraS3(final StageObjectsJobSpectraS3Request request)
+ throws IOException;
+
@Action("DELETE")
@Resource("ACTIVE_JOB")
@@ -946,6 +998,13 @@ ModifyNodeSpectraS3Response modifyNodeSpectraS3(final ModifyNodeSpectraS3Request
PutAzureTargetFailureNotificationRegistrationSpectraS3Response putAzureTargetFailureNotificationRegistrationSpectraS3(final PutAzureTargetFailureNotificationRegistrationSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("BucketChangesNotificationRegistration")
+ @Action("CREATE")
+ @Resource("BUCKET_CHANGES_NOTIFICATION_REGISTRATION")
+
+ PutBucketChangesNotificationRegistrationSpectraS3Response putBucketChangesNotificationRegistrationSpectraS3(final PutBucketChangesNotificationRegistrationSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("Ds3TargetFailureNotificationRegistration")
@Action("CREATE")
@Resource("DS3_TARGET_FAILURE_NOTIFICATION_REGISTRATION")
@@ -1043,6 +1102,12 @@ PutTapePartitionFailureNotificationRegistrationSpectraS3Response putTapePartitio
DeleteAzureTargetFailureNotificationRegistrationSpectraS3Response deleteAzureTargetFailureNotificationRegistrationSpectraS3(final DeleteAzureTargetFailureNotificationRegistrationSpectraS3Request request)
throws IOException;
+ @Action("DELETE")
+ @Resource("BUCKET_CHANGES_NOTIFICATION_REGISTRATION")
+
+ DeleteBucketChangesNotificationRegistrationSpectraS3Response deleteBucketChangesNotificationRegistrationSpectraS3(final DeleteBucketChangesNotificationRegistrationSpectraS3Request request)
+ throws IOException;
+
@Action("DELETE")
@Resource("DS3_TARGET_FAILURE_NOTIFICATION_REGISTRATION")
@@ -1135,6 +1200,27 @@ GetAzureTargetFailureNotificationRegistrationSpectraS3Response getAzureTargetFai
GetAzureTargetFailureNotificationRegistrationsSpectraS3Response getAzureTargetFailureNotificationRegistrationsSpectraS3(final GetAzureTargetFailureNotificationRegistrationsSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("BucketChangesNotificationRegistration")
+ @Action("SHOW")
+ @Resource("BUCKET_CHANGES_NOTIFICATION_REGISTRATION")
+
+ GetBucketChangesNotificationRegistrationSpectraS3Response getBucketChangesNotificationRegistrationSpectraS3(final GetBucketChangesNotificationRegistrationSpectraS3Request request)
+ throws IOException;
+
+ @ResponsePayloadModel("BucketChangesNotificationRegistrationList")
+ @Action("LIST")
+ @Resource("BUCKET_CHANGES_NOTIFICATION_REGISTRATION")
+
+ GetBucketChangesNotificationRegistrationsSpectraS3Response getBucketChangesNotificationRegistrationsSpectraS3(final GetBucketChangesNotificationRegistrationsSpectraS3Request request)
+ throws IOException;
+
+ @ResponsePayloadModel("BucketHistoryEventList")
+ @Action("LIST")
+ @Resource("BUCKET_HISTORY")
+
+ GetBucketHistorySpectraS3Response getBucketHistorySpectraS3(final GetBucketHistorySpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("Ds3TargetFailureNotificationRegistration")
@Action("SHOW")
@Resource("DS3_TARGET_FAILURE_NOTIFICATION_REGISTRATION")
@@ -1365,6 +1451,13 @@ GetPhysicalPlacementForObjectsSpectraS3Response getPhysicalPlacementForObjectsSp
GetPhysicalPlacementForObjectsWithFullDetailsSpectraS3Response getPhysicalPlacementForObjectsWithFullDetailsSpectraS3(final GetPhysicalPlacementForObjectsWithFullDetailsSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("S3Object")
+ @Action("BULK_MODIFY")
+ @Resource("OBJECT")
+
+ UndeleteObjectSpectraS3Response undeleteObjectSpectraS3(final UndeleteObjectSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("PhysicalPlacement")
@Action("SHOW")
@Resource("BUCKET")
@@ -1656,6 +1749,13 @@ ModifyStorageDomainSpectraS3Response modifyStorageDomainSpectraS3(final ModifySt
ForceFeatureKeyValidationSpectraS3Response forceFeatureKeyValidationSpectraS3(final ForceFeatureKeyValidationSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("AbmConfigApiBean")
+ @Action("LIST")
+ @Resource("ABM_CONFIG")
+
+ GetAbmConfigSpectraS3Response getAbmConfigSpectraS3(final GetAbmConfigSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("FeatureKeyList")
@Action("LIST")
@Resource("FEATURE_KEY")
@@ -1747,6 +1847,13 @@ CancelOnlineOnAllTapesSpectraS3Response cancelOnlineOnAllTapesSpectraS3(final Ca
CancelOnlineTapeSpectraS3Response cancelOnlineTapeSpectraS3(final CancelOnlineTapeSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("TapeDrive")
+ @Action("MODIFY")
+ @Resource("TAPE_DRIVE")
+
+ CancelTestTapeDriveSpectraS3Response cancelTestTapeDriveSpectraS3(final CancelTestTapeDriveSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("TapeFailureList")
@Action("BULK_MODIFY")
@Resource("TAPE")
@@ -1768,6 +1875,13 @@ CancelVerifyTapeSpectraS3Response cancelVerifyTapeSpectraS3(final CancelVerifyTa
CleanTapeDriveSpectraS3Response cleanTapeDriveSpectraS3(final CleanTapeDriveSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("TapeDrive")
+ @Action("MODIFY")
+ @Resource("TAPE_DRIVE")
+
+ PutDriveDumpSpectraS3Response putDriveDumpSpectraS3(final PutDriveDumpSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("TapeDensityDirective")
@Action("CREATE")
@Resource("TAPE_DENSITY_DIRECTIVE")
@@ -1990,12 +2104,26 @@ InspectAllTapesSpectraS3Response inspectAllTapesSpectraS3(final InspectAllTapesS
InspectTapeSpectraS3Response inspectTapeSpectraS3(final InspectTapeSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("Tape")
+ @Action("MODIFY")
+ @Resource("TAPE")
+
+ MarkTapeForCompactionSpectraS3Response markTapeForCompactionSpectraS3(final MarkTapeForCompactionSpectraS3Request request)
+ throws IOException;
+
@Action("BULK_MODIFY")
@Resource("TAPE_PARTITION")
ModifyAllTapePartitionsSpectraS3Response modifyAllTapePartitionsSpectraS3(final ModifyAllTapePartitionsSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("TapeDrive")
+ @Action("MODIFY")
+ @Resource("TAPE_DRIVE")
+
+ ModifyTapeDriveSpectraS3Response modifyTapeDriveSpectraS3(final ModifyTapeDriveSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("TapePartition")
@Action("MODIFY")
@Resource("TAPE_PARTITION")
@@ -2037,6 +2165,13 @@ RawImportAllTapesSpectraS3Response rawImportAllTapesSpectraS3(final RawImportAll
RawImportTapeSpectraS3Response rawImportTapeSpectraS3(final RawImportTapeSpectraS3Request request)
throws IOException;
+ @ResponsePayloadModel("TapeDrive")
+ @Action("MODIFY")
+ @Resource("TAPE_DRIVE")
+
+ TestTapeDriveSpectraS3Response testTapeDriveSpectraS3(final TestTapeDriveSpectraS3Request request)
+ throws IOException;
+
@ResponsePayloadModel("TapeFailureList")
@Action("BULK_MODIFY")
@Resource("TAPE")
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientBuilder.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientBuilder.java
index c8bc9058b..104ee7f69 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientBuilder.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientBuilder.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -40,6 +40,7 @@ public class Ds3ClientBuilder implements Builder {
static final private String ACCESS_KEY = "DS3_ACCESS_KEY";
static final private String SECRET_KEY = "DS3_SECRET_KEY";
+ private NetworkClient networkClient;
final private String endpoint;
final private Credentials credentials;
@@ -198,11 +199,22 @@ public Ds3ClientBuilder withUserAgent(final String userAgent) {
return this;
}
+ /**
+ * Set a custom NetworkClient implementation. If this is set, all other connection parameters will be ignored.
+ */
+ public Ds3ClientBuilder withNetworkClient(final NetworkClient networkClient) {
+ this.networkClient = networkClient;
+ return this;
+ }
+
/**
* Returns a new Ds3Client instance.
*/
@Override
public Ds3Client build() {
+ if (this.networkClient != null) {
+ return new Ds3ClientImpl(this.networkClient);
+ }
LOG.info("Making connection details for endpoint [{}] using this authorization id [{}]",
this.endpoint, this.credentials.getClientId());
final ConnectionDetailsImpl.Builder connBuilder = ConnectionDetailsImpl
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java
index 8a92e5bb3..ab30c381c 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -46,22 +46,14 @@ public ConnectionDetails getConnectionDetails() {
}
@Override
- public AbortMultiPartUploadResponse abortMultiPartUpload(final AbortMultiPartUploadRequest request) throws IOException {
- return new AbortMultiPartUploadResponseParser().response(this.netClient.getResponse(request));
- }
- @Override
- public CompleteMultiPartUploadResponse completeMultiPartUpload(final CompleteMultiPartUploadRequest request) throws IOException {
- return new CompleteMultiPartUploadResponseParser().response(this.netClient.getResponse(request));
+ public CompleteBlobResponse completeBlob(final CompleteBlobRequest request) throws IOException {
+ return new CompleteBlobResponseParser().response(this.netClient.getResponse(request));
}
@Override
public PutBucketResponse putBucket(final PutBucketRequest request) throws IOException {
return new PutBucketResponseParser().response(this.netClient.getResponse(request));
}
@Override
- public PutMultiPartUploadPartResponse putMultiPartUploadPart(final PutMultiPartUploadPartRequest request) throws IOException {
- return new PutMultiPartUploadPartResponseParser().response(this.netClient.getResponse(request));
- }
- @Override
public PutObjectResponse putObject(final PutObjectRequest request) throws IOException {
return new PutObjectResponseParser().response(this.netClient.getResponse(request));
}
@@ -94,18 +86,6 @@ public HeadObjectResponse headObject(final HeadObjectRequest request) throws IOE
return new HeadObjectResponseParser().response(this.netClient.getResponse(request));
}
@Override
- public InitiateMultiPartUploadResponse initiateMultiPartUpload(final InitiateMultiPartUploadRequest request) throws IOException {
- return new InitiateMultiPartUploadResponseParser().response(this.netClient.getResponse(request));
- }
- @Override
- public ListMultiPartUploadPartsResponse listMultiPartUploadParts(final ListMultiPartUploadPartsRequest request) throws IOException {
- return new ListMultiPartUploadPartsResponseParser().response(this.netClient.getResponse(request));
- }
- @Override
- public ListMultiPartUploadsResponse listMultiPartUploads(final ListMultiPartUploadsRequest request) throws IOException {
- return new ListMultiPartUploadsResponseParser().response(this.netClient.getResponse(request));
- }
- @Override
public PutBucketAclForGroupSpectraS3Response putBucketAclForGroupSpectraS3(final PutBucketAclForGroupSpectraS3Request request) throws IOException {
return new PutBucketAclForGroupSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -182,6 +162,14 @@ public ModifyBucketSpectraS3Response modifyBucketSpectraS3(final ModifyBucketSpe
return new ModifyBucketSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public PutCacheThrottleRuleSpectraS3Response putCacheThrottleRuleSpectraS3(final PutCacheThrottleRuleSpectraS3Request request) throws IOException {
+ return new PutCacheThrottleRuleSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
+ public DeleteCacheThrottleRuleSpectraS3Response deleteCacheThrottleRuleSpectraS3(final DeleteCacheThrottleRuleSpectraS3Request request) throws IOException {
+ return new DeleteCacheThrottleRuleSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public ForceFullCacheReclaimSpectraS3Response forceFullCacheReclaimSpectraS3(final ForceFullCacheReclaimSpectraS3Request request) throws IOException {
return new ForceFullCacheReclaimSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -198,10 +186,22 @@ public GetCacheStateSpectraS3Response getCacheStateSpectraS3(final GetCacheState
return new GetCacheStateSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public GetCacheThrottleRuleSpectraS3Response getCacheThrottleRuleSpectraS3(final GetCacheThrottleRuleSpectraS3Request request) throws IOException {
+ return new GetCacheThrottleRuleSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
+ public GetCacheThrottleRulesSpectraS3Response getCacheThrottleRulesSpectraS3(final GetCacheThrottleRulesSpectraS3Request request) throws IOException {
+ return new GetCacheThrottleRulesSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public ModifyCacheFilesystemSpectraS3Response modifyCacheFilesystemSpectraS3(final ModifyCacheFilesystemSpectraS3Request request) throws IOException {
return new ModifyCacheFilesystemSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public ModifyCacheThrottleRuleSpectraS3Response modifyCacheThrottleRuleSpectraS3(final ModifyCacheThrottleRuleSpectraS3Request request) throws IOException {
+ return new ModifyCacheThrottleRuleSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public GetBucketCapacitySummarySpectraS3Response getBucketCapacitySummarySpectraS3(final GetBucketCapacitySummarySpectraS3Request request) throws IOException {
return new GetBucketCapacitySummarySpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -466,6 +466,8 @@ public VerifyUserIsMemberOfGroupSpectraS3Response verifyUserIsMemberOfGroupSpect
return new VerifyUserIsMemberOfGroupSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ /** @deprecated Use {@link #getJobChunksReadyForClientProcessingSpectraS3(GetJobChunksReadyForClientProcessingSpectraS3Request)} instead */
+ @Deprecated
public AllocateJobChunkSpectraS3Response allocateJobChunkSpectraS3(final AllocateJobChunkSpectraS3Request request) throws IOException {
return new AllocateJobChunkSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -494,6 +496,10 @@ public ClearAllCompletedJobsSpectraS3Response clearAllCompletedJobsSpectraS3(fin
return new ClearAllCompletedJobsSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public CloseAggregatingJobSpectraS3Response closeAggregatingJobSpectraS3(final CloseAggregatingJobSpectraS3Request request) throws IOException {
+ return new CloseAggregatingJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public GetBulkJobSpectraS3Response getBulkJobSpectraS3(final GetBulkJobSpectraS3Request request) throws IOException {
return new GetBulkJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -506,6 +512,10 @@ public VerifyBulkJobSpectraS3Response verifyBulkJobSpectraS3(final VerifyBulkJob
return new VerifyBulkJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public DeleteJobCreationFailureSpectraS3Response deleteJobCreationFailureSpectraS3(final DeleteJobCreationFailureSpectraS3Request request) throws IOException {
+ return new DeleteJobCreationFailureSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public GetActiveJobSpectraS3Response getActiveJobSpectraS3(final GetActiveJobSpectraS3Request request) throws IOException {
return new GetActiveJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -542,10 +552,22 @@ public GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyFo
return new GetJobChunksReadyForClientProcessingSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public GetJobCreationFailuresSpectraS3Response getJobCreationFailuresSpectraS3(final GetJobCreationFailuresSpectraS3Request request) throws IOException {
+ return new GetJobCreationFailuresSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
+ public GetJobEntriesSpectraS3Response getJobEntriesSpectraS3(final GetJobEntriesSpectraS3Request request) throws IOException {
+ return new GetJobEntriesSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public GetJobSpectraS3Response getJobSpectraS3(final GetJobSpectraS3Request request) throws IOException {
return new GetJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public GetJobSummarySpectraS3Response getJobSummarySpectraS3(final GetJobSummarySpectraS3Request request) throws IOException {
+ return new GetJobSummarySpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public GetJobToReplicateSpectraS3Response getJobToReplicateSpectraS3(final GetJobToReplicateSpectraS3Request request) throws IOException {
return new GetJobToReplicateSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -566,6 +588,10 @@ public ReplicatePutJobSpectraS3Response replicatePutJobSpectraS3(final Replicate
return new ReplicatePutJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public StageObjectsJobSpectraS3Response stageObjectsJobSpectraS3(final StageObjectsJobSpectraS3Request request) throws IOException {
+ return new StageObjectsJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public TruncateActiveJobSpectraS3Response truncateActiveJobSpectraS3(final TruncateActiveJobSpectraS3Request request) throws IOException {
return new TruncateActiveJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -602,6 +628,10 @@ public PutAzureTargetFailureNotificationRegistrationSpectraS3Response putAzureTa
return new PutAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public PutBucketChangesNotificationRegistrationSpectraS3Response putBucketChangesNotificationRegistrationSpectraS3(final PutBucketChangesNotificationRegistrationSpectraS3Request request) throws IOException {
+ return new PutBucketChangesNotificationRegistrationSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public PutDs3TargetFailureNotificationRegistrationSpectraS3Response putDs3TargetFailureNotificationRegistrationSpectraS3(final PutDs3TargetFailureNotificationRegistrationSpectraS3Request request) throws IOException {
return new PutDs3TargetFailureNotificationRegistrationSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -658,6 +688,10 @@ public DeleteAzureTargetFailureNotificationRegistrationSpectraS3Response deleteA
return new DeleteAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public DeleteBucketChangesNotificationRegistrationSpectraS3Response deleteBucketChangesNotificationRegistrationSpectraS3(final DeleteBucketChangesNotificationRegistrationSpectraS3Request request) throws IOException {
+ return new DeleteBucketChangesNotificationRegistrationSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public DeleteDs3TargetFailureNotificationRegistrationSpectraS3Response deleteDs3TargetFailureNotificationRegistrationSpectraS3(final DeleteDs3TargetFailureNotificationRegistrationSpectraS3Request request) throws IOException {
return new DeleteDs3TargetFailureNotificationRegistrationSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -718,6 +752,18 @@ public GetAzureTargetFailureNotificationRegistrationsSpectraS3Response getAzureT
return new GetAzureTargetFailureNotificationRegistrationsSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public GetBucketChangesNotificationRegistrationSpectraS3Response getBucketChangesNotificationRegistrationSpectraS3(final GetBucketChangesNotificationRegistrationSpectraS3Request request) throws IOException {
+ return new GetBucketChangesNotificationRegistrationSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
+ public GetBucketChangesNotificationRegistrationsSpectraS3Response getBucketChangesNotificationRegistrationsSpectraS3(final GetBucketChangesNotificationRegistrationsSpectraS3Request request) throws IOException {
+ return new GetBucketChangesNotificationRegistrationsSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
+ public GetBucketHistorySpectraS3Response getBucketHistorySpectraS3(final GetBucketHistorySpectraS3Request request) throws IOException {
+ return new GetBucketHistorySpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public GetDs3TargetFailureNotificationRegistrationSpectraS3Response getDs3TargetFailureNotificationRegistrationSpectraS3(final GetDs3TargetFailureNotificationRegistrationSpectraS3Request request) throws IOException {
return new GetDs3TargetFailureNotificationRegistrationSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -850,6 +896,10 @@ public GetPhysicalPlacementForObjectsWithFullDetailsSpectraS3Response getPhysica
return new GetPhysicalPlacementForObjectsWithFullDetailsSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public UndeleteObjectSpectraS3Response undeleteObjectSpectraS3(final UndeleteObjectSpectraS3Request request) throws IOException {
+ return new UndeleteObjectSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public VerifyPhysicalPlacementForObjectsSpectraS3Response verifyPhysicalPlacementForObjectsSpectraS3(final VerifyPhysicalPlacementForObjectsSpectraS3Request request) throws IOException {
return new VerifyPhysicalPlacementForObjectsSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -1026,6 +1076,10 @@ public ForceFeatureKeyValidationSpectraS3Response forceFeatureKeyValidationSpect
return new ForceFeatureKeyValidationSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public GetAbmConfigSpectraS3Response getAbmConfigSpectraS3(final GetAbmConfigSpectraS3Request request) throws IOException {
+ return new GetAbmConfigSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public GetFeatureKeysSpectraS3Response getFeatureKeysSpectraS3(final GetFeatureKeysSpectraS3Request request) throws IOException {
return new GetFeatureKeysSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -1078,6 +1132,10 @@ public CancelOnlineTapeSpectraS3Response cancelOnlineTapeSpectraS3(final CancelO
return new CancelOnlineTapeSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public CancelTestTapeDriveSpectraS3Response cancelTestTapeDriveSpectraS3(final CancelTestTapeDriveSpectraS3Request request) throws IOException {
+ return new CancelTestTapeDriveSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public CancelVerifyOnAllTapesSpectraS3Response cancelVerifyOnAllTapesSpectraS3(final CancelVerifyOnAllTapesSpectraS3Request request) throws IOException {
return new CancelVerifyOnAllTapesSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -1090,6 +1148,10 @@ public CleanTapeDriveSpectraS3Response cleanTapeDriveSpectraS3(final CleanTapeDr
return new CleanTapeDriveSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public PutDriveDumpSpectraS3Response putDriveDumpSpectraS3(final PutDriveDumpSpectraS3Request request) throws IOException {
+ return new PutDriveDumpSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public PutTapeDensityDirectiveSpectraS3Response putTapeDensityDirectiveSpectraS3(final PutTapeDensityDirectiveSpectraS3Request request) throws IOException {
return new PutTapeDensityDirectiveSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -1222,10 +1284,18 @@ public InspectTapeSpectraS3Response inspectTapeSpectraS3(final InspectTapeSpectr
return new InspectTapeSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public MarkTapeForCompactionSpectraS3Response markTapeForCompactionSpectraS3(final MarkTapeForCompactionSpectraS3Request request) throws IOException {
+ return new MarkTapeForCompactionSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public ModifyAllTapePartitionsSpectraS3Response modifyAllTapePartitionsSpectraS3(final ModifyAllTapePartitionsSpectraS3Request request) throws IOException {
return new ModifyAllTapePartitionsSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public ModifyTapeDriveSpectraS3Response modifyTapeDriveSpectraS3(final ModifyTapeDriveSpectraS3Request request) throws IOException {
+ return new ModifyTapeDriveSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public ModifyTapePartitionSpectraS3Response modifyTapePartitionSpectraS3(final ModifyTapePartitionSpectraS3Request request) throws IOException {
return new ModifyTapePartitionSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@@ -1250,6 +1320,10 @@ public RawImportTapeSpectraS3Response rawImportTapeSpectraS3(final RawImportTape
return new RawImportTapeSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
+ public TestTapeDriveSpectraS3Response testTapeDriveSpectraS3(final TestTapeDriveSpectraS3Request request) throws IOException {
+ return new TestTapeDriveSpectraS3ResponseParser().response(this.netClient.getResponse(request));
+ }
+ @Override
public VerifyAllTapesSpectraS3Response verifyAllTapesSpectraS3(final VerifyAllTapesSpectraS3Request request) throws IOException {
return new VerifyAllTapesSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3InputStreamEntity.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3InputStreamEntity.java
index 666b08136..700271fe9 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3InputStreamEntity.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3InputStreamEntity.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -39,18 +39,14 @@ public void setBufferSize(final int bufferSize) {
this.bufferSize = bufferSize;
}
- public long getBufferSize() {
- return bufferSize;
- }
-
@Override
public void writeTo(final OutputStream outStream) throws IOException {
final long startTime = PerformanceUtils.getCurrentTime();
final long totalBytes = IOUtils.copy(this.getContent(), outStream, bufferSize, path, true);
final long endTime = PerformanceUtils.getCurrentTime();
-
- if (this.getContentLength() != -1 && totalBytes != this.getContentLength()) {
- throw new ContentLengthNotMatchException(path, this.getContentLength(), totalBytes);
+ final long length = this.getContentLength();
+ if (length != -1 && totalBytes != length) {
+ throw new ContentLengthNotMatchException(path, length, totalBytes);
}
PerformanceUtils.logMbps(startTime, endTime, totalBytes, path, true);
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/GetObjectCustomParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/GetObjectCustomParser.java
index 263c5a6b6..39149e305 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/GetObjectCustomParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/GetObjectCustomParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/Action.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/Action.java
index 4fabc6cd7..748dab36d 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/Action.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/Action.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/Resource.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/Resource.java
index 014ea211a..1e92037e9 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/Resource.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/Resource.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/ResponsePayloadModel.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/ResponsePayloadModel.java
index b971fc209..bdbd138c7 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/ResponsePayloadModel.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/annotations/ResponsePayloadModel.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteBlobRequest.java
similarity index 58%
rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadRequest.java
rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteBlobRequest.java
index 2c4c8d79f..2592a263e 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteBlobRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -19,9 +19,8 @@
import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
import java.util.UUID;
-import com.google.common.net.UrlEscapers;
-public class AbortMultiPartUploadRequest extends AbstractRequest {
+public class CompleteBlobRequest extends AbstractRequest {
// Variables
@@ -29,32 +28,51 @@ public class AbortMultiPartUploadRequest extends AbstractRequest {
private final String objectName;
- private final String uploadId;
+ private final String blob;
+
+ private final String job;
+
+ private long size;
// Constructor
- public AbortMultiPartUploadRequest(final String bucketName, final String objectName, final UUID uploadId) {
+ public CompleteBlobRequest(final String bucketName, final String objectName, final UUID blob, final UUID job) {
this.bucketName = bucketName;
this.objectName = objectName;
- this.uploadId = uploadId.toString();
+ this.blob = blob.toString();
+ this.job = job.toString();
- this.getQueryParams().put("upload_id", uploadId.toString());
+ this.updateQueryParam("blob", blob);
+
+ this.updateQueryParam("job", job);
+
}
- public AbortMultiPartUploadRequest(final String bucketName, final String objectName, final String uploadId) {
+ public CompleteBlobRequest(final String bucketName, final String objectName, final String blob, final String job) {
this.bucketName = bucketName;
this.objectName = objectName;
- this.uploadId = uploadId;
+ this.blob = blob;
+ this.job = job;
- this.getQueryParams().put("upload_id", UrlEscapers.urlFragmentEscaper().escape(uploadId).replace("+", "%2B"));
+ this.updateQueryParam("blob", blob);
+
+ this.updateQueryParam("job", job);
+
+ }
+
+ public CompleteBlobRequest withSize(final long size) {
+ this.size = size;
+ this.updateQueryParam("size", size);
+ return this;
}
+
@Override
public HttpVerb getVerb() {
- return HttpVerb.DELETE;
+ return HttpVerb.POST;
}
@Override
@@ -72,8 +90,18 @@ public String getObjectName() {
}
- public String getUploadId() {
- return this.uploadId;
+ public String getBlob() {
+ return this.blob;
+ }
+
+
+ public String getJob() {
+ return this.job;
+ }
+
+
+ public long getSize() {
+ return this.size;
}
}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteBlobResponse.java
similarity index 80%
rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadResponse.java
rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteBlobResponse.java
index eec1f01b1..f989804ae 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteBlobResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -19,9 +19,9 @@
import com.spectralogic.ds3client.models.ChecksumType;
import com.spectralogic.ds3client.commands.interfaces.AbstractResponse;
-public class AbortMultiPartUploadResponse extends AbstractResponse {
+public class CompleteBlobResponse extends AbstractResponse {
- public AbortMultiPartUploadResponse(final String checksum, final ChecksumType.Type checksumType) {
+ public CompleteBlobResponse(final String checksum, final ChecksumType.Type checksumType) {
super(checksum, checksumType);
}
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadRequest.java
deleted file mode 100644
index b4f5164a2..000000000
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadRequest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-// This code is auto-generated, do not modify
-package com.spectralogic.ds3client.commands;
-
-import com.spectralogic.ds3client.networking.HttpVerb;
-import com.spectralogic.ds3client.models.multipart.CompleteMultipartUpload;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import com.spectralogic.ds3client.serializer.XmlOutput;
-import java.nio.charset.Charset;
-import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
-import java.util.UUID;
-import com.google.common.net.UrlEscapers;
-
-public class CompleteMultiPartUploadRequest extends AbstractRequest {
-
- // Variables
-
- private final String bucketName;
-
- private final String objectName;
-
- private final String uploadId;
-
- private final CompleteMultipartUpload requestPayload;
- private long size = 0;
-
- // Constructor
-
-
- public CompleteMultiPartUploadRequest(final String bucketName, final String objectName, final CompleteMultipartUpload requestPayload, final UUID uploadId) {
- this.bucketName = bucketName;
- this.objectName = objectName;
- this.uploadId = uploadId.toString();
- this.requestPayload = requestPayload;
-
- this.getQueryParams().put("upload_id", uploadId.toString());
- }
-
-
- public CompleteMultiPartUploadRequest(final String bucketName, final String objectName, final CompleteMultipartUpload requestPayload, final String uploadId) {
- this.bucketName = bucketName;
- this.objectName = objectName;
- this.uploadId = uploadId;
- this.requestPayload = requestPayload;
-
- this.getQueryParams().put("upload_id", UrlEscapers.urlFragmentEscaper().escape(uploadId).replace("+", "%2B"));
- }
-
-
- @Override
- public HttpVerb getVerb() {
- return HttpVerb.POST;
- }
-
- @Override
- public String getPath() {
- return "/" + this.bucketName + "/" + this.objectName;
- }
- @Override
- public long getSize() {
- return this.size;
- }
-
- @Override
- public InputStream getStream() {
- if (requestPayload == null) {
- return null;
- }
-
- final String xmlOutput = XmlOutput.toXml(requestPayload);
-
- final byte[] stringBytes = xmlOutput.getBytes(Charset.forName("UTF-8"));
- this.size = stringBytes.length;
- return new ByteArrayInputStream(stringBytes);
- }
-
-
- public String getBucketName() {
- return this.bucketName;
- }
-
-
- public String getObjectName() {
- return this.objectName;
- }
-
-
- public String getUploadId() {
- return this.uploadId;
- }
-
-
- public CompleteMultipartUpload getRequestPayload() {
- return this.requestPayload;
- }
-
-}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteBucketRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteBucketRequest.java
index 3e873326b..339ecca31 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteBucketRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteBucketRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteBucketResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteBucketResponse.java
index 37b4bd41e..909a71542 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteBucketResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteBucketResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectRequest.java
index bb2da1b05..ed2d94cd6 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -18,6 +18,7 @@
import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
+import java.util.UUID;
public class DeleteObjectRequest extends AbstractRequest {
@@ -27,7 +28,7 @@ public class DeleteObjectRequest extends AbstractRequest {
private final String objectName;
- private boolean rollBack;
+ private String versionId;
// Constructor
@@ -38,13 +39,16 @@ public DeleteObjectRequest(final String bucketName, final String objectName) {
}
- public DeleteObjectRequest withRollBack(final boolean rollBack) {
- this.rollBack = rollBack;
- if (this.rollBack) {
- this.getQueryParams().put("roll_back", null);
- } else {
- this.getQueryParams().remove("roll_back");
- }
+ public DeleteObjectRequest withVersionId(final UUID versionId) {
+ this.versionId = versionId.toString();
+ this.updateQueryParam("version_id", versionId);
+ return this;
+ }
+
+
+ public DeleteObjectRequest withVersionId(final String versionId) {
+ this.versionId = versionId;
+ this.updateQueryParam("version_id", versionId);
return this;
}
@@ -70,8 +74,8 @@ public String getObjectName() {
}
- public boolean getRollBack() {
- return this.rollBack;
+ public String getVersionId() {
+ return this.versionId;
}
}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectResponse.java
index dff71b33e..6bf8fd341 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectsRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectsRequest.java
index 7b370467c..baa417b03 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectsRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectsRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -26,17 +26,15 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
-import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
public class DeleteObjectsRequest extends AbstractRequest {
// Variables
- private final List objects;
+ private final List objects;
private final String bucketName;
-
- private boolean rollBack;
private boolean quiet = false;
private long size;
@@ -45,39 +43,36 @@ public class DeleteObjectsRequest extends AbstractRequest {
public DeleteObjectsRequest(final String bucketName, final List objects) {
this.bucketName = bucketName;
- this.objects = objects;
this.getQueryParams().put("delete", null);
+ this.objects = namesToDeleteObjects(objects);
}
- public DeleteObjectsRequest(final String bucketName, final Iterable objs) {
+ public DeleteObjectsRequest(final String bucketName, final Iterable objects) {
this.bucketName = bucketName;
this.getQueryParams().put("delete", null);
- this.objects = contentsToString(objs);
+ this.objects = contentsToDeleteObjects(objects);
}
- private static List contentsToString(final Iterable objs) {
- final List objKeyList = new ArrayList<>();
- for (final Contents obj : objs) {
- objKeyList.add(obj.getKey());
+ private static List contentsToDeleteObjects(final Iterable objects) {
+ final List objectsToDelete = new ArrayList<>();
+ for (final Contents obj : objects) {
+ objectsToDelete.add(new DeleteObject(obj.getKey(), obj.getVersionId()));
}
- return objKeyList;
+ return objectsToDelete;
}
- public DeleteObjectsRequest withRollBack(final boolean rollBack) {
- this.rollBack = rollBack;
- if (this.rollBack) {
- this.getQueryParams().put("roll_back", null);
- } else {
- this.getQueryParams().remove("roll_back");
+ private static List namesToDeleteObjects(final Iterable objNames) {
+ final List objectsToDelete = new ArrayList<>();
+ for (final String objName : objNames) {
+ objectsToDelete.add(new DeleteObject(objName));
}
- return this;
+ return objectsToDelete;
}
-
public DeleteObjectsRequest withQuiet(final boolean quiet) {
this.quiet = quiet;
return this;
@@ -88,16 +83,10 @@ public InputStream getStream() {
final Delete delete = new Delete();
delete.setQuiet(quiet);
- final List deleteObjects = new ArrayList<>();
-
- for(final String objName : objects) {
- deleteObjects.add(new DeleteObject(objName));
- }
-
- delete.setDeleteObjectList(deleteObjects);
+ delete.setDeleteObjectList(objects);
final String xmlOutput = XmlOutput.toXml(delete);
- final byte[] stringBytes = xmlOutput.getBytes(Charset.forName("UTF-8"));
+ final byte[] stringBytes = xmlOutput.getBytes(StandardCharsets.UTF_8);
this.size = stringBytes.length;
return new ByteArrayInputStream(stringBytes);
@@ -112,7 +101,7 @@ public HttpVerb getVerb() {
public String getPath() {
return "/" + this.bucketName;
}
- public List getObjects() {
+ public List getObjects() {
return this.objects;
}
@@ -128,11 +117,6 @@ public String getBucketName() {
}
- public boolean getRollBack() {
- return this.rollBack;
- }
-
-
@Override
public long getSize() {
return this.size;
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectsResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectsResponse.java
index 8fd6a4c94..97f138510 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectsResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteObjectsResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetBucketRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetBucketRequest.java
index d2c38fa11..1f9d983ab 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetBucketRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetBucketRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -18,7 +18,6 @@
import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
-import com.google.common.net.UrlEscapers;
public class GetBucketRequest extends AbstractRequest {
@@ -34,6 +33,8 @@ public class GetBucketRequest extends AbstractRequest {
private String prefix;
+ private boolean versions;
+
// Constructor
@@ -70,6 +71,17 @@ public GetBucketRequest withPrefix(final String prefix) {
}
+ public GetBucketRequest withVersions(final boolean versions) {
+ this.versions = versions;
+ if (this.versions) {
+ this.getQueryParams().put("versions", null);
+ } else {
+ this.getQueryParams().remove("versions");
+ }
+ return this;
+ }
+
+
@Override
public HttpVerb getVerb() {
@@ -105,4 +117,9 @@ public String getPrefix() {
return this.prefix;
}
+
+ public boolean getVersions() {
+ return this.versions;
+ }
+
}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetBucketResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetBucketResponse.java
index 86ead6a9a..dc86ac153 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetBucketResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetBucketResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetObjectRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetObjectRequest.java
index d7332cd64..c16450fb9 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetObjectRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetObjectRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -28,7 +28,8 @@
import java.util.Collection;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
import java.util.UUID;
-import com.google.common.net.UrlEscapers;
+import javax.annotation.Nonnull;
+import com.google.common.base.Preconditions;
import com.spectralogic.ds3client.models.ChecksumType;
public class GetObjectRequest extends AbstractRequest {
@@ -41,9 +42,13 @@ public class GetObjectRequest extends AbstractRequest {
private final String objectName;
+ private boolean cachedOnly;
+
private String job;
private long offset;
+
+ private String versionId;
private ImmutableCollection byteRanges = null;
private ChecksumType checksum = ChecksumType.none();
private ChecksumType.Type checksumType = ChecksumType.Type.NONE;
@@ -52,7 +57,8 @@ public class GetObjectRequest extends AbstractRequest {
/** @deprecated use {@link #GetObjectRequest(String, String, WritableByteChannel, UUID, long)} instead */
@Deprecated
- public GetObjectRequest(final String bucketName, final String objectName, final WritableByteChannel channel) {
+ public GetObjectRequest(final String bucketName, final String objectName, @Nonnull final WritableByteChannel channel) {
+ Preconditions.checkNotNull(channel, "Channel may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.channel = channel;
@@ -61,58 +67,81 @@ public GetObjectRequest(final String bucketName, final String objectName, final
}
- public GetObjectRequest(final String bucketName, final String objectName, final WritableByteChannel channel, final UUID job, final long offset) {
+ public GetObjectRequest(final String bucketName, final String objectName, @Nonnull final WritableByteChannel channel, final UUID job, final long offset) {
+ Preconditions.checkNotNull(channel, "Channel may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.job = job.toString();
this.offset = offset;
this.channel = channel;
- this.getQueryParams().put("job", job.toString());
- this.getQueryParams().put("offset", Long.toString(offset));
+ this.updateQueryParam("job", job);
+
+ this.updateQueryParam("offset", offset);
+
}
- public GetObjectRequest(final String bucketName, final String objectName, final WritableByteChannel channel, final String job, final long offset) {
+ public GetObjectRequest(final String bucketName, final String objectName, @Nonnull final WritableByteChannel channel, final String job, final long offset) {
+ Preconditions.checkNotNull(channel, "Channel may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.job = job;
this.offset = offset;
this.channel = channel;
- this.getQueryParams().put("job", UrlEscapers.urlFragmentEscaper().escape(job).replace("+", "%2B"));
- this.getQueryParams().put("offset", Long.toString(offset));
+ this.updateQueryParam("job", job);
+
+ this.updateQueryParam("offset", offset);
+
}
- public GetObjectRequest(final String bucketName, final String objectName, final UUID job, final long offset, final OutputStream stream) {
+ public GetObjectRequest(final String bucketName, final String objectName, final UUID job, final long offset, @Nonnull final OutputStream stream) {
+ Preconditions.checkNotNull(stream, "Stream may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.job = job.toString();
this.offset = offset;
this.channel = Channels.newChannel(stream);
- this.getQueryParams().put("job", job.toString());
- this.getQueryParams().put("offset", Long.toString(offset));
+ this.updateQueryParam("job", job);
+
+ this.updateQueryParam("offset", offset);
+
}
- public GetObjectRequest(final String bucketName, final String objectName, final String job, final long offset, final OutputStream stream) {
+ public GetObjectRequest(final String bucketName, final String objectName, final String job, final long offset, @Nonnull final OutputStream stream) {
+ Preconditions.checkNotNull(stream, "Stream may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.job = job;
this.offset = offset;
this.channel = Channels.newChannel(stream);
- this.getQueryParams().put("job", UrlEscapers.urlFragmentEscaper().escape(job).replace("+", "%2B"));
- this.getQueryParams().put("offset", Long.toString(offset));
+ this.updateQueryParam("job", job);
+
+ this.updateQueryParam("offset", offset);
+
}
+ public GetObjectRequest withCachedOnly(final boolean cachedOnly) {
+ this.cachedOnly = cachedOnly;
+ if (this.cachedOnly) {
+ this.getQueryParams().put("cached_only", null);
+ } else {
+ this.getQueryParams().remove("cached_only");
+ }
+ return this;
+ }
+
+
public GetObjectRequest withJob(final UUID job) {
this.job = job.toString();
this.updateQueryParam("job", job);
@@ -134,6 +163,20 @@ public GetObjectRequest withOffset(final long offset) {
}
+ public GetObjectRequest withVersionId(final UUID versionId) {
+ this.versionId = versionId.toString();
+ this.updateQueryParam("version_id", versionId);
+ return this;
+ }
+
+
+ public GetObjectRequest withVersionId(final String versionId) {
+ this.versionId = versionId;
+ this.updateQueryParam("version_id", versionId);
+ return this;
+ }
+
+
/**
* Set a MD5 checksum for the request.
@@ -225,6 +268,11 @@ public String getObjectName() {
}
+ public boolean getCachedOnly() {
+ return this.cachedOnly;
+ }
+
+
public String getJob() {
return this.job;
}
@@ -235,6 +283,11 @@ public long getOffset() {
}
+ public String getVersionId() {
+ return this.versionId;
+ }
+
+
public Collection getByteRanges() {
return this.byteRanges;
}
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetObjectResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetObjectResponse.java
index f5526b225..132126e9d 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetObjectResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetObjectResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetServiceRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetServiceRequest.java
index 24d4fe8b4..0e15e2265 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetServiceRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetServiceRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetServiceResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetServiceResponse.java
index 295daaaed..f32f5406a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetServiceResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/GetServiceResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadBucketRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadBucketRequest.java
index 808281c72..4f64a6404 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadBucketRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadBucketRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadBucketResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadBucketResponse.java
index 5782b3577..fe4ab5659 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadBucketResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadBucketResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadObjectRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadObjectRequest.java
index 10bace3d2..6be9f6430 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadObjectRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadObjectRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -18,6 +18,7 @@
import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
+import java.util.UUID;
public class HeadObjectRequest extends AbstractRequest {
@@ -27,6 +28,8 @@ public class HeadObjectRequest extends AbstractRequest {
private final String objectName;
+ private String versionId;
+
// Constructor
@@ -36,6 +39,20 @@ public HeadObjectRequest(final String bucketName, final String objectName) {
}
+ public HeadObjectRequest withVersionId(final UUID versionId) {
+ this.versionId = versionId.toString();
+ this.updateQueryParam("version_id", versionId);
+ return this;
+ }
+
+
+ public HeadObjectRequest withVersionId(final String versionId) {
+ this.versionId = versionId;
+ this.updateQueryParam("version_id", versionId);
+ return this;
+ }
+
+
@Override
public HttpVerb getVerb() {
@@ -56,4 +73,9 @@ public String getObjectName() {
return this.objectName;
}
+
+ public String getVersionId() {
+ return this.versionId;
+ }
+
}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadObjectResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadObjectResponse.java
index 8097b9fc1..f0b93fa9b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadObjectResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/HeadObjectResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -19,22 +19,49 @@
import com.spectralogic.ds3client.commands.interfaces.AbstractResponse;
import com.spectralogic.ds3client.networking.Metadata;
import com.spectralogic.ds3client.models.ChecksumType;
+import com.google.common.collect.ImmutableMap;
+import java.time.ZonedDateTime;
+import java.util.UUID;
public class HeadObjectResponse extends AbstractResponse {
public enum Status { EXISTS, DOESNTEXIST, UNKNOWN }
+ private final ImmutableMap blobChecksums;
+
+ private final ChecksumType.Type blobChecksumType;
+
+ private final ZonedDateTime creationDate;
+
private final Metadata metadata;
private final long objectSize;
private final Status status;
- public HeadObjectResponse(final Metadata metadata, final long objectSize, final Status status, final String checksum, final ChecksumType.Type checksumType) {
+ private final UUID versionId;
+
+ public HeadObjectResponse(final ImmutableMap blobChecksums, final ChecksumType.Type blobChecksumType, final ZonedDateTime creationDate, final Metadata metadata, final long objectSize, final Status status, final UUID versionId, final String checksum, final ChecksumType.Type checksumType) {
super(checksum, checksumType);
+ this.blobChecksums = blobChecksums;
+ this.blobChecksumType = blobChecksumType;
+ this.creationDate = creationDate;
this.metadata = metadata;
this.objectSize = objectSize;
this.status = status;
+ this.versionId = versionId;
+ }
+
+ public ImmutableMap getBlobChecksums() {
+ return this.blobChecksums;
+ }
+
+ public ChecksumType.Type getBlobChecksumType() {
+ return this.blobChecksumType;
+ }
+
+ public ZonedDateTime getCreationDate() {
+ return this.creationDate;
}
public Metadata getMetadata() {
@@ -49,4 +76,8 @@ public Status getStatus() {
return this.status;
}
+ public UUID getVersionId() {
+ return this.versionId;
+ }
+
}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsRequest.java
deleted file mode 100644
index 8b2d97ffe..000000000
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsRequest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-// This code is auto-generated, do not modify
-package com.spectralogic.ds3client.commands;
-
-import com.spectralogic.ds3client.networking.HttpVerb;
-import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
-import java.util.UUID;
-import com.google.common.net.UrlEscapers;
-import java.lang.Integer;
-
-public class ListMultiPartUploadPartsRequest extends AbstractRequest {
-
- // Variables
-
- private final String bucketName;
-
- private final String objectName;
-
- private final String uploadId;
-
- private int maxParts;
-
- private Integer partNumberMarker;
-
- // Constructor
-
-
- public ListMultiPartUploadPartsRequest(final String bucketName, final String objectName, final UUID uploadId) {
- this.bucketName = bucketName;
- this.objectName = objectName;
- this.uploadId = uploadId.toString();
-
- this.getQueryParams().put("upload_id", uploadId.toString());
- }
-
-
- public ListMultiPartUploadPartsRequest(final String bucketName, final String objectName, final String uploadId) {
- this.bucketName = bucketName;
- this.objectName = objectName;
- this.uploadId = uploadId;
-
- this.getQueryParams().put("upload_id", UrlEscapers.urlFragmentEscaper().escape(uploadId).replace("+", "%2B"));
- }
-
- public ListMultiPartUploadPartsRequest withMaxParts(final int maxParts) {
- this.maxParts = maxParts;
- this.updateQueryParam("max_parts", maxParts);
- return this;
- }
-
-
- public ListMultiPartUploadPartsRequest withPartNumberMarker(final Integer partNumberMarker) {
- this.partNumberMarker = partNumberMarker;
- this.updateQueryParam("part_number_marker", partNumberMarker);
- return this;
- }
-
-
-
- @Override
- public HttpVerb getVerb() {
- return HttpVerb.GET;
- }
-
- @Override
- public String getPath() {
- return "/" + this.bucketName + "/" + this.objectName;
- }
-
- public String getBucketName() {
- return this.bucketName;
- }
-
-
- public String getObjectName() {
- return this.objectName;
- }
-
-
- public String getUploadId() {
- return this.uploadId;
- }
-
-
- public int getMaxParts() {
- return this.maxParts;
- }
-
-
- public Integer getPartNumberMarker() {
- return this.partNumberMarker;
- }
-
-}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsRequest.java
deleted file mode 100644
index d38f4ba76..000000000
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsRequest.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-// This code is auto-generated, do not modify
-package com.spectralogic.ds3client.commands;
-
-import com.spectralogic.ds3client.networking.HttpVerb;
-import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
-import com.google.common.net.UrlEscapers;
-
-public class ListMultiPartUploadsRequest extends AbstractRequest {
-
- // Variables
-
- private final String bucketName;
-
- private String delimiter;
-
- private String keyMarker;
-
- private int maxUploads;
-
- private String prefix;
-
- private String uploadIdMarker;
-
- // Constructor
-
-
- public ListMultiPartUploadsRequest(final String bucketName) {
- this.bucketName = bucketName;
-
- this.getQueryParams().put("uploads", null);
- }
-
- public ListMultiPartUploadsRequest withDelimiter(final String delimiter) {
- this.delimiter = delimiter;
- this.updateQueryParam("delimiter", delimiter);
- return this;
- }
-
-
- public ListMultiPartUploadsRequest withKeyMarker(final String keyMarker) {
- this.keyMarker = keyMarker;
- this.updateQueryParam("key_marker", keyMarker);
- return this;
- }
-
-
- public ListMultiPartUploadsRequest withMaxUploads(final int maxUploads) {
- this.maxUploads = maxUploads;
- this.updateQueryParam("max_uploads", maxUploads);
- return this;
- }
-
-
- public ListMultiPartUploadsRequest withPrefix(final String prefix) {
- this.prefix = prefix;
- this.updateQueryParam("prefix", prefix);
- return this;
- }
-
-
- public ListMultiPartUploadsRequest withUploadIdMarker(final String uploadIdMarker) {
- this.uploadIdMarker = uploadIdMarker;
- this.updateQueryParam("upload_id_marker", uploadIdMarker);
- return this;
- }
-
-
-
- @Override
- public HttpVerb getVerb() {
- return HttpVerb.GET;
- }
-
- @Override
- public String getPath() {
- return "/" + this.bucketName;
- }
-
- public String getBucketName() {
- return this.bucketName;
- }
-
-
- public String getDelimiter() {
- return this.delimiter;
- }
-
-
- public String getKeyMarker() {
- return this.keyMarker;
- }
-
-
- public int getMaxUploads() {
- return this.maxUploads;
- }
-
-
- public String getPrefix() {
- return this.prefix;
- }
-
-
- public String getUploadIdMarker() {
- return this.uploadIdMarker;
- }
-
-}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutBucketRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutBucketRequest.java
index 148c95439..ad64def83 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutBucketRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutBucketRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutBucketResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutBucketResponse.java
index ddf9fc3d7..d6d418a86 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutBucketResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutBucketResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartRequest.java
deleted file mode 100644
index 09ed0d4f4..000000000
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartRequest.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
- * this file except in compliance with the License. A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file.
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ****************************************************************************
- */
-
-// This code is auto-generated, do not modify
-package com.spectralogic.ds3client.commands;
-
-import com.spectralogic.ds3client.networking.HttpVerb;
-import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
-import java.util.UUID;
-import com.google.common.net.UrlEscapers;
-import com.spectralogic.ds3client.utils.SeekableByteChannelInputStream;
-import java.nio.channels.SeekableByteChannel;
-import java.io.InputStream;
-
-public class PutMultiPartUploadPartRequest extends AbstractRequest {
-
- // Variables
-
- private final String bucketName;
-
- private final String objectName;
-
- private final int partNumber;
-
- private final String uploadId;
-
- private final long size;
-
- private final InputStream stream;
-
- private SeekableByteChannel channel;
-
- // Constructor
-
-
- public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final SeekableByteChannel channel, final int partNumber, final long size, final UUID uploadId) {
- this.bucketName = bucketName;
- this.objectName = objectName;
- this.partNumber = partNumber;
- this.uploadId = uploadId.toString();
- this.size = size;
- this.channel = channel;
-
- this.getQueryParams().put("part_number", Integer.toString(partNumber));
- this.getQueryParams().put("upload_id", uploadId.toString());
- this.stream = new SeekableByteChannelInputStream(channel);
- }
-
-
- public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final SeekableByteChannel channel, final int partNumber, final long size, final String uploadId) {
- this.bucketName = bucketName;
- this.objectName = objectName;
- this.partNumber = partNumber;
- this.uploadId = uploadId;
- this.size = size;
- this.channel = channel;
-
- this.getQueryParams().put("part_number", Integer.toString(partNumber));
- this.getQueryParams().put("upload_id", UrlEscapers.urlFragmentEscaper().escape(uploadId).replace("+", "%2B"));
- this.stream = new SeekableByteChannelInputStream(channel);
- }
-
-
- public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final int partNumber, final long size, final InputStream stream, final UUID uploadId) {
- this.bucketName = bucketName;
- this.objectName = objectName;
- this.partNumber = partNumber;
- this.uploadId = uploadId.toString();
- this.size = size;
- this.stream = stream;
-
- this.getQueryParams().put("part_number", Integer.toString(partNumber));
- this.getQueryParams().put("upload_id", uploadId.toString());
- }
-
-
- public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final int partNumber, final long size, final InputStream stream, final String uploadId) {
- this.bucketName = bucketName;
- this.objectName = objectName;
- this.partNumber = partNumber;
- this.uploadId = uploadId;
- this.size = size;
- this.stream = stream;
-
- this.getQueryParams().put("part_number", Integer.toString(partNumber));
- this.getQueryParams().put("upload_id", UrlEscapers.urlFragmentEscaper().escape(uploadId).replace("+", "%2B"));
- }
-
-
- @Override
- public HttpVerb getVerb() {
- return HttpVerb.PUT;
- }
-
- @Override
- public String getPath() {
- return "/" + this.bucketName + "/" + this.objectName;
- }
-
- public String getBucketName() {
- return this.bucketName;
- }
-
-
- public String getObjectName() {
- return this.objectName;
- }
-
-
- public int getPartNumber() {
- return this.partNumber;
- }
-
-
- public String getUploadId() {
- return this.uploadId;
- }
-
-
- public long getSize() {
- return this.size;
- }
-
-
- public InputStream getStream() {
- return this.stream;
- }
-
-
- public SeekableByteChannel getChannel() {
- return this.channel;
- }
-
-}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutObjectRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutObjectRequest.java
index 7ebc8d945..0d5c77107 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutObjectRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutObjectRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -25,7 +25,8 @@
import org.slf4j.LoggerFactory;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
import java.util.UUID;
-import com.google.common.net.UrlEscapers;
+import javax.annotation.Nonnull;
+import com.google.common.base.Preconditions;
import com.spectralogic.ds3client.models.ChecksumType;
public class PutObjectRequest extends AbstractRequest {
@@ -53,7 +54,8 @@ public class PutObjectRequest extends AbstractRequest {
/** @deprecated use {@link #PutObjectRequest(String, String, SeekableByteChannel, UUID, long, long)} instead */
@Deprecated
- public PutObjectRequest(final String bucketName, final String objectName, final SeekableByteChannel channel, final long size) {
+ public PutObjectRequest(final String bucketName, final String objectName, @Nonnull final SeekableByteChannel channel, final long size) {
+ Preconditions.checkNotNull(channel, "Channel may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.size = size;
@@ -64,7 +66,8 @@ public PutObjectRequest(final String bucketName, final String objectName, final
}
- public PutObjectRequest(final String bucketName, final String objectName, final SeekableByteChannel channel, final UUID job, final long offset, final long size) {
+ public PutObjectRequest(final String bucketName, final String objectName, @Nonnull final SeekableByteChannel channel, final UUID job, final long offset, final long size) {
+ Preconditions.checkNotNull(channel, "Channel may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.size = size;
@@ -73,13 +76,16 @@ public PutObjectRequest(final String bucketName, final String objectName, final
this.channel = channel;
this.stream = new SeekableByteChannelInputStream(channel);
- this.getQueryParams().put("job", job.toString());
- this.getQueryParams().put("offset", Long.toString(offset));
+ this.updateQueryParam("job", job);
+
+ this.updateQueryParam("offset", offset);
+
}
- public PutObjectRequest(final String bucketName, final String objectName, final SeekableByteChannel channel, final String job, final long offset, final long size) {
+ public PutObjectRequest(final String bucketName, final String objectName, @Nonnull final SeekableByteChannel channel, final String job, final long offset, final long size) {
+ Preconditions.checkNotNull(channel, "Channel may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.size = size;
@@ -88,13 +94,16 @@ public PutObjectRequest(final String bucketName, final String objectName, final
this.channel = channel;
this.stream = new SeekableByteChannelInputStream(channel);
- this.getQueryParams().put("job", UrlEscapers.urlFragmentEscaper().escape(job).replace("+", "%2B"));
- this.getQueryParams().put("offset", Long.toString(offset));
+ this.updateQueryParam("job", job);
+
+ this.updateQueryParam("offset", offset);
+
}
- public PutObjectRequest(final String bucketName, final String objectName, final UUID job, final long offset, final long size, final InputStream stream) {
+ public PutObjectRequest(final String bucketName, final String objectName, final UUID job, final long offset, final long size, @Nonnull final InputStream stream) {
+ Preconditions.checkNotNull(stream, "Stream may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.size = size;
@@ -102,13 +111,16 @@ public PutObjectRequest(final String bucketName, final String objectName, final
this.offset = offset;
this.stream = stream;
- this.getQueryParams().put("job", job.toString());
- this.getQueryParams().put("offset", Long.toString(offset));
+ this.updateQueryParam("job", job);
+
+ this.updateQueryParam("offset", offset);
+
}
- public PutObjectRequest(final String bucketName, final String objectName, final String job, final long offset, final long size, final InputStream stream) {
+ public PutObjectRequest(final String bucketName, final String objectName, final String job, final long offset, final long size, @Nonnull final InputStream stream) {
+ Preconditions.checkNotNull(stream, "Stream may not be null.");
this.bucketName = bucketName;
this.objectName = objectName;
this.size = size;
@@ -116,8 +128,10 @@ public PutObjectRequest(final String bucketName, final String objectName, final
this.offset = offset;
this.stream = stream;
- this.getQueryParams().put("job", UrlEscapers.urlFragmentEscaper().escape(job).replace("+", "%2B"));
- this.getQueryParams().put("offset", Long.toString(offset));
+ this.updateQueryParam("job", job);
+
+ this.updateQueryParam("offset", offset);
+
}
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutObjectResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutObjectResponse.java
index b0a27c05d..7a636ee68 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutObjectResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutObjectResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractCreateNotificationRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractCreateNotificationRequest.java
index 020a438b5..5ce3e6f72 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractCreateNotificationRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractCreateNotificationRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractDeleteNotificationRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractDeleteNotificationRequest.java
index e5e6c1314..d547468e6 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractDeleteNotificationRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractDeleteNotificationRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractGetNotificationRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractGetNotificationRequest.java
index c327618a2..cf20784b9 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractGetNotificationRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractGetNotificationRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractIdsPayloadRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractIdsPayloadRequest.java
new file mode 100644
index 000000000..d3e53cb36
--- /dev/null
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractIdsPayloadRequest.java
@@ -0,0 +1,55 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+package com.spectralogic.ds3client.commands.interfaces;
+
+import com.spectralogic.ds3client.models.requestpayloads.Ids;
+import com.spectralogic.ds3client.serializer.XmlOutput;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+
+/**
+ * Abstract class that handles request payload of ids, in format:
+ * {@code id1id2...}
+ */
+public abstract class AbstractIdsPayloadRequest extends AbstractRequest {
+
+ private final List ids;
+ private long size;
+
+ public AbstractIdsPayloadRequest(final List ids) {
+ super();
+ this.ids = ids;
+ }
+
+ @Override
+ public InputStream getStream() {
+ final Ids requestPayload = new Ids(ids);
+ final String xmlOutput = XmlOutput.toXml(requestPayload);
+ final byte[] stringBytes = xmlOutput.getBytes(StandardCharsets.UTF_8);
+ this.size = stringBytes.length;
+
+ return new ByteArrayInputStream(stringBytes);
+ }
+
+ @Override
+ public long getSize() {
+ return this.size;
+ }
+}
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractPaginationRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractPaginationRequest.java
index cce28b623..d1daa869b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractPaginationRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractPaginationRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractPaginationResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractPaginationResponse.java
index 84cc9e0c2..0b1ee2da2 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractPaginationResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractPaginationResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -19,8 +19,8 @@
public abstract class AbstractPaginationResponse extends AbstractResponse implements PaginationResponse {
- private Integer pagingTruncated;
- private Integer pagingTotalResultCount;
+ private final Integer pagingTruncated;
+ private final Integer pagingTotalResultCount;
public AbstractPaginationResponse(final Integer pagingTotalResultCount, final Integer pagingTruncated, final String checksum, final ChecksumType.Type checksumType) {
super(checksum, checksumType);
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractRequest.java
index faae9155a..558128d51 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -36,7 +36,7 @@ private static RequestHeaders buildDefaultHeaders() {
@Override
public String getContentType() {
- return ContentType.APPLICATION_XML.toString();
+ return ContentType.APPLICATION_XML.getMimeType();
}
@Override
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractResponse.java
index 38c0f0435..9af026305 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/AbstractResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/BulkRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/BulkRequest.java
index 22984cdb4..6dd3a50db 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/BulkRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/BulkRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -18,14 +18,13 @@
import com.spectralogic.ds3client.BulkCommand;
import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.models.Priority;
-import com.spectralogic.ds3client.models.JobChunkClientProcessingOrderGuarantee;
-import com.spectralogic.ds3client.models.WriteOptimization;
import com.spectralogic.ds3client.models.bulk.*;
import com.spectralogic.ds3client.serializer.XmlOutput;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
public abstract class BulkRequest extends AbstractRequest {
@@ -34,8 +33,6 @@ public abstract class BulkRequest extends AbstractRequest {
private InputStream stream;
private long size;
private Priority priority;
- private WriteOptimization writeOptimization;
- protected JobChunkClientProcessingOrderGuarantee chunkOrdering;
public BulkRequest(final String bucket, final Iterable objects) {
this.bucket = bucket;
@@ -44,11 +41,7 @@ public BulkRequest(final String bucket, final Iterable objects) {
public BulkRequest withPriority(final Priority priority) {
this.priority = priority;
- return this;
- }
-
- public BulkRequest withWriteOptimization(final WriteOptimization writeOptimization) {
- this.writeOptimization = writeOptimization;
+ this.updateQueryParam("priority", priority);
return this;
}
@@ -56,9 +49,6 @@ private InputStream generateStream() {
final Ds3ObjectList objects =
new Ds3ObjectList();
objects.setObjects(this.ds3Objects);
- objects.setPriority(this.priority);
- objects.setWriteOptimization(this.writeOptimization);
- objects.setChunkClientProcessingOrderGuarantee(this.chunkOrdering);
final StringBuilder xmlOutputBuilder = new StringBuilder();
if (this.getCommand() == BulkCommand.PUT) {
@@ -67,7 +57,7 @@ private InputStream generateStream() {
xmlOutputBuilder.append(XmlOutput.toXml(objects, false));
}
- final byte[] stringBytes = xmlOutputBuilder.toString().getBytes(Charset.forName("UTF-8"));
+ final byte[] stringBytes = xmlOutputBuilder.toString().getBytes(StandardCharsets.UTF_8);
this.size = stringBytes.length;
return new ByteArrayInputStream(stringBytes);
}
@@ -108,8 +98,4 @@ public InputStream getStream() {
public Priority getPriority() {
return priority;
}
-
- public WriteOptimization getWriteOptimization() {
- return writeOptimization;
- }
}
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/BulkResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/BulkResponse.java
index aaaebd8a7..e24eef06b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/BulkResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/BulkResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/Ds3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/Ds3Request.java
index 8160985c4..afed6f301 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/Ds3Request.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/Ds3Request.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/Ds3Response.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/Ds3Response.java
index 94c2f2bbf..b421d355f 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/Ds3Response.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/Ds3Response.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/PaginationRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/PaginationRequest.java
index d3decb82d..e3f7f3e85 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/PaginationRequest.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/PaginationRequest.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/PaginationResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/PaginationResponse.java
index 6407d4f46..128ef66bf 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/PaginationResponse.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/PaginationResponse.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/RequestHeaders.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/RequestHeaders.java
index b17818dd9..a8e0d85aa 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/RequestHeaders.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/RequestHeaders.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/RequestHeadersImpl.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/RequestHeadersImpl.java
index cb6e7f5fb..143ce6ea1 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/RequestHeadersImpl.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/interfaces/RequestHeadersImpl.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -23,7 +23,8 @@
import java.util.Set;
import static com.spectralogic.ds3client.utils.MetadataStringManipulation.toDecodedString;
-import static com.spectralogic.ds3client.utils.MetadataStringManipulation.toEncodedString;
+import static com.spectralogic.ds3client.utils.MetadataStringManipulation.toEncodedKeyString;
+import static com.spectralogic.ds3client.utils.MetadataStringManipulation.toEncodedValueString;
/**
* Implementation of request headers which percent encodes key and values.
@@ -37,7 +38,7 @@ public class RequestHeadersImpl implements RequestHeaders {
*/
@Override
public void put(final String key, final String value) {
- headers.put(toEncodedString(key), toEncodedString(value));
+ headers.put(toEncodedKeyString(key), toEncodedValueString(value));
}
/**
@@ -47,7 +48,7 @@ public void put(final String key, final String value) {
@Override
public Collection get(final String key) {
final ImmutableList.Builder builder = ImmutableList.builder();
- for (final String value : headers.get(toEncodedString(key))) {
+ for (final String value : headers.get(toEncodedKeyString(key))) {
builder.add(toDecodedString(value));
}
return builder.build();
@@ -67,7 +68,7 @@ public int size() {
*/
@Override
public boolean containsKey(final String key) {
- return headers.containsKey(toEncodedString(key));
+ return headers.containsKey(toEncodedKeyString(key));
}
/**
@@ -76,7 +77,7 @@ public boolean containsKey(final String key) {
*/
@Override
public Collection removeAll(final String key) {
- return headers.removeAll(toEncodedString(key));
+ return headers.removeAll(toEncodedKeyString(key));
}
/**
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/package-info.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/package-info.java
index 37052d33e..d50e303c6 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/package-info.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/package-info.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AllocateJobChunkSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AllocateJobChunkSpectraS3ResponseParser.java
index 1fd53aca9..1d13ff8c4 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AllocateJobChunkSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AllocateJobChunkSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -26,6 +26,8 @@
import java.io.IOException;
import java.io.InputStream;
+/** @deprecated Use {@link GetJobChunksReadyForClientProcessingSpectraS3ResponseParser} instead */
+@Deprecated
public class AllocateJobChunkSpectraS3ResponseParser extends AbstractResponseParser {
private final int[] expectedStatusCodes = new int[]{200, 307, 503};
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelActiveJobSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelActiveJobSpectraS3ResponseParser.java
index f35d67f31..270892ad8 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelActiveJobSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelActiveJobSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelAllActiveJobsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelAllActiveJobsSpectraS3ResponseParser.java
index b8ae0807e..d632a69c3 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelAllActiveJobsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelAllActiveJobsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelAllJobsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelAllJobsSpectraS3ResponseParser.java
index 7b2f7b0c8..59e9e1847 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelAllJobsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelAllJobsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelEjectOnAllTapesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelEjectOnAllTapesSpectraS3ResponseParser.java
index eb5321a69..08f0b6477 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelEjectOnAllTapesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelEjectOnAllTapesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelEjectTapeSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelEjectTapeSpectraS3ResponseParser.java
index 831e95418..741a21e1a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelEjectTapeSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelEjectTapeSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelFormatOnAllTapesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelFormatOnAllTapesSpectraS3ResponseParser.java
index 0a17966e3..a9718103c 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelFormatOnAllTapesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelFormatOnAllTapesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelFormatTapeSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelFormatTapeSpectraS3ResponseParser.java
index 35a0052b6..92b310b6a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelFormatTapeSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelFormatTapeSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportOnAllPoolsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportOnAllPoolsSpectraS3ResponseParser.java
index aa24be424..784957ba4 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportOnAllPoolsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportOnAllPoolsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportOnAllTapesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportOnAllTapesSpectraS3ResponseParser.java
index 791f9dc2f..3a7c662f9 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportOnAllTapesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportOnAllTapesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportPoolSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportPoolSpectraS3ResponseParser.java
index bedb39414..0c7b06560 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportPoolSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportPoolSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportTapeSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportTapeSpectraS3ResponseParser.java
index ad3b8c150..a4eda7eac 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportTapeSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelImportTapeSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelJobSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelJobSpectraS3ResponseParser.java
index 2227cca92..460578561 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelJobSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelJobSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelOnlineOnAllTapesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelOnlineOnAllTapesSpectraS3ResponseParser.java
index 5affbb062..1a679b2f0 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelOnlineOnAllTapesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelOnlineOnAllTapesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelOnlineTapeSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelOnlineTapeSpectraS3ResponseParser.java
index 9a2ccf708..c2adf533f 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelOnlineTapeSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelOnlineTapeSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ListMultiPartUploadsResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelTestTapeDriveSpectraS3ResponseParser.java
similarity index 72%
rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ListMultiPartUploadsResponseParser.java
rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelTestTapeDriveSpectraS3ResponseParser.java
index 2448bd554..a4f889b2d 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ListMultiPartUploadsResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelTestTapeDriveSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -16,27 +16,27 @@
// This code is auto-generated, do not modify
package com.spectralogic.ds3client.commands.parsers;
-import com.spectralogic.ds3client.commands.ListMultiPartUploadsResponse;
import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
-import com.spectralogic.ds3client.models.ListMultiPartUploadsResult;
+import com.spectralogic.ds3client.commands.spectrads3.CancelTestTapeDriveSpectraS3Response;
+import com.spectralogic.ds3client.models.TapeDrive;
import com.spectralogic.ds3client.networking.WebResponse;
import com.spectralogic.ds3client.serializer.XmlOutput;
import java.io.IOException;
import java.io.InputStream;
-public class ListMultiPartUploadsResponseParser extends AbstractResponseParser {
+public class CancelTestTapeDriveSpectraS3ResponseParser extends AbstractResponseParser {
private final int[] expectedStatusCodes = new int[]{200};
@Override
- public ListMultiPartUploadsResponse parseXmlResponse(final WebResponse response) throws IOException {
+ public CancelTestTapeDriveSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
final int statusCode = response.getStatusCode();
if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
switch (statusCode) {
case 200:
try (final InputStream inputStream = response.getResponseStream()) {
- final ListMultiPartUploadsResult result = XmlOutput.fromXml(inputStream, ListMultiPartUploadsResult.class);
- return new ListMultiPartUploadsResponse(result, this.getChecksum(), this.getChecksumType());
+ final TapeDrive result = XmlOutput.fromXml(inputStream, TapeDrive.class);
+ return new CancelTestTapeDriveSpectraS3Response(result, this.getChecksum(), this.getChecksumType());
}
default:
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyOnAllPoolsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyOnAllPoolsSpectraS3ResponseParser.java
index 97c901283..59e153d35 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyOnAllPoolsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyOnAllPoolsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyOnAllTapesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyOnAllTapesSpectraS3ResponseParser.java
index 17e4150b5..27793da15 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyOnAllTapesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyOnAllTapesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyPoolSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyPoolSpectraS3ResponseParser.java
index bca23d3df..6e6e6615b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyPoolSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyPoolSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyTapeSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyTapeSpectraS3ResponseParser.java
index 03fab3315..611aa4b3a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyTapeSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CancelVerifyTapeSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CleanTapeDriveSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CleanTapeDriveSpectraS3ResponseParser.java
index 6888c5f38..872b29c1b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CleanTapeDriveSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CleanTapeDriveSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearAllCanceledJobsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearAllCanceledJobsSpectraS3ResponseParser.java
index 95bf2bdfe..59c60e9a7 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearAllCanceledJobsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearAllCanceledJobsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearAllCompletedJobsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearAllCompletedJobsSpectraS3ResponseParser.java
index d373893f3..efa471eb2 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearAllCompletedJobsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearAllCompletedJobsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobAzureTargetsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobAzureTargetsSpectraS3ResponseParser.java
index 689a73089..0d4f8a9fb 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobAzureTargetsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobAzureTargetsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobDs3TargetsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobDs3TargetsSpectraS3ResponseParser.java
index 8c7b12c53..586fc67ba 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobDs3TargetsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobDs3TargetsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobPoolsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobPoolsSpectraS3ResponseParser.java
index d042c68f2..641573bcc 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobPoolsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobPoolsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobS3TargetsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobS3TargetsSpectraS3ResponseParser.java
index 2ee566738..5b73520a9 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobS3TargetsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobS3TargetsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobTapesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobTapesSpectraS3ResponseParser.java
index 6e0746428..a6b229664 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobTapesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ClearSuspectBlobTapesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompleteMultiPartUploadResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CloseAggregatingJobSpectraS3ResponseParser.java
similarity index 71%
rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompleteMultiPartUploadResponseParser.java
rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CloseAggregatingJobSpectraS3ResponseParser.java
index e6f22fcea..244154d22 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompleteMultiPartUploadResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CloseAggregatingJobSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -16,27 +16,27 @@
// This code is auto-generated, do not modify
package com.spectralogic.ds3client.commands.parsers;
-import com.spectralogic.ds3client.commands.CompleteMultiPartUploadResponse;
import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
-import com.spectralogic.ds3client.models.CompleteMultipartUploadResult;
+import com.spectralogic.ds3client.commands.spectrads3.CloseAggregatingJobSpectraS3Response;
+import com.spectralogic.ds3client.models.MasterObjectList;
import com.spectralogic.ds3client.networking.WebResponse;
import com.spectralogic.ds3client.serializer.XmlOutput;
import java.io.IOException;
import java.io.InputStream;
-public class CompleteMultiPartUploadResponseParser extends AbstractResponseParser {
+public class CloseAggregatingJobSpectraS3ResponseParser extends AbstractResponseParser {
private final int[] expectedStatusCodes = new int[]{200};
@Override
- public CompleteMultiPartUploadResponse parseXmlResponse(final WebResponse response) throws IOException {
+ public CloseAggregatingJobSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
final int statusCode = response.getStatusCode();
if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
switch (statusCode) {
case 200:
try (final InputStream inputStream = response.getResponseStream()) {
- final CompleteMultipartUploadResult result = XmlOutput.fromXml(inputStream, CompleteMultipartUploadResult.class);
- return new CompleteMultiPartUploadResponse(result, this.getChecksum(), this.getChecksumType());
+ final MasterObjectList result = XmlOutput.fromXml(inputStream, MasterObjectList.class);
+ return new CloseAggregatingJobSpectraS3Response(result, this.getChecksum(), this.getChecksumType());
}
default:
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompactAllPoolsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompactAllPoolsSpectraS3ResponseParser.java
index 709d4b9c0..548904960 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompactAllPoolsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompactAllPoolsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompactPoolSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompactPoolSpectraS3ResponseParser.java
index 92fe1c073..3fd6a5cc1 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompactPoolSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompactPoolSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutMultiPartUploadPartResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompleteBlobResponseParser.java
similarity index 77%
rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutMultiPartUploadPartResponseParser.java
rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompleteBlobResponseParser.java
index a2606255e..035fe19aa 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutMultiPartUploadPartResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompleteBlobResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -16,23 +16,23 @@
// This code is auto-generated, do not modify
package com.spectralogic.ds3client.commands.parsers;
-import com.spectralogic.ds3client.commands.PutMultiPartUploadPartResponse;
+import com.spectralogic.ds3client.commands.CompleteBlobResponse;
import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
import com.spectralogic.ds3client.networking.WebResponse;
import java.io.IOException;
-public class PutMultiPartUploadPartResponseParser extends AbstractResponseParser {
+public class CompleteBlobResponseParser extends AbstractResponseParser {
private final int[] expectedStatusCodes = new int[]{200};
@Override
- public PutMultiPartUploadPartResponse parseXmlResponse(final WebResponse response) throws IOException {
+ public CompleteBlobResponse parseXmlResponse(final WebResponse response) throws IOException {
final int statusCode = response.getStatusCode();
if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
switch (statusCode) {
case 200:
//There is no payload, return an empty response handler
- return new PutMultiPartUploadPartResponse(this.getChecksum(), this.getChecksumType());
+ return new CompleteBlobResponse(this.getChecksum(), this.getChecksumType());
default:
assert false: "validateStatusCode should have made it impossible to reach this line";
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ConvertStorageDomainToDs3TargetSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ConvertStorageDomainToDs3TargetSpectraS3ResponseParser.java
index da5115383..660d429c6 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ConvertStorageDomainToDs3TargetSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ConvertStorageDomainToDs3TargetSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeallocatePoolSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeallocatePoolSpectraS3ResponseParser.java
index 2ba12ab21..0d1d5adcb 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeallocatePoolSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeallocatePoolSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DelegateCreateUserSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DelegateCreateUserSpectraS3ResponseParser.java
index dab076ee3..2be720dee 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DelegateCreateUserSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DelegateCreateUserSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DelegateDeleteUserSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DelegateDeleteUserSpectraS3ResponseParser.java
index e8af083ac..427826efb 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DelegateDeleteUserSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DelegateDeleteUserSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureDataReplicationRuleSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureDataReplicationRuleSpectraS3ResponseParser.java
index 2bb6d38bb..ac14df773 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureDataReplicationRuleSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureDataReplicationRuleSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetBucketNameSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetBucketNameSpectraS3ResponseParser.java
index 6ca12263b..ba5bd44a4 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetBucketNameSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetBucketNameSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser.java
index 248af58b8..31be32949 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetFailureSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetFailureSpectraS3ResponseParser.java
index f3ce7b33a..a58eae82e 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetFailureSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetFailureSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetReadPreferenceSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetReadPreferenceSpectraS3ResponseParser.java
index 6f857194b..070cd681e 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetReadPreferenceSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetReadPreferenceSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetSpectraS3ResponseParser.java
index 8d2338329..482b0d5b6 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteAzureTargetSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketAclSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketAclSpectraS3ResponseParser.java
index 5c566bece..b99936668 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketAclSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketAclSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketChangesNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketChangesNotificationRegistrationSpectraS3ResponseParser.java
new file mode 100644
index 000000000..77d8c93d9
--- /dev/null
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketChangesNotificationRegistrationSpectraS3ResponseParser.java
@@ -0,0 +1,44 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+// This code is auto-generated, do not modify
+package com.spectralogic.ds3client.commands.parsers;
+
+import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
+import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
+import com.spectralogic.ds3client.commands.spectrads3.DeleteBucketChangesNotificationRegistrationSpectraS3Response;
+import com.spectralogic.ds3client.networking.WebResponse;
+import java.io.IOException;
+
+public class DeleteBucketChangesNotificationRegistrationSpectraS3ResponseParser extends AbstractResponseParser {
+ private final int[] expectedStatusCodes = new int[]{204};
+
+ @Override
+ public DeleteBucketChangesNotificationRegistrationSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
+ final int statusCode = response.getStatusCode();
+ if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
+ switch (statusCode) {
+ case 204:
+ //There is no payload, return an empty response handler
+ return new DeleteBucketChangesNotificationRegistrationSpectraS3Response(this.getChecksum(), this.getChecksumType());
+
+ default:
+ assert false: "validateStatusCode should have made it impossible to reach this line";
+ }
+ }
+
+ throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
+ }
+}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketResponseParser.java
index 77dfb943a..6fde83909 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketSpectraS3ResponseParser.java
index 635358864..e551c6aba 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteBucketSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AbortMultiPartUploadResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteCacheThrottleRuleSpectraS3ResponseParser.java
similarity index 75%
rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AbortMultiPartUploadResponseParser.java
rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteCacheThrottleRuleSpectraS3ResponseParser.java
index bff3111fc..2c32f93be 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AbortMultiPartUploadResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteCacheThrottleRuleSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -16,23 +16,23 @@
// This code is auto-generated, do not modify
package com.spectralogic.ds3client.commands.parsers;
-import com.spectralogic.ds3client.commands.AbortMultiPartUploadResponse;
import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
+import com.spectralogic.ds3client.commands.spectrads3.DeleteCacheThrottleRuleSpectraS3Response;
import com.spectralogic.ds3client.networking.WebResponse;
import java.io.IOException;
-public class AbortMultiPartUploadResponseParser extends AbstractResponseParser {
+public class DeleteCacheThrottleRuleSpectraS3ResponseParser extends AbstractResponseParser {
private final int[] expectedStatusCodes = new int[]{204};
@Override
- public AbortMultiPartUploadResponse parseXmlResponse(final WebResponse response) throws IOException {
+ public DeleteCacheThrottleRuleSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
final int statusCode = response.getStatusCode();
if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
switch (statusCode) {
case 204:
//There is no payload, return an empty response handler
- return new AbortMultiPartUploadResponse(this.getChecksum(), this.getChecksumType());
+ return new DeleteCacheThrottleRuleSpectraS3Response(this.getChecksum(), this.getChecksumType());
default:
assert false: "validateStatusCode should have made it impossible to reach this line";
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPersistenceRuleSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPersistenceRuleSpectraS3ResponseParser.java
index 322928d3c..3e330745a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPersistenceRuleSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPersistenceRuleSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPolicyAclSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPolicyAclSpectraS3ResponseParser.java
index 0440888ce..a127897ac 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPolicyAclSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPolicyAclSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPolicySpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPolicySpectraS3ResponseParser.java
index 73f495ed0..a7a353e71 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPolicySpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDataPolicySpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3DataReplicationRuleSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3DataReplicationRuleSpectraS3ResponseParser.java
index 551f97634..74c381b5d 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3DataReplicationRuleSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3DataReplicationRuleSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetFailureNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetFailureNotificationRegistrationSpectraS3ResponseParser.java
index 11ae265f6..9f8f13766 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetFailureNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetFailureNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetFailureSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetFailureSpectraS3ResponseParser.java
index bd7e2831d..7e9315bb7 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetFailureSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetFailureSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetReadPreferenceSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetReadPreferenceSpectraS3ResponseParser.java
index 48fa72f88..3e283a42c 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetReadPreferenceSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetReadPreferenceSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetSpectraS3ResponseParser.java
index 8de4d7f5d..809c873eb 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteDs3TargetSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteFolderRecursivelySpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteFolderRecursivelySpectraS3ResponseParser.java
index 776b5f5b6..aead5d140 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteFolderRecursivelySpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteFolderRecursivelySpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteGroupMemberSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteGroupMemberSpectraS3ResponseParser.java
index 696dc32ea..26a57a92e 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteGroupMemberSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteGroupMemberSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteGroupSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteGroupSpectraS3ResponseParser.java
index 6623f2f7f..56212bc2b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteGroupSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteGroupSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCompletedNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCompletedNotificationRegistrationSpectraS3ResponseParser.java
index 29ea91210..9da6ed3f3 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCompletedNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCompletedNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreatedNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreatedNotificationRegistrationSpectraS3ResponseParser.java
index 68a30f974..a293d5fa1 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreatedNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreatedNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreationFailedNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreationFailedNotificationRegistrationSpectraS3ResponseParser.java
index e2f7edb32..fad895d6b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreationFailedNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreationFailedNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreationFailureSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreationFailureSpectraS3ResponseParser.java
new file mode 100644
index 000000000..f4a2eb417
--- /dev/null
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteJobCreationFailureSpectraS3ResponseParser.java
@@ -0,0 +1,44 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+// This code is auto-generated, do not modify
+package com.spectralogic.ds3client.commands.parsers;
+
+import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
+import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
+import com.spectralogic.ds3client.commands.spectrads3.DeleteJobCreationFailureSpectraS3Response;
+import com.spectralogic.ds3client.networking.WebResponse;
+import java.io.IOException;
+
+public class DeleteJobCreationFailureSpectraS3ResponseParser extends AbstractResponseParser {
+ private final int[] expectedStatusCodes = new int[]{204};
+
+ @Override
+ public DeleteJobCreationFailureSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
+ final int statusCode = response.getStatusCode();
+ if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
+ switch (statusCode) {
+ case 204:
+ //There is no payload, return an empty response handler
+ return new DeleteJobCreationFailureSpectraS3Response(this.getChecksum(), this.getChecksumType());
+
+ default:
+ assert false: "validateStatusCode should have made it impossible to reach this line";
+ }
+ }
+
+ throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
+ }
+}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectCachedNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectCachedNotificationRegistrationSpectraS3ResponseParser.java
index 3c040d884..295384e5a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectCachedNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectCachedNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectLostNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectLostNotificationRegistrationSpectraS3ResponseParser.java
index 88b900e6c..245f031b1 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectLostNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectLostNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectPersistedNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectPersistedNotificationRegistrationSpectraS3ResponseParser.java
index 7e9b75953..3e7c9cb77 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectPersistedNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectPersistedNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectResponseParser.java
index bb7f40797..f099f8051 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectsResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectsResponseParser.java
index c00646fca..a7e912f88 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectsResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteObjectsResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePermanentlyLostPoolSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePermanentlyLostPoolSpectraS3ResponseParser.java
index df0785cfc..9e1d3929f 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePermanentlyLostPoolSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePermanentlyLostPoolSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePermanentlyLostTapeSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePermanentlyLostTapeSpectraS3ResponseParser.java
index 301a5ef39..f6682ebb6 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePermanentlyLostTapeSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePermanentlyLostTapeSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolFailureNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolFailureNotificationRegistrationSpectraS3ResponseParser.java
index 46fa2e9cf..776a33453 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolFailureNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolFailureNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolFailureSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolFailureSpectraS3ResponseParser.java
index 0b9d83b2e..04308e541 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolFailureSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolFailureSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolPartitionSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolPartitionSpectraS3ResponseParser.java
index ff392c838..552d4ec0f 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolPartitionSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeletePoolPartitionSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3DataReplicationRuleSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3DataReplicationRuleSpectraS3ResponseParser.java
index 7f7ae615c..5c68abd4d 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3DataReplicationRuleSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3DataReplicationRuleSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetBucketNameSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetBucketNameSpectraS3ResponseParser.java
index be3d0bf05..30d961102 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetBucketNameSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetBucketNameSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetFailureNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetFailureNotificationRegistrationSpectraS3ResponseParser.java
index 664a45eb5..fa130dbfc 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetFailureNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetFailureNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetFailureSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetFailureSpectraS3ResponseParser.java
index 4869ff73a..0900b6fb3 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetFailureSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetFailureSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetReadPreferenceSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetReadPreferenceSpectraS3ResponseParser.java
index 95a406174..34039417f 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetReadPreferenceSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetReadPreferenceSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetSpectraS3ResponseParser.java
index 87c24f22b..c6f532022 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteS3TargetSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainFailureNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainFailureNotificationRegistrationSpectraS3ResponseParser.java
index d11a1d196..e730331b9 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainFailureNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainFailureNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainFailureSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainFailureSpectraS3ResponseParser.java
index a1b20a586..8919bfe5a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainFailureSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainFailureSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainMemberSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainMemberSpectraS3ResponseParser.java
index 5b1349e3e..5ca232832 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainMemberSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainMemberSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainSpectraS3ResponseParser.java
index 73e36978f..64fed3179 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteStorageDomainSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteSystemFailureNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteSystemFailureNotificationRegistrationSpectraS3ResponseParser.java
index d67d7068c..c77451835 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteSystemFailureNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteSystemFailureNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeDensityDirectiveSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeDensityDirectiveSpectraS3ResponseParser.java
index 66702318d..b10d8134d 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeDensityDirectiveSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeDensityDirectiveSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeDriveSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeDriveSpectraS3ResponseParser.java
index 9591d6baa..9e824eeb0 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeDriveSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeDriveSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeFailureNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeFailureNotificationRegistrationSpectraS3ResponseParser.java
index 692684fb0..741202c98 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeFailureNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeFailureNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeFailureSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeFailureSpectraS3ResponseParser.java
index 8ef3e0058..d5aff3b2a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeFailureSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapeFailureSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionFailureNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionFailureNotificationRegistrationSpectraS3ResponseParser.java
index 9c7f37858..3fef0af15 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionFailureNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionFailureNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionFailureSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionFailureSpectraS3ResponseParser.java
index dcb120d50..5c8dff611 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionFailureSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionFailureSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionSpectraS3ResponseParser.java
index 47fa44872..9e83d1e3a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteTapePartitionSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectAllTapesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectAllTapesSpectraS3ResponseParser.java
index e64bbcb86..2bf12bf81 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectAllTapesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectAllTapesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectStorageDomainBlobsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectStorageDomainBlobsSpectraS3ResponseParser.java
index 144ab7708..209bcff48 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectStorageDomainBlobsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectStorageDomainBlobsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectStorageDomainSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectStorageDomainSpectraS3ResponseParser.java
index 2116ab562..a5146aa6b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectStorageDomainSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectStorageDomainSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectTapeSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectTapeSpectraS3ResponseParser.java
index 5848063fd..9788aeba9 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectTapeSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/EjectTapeSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceFeatureKeyValidationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceFeatureKeyValidationSpectraS3ResponseParser.java
index 77ded7f99..79085da93 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceFeatureKeyValidationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceFeatureKeyValidationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceFullCacheReclaimSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceFullCacheReclaimSpectraS3ResponseParser.java
index 90b2cd928..d2df49c05 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceFullCacheReclaimSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceFullCacheReclaimSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForcePoolEnvironmentRefreshSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForcePoolEnvironmentRefreshSpectraS3ResponseParser.java
index e0f99e7fe..9d03709ce 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForcePoolEnvironmentRefreshSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForcePoolEnvironmentRefreshSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceTapeEnvironmentRefreshSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceTapeEnvironmentRefreshSpectraS3ResponseParser.java
index c8c43e44d..1a16a23fb 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceTapeEnvironmentRefreshSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceTapeEnvironmentRefreshSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceTargetEnvironmentRefreshSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceTargetEnvironmentRefreshSpectraS3ResponseParser.java
index f9d49343d..905c41a00 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceTargetEnvironmentRefreshSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ForceTargetEnvironmentRefreshSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatAllForeignPoolsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatAllForeignPoolsSpectraS3ResponseParser.java
index 285468d79..e8f50d55b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatAllForeignPoolsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatAllForeignPoolsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatAllTapesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatAllTapesSpectraS3ResponseParser.java
index 56b0a1ed6..eb8bad1bf 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatAllTapesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatAllTapesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatForeignPoolSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatForeignPoolSpectraS3ResponseParser.java
index 07f97fd53..cf24e4c16 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatForeignPoolSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatForeignPoolSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatTapeSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatTapeSpectraS3ResponseParser.java
index 297672e49..09a5c58a3 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatTapeSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/FormatTapeSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAbmConfigSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAbmConfigSpectraS3ResponseParser.java
new file mode 100644
index 000000000..788eba251
--- /dev/null
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAbmConfigSpectraS3ResponseParser.java
@@ -0,0 +1,49 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+// This code is auto-generated, do not modify
+package com.spectralogic.ds3client.commands.parsers;
+
+import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
+import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
+import com.spectralogic.ds3client.commands.spectrads3.GetAbmConfigSpectraS3Response;
+import com.spectralogic.ds3client.models.AbmConfigApiBean;
+import com.spectralogic.ds3client.networking.WebResponse;
+import com.spectralogic.ds3client.serializer.XmlOutput;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class GetAbmConfigSpectraS3ResponseParser extends AbstractResponseParser {
+ private final int[] expectedStatusCodes = new int[]{200};
+
+ @Override
+ public GetAbmConfigSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
+ final int statusCode = response.getStatusCode();
+ if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
+ switch (statusCode) {
+ case 200:
+ try (final InputStream inputStream = response.getResponseStream()) {
+ final AbmConfigApiBean result = XmlOutput.fromXml(inputStream, AbmConfigApiBean.class);
+ return new GetAbmConfigSpectraS3Response(result, this.getChecksum(), this.getChecksumType());
+ }
+
+ default:
+ assert false: "validateStatusCode should have made it impossible to reach this line";
+ }
+ }
+
+ throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
+ }
+}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetActiveJobSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetActiveJobSpectraS3ResponseParser.java
index bf84240ba..9174ac1ec 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetActiveJobSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetActiveJobSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetActiveJobsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetActiveJobsSpectraS3ResponseParser.java
index 69987de82..b9a425dbf 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetActiveJobsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetActiveJobsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureDataReplicationRuleSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureDataReplicationRuleSpectraS3ResponseParser.java
index 1c96094f8..2e5fc1ab4 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureDataReplicationRuleSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureDataReplicationRuleSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureDataReplicationRulesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureDataReplicationRulesSpectraS3ResponseParser.java
index c36967b52..d3a8184eb 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureDataReplicationRulesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureDataReplicationRulesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetBucketNamesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetBucketNamesSpectraS3ResponseParser.java
index 4a709ffea..86b23301e 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetBucketNamesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetBucketNamesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser.java
index f192d5242..f67f8f1c0 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailureNotificationRegistrationSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailureNotificationRegistrationsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailureNotificationRegistrationsSpectraS3ResponseParser.java
index 4f90e9f1e..d2fa2201f 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailureNotificationRegistrationsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailureNotificationRegistrationsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailuresSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailuresSpectraS3ResponseParser.java
index 1d724da8c..21df5216d 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailuresSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetFailuresSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetReadPreferenceSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetReadPreferenceSpectraS3ResponseParser.java
index c3fecefb2..56760ec14 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetReadPreferenceSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetReadPreferenceSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetReadPreferencesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetReadPreferencesSpectraS3ResponseParser.java
index b795c13b9..a1d4e6062 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetReadPreferencesSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetReadPreferencesSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetSpectraS3ResponseParser.java
index fc42c339e..c71be8fe7 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetsSpectraS3ResponseParser.java
index 37e08e730..a927602c2 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetAzureTargetsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobPersistenceSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobPersistenceSpectraS3ResponseParser.java
index 5d76b29bf..c21039b2b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobPersistenceSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobPersistenceSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnAzureTargetSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnAzureTargetSpectraS3ResponseParser.java
index b1aebf9f9..8a44c8e76 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnAzureTargetSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnAzureTargetSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnDs3TargetSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnDs3TargetSpectraS3ResponseParser.java
index cd0abbd7a..1499aa80f 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnDs3TargetSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnDs3TargetSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnPoolSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnPoolSpectraS3ResponseParser.java
index 588d5675c..205cefb1a 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnPoolSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnPoolSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnS3TargetSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnS3TargetSpectraS3ResponseParser.java
index dd81fc1ef..ea47be3e8 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnS3TargetSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnS3TargetSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnTapeSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnTapeSpectraS3ResponseParser.java
index 150e6711b..72803261b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnTapeSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobsOnTapeSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
@@ -31,12 +31,14 @@ public class GetBlobsOnTapeSpectraS3ResponseParser extends AbstractResponseParse
@Override
public GetBlobsOnTapeSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
final int statusCode = response.getStatusCode();
+ final Integer pagingTruncated = parseIntHeader("page-truncated");
+ final Integer pagingTotalResultCount = parseIntHeader("total-result-count");
if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
switch (statusCode) {
case 200:
try (final InputStream inputStream = response.getResponseStream()) {
final BulkObjectList result = XmlOutput.fromXml(inputStream, BulkObjectList.class);
- return new GetBlobsOnTapeSpectraS3Response(result, this.getChecksum(), this.getChecksumType());
+ return new GetBlobsOnTapeSpectraS3Response(result, pagingTotalResultCount, pagingTruncated, this.getChecksum(), this.getChecksumType());
}
default:
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketAclSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketAclSpectraS3ResponseParser.java
index 4461080df..8322a972b 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketAclSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketAclSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketAclsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketAclsSpectraS3ResponseParser.java
index c8dc5ed17..ca1f038a4 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketAclsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketAclsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketCapacitySummarySpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketCapacitySummarySpectraS3ResponseParser.java
index 314b0b8e8..07a71ba01 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketCapacitySummarySpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketCapacitySummarySpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketChangesNotificationRegistrationSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketChangesNotificationRegistrationSpectraS3ResponseParser.java
new file mode 100644
index 000000000..22f66fa88
--- /dev/null
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketChangesNotificationRegistrationSpectraS3ResponseParser.java
@@ -0,0 +1,49 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+// This code is auto-generated, do not modify
+package com.spectralogic.ds3client.commands.parsers;
+
+import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
+import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
+import com.spectralogic.ds3client.commands.spectrads3.GetBucketChangesNotificationRegistrationSpectraS3Response;
+import com.spectralogic.ds3client.models.BucketChangesNotificationRegistration;
+import com.spectralogic.ds3client.networking.WebResponse;
+import com.spectralogic.ds3client.serializer.XmlOutput;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class GetBucketChangesNotificationRegistrationSpectraS3ResponseParser extends AbstractResponseParser {
+ private final int[] expectedStatusCodes = new int[]{200};
+
+ @Override
+ public GetBucketChangesNotificationRegistrationSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
+ final int statusCode = response.getStatusCode();
+ if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
+ switch (statusCode) {
+ case 200:
+ try (final InputStream inputStream = response.getResponseStream()) {
+ final BucketChangesNotificationRegistration result = XmlOutput.fromXml(inputStream, BucketChangesNotificationRegistration.class);
+ return new GetBucketChangesNotificationRegistrationSpectraS3Response(result, this.getChecksum(), this.getChecksumType());
+ }
+
+ default:
+ assert false: "validateStatusCode should have made it impossible to reach this line";
+ }
+ }
+
+ throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
+ }
+}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketChangesNotificationRegistrationsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketChangesNotificationRegistrationsSpectraS3ResponseParser.java
new file mode 100644
index 000000000..8fd7d3058
--- /dev/null
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketChangesNotificationRegistrationsSpectraS3ResponseParser.java
@@ -0,0 +1,51 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+// This code is auto-generated, do not modify
+package com.spectralogic.ds3client.commands.parsers;
+
+import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
+import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
+import com.spectralogic.ds3client.commands.spectrads3.GetBucketChangesNotificationRegistrationsSpectraS3Response;
+import com.spectralogic.ds3client.models.BucketChangesNotificationRegistrationList;
+import com.spectralogic.ds3client.networking.WebResponse;
+import com.spectralogic.ds3client.serializer.XmlOutput;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class GetBucketChangesNotificationRegistrationsSpectraS3ResponseParser extends AbstractResponseParser {
+ private final int[] expectedStatusCodes = new int[]{200};
+
+ @Override
+ public GetBucketChangesNotificationRegistrationsSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
+ final int statusCode = response.getStatusCode();
+ final Integer pagingTruncated = parseIntHeader("page-truncated");
+ final Integer pagingTotalResultCount = parseIntHeader("total-result-count");
+ if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
+ switch (statusCode) {
+ case 200:
+ try (final InputStream inputStream = response.getResponseStream()) {
+ final BucketChangesNotificationRegistrationList result = XmlOutput.fromXml(inputStream, BucketChangesNotificationRegistrationList.class);
+ return new GetBucketChangesNotificationRegistrationsSpectraS3Response(result, pagingTotalResultCount, pagingTruncated, this.getChecksum(), this.getChecksumType());
+ }
+
+ default:
+ assert false: "validateStatusCode should have made it impossible to reach this line";
+ }
+ }
+
+ throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
+ }
+}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketHistorySpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketHistorySpectraS3ResponseParser.java
new file mode 100644
index 000000000..4c4932d71
--- /dev/null
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketHistorySpectraS3ResponseParser.java
@@ -0,0 +1,51 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+// This code is auto-generated, do not modify
+package com.spectralogic.ds3client.commands.parsers;
+
+import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
+import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
+import com.spectralogic.ds3client.commands.spectrads3.GetBucketHistorySpectraS3Response;
+import com.spectralogic.ds3client.models.BucketHistoryEventList;
+import com.spectralogic.ds3client.networking.WebResponse;
+import com.spectralogic.ds3client.serializer.XmlOutput;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class GetBucketHistorySpectraS3ResponseParser extends AbstractResponseParser {
+ private final int[] expectedStatusCodes = new int[]{200};
+
+ @Override
+ public GetBucketHistorySpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
+ final int statusCode = response.getStatusCode();
+ final Integer pagingTruncated = parseIntHeader("page-truncated");
+ final Integer pagingTotalResultCount = parseIntHeader("total-result-count");
+ if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
+ switch (statusCode) {
+ case 200:
+ try (final InputStream inputStream = response.getResponseStream()) {
+ final BucketHistoryEventList result = XmlOutput.fromXml(inputStream, BucketHistoryEventList.class);
+ return new GetBucketHistorySpectraS3Response(result, pagingTotalResultCount, pagingTruncated, this.getChecksum(), this.getChecksumType());
+ }
+
+ default:
+ assert false: "validateStatusCode should have made it impossible to reach this line";
+ }
+ }
+
+ throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
+ }
+}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketResponseParser.java
index e74d22e03..ef6494930 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketSpectraS3ResponseParser.java
index f83a65313..950c9a563 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketsSpectraS3ResponseParser.java
index 8cb8b967a..244e541fa 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBucketsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBulkJobSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBulkJobSpectraS3ResponseParser.java
index fe3adc583..293d31b05 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBulkJobSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBulkJobSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheFilesystemSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheFilesystemSpectraS3ResponseParser.java
index 3769f37ba..f00b7fefc 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheFilesystemSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheFilesystemSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheFilesystemsSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheFilesystemsSpectraS3ResponseParser.java
index 2604784ee..c4e1e51da 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheFilesystemsSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheFilesystemsSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheStateSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheStateSpectraS3ResponseParser.java
index 789ea90fa..860a639f4 100644
--- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheStateSpectraS3ResponseParser.java
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheStateSpectraS3ResponseParser.java
@@ -1,6 +1,6 @@
/*
* ******************************************************************************
- * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is located at
*
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRuleSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRuleSpectraS3ResponseParser.java
new file mode 100644
index 000000000..416273a92
--- /dev/null
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRuleSpectraS3ResponseParser.java
@@ -0,0 +1,49 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+// This code is auto-generated, do not modify
+package com.spectralogic.ds3client.commands.parsers;
+
+import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
+import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
+import com.spectralogic.ds3client.commands.spectrads3.GetCacheThrottleRuleSpectraS3Response;
+import com.spectralogic.ds3client.models.CacheThrottleRule;
+import com.spectralogic.ds3client.networking.WebResponse;
+import com.spectralogic.ds3client.serializer.XmlOutput;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class GetCacheThrottleRuleSpectraS3ResponseParser extends AbstractResponseParser {
+ private final int[] expectedStatusCodes = new int[]{200};
+
+ @Override
+ public GetCacheThrottleRuleSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
+ final int statusCode = response.getStatusCode();
+ if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
+ switch (statusCode) {
+ case 200:
+ try (final InputStream inputStream = response.getResponseStream()) {
+ final CacheThrottleRule result = XmlOutput.fromXml(inputStream, CacheThrottleRule.class);
+ return new GetCacheThrottleRuleSpectraS3Response(result, this.getChecksum(), this.getChecksumType());
+ }
+
+ default:
+ assert false: "validateStatusCode should have made it impossible to reach this line";
+ }
+ }
+
+ throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
+ }
+}
\ No newline at end of file
diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRulesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRulesSpectraS3ResponseParser.java
new file mode 100644
index 000000000..e6c65bb63
--- /dev/null
+++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRulesSpectraS3ResponseParser.java
@@ -0,0 +1,51 @@
+/*
+ * ******************************************************************************
+ * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file.
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * ****************************************************************************
+ */
+
+// This code is auto-generated, do not modify
+package com.spectralogic.ds3client.commands.parsers;
+
+import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
+import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
+import com.spectralogic.ds3client.commands.spectrads3.GetCacheThrottleRulesSpectraS3Response;
+import com.spectralogic.ds3client.models.CacheThrottleRuleList;
+import com.spectralogic.ds3client.networking.WebResponse;
+import com.spectralogic.ds3client.serializer.XmlOutput;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class GetCacheThrottleRulesSpectraS3ResponseParser extends AbstractResponseParser