Browse Source

Add Support for S3 Intelligent Tiering (#39376)

* Add support for S3 intelligent tiering
* Closes #38836
Pedro Silva 6 years ago
parent
commit
518f5ffd0b

+ 3 - 2
docs/plugins/repository-s3.asciidoc

@@ -244,8 +244,9 @@ The following settings are supported:
 `storage_class`::
 `storage_class`::
 
 
     Sets the S3 storage class for objects stored in the snapshot repository.
     Sets the S3 storage class for objects stored in the snapshot repository.
-    Values may be `standard`, `reduced_redundancy`, `standard_ia`.  Defaults to
-    `standard`. Changing this setting on an existing repository only affects the
+    Values may be `standard`, `reduced_redundancy`, `standard_ia`
+    and `intelligent_tiering`. Defaults to `standard`.
+    Changing this setting on an existing repository only affects the
     storage class for newly created objects, resulting in a mixed usage of
     storage class for newly created objects, resulting in a mixed usage of
     storage classes. Additionally, S3 Lifecycle Policies can be used to manage
     storage classes. Additionally, S3 Lifecycle Policies can be used to manage
     the storage class of existing objects.  Due to the extra complexity with the
     the storage class of existing objects.  Due to the extra complexity with the

+ 1 - 1
plugins/repository-s3/build.gradle

@@ -30,7 +30,7 @@ esplugin {
 }
 }
 
 
 versions << [
 versions << [
-  'aws': '1.11.406'
+  'aws': '1.11.505'
 ]
 ]
 
 
 dependencies {
 dependencies {

+ 0 - 1
plugins/repository-s3/licenses/aws-java-sdk-core-1.11.406.jar.sha1

@@ -1 +0,0 @@
-43f3b7332d4d527bbf34d4ac6be094f3dabec6de

+ 1 - 0
plugins/repository-s3/licenses/aws-java-sdk-core-1.11.505.jar.sha1

@@ -0,0 +1 @@
+d19328c227b2b5ad81d137361ebc9cbcd0396465

+ 0 - 1
plugins/repository-s3/licenses/aws-java-sdk-kms-1.11.406.jar.sha1

@@ -1 +0,0 @@
-e29854e58dc20f5453c1da7e580a5921b1e9714a

+ 1 - 0
plugins/repository-s3/licenses/aws-java-sdk-kms-1.11.505.jar.sha1

@@ -0,0 +1 @@
+2a219919090a6cadd7e119c899c90343ad9c0077

+ 0 - 1
plugins/repository-s3/licenses/aws-java-sdk-s3-1.11.406.jar.sha1

@@ -1 +0,0 @@
-5c3c2c57b076602b3aeef841c63e5848ec52b00d

+ 1 - 0
plugins/repository-s3/licenses/aws-java-sdk-s3-1.11.505.jar.sha1

@@ -0,0 +1 @@
+b4cf82765b04a579609314ab7f296a9a0ddae1cf

+ 0 - 1
plugins/repository-s3/licenses/jmespath-java-1.11.406.jar.sha1

@@ -1 +0,0 @@
-06c291d1029943d4968a36fadffa3b71a6d8b4e4

+ 1 - 0
plugins/repository-s3/licenses/jmespath-java-1.11.505.jar.sha1

@@ -0,0 +1 @@
+067234d307b210097e247a49f08875e0cd3f2b95

+ 1 - 1
plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java

@@ -124,7 +124,7 @@ class S3Repository extends BlobStoreRepository {
 
 
     /**
     /**
      * Sets the S3 storage class type for the backup files. Values may be standard, reduced_redundancy,
      * Sets the S3 storage class type for the backup files. Values may be standard, reduced_redundancy,
-     * standard_ia. Defaults to standard.
+     * standard_ia and intelligent_tiering. Defaults to standard.
      */
      */
     static final Setting<String> STORAGE_CLASS_SETTING = Setting.simpleString("storage_class");
     static final Setting<String> STORAGE_CLASS_SETTING = Setting.simpleString("storage_class");
 
 

+ 3 - 1
plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreTests.java

@@ -74,16 +74,18 @@ public class S3BlobStoreTests extends ESBlobStoreTestCase {
         assertThat(S3BlobStore.initStorageClass(null), equalTo(StorageClass.Standard));
         assertThat(S3BlobStore.initStorageClass(null), equalTo(StorageClass.Standard));
         assertThat(S3BlobStore.initStorageClass(""), equalTo(StorageClass.Standard));
         assertThat(S3BlobStore.initStorageClass(""), equalTo(StorageClass.Standard));
 
 
-        // it should accept [standard, standard_ia, reduced_redundancy]
+        // it should accept [standard, standard_ia, reduced_redundancy, intelligent_tiering]
         assertThat(S3BlobStore.initStorageClass("standard"), equalTo(StorageClass.Standard));
         assertThat(S3BlobStore.initStorageClass("standard"), equalTo(StorageClass.Standard));
         assertThat(S3BlobStore.initStorageClass("standard_ia"), equalTo(StorageClass.StandardInfrequentAccess));
         assertThat(S3BlobStore.initStorageClass("standard_ia"), equalTo(StorageClass.StandardInfrequentAccess));
         assertThat(S3BlobStore.initStorageClass("reduced_redundancy"), equalTo(StorageClass.ReducedRedundancy));
         assertThat(S3BlobStore.initStorageClass("reduced_redundancy"), equalTo(StorageClass.ReducedRedundancy));
+        assertThat(S3BlobStore.initStorageClass("intelligent_tiering"), equalTo(StorageClass.IntelligentTiering));
     }
     }
 
 
     public void testCaseInsensitiveStorageClass() {
     public void testCaseInsensitiveStorageClass() {
         assertThat(S3BlobStore.initStorageClass("sTandaRd"), equalTo(StorageClass.Standard));
         assertThat(S3BlobStore.initStorageClass("sTandaRd"), equalTo(StorageClass.Standard));
         assertThat(S3BlobStore.initStorageClass("sTandaRd_Ia"), equalTo(StorageClass.StandardInfrequentAccess));
         assertThat(S3BlobStore.initStorageClass("sTandaRd_Ia"), equalTo(StorageClass.StandardInfrequentAccess));
         assertThat(S3BlobStore.initStorageClass("reduCED_redundancy"), equalTo(StorageClass.ReducedRedundancy));
         assertThat(S3BlobStore.initStorageClass("reduCED_redundancy"), equalTo(StorageClass.ReducedRedundancy));
+        assertThat(S3BlobStore.initStorageClass("intelLigeNt_tieriNG"), equalTo(StorageClass.IntelligentTiering));
     }
     }
 
 
     public void testInvalidStorageClass() {
     public void testInvalidStorageClass() {