Skip to content

Commit 08f5335

Browse files
Added support for Amazon WorkSpaces Instances API
S3 Tables now supports sort and z-order compaction strategies for Iceberg tables in addition to binpack. AWS Glue now supports sort and z-order strategy for managed automated compaction for Iceberg tables in addition to binpack.
1 parent a87fe0a commit 08f5335

File tree

222 files changed

+19139
-820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+19139
-820
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.593
1+
1.11.594
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
add_project(workspaces-instances-smoke-tests
2+
"Tests for the AWS WORKSPACES-INSTANCES C++ SDK"
3+
testing-resources
4+
aws-cpp-sdk-workspaces-instances
5+
aws-cpp-sdk-core
6+
)
7+
file(GLOB AWS_WORKSPACES-INSTANCES_GENERATED_SMOKE_TEST_SRC
8+
"${CMAKE_CURRENT_SOURCE_DIR}/../RunTests.cpp"
9+
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
10+
)
11+
if(MSVC AND BUILD_SHARED_LIBS)
12+
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
13+
endif()
14+
15+
if (CMAKE_CROSSCOMPILING)
16+
set(AUTORUN_UNIT_TESTS OFF)
17+
endif()
18+
19+
if (AUTORUN_UNIT_TESTS)
20+
enable_testing()
21+
endif()
22+
23+
if(PLATFORM_ANDROID AND BUILD_SHARED_LIBS)
24+
add_library(${PROJECT_NAME} "${AWS_WORKSPACES-INSTANCES_GENERATED_SMOKE_TEST_SRC}")
25+
else()
26+
add_executable(${PROJECT_NAME} "${AWS_WORKSPACES-INSTANCES_GENERATED_SMOKE_TEST_SRC}")
27+
endif()
28+
29+
set_compiler_flags(${PROJECT_NAME})
30+
set_compiler_warnings(${PROJECT_NAME})
31+
32+
target_include_directories(${PROJECT_NAME} PUBLIC
33+
${CMAKE_CURRENT_SOURCE_DIR}/../../src/aws-cpp-sdk-workspaces-instances/include)
34+
35+
target_link_libraries(${PROJECT_NAME}
36+
${PROJECT_LIBS})
37+
38+
if(NOT CMAKE_CROSSCOMPILING)
39+
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
40+
endif()
41+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
#include <algorithm>
6+
#include <aws/core/auth/AWSCredentialsProviderChain.h>
7+
#include <aws/core/client/AsyncCallerContext.h>
8+
#include <aws/core/client/ClientConfiguration.h>
9+
#include <aws/core/client/CoreErrors.h>
10+
#include <aws/core/http/HttpTypes.h>
11+
#include <aws/core/utils/Outcome.h>
12+
#include <aws/core/utils/UnreferencedParam.h>
13+
#include <aws/core/utils/logging/LogMacros.h>
14+
#include <aws/core/utils/memory/AWSMemory.h>
15+
#include <utility>
16+
#include <aws/testing/AwsCppSdkGTestSuite.h>
17+
#include <aws/testing/AwsTestHelpers.h>
18+
#include <aws/workspaces-instances/WorkspacesInstancesClient.h>
19+
#include <aws/workspaces-instances/model/ListRegionsRequest.h>
20+
21+
namespace WorkspacesInstancesSmokeTest{
22+
using namespace Aws::Auth;
23+
using namespace Aws::Http;
24+
using namespace Aws::Client;
25+
26+
using namespace Aws::WorkspacesInstances;
27+
using namespace Aws::WorkspacesInstances::Model;
28+
class WorkspacesInstancesSmokeTestSuite : public Aws::Testing::AwsCppSdkGTestSuite {
29+
public:
30+
static const char ALLOCATION_TAG[];
31+
};
32+
const char WorkspacesInstancesSmokeTestSuite::ALLOCATION_TAG[] = "WorkspacesInstancesSmokeTest";
33+
TEST_F(WorkspacesInstancesSmokeTestSuite, ListRegionsSuccess )
34+
{
35+
Aws::WorkspacesInstances::WorkspacesInstancesClientConfiguration clientConfiguration;
36+
clientConfiguration.region = "us-east-1";
37+
clientConfiguration.useFIPS = false;
38+
clientConfiguration.useDualStack = false;
39+
auto clientSp = Aws::MakeShared<WorkspacesInstancesClient>(ALLOCATION_TAG, clientConfiguration);
40+
//populate input params
41+
42+
ListRegionsRequest input;
43+
auto outcome = clientSp->ListRegions(input);
44+
EXPECT_TRUE( outcome.IsSuccess());
45+
}
46+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/glue/Glue_EXPORTS.h>
8+
#include <aws/glue/model/IcebergCompactionConfiguration.h>
9+
#include <utility>
10+
11+
namespace Aws
12+
{
13+
namespace Utils
14+
{
15+
namespace Json
16+
{
17+
class JsonValue;
18+
class JsonView;
19+
} // namespace Json
20+
} // namespace Utils
21+
namespace Glue
22+
{
23+
namespace Model
24+
{
25+
26+
/**
27+
* <p>The configuration for a compaction optimizer. This configuration defines how
28+
* data files in your table will be compacted to improve query performance and
29+
* reduce storage costs.</p><p><h3>See Also:</h3> <a
30+
* href="http://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CompactionConfiguration">AWS
31+
* API Reference</a></p>
32+
*/
33+
class CompactionConfiguration
34+
{
35+
public:
36+
AWS_GLUE_API CompactionConfiguration() = default;
37+
AWS_GLUE_API CompactionConfiguration(Aws::Utils::Json::JsonView jsonValue);
38+
AWS_GLUE_API CompactionConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
39+
AWS_GLUE_API Aws::Utils::Json::JsonValue Jsonize() const;
40+
41+
42+
///@{
43+
/**
44+
* <p>The configuration for an Iceberg compaction optimizer.</p>
45+
*/
46+
inline const IcebergCompactionConfiguration& GetIcebergConfiguration() const { return m_icebergConfiguration; }
47+
inline bool IcebergConfigurationHasBeenSet() const { return m_icebergConfigurationHasBeenSet; }
48+
template<typename IcebergConfigurationT = IcebergCompactionConfiguration>
49+
void SetIcebergConfiguration(IcebergConfigurationT&& value) { m_icebergConfigurationHasBeenSet = true; m_icebergConfiguration = std::forward<IcebergConfigurationT>(value); }
50+
template<typename IcebergConfigurationT = IcebergCompactionConfiguration>
51+
CompactionConfiguration& WithIcebergConfiguration(IcebergConfigurationT&& value) { SetIcebergConfiguration(std::forward<IcebergConfigurationT>(value)); return *this;}
52+
///@}
53+
private:
54+
55+
IcebergCompactionConfiguration m_icebergConfiguration;
56+
bool m_icebergConfigurationHasBeenSet = false;
57+
};
58+
59+
} // namespace Model
60+
} // namespace Glue
61+
} // namespace Aws
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/glue/Glue_EXPORTS.h>
8+
#include <aws/core/utils/memory/stl/AWSString.h>
9+
10+
namespace Aws
11+
{
12+
namespace Glue
13+
{
14+
namespace Model
15+
{
16+
enum class CompactionStrategy
17+
{
18+
NOT_SET,
19+
binpack,
20+
sort,
21+
z_order
22+
};
23+
24+
namespace CompactionStrategyMapper
25+
{
26+
AWS_GLUE_API CompactionStrategy GetCompactionStrategyForName(const Aws::String& name);
27+
28+
AWS_GLUE_API Aws::String GetNameForCompactionStrategy(CompactionStrategy value);
29+
} // namespace CompactionStrategyMapper
30+
} // namespace Model
31+
} // namespace Glue
32+
} // namespace Aws
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/glue/Glue_EXPORTS.h>
8+
#include <aws/glue/model/CompactionStrategy.h>
9+
#include <utility>
10+
11+
namespace Aws
12+
{
13+
namespace Utils
14+
{
15+
namespace Json
16+
{
17+
class JsonValue;
18+
class JsonView;
19+
} // namespace Json
20+
} // namespace Utils
21+
namespace Glue
22+
{
23+
namespace Model
24+
{
25+
26+
/**
27+
* <p>The configuration for an Iceberg compaction optimizer. This configuration
28+
* defines parameters for optimizing the layout of data files in Iceberg
29+
* tables.</p><p><h3>See Also:</h3> <a
30+
* href="http://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/IcebergCompactionConfiguration">AWS
31+
* API Reference</a></p>
32+
*/
33+
class IcebergCompactionConfiguration
34+
{
35+
public:
36+
AWS_GLUE_API IcebergCompactionConfiguration() = default;
37+
AWS_GLUE_API IcebergCompactionConfiguration(Aws::Utils::Json::JsonView jsonValue);
38+
AWS_GLUE_API IcebergCompactionConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
39+
AWS_GLUE_API Aws::Utils::Json::JsonValue Jsonize() const;
40+
41+
42+
///@{
43+
/**
44+
* <p>The strategy to use for compaction. Valid values are:</p> <ul> <li> <p>
45+
* <code>binpack</code>: Combines small files into larger files, typically
46+
* targeting sizes over 100MB, while applying any pending deletes. This is the
47+
* recommended compaction strategy for most use cases. </p> </li> <li> <p>
48+
* <code>sort</code>: Organizes data based on specified columns which are sorted
49+
* hierarchically during compaction, improving query performance for filtered
50+
* operations. This strategy is recommended when your queries frequently filter on
51+
* specific columns. To use this strategy, you must first define a sort order in
52+
* your Iceberg table properties using the <code>sort_order</code> table
53+
* property.</p> </li> <li> <p> <code>z-order</code>: Optimizes data organization
54+
* by blending multiple attributes into a single scalar value that can be used for
55+
* sorting, allowing efficient querying across multiple dimensions. This strategy
56+
* is recommended when you need to query data across multiple dimensions
57+
* simultaneously. To use this strategy, you must first define a sort order in your
58+
* Iceberg table properties using the <code>sort_order</code> table property. </p>
59+
* </li> </ul> <p>If an input is not provided, the default value 'binpack' will be
60+
* used.</p>
61+
*/
62+
inline CompactionStrategy GetStrategy() const { return m_strategy; }
63+
inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; }
64+
inline void SetStrategy(CompactionStrategy value) { m_strategyHasBeenSet = true; m_strategy = value; }
65+
inline IcebergCompactionConfiguration& WithStrategy(CompactionStrategy value) { SetStrategy(value); return *this;}
66+
///@}
67+
private:
68+
69+
CompactionStrategy m_strategy{CompactionStrategy::NOT_SET};
70+
bool m_strategyHasBeenSet = false;
71+
};
72+
73+
} // namespace Model
74+
} // namespace Glue
75+
} // namespace Aws

