Skip to content

Commit f756441

Browse files
S3 Tables now supports sort and z-order compaction strategies for Iceberg tables in addition to binpack.
1 parent b4fa6b3 commit f756441

13 files changed

+194
-40
lines changed

generator/ServiceModels/s3tables/s3tables-2018-05-10.api.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,9 +1173,19 @@
11731173
"IcebergCompactionSettings":{
11741174
"type":"structure",
11751175
"members":{
1176-
"targetFileSizeMB":{"shape":"PositiveInteger"}
1176+
"targetFileSizeMB":{"shape":"PositiveInteger"},
1177+
"strategy":{"shape":"IcebergCompactionStrategy"}
11771178
}
11781179
},
1180+
"IcebergCompactionStrategy":{
1181+
"type":"string",
1182+
"enum":[
1183+
"auto",
1184+
"binpack",
1185+
"sort",
1186+
"z-order"
1187+
]
1188+
},
11791189
"IcebergMetadata":{
11801190
"type":"structure",
11811191
"required":["schema"],

generator/ServiceModels/s3tables/s3tables-2018-05-10.docs.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"GetTableBucketMaintenanceConfiguration": "<p>Gets details about a maintenance configuration for a given table bucket. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-table-buckets-maintenance.html\">Amazon S3 table bucket maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTableBucketMaintenanceConfiguration</code> permission to use this operation. </p> </dd> </dl>",
1919
"GetTableBucketPolicy": "<p>Gets details about a table bucket policy. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-bucket-policy.html#table-bucket-policy-get\">Viewing a table bucket policy</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTableBucketPolicy</code> permission to use this operation. </p> </dd> </dl>",
2020
"GetTableEncryption": "<p>Gets the encryption configuration for a table.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTableEncryption</code> permission to use this operation.</p> </dd> </dl>",
21-
"GetTableMaintenanceConfiguration": "<p>Gets details about the maintenance configuration of a table. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html\">S3 Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTableMaintenanceConfiguration</code> permission to use this operation. </p> </dd> </dl>",
21+
"GetTableMaintenanceConfiguration": "<p>Gets details about the maintenance configuration of a table. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html\">S3 Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <ul> <li> <p>You must have the <code>s3tables:GetTableMaintenanceConfiguration</code> permission to use this operation. </p> </li> <li> <p>You must have the <code>s3tables:GetTableData</code> permission to use set the compaction strategy to <code>sort</code> or <code>zorder</code>.</p> </li> </ul> </dd> </dl>",
2222
"GetTableMaintenanceJobStatus": "<p>Gets the status of a maintenance job for a table. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html\">S3 Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTableMaintenanceJobStatus</code> permission to use this operation. </p> </dd> </dl>",
2323
"GetTableMetadataLocation": "<p>Gets the location of the table metadata.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTableMetadataLocation</code> permission to use this operation. </p> </dd> </dl>",
2424
"GetTablePolicy": "<p>Gets details about a table policy. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-table-policy.html#table-policy-get\">Viewing a table policy</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTablePolicy</code> permission to use this operation. </p> </dd> </dl>",
@@ -284,6 +284,12 @@
284284
"TableMaintenanceSettings$icebergCompaction": "<p>Contains details about the Iceberg compaction settings for the table.</p>"
285285
}
286286
},
287+
"IcebergCompactionStrategy": {
288+
"base": null,
289+
"refs": {
290+
"IcebergCompactionSettings$strategy": "<p>The compaction strategy to use for the table. This determines how files are selected and combined during compaction operations.</p>"
291+
}
292+
},
287293
"IcebergMetadata": {
288294
"base": "<p>Contains details about the metadata for an Iceberg table.</p>",
289295
"refs": {

generator/ServiceModels/s3tables/s3tables-2018-05-10.normal.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
{"shape":"ConflictException"},
338338
{"shape":"BadRequestException"}
339339
],
340-
"documentation":"<p>Gets details about the maintenance configuration of a table. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html\">S3 Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTableMaintenanceConfiguration</code> permission to use this operation. </p> </dd> </dl>"
340+
"documentation":"<p>Gets details about the maintenance configuration of a table. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html\">S3 Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <ul> <li> <p>You must have the <code>s3tables:GetTableMaintenanceConfiguration</code> permission to use this operation. </p> </li> <li> <p>You must have the <code>s3tables:GetTableData</code> permission to use set the compaction strategy to <code>sort</code> or <code>zorder</code>.</p> </li> </ul> </dd> </dl>"
341341
},
342342
"GetTableMaintenanceJobStatus":{
343343
"name":"GetTableMaintenanceJobStatus",
@@ -1413,10 +1413,23 @@
14131413
"targetFileSizeMB":{
14141414
"shape":"PositiveInteger",
14151415
"documentation":"<p>The target file size for the table in MB.</p>"
1416+
},
1417+
"strategy":{
1418+
"shape":"IcebergCompactionStrategy",
1419+
"documentation":"<p>The compaction strategy to use for the table. This determines how files are selected and combined during compaction operations.</p>"
14161420
}
14171421
},
14181422
"documentation":"<p>Contains details about the compaction settings for an Iceberg table.</p>"
14191423
},
1424+
"IcebergCompactionStrategy":{
1425+
"type":"string",
1426+
"enum":[
1427+
"auto",
1428+
"binpack",
1429+
"sort",
1430+
"z-order"
1431+
]
1432+
},
14201433
"IcebergMetadata":{
14211434
"type":"structure",
14221435
"required":["schema"],

generator/ServiceModels/s3tables/s3tables-2018-05-10.smoke2.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,11 @@
3535
"useAccountIdRouting" : true
3636
}
3737
}, {
38-
"id" : "GetNamespace_AccessDeniedException",
39-
"operationName" : "GetNamespace",
40-
"input" : {
41-
"tableBucketARN" : "arn:aws:s3tables:us-east-1:123456789012:bucket/does-not-exist",
42-
"namespace" : "doesnotexist"
43-
},
38+
"id" : "ListTableBuckets_Success",
39+
"operationName" : "ListTableBuckets",
40+
"input" : { },
4441
"expectation" : {
45-
"failure" : {
46-
"errorId" : "AccessDeniedException"
47-
}
42+
"success" : { }
4843
},
4944
"config" : {
5045
"region" : "us-east-1",
@@ -53,10 +48,12 @@
5348
"useAccountIdRouting" : true
5449
}
5550
}, {
56-
"id" : "ListTables_AccessDeniedException",
57-
"operationName" : "ListTables",
51+
"id" : "GetTable_AccessDeniedException",
52+
"operationName" : "GetTable",
5853
"input" : {
59-
"tableBucketARN" : "arn:aws:s3tables:us-east-1:123456789012:bucket/does-not-exist"
54+
"tableBucketARN" : "arn:aws:s3tables:us-east-1:123456789012:bucket/does-not-exist",
55+
"namespace" : "doesnotexist",
56+
"name" : "doesnotexist"
6057
},
6158
"expectation" : {
6259
"failure" : {
@@ -70,12 +67,10 @@
7067
"useAccountIdRouting" : true
7168
}
7269
}, {
73-
"id" : "GetTable_AccessDeniedException",
70+
"id" : "GetTableArn_AccessDeniedException",
7471
"operationName" : "GetTable",
7572
"input" : {
76-
"tableBucketARN" : "arn:aws:s3tables:us-east-1:123456789012:bucket/does-not-exist",
77-
"namespace" : "doesnotexist",
78-
"name" : "doesnotexist"
73+
"tableArn" : "arn:aws:s3tables:us-east-1:123456789012:bucket/does-not-exist/table/f577d6ca-c1dd-4686-9f41-62130a40e91b"
7974
},
8075
"expectation" : {
8176
"failure" : {
@@ -89,10 +84,10 @@
8984
"useAccountIdRouting" : true
9085
}
9186
}, {
92-
"id" : "GetTableArn_AccessDeniedException",
93-
"operationName" : "GetTable",
87+
"id" : "ListTables_AccessDeniedException",
88+
"operationName" : "ListTables",
9489
"input" : {
95-
"tableArn" : "arn:aws:s3tables:us-east-1:123456789012:bucket/does-not-exist/table/f577d6ca-c1dd-4686-9f41-62130a40e91b"
90+
"tableBucketARN" : "arn:aws:s3tables:us-east-1:123456789012:bucket/does-not-exist"
9691
},
9792
"expectation" : {
9893
"failure" : {
@@ -106,11 +101,16 @@
106101
"useAccountIdRouting" : true
107102
}
108103
}, {
109-
"id" : "ListTableBuckets_Success",
110-
"operationName" : "ListTableBuckets",
111-
"input" : { },
104+
"id" : "GetNamespace_AccessDeniedException",
105+
"operationName" : "GetNamespace",
106+
"input" : {
107+
"tableBucketARN" : "arn:aws:s3tables:us-east-1:123456789012:bucket/does-not-exist",
108+
"namespace" : "doesnotexist"
109+
},
112110
"expectation" : {
113-
"success" : { }
111+
"failure" : {
112+
"errorId" : "AccessDeniedException"
113+
}
114114
},
115115
"config" : {
116116
"region" : "us-east-1",

sdk/src/Services/S3Tables/Generated/Model/GetTableMaintenanceConfigurationRequest.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,17 @@ namespace Amazon.S3Tables.Model
3535
/// see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html">S3
3636
/// Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.
3737
///
38-
/// <dl> <dt>Permissions</dt> <dd>
38+
/// <dl> <dt>Permissions</dt> <dd> <ul> <li>
3939
/// <para>
4040
/// You must have the <c>s3tables:GetTableMaintenanceConfiguration</c> permission to use
4141
/// this operation.
4242
/// </para>
43-
/// </dd> </dl>
43+
/// </li> <li>
44+
/// <para>
45+
/// You must have the <c>s3tables:GetTableData</c> permission to use set the compaction
46+
/// strategy to <c>sort</c> or <c>zorder</c>.
47+
/// </para>
48+
/// </li> </ul> </dd> </dl>
4449
/// </summary>
4550
public partial class GetTableMaintenanceConfigurationRequest : AmazonS3TablesRequest
4651
{

sdk/src/Services/S3Tables/Generated/Model/IcebergCompactionSettings.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,28 @@ namespace Amazon.S3Tables.Model
3434
/// </summary>
3535
public partial class IcebergCompactionSettings
3636
{
37+
private IcebergCompactionStrategy _strategy;
3738
private int? _targetFileSizeMB;
3839

40+
/// <summary>
41+
/// Gets and sets the property Strategy.
42+
/// <para>
43+
/// The compaction strategy to use for the table. This determines how files are selected
44+
/// and combined during compaction operations.
45+
/// </para>
46+
/// </summary>
47+
public IcebergCompactionStrategy Strategy
48+
{
49+
get { return this._strategy; }
50+
set { this._strategy = value; }
51+
}
52+
53+
// Check to see if Strategy property is set
54+
internal bool IsSetStrategy()
55+
{
56+
return this._strategy != null;
57+
}
58+
3959
/// <summary>
4060
/// Gets and sets the property TargetFileSizeMB.
4161
/// <para>

sdk/src/Services/S3Tables/Generated/Model/Internal/MarshallTransformations/IcebergCompactionSettingsMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ public void Marshall(IcebergCompactionSettings requestObject, JsonMarshallerCont
4646
{
4747
if(requestObject == null)
4848
return;
49+
if(requestObject.IsSetStrategy())
50+
{
51+
context.Writer.WritePropertyName("strategy");
52+
context.Writer.WriteStringValue(requestObject.Strategy);
53+
}
54+
4955
if(requestObject.IsSetTargetFileSizeMB())
5056
{
5157
context.Writer.WritePropertyName("targetFileSizeMB");

sdk/src/Services/S3Tables/Generated/Model/Internal/MarshallTransformations/IcebergCompactionSettingsUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ public IcebergCompactionSettings Unmarshall(JsonUnmarshallerContext context, ref
5656
int targetDepth = context.CurrentDepth;
5757
while (context.ReadAtDepth(targetDepth, ref reader))
5858
{
59+
if (context.TestExpression("strategy", targetDepth))
60+
{
61+
var unmarshaller = StringUnmarshaller.Instance;
62+
unmarshalledObject.Strategy = unmarshaller.Unmarshall(context, ref reader);
63+
continue;
64+
}
5965
if (context.TestExpression("targetFileSizeMB", targetDepth))
6066
{
6167
var unmarshaller = NullableIntUnmarshaller.Instance;

sdk/src/Services/S3Tables/Generated/ServiceEnumerations.cs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,64 @@
2424
namespace Amazon.S3Tables
2525
{
2626

27+
/// <summary>
28+
/// Constants used for properties of type IcebergCompactionStrategy.
29+
/// </summary>
30+
public class IcebergCompactionStrategy : ConstantClass
31+
{
32+
33+
/// <summary>
34+
/// Constant Auto for IcebergCompactionStrategy
35+
/// </summary>
36+
public static readonly IcebergCompactionStrategy Auto = new IcebergCompactionStrategy("auto");
37+
/// <summary>
38+
/// Constant Binpack for IcebergCompactionStrategy
39+
/// </summary>
40+
public static readonly IcebergCompactionStrategy Binpack = new IcebergCompactionStrategy("binpack");
41+
/// <summary>
42+
/// Constant Sort for IcebergCompactionStrategy
43+
/// </summary>
44+
public static readonly IcebergCompactionStrategy Sort = new IcebergCompactionStrategy("sort");
45+
/// <summary>
46+
/// Constant ZOrder for IcebergCompactionStrategy
47+
/// </summary>
48+
public static readonly IcebergCompactionStrategy ZOrder = new IcebergCompactionStrategy("z-order");
49+
50+
/// <summary>
51+
/// This constant constructor does not need to be called if the constant
52+
/// you are attempting to use is already defined as a static instance of
53+
/// this class.
54+
/// This constructor should be used to construct constants that are not
55+
/// defined as statics, for instance if attempting to use a feature that is
56+
/// newer than the current version of the SDK.
57+
/// </summary>
58+
public IcebergCompactionStrategy(string value)
59+
: base(value)
60+
{
61+
}
62+
63+
/// <summary>
64+
/// Finds the constant for the unique value.
65+
/// </summary>
66+
/// <param name="value">The unique value for the constant</param>
67+
/// <returns>The constant for the unique value</returns>
68+
public static IcebergCompactionStrategy FindValue(string value)
69+
{
70+
return FindValue<IcebergCompactionStrategy>(value);
71+
}
72+
73+
/// <summary>
74+
/// Utility method to convert strings to the constant class.
75+
/// </summary>
76+
/// <param name="value">The string value to convert to the constant class.</param>
77+
/// <returns></returns>
78+
public static implicit operator IcebergCompactionStrategy(string value)
79+
{
80+
return FindValue(value);
81+
}
82+
}
83+
84+
2785
/// <summary>
2886
/// Constants used for properties of type JobStatus.
2987
/// </summary>

sdk/src/Services/S3Tables/Generated/_bcl/AmazonS3TablesClient.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,12 +1845,17 @@ public virtual GetTableEncryptionResponse GetTableEncryption(GetTableEncryptionR
18451845
/// see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html">S3
18461846
/// Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.
18471847
///
1848-
/// <dl> <dt>Permissions</dt> <dd>
1848+
/// <dl> <dt>Permissions</dt> <dd> <ul> <li>
18491849
/// <para>
18501850
/// You must have the <c>s3tables:GetTableMaintenanceConfiguration</c> permission to use
18511851
/// this operation.
18521852
/// </para>
1853-
/// </dd> </dl>
1853+
/// </li> <li>
1854+
/// <para>
1855+
/// You must have the <c>s3tables:GetTableData</c> permission to use set the compaction
1856+
/// strategy to <c>sort</c> or <c>zorder</c>.
1857+
/// </para>
1858+
/// </li> </ul> </dd> </dl>
18541859
/// </summary>
18551860
/// <param name="request">Container for the necessary parameters to execute the GetTableMaintenanceConfiguration service method.</param>
18561861
///
@@ -1890,12 +1895,17 @@ public virtual GetTableMaintenanceConfigurationResponse GetTableMaintenanceConfi
18901895
/// see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html">S3
18911896
/// Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.
18921897
///
1893-
/// <dl> <dt>Permissions</dt> <dd>
1898+
/// <dl> <dt>Permissions</dt> <dd> <ul> <li>
18941899
/// <para>
18951900
/// You must have the <c>s3tables:GetTableMaintenanceConfiguration</c> permission to use
18961901
/// this operation.
18971902
/// </para>
1898-
/// </dd> </dl>
1903+
/// </li> <li>
1904+
/// <para>
1905+
/// You must have the <c>s3tables:GetTableData</c> permission to use set the compaction
1906+
/// strategy to <c>sort</c> or <c>zorder</c>.
1907+
/// </para>
1908+
/// </li> </ul> </dd> </dl>
18991909
/// </summary>
19001910
/// <param name="request">Container for the necessary parameters to execute the GetTableMaintenanceConfiguration service method.</param>
19011911
/// <param name="cancellationToken">

0 commit comments

Comments
 (0)