Add Support for S3 Intelligent Tiering (#39376) (#39620)

* Add support for S3 intelligent tiering
* Closes #38836
This commit is contained in:
Armin Braun 2019-03-04 10:32:37 +01:00 committed by GitHub
parent 0f65390c29
commit 65732d707f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 12 additions and 9 deletions

View File

@ -244,8 +244,9 @@ The following settings are supported:
`storage_class`::
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 classes. Additionally, S3 Lifecycle Policies can be used to manage
the storage class of existing objects. Due to the extra complexity with the

View File

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

View File

@ -1 +0,0 @@
43f3b7332d4d527bbf34d4ac6be094f3dabec6de

View File

@ -0,0 +1 @@
d19328c227b2b5ad81d137361ebc9cbcd0396465

View File

@ -1 +0,0 @@
e29854e58dc20f5453c1da7e580a5921b1e9714a

View File

@ -0,0 +1 @@
2a219919090a6cadd7e119c899c90343ad9c0077

View File

@ -1 +0,0 @@
5c3c2c57b076602b3aeef841c63e5848ec52b00d

View File

@ -0,0 +1 @@
b4cf82765b04a579609314ab7f296a9a0ddae1cf

View File

@ -1 +0,0 @@
06c291d1029943d4968a36fadffa3b71a6d8b4e4

View File

@ -0,0 +1 @@
067234d307b210097e247a49f08875e0cd3f2b95

View File

@ -130,7 +130,7 @@ class S3Repository extends BlobStoreRepository {
/**
* 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");

View File

@ -74,16 +74,18 @@ public class S3BlobStoreTests extends ESBlobStoreTestCase {
assertThat(S3BlobStore.initStorageClass(null), 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_ia"), equalTo(StorageClass.StandardInfrequentAccess));
assertThat(S3BlobStore.initStorageClass("reduced_redundancy"), equalTo(StorageClass.ReducedRedundancy));
assertThat(S3BlobStore.initStorageClass("intelligent_tiering"), equalTo(StorageClass.IntelligentTiering));
}
public void testCaseInsensitiveStorageClass() {
assertThat(S3BlobStore.initStorageClass("sTandaRd"), equalTo(StorageClass.Standard));
assertThat(S3BlobStore.initStorageClass("sTandaRd_Ia"), equalTo(StorageClass.StandardInfrequentAccess));
assertThat(S3BlobStore.initStorageClass("reduCED_redundancy"), equalTo(StorageClass.ReducedRedundancy));
assertThat(S3BlobStore.initStorageClass("intelLigeNt_tieriNG"), equalTo(StorageClass.IntelligentTiering));
}
public void testInvalidStorageClass() {