generated/src/aws-cpp-sdk-glue/include/aws/glue/model/TableOptimizerConfiguration.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <aws/glue/Glue_EXPORTS.h>
88
#include <aws/core/utils/memory/stl/AWSString.h>
99
#include <aws/glue/model/TableOptimizerVpcConfiguration.h>
10+
#include <aws/glue/model/CompactionConfiguration.h>
1011
#include <aws/glue/model/RetentionConfiguration.h>
1112
#include <aws/glue/model/OrphanFileDeletionConfiguration.h>
1213
#include <utility>
@@ -79,6 +80,20 @@ namespace Model
7980
TableOptimizerConfiguration& WithVpcConfiguration(VpcConfigurationT&& value) { SetVpcConfiguration(std::forward<VpcConfigurationT>(value)); return *this;}
8081
///@}
8182

83+
///@{
84+
/**
85+
* <p>The configuration for a compaction optimizer. This configuration defines how
86+
* data files in your table will be compacted to improve query performance and
87+
* reduce storage costs.</p>
88+
*/
89+
inline const CompactionConfiguration& GetCompactionConfiguration() const { return m_compactionConfiguration; }
90+
inline bool CompactionConfigurationHasBeenSet() const { return m_compactionConfigurationHasBeenSet; }
91+
template<typename CompactionConfigurationT = CompactionConfiguration>
92+
void SetCompactionConfiguration(CompactionConfigurationT&& value) { m_compactionConfigurationHasBeenSet = true; m_compactionConfiguration = std::forward<CompactionConfigurationT>(value); }
93+
template<typename CompactionConfigurationT = CompactionConfiguration>
94+
TableOptimizerConfiguration& WithCompactionConfiguration(CompactionConfigurationT&& value) { SetCompactionConfiguration(std::forward<CompactionConfigurationT>(value)); return *this;}
95+
///@}
96+
8297
///@{
8398
/**
8499
* <p>The configuration for a snapshot retention optimizer.</p>
@@ -113,6 +128,9 @@ namespace Model
113128
TableOptimizerVpcConfiguration m_vpcConfiguration;
114129
bool m_vpcConfigurationHasBeenSet = false;
115130

131+
CompactionConfiguration m_compactionConfiguration;
132+
bool m_compactionConfigurationHasBeenSet = false;
133+
116134
RetentionConfiguration m_retentionConfiguration;
117135
bool m_retentionConfigurationHasBeenSet = false;
118136

generated/src/aws-cpp-sdk-glue/include/aws/glue/model/TableOptimizerRun.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <aws/core/utils/DateTime.h>
1010
#include <aws/core/utils/memory/stl/AWSString.h>
1111
#include <aws/glue/model/CompactionMetrics.h>
12+
#include <aws/glue/model/CompactionStrategy.h>
1213
#include <aws/glue/model/RetentionMetrics.h>
1314
#include <aws/glue/model/OrphanFileDeletionMetrics.h>
1415
#include <utility>
@@ -102,6 +103,32 @@ namespace Model
102103
TableOptimizerRun& WithCompactionMetrics(CompactionMetricsT&& value) { SetCompactionMetrics(std::forward<CompactionMetricsT>(value)); return *this;}
103104
///@}
104105

106+
///@{
107+
/**
108+
* <p>The strategy used for the compaction run. Indicates which algorithm was
109+
* applied to determine how files were selected and combined during the compaction
110+
* process. Valid values are:</p> <ul> <li> <p> <code>binpack</code>: Combines
111+
* small files into larger files, typically targeting sizes over 100MB, while
112+
* applying any pending deletes. This is the recommended compaction strategy for
113+
* most use cases. </p> </li> <li> <p> <code>sort</code>: Organizes data based on
114+
* specified columns which are sorted hierarchically during compaction, improving
115+
* query performance for filtered operations. This strategy is recommended when
116+
* your queries frequently filter on specific columns. To use this strategy, you
117+
* must first define a sort order in your Iceberg table properties using the
118+
* <code>sort_order</code> table property.</p> </li> <li> <p> <code>z-order</code>:
119+
* Optimizes data organization by blending multiple attributes into a single scalar
120+
* value that can be used for sorting, allowing efficient querying across multiple
121+
* dimensions. This strategy is recommended when you need to query data across
122+
* multiple dimensions simultaneously. To use this strategy, you must first define
123+
* a sort order in your Iceberg table properties using the <code>sort_order</code>
124+
* table property. </p> </li> </ul>
125+
*/
126+
inline CompactionStrategy GetCompactionStrategy() const { return m_compactionStrategy; }
127+
inline bool CompactionStrategyHasBeenSet() const { return m_compactionStrategyHasBeenSet; }
128+
inline void SetCompactionStrategy(CompactionStrategy value) { m_compactionStrategyHasBeenSet = true; m_compactionStrategy = value; }
129+
inline TableOptimizerRun& WithCompactionStrategy(CompactionStrategy value) { SetCompactionStrategy(value); return *this;}
130+
///@}
131+
105132
///@{
106133
/**
107134
* <p>A <code>RetentionMetrics</code> object containing metrics for the optimizer
@@ -144,6 +171,9 @@ namespace Model
144171
CompactionMetrics m_compactionMetrics;
145172
bool m_compactionMetricsHasBeenSet = false;
146173

174+
CompactionStrategy m_compactionStrategy{CompactionStrategy::NOT_SET};
175+
bool m_compactionStrategyHasBeenSet = false;
176+
147177
RetentionMetrics m_retentionMetrics;
148178
bool m_retentionMetricsHasBeenSet = false;
149179

0 commit comments

Comments
 (0)