You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ja...@apache.org on 2022/02/12 20:21:56 UTC
[iceberg] branch master updated: AWS: fix inconsistency of S3 checksum feature names (#4103)
This is an automated email from the ASF dual-hosted git repository.
jackye pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new 9be2c4a AWS: fix inconsistency of S3 checksum feature names (#4103)
9be2c4a is described below
commit 9be2c4a59563a7a85526b860a8eb945a868ce271
Author: Jack Ye <yz...@amazon.com>
AuthorDate: Sat Feb 12 12:21:36 2022 -0800
AWS: fix inconsistency of S3 checksum feature names (#4103)
---
.../main/java/org/apache/iceberg/aws/AwsProperties.java | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/aws/src/main/java/org/apache/iceberg/aws/AwsProperties.java b/aws/src/main/java/org/apache/iceberg/aws/AwsProperties.java
index 4bbb91e..fef845a 100644
--- a/aws/src/main/java/org/apache/iceberg/aws/AwsProperties.java
+++ b/aws/src/main/java/org/apache/iceberg/aws/AwsProperties.java
@@ -166,6 +166,12 @@ public class AwsProperties implements Serializable {
public static final String S3FILEIO_SESSION_TOKEN = "s3.session-token";
/**
+ * Enables eTag checks for S3 PUT and MULTIPART upload requests.
+ */
+ public static final String S3_CHECKSUM_ENABLED = "s3.checksum-enabled";
+ public static final boolean S3_CHECKSUM_ENABLED_DEFAULT = false;
+
+ /**
* DynamoDB table name for {@link DynamoDbCatalog}
*/
public static final String DYNAMODB_TABLE_NAME = "dynamodb.table-name";
@@ -210,9 +216,9 @@ public class AwsProperties implements Serializable {
public static final String CLIENT_ASSUME_ROLE_REGION = "client.assume-role.region";
/**
- * Enables eTag checks for S3 PUT and MULTIPART upload requests.
+ * @deprecated will be removed at 0.15.0, please use {@link #S3_CHECKSUM_ENABLED_DEFAULT} instead
*/
- public static final String S3_CHECKSUM_ENABLED = "s3.checksum-enabled";
+ @Deprecated
public static final boolean CLIENT_ENABLE_ETAG_CHECK_DEFAULT = false;
private String s3FileIoSseType;
@@ -241,6 +247,7 @@ public class AwsProperties implements Serializable {
this.s3FileIoMultiPartSize = S3FILEIO_MULTIPART_SIZE_DEFAULT;
this.s3FileIoMultipartThresholdFactor = S3FILEIO_MULTIPART_THRESHOLD_FACTOR_DEFAULT;
this.s3fileIoStagingDirectory = System.getProperty("java.io.tmpdir");
+ this.isS3ChecksumEnabled = S3_CHECKSUM_ENABLED_DEFAULT;
this.glueCatalogId = null;
this.glueCatalogSkipArchive = GLUE_CATALOG_SKIP_ARCHIVE_DEFAULT;
@@ -290,11 +297,11 @@ public class AwsProperties implements Serializable {
Preconditions.checkArgument(s3FileIoAcl == null || !s3FileIoAcl.equals(ObjectCannedACL.UNKNOWN_TO_SDK_VERSION),
"Cannot support S3 CannedACL " + aclType);
+ this.isS3ChecksumEnabled = PropertyUtil.propertyAsBoolean(properties, S3_CHECKSUM_ENABLED,
+ S3_CHECKSUM_ENABLED_DEFAULT);
+
this.dynamoDbTableName = PropertyUtil.propertyAsString(properties, DYNAMODB_TABLE_NAME,
DYNAMODB_TABLE_NAME_DEFAULT);
-
- this.isS3ChecksumEnabled = PropertyUtil.propertyAsBoolean(properties, S3_CHECKSUM_ENABLED,
- CLIENT_ENABLE_ETAG_CHECK_DEFAULT);
}
public String s3FileIoSseType() {