Skip to content

add intelligent tiering storage class#3032

Closed
arpit1997 wants to merge 1 commit intotrinodb:masterfrom
arpit1997:add-intelligent-tiering
Closed

add intelligent tiering storage class#3032
arpit1997 wants to merge 1 commit intotrinodb:masterfrom
arpit1997:add-intelligent-tiering

Conversation

@arpit1997
Copy link
Member

  • Added support for configuring storage class at the time of writing data.
  • Currently supported Storage classes are standard and Intelligent Tiering.

Info on S3 Storage classes: https://aws.amazon.com/s3/storage-classes/

Cleaned up the PR #2686

Copy link
Member

@Praveen2112 Praveen2112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. A few nits

.setS3PathStyleAccess(true)
.setS3UseInstanceCredentials(false)
.setS3IamRole("roleArn")
.setS3StorageClass(PrestoS3StorageClass.INTELLIGENT_TIERING)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can import the enum directly

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Praveen2112 Importing Enum directly might look off since PrestoS3SignerType and PrestoS3AclType are used without importing Enum directly.

*/
package io.prestosql.plugin.hive.s3;

import com.amazonaws.services.s3.model.StorageClass;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import com.amazonaws.services.s3.model.StorageClass;
import com.amazonaws.services.s3.model.StorageClass.Standard;
import com.amazonaws.services.s3.model.StorageClass.IntelligentTiering;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Praveen2112 These statement below might look confusing if I import the storage classes Standard and IntelligentTiering directly

   STANDARD(Standard),
   INTELLIGENT_TIERING(IntelligentTiering);

Should I still change this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#2686 (comment) -- ie do not import them

private String s3AwsAccessKey;
private String s3AwsSecretKey;
private String s3Endpoint;
private PrestoS3StorageClass s3StorageClass = PrestoS3StorageClass.STANDARD;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we directly import the enum ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Praveen2112 Importing Enum directly might look off since PrestoS3SignerType and PrestoS3AclType are used without importing Enum directly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if static import removes readability, it's should not be used;

here it is OK to static import, except it would be inconsistent. Please keep as is (inconsistency decreases readability)

@findepi
Copy link
Member

findepi commented Mar 7, 2020

Merged, thanks!

@findepi findepi closed this Mar 7, 2020
@findepi findepi added this to the 331 milestone Mar 7, 2020
@findepi findepi mentioned this pull request Mar 7, 2020
6 tasks
@arpit1997 arpit1997 deleted the add-intelligent-tiering branch March 11, 2020 11:19
v-jizhang added a commit to v-jizhang/presto that referenced this pull request Apr 30, 2021
Cherry pick of trinodb/trino#3032

Co-authored-by Arpit Solanki <solankiarpit1997@gmail.com>
arhimondr pushed a commit to prestodb/presto that referenced this pull request May 12, 2021
Cherry pick of trinodb/trino#3032

Co-authored-by Arpit Solanki <solankiarpit1997@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants