Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge in v2-master 9/25 #19

Merged
merged 90 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
d559100
Don't declare jsii-runtime as a dependency of any component directly …
MarioRial22 Aug 30, 2024
9ac9385
build(deps): bump software.amazon.awssdk:bom from 2.27.12 to 2.27.17
dependabot[bot] Sep 2, 2024
3084127
build(deps): bump software.amazon.awssdk:bom from 2.27.12 to 2.27.17 …
github-actions[bot] Sep 2, 2024
41d999c
build(deps): bump software.amazon.jsii:jsii-runtime
dependabot[bot] Sep 2, 2024
b1e13e1
build(deps): bump software.amazon.jsii:jsii-runtime from 1.102.0 to 1…
github-actions[bot] Sep 2, 2024
bcad445
build(deps): bump com.clickhouse:clickhouse-jdbc from 0.6.4 to 0.6.5
dependabot[bot] Sep 2, 2024
17bb34f
build(deps): bump com.clickhouse:clickhouse-jdbc from 0.6.4 to 0.6.5 …
github-actions[bot] Sep 2, 2024
b42439a
build(deps): bump org.apache.commons:commons-lang3 from 3.16.0 to 3.17.0
dependabot[bot] Sep 2, 2024
5c1b6e6
build(deps): bump org.apache.commons:commons-lang3 from 3.16.0 to 3.1…
github-actions[bot] Sep 2, 2024
81a0949
build(deps): bump com.microsoft.azure:msal4j from 1.17.0 to 1.17.1
dependabot[bot] Sep 2, 2024
c3367e5
build(deps): bump com.microsoft.azure:msal4j from 1.17.0 to 1.17.1 (#…
github-actions[bot] Sep 2, 2024
4d9e254
build(deps): bump org.apache.maven.plugins:maven-javadoc-plugin
dependabot[bot] Sep 2, 2024
68c6f64
build(deps): bump org.apache.maven.plugins:maven-javadoc-plugin from …
github-actions[bot] Sep 2, 2024
7b01b09
build(deps): bump net.snowflake:snowflake-jdbc from 3.18.0 to 3.19.0
dependabot[bot] Sep 2, 2024
c9ecc18
build(deps): bump net.snowflake:snowflake-jdbc from 3.18.0 to 3.19.0 …
github-actions[bot] Sep 2, 2024
1e35cdb
build(deps): bump surefire.failsafe.version from 3.4.0 to 3.5.0
dependabot[bot] Sep 2, 2024
3dd1ed5
build(deps): bump surefire.failsafe.version from 3.4.0 to 3.5.0 (#2233)
github-actions[bot] Sep 2, 2024
e6076b6
build(deps): bump org.yaml:snakeyaml from 2.2 to 2.3
dependabot[bot] Sep 2, 2024
aefeaaa
build(deps): bump org.yaml:snakeyaml from 2.2 to 2.3 (#2236)
github-actions[bot] Sep 2, 2024
856418b
Collate Aware Postgresql String Builder (#2216)
AbdulR3hman Sep 5, 2024
79c3cb3
Updated Postgresql Split Query Comment (#2242)
AbdulR3hman Sep 5, 2024
b806245
build(deps): bump aws-sdk.version from 1.12.770 to 1.12.771
dependabot[bot] Sep 9, 2024
8e1c923
build(deps): bump aws-sdk.version from 1.12.770 to 1.12.771 (#2245)
github-actions[bot] Sep 9, 2024
0895352
build(deps): bump org.elasticsearch.client:elasticsearch-rest-client
dependabot[bot] Sep 9, 2024
d80767e
build(deps): bump org.elasticsearch.client:elasticsearch-rest-client …
github-actions[bot] Sep 9, 2024
faf2952
build(deps-dev): bump log4j2Version from 2.23.1 to 2.24.0
dependabot[bot] Sep 9, 2024
55beda2
build(deps-dev): bump log4j2Version from 2.23.1 to 2.24.0 (#2247)
github-actions[bot] Sep 9, 2024
87c78fe
build(deps): bump software.amazon.awssdk:bom from 2.27.17 to 2.27.21
dependabot[bot] Sep 9, 2024
1d893e3
build(deps): bump software.amazon.awssdk:bom from 2.27.17 to 2.27.21 …
github-actions[bot] Sep 9, 2024
4e0ec4f
Add athena connector exception class to classify Runtime Exception (#…
yipez-spec Sep 10, 2024
909a010
Remove dynamodb:ListSchemas as its no longer valid (#2252)
AbdulR3hman Sep 11, 2024
a6fc14d
update new uses of semantic version (#2258)
aimethed Sep 12, 2024
31f8862
build(deps): bump org.jetbrains.kotlin:kotlin-stdlib-common
dependabot[bot] Sep 9, 2024
e0c11e7
build(deps): bump org.jetbrains.kotlin:kotlin-stdlib-common from 1.9.…
github-actions[bot] Sep 13, 2024
da06a84
build(deps): bump org.jetbrains.kotlin:kotlin-reflect
dependabot[bot] Sep 13, 2024
25800b1
build(deps): bump org.jetbrains.kotlin:kotlin-reflect from 1.9.10 to …
github-actions[bot] Sep 13, 2024
5c95b68
build(deps): bump org.jetbrains.kotlin:kotlin-stdlib
dependabot[bot] Sep 13, 2024
9c28618
build(deps): bump org.jetbrains.kotlin:kotlin-stdlib from 1.9.10 to 2…
github-actions[bot] Sep 13, 2024
15a29e6
build(deps): bump org.jetbrains.kotlin:kotlin-stdlib-jdk8
dependabot[bot] Sep 13, 2024
b70cbd5
v2 changes for timestream (#2239)
Trianz-Akshay Sep 13, 2024
0c8cfe5
build(deps): bump org.jetbrains.kotlin:kotlin-stdlib-jdk8 from 1.9.10…
github-actions[bot] Sep 13, 2024
e923ec1
build(deps): bump com.squareup.wire:wire-compiler from 4.9.0 to 5.0.0
dependabot[bot] Sep 9, 2024
44fa222
build(deps): bump com.squareup.wire:wire-compiler from 4.9.0 to 5.0.0…
github-actions[bot] Sep 14, 2024
30bc7ce
build(deps): bump com.squareup.wire:wire-schema from 4.9.0 to 5.0.0
dependabot[bot] Sep 9, 2024
1d6d710
build(deps): bump com.squareup.wire:wire-schema from 4.9.0 to 5.0.0 (…
github-actions[bot] Sep 14, 2024
741b96e
build(deps): bump com.squareup.wire:wire-runtime-jvm from 4.9.0 to 5.0.0
dependabot[bot] Sep 9, 2024
08ea11a
build(deps): bump com.squareup.wire:wire-runtime-jvm from 4.9.0 to 5.…
github-actions[bot] Sep 14, 2024
7b817b6
build(deps): bump software.amazon.awssdk:bom from 2.27.21 to 2.28.1
dependabot[bot] Sep 16, 2024
97a9ca9
build(deps): bump software.amazon.awssdk:bom from 2.27.21 to 2.28.1 (…
github-actions[bot] Sep 16, 2024
6e00e1b
build(deps): bump net.java.dev.jna:jna-platform from 5.14.0 to 5.15.0
dependabot[bot] Sep 16, 2024
e0c9ade
build(deps): bump net.java.dev.jna:jna-platform from 5.14.0 to 5.15.0…
github-actions[bot] Sep 16, 2024
3af4e2f
build(deps): bump io.confluent:kafka-protobuf-serializer
dependabot[bot] Sep 16, 2024
d67f8ab
build(deps): bump io.confluent:kafka-protobuf-serializer from 7.7.0 t…
github-actions[bot] Sep 16, 2024
cf00586
build(deps): bump com.squareup.wire:wire-runtime-jvm from 5.0.0 to 5.1.0
dependabot[bot] Sep 16, 2024
2be3690
build(deps): bump com.squareup.wire:wire-runtime-jvm from 5.0.0 to 5.…
github-actions[bot] Sep 16, 2024
e655a52
build(deps): bump io.confluent:kafka-avro-serializer from 7.7.0 to 7.7.1
dependabot[bot] Sep 16, 2024
7892c0f
build(deps): bump io.confluent:kafka-avro-serializer from 7.7.0 to 7.…
github-actions[bot] Sep 16, 2024
e7ae59b
build(deps): bump io.confluent:kafka-protobuf-provider
dependabot[bot] Sep 16, 2024
e059bf7
build(deps): bump io.confluent:kafka-protobuf-provider from 7.7.0 to …
github-actions[bot] Sep 16, 2024
b8e39ce
build(deps): bump com.squareup.wire:wire-compiler from 5.0.0 to 5.1.0
dependabot[bot] Sep 16, 2024
0de8868
build(deps): bump com.squareup.wire:wire-compiler from 5.0.0 to 5.1.0…
github-actions[bot] Sep 16, 2024
84f8470
build(deps): bump org.apache.maven.plugins:maven-gpg-plugin
dependabot[bot] Sep 16, 2024
7f42acd
build(deps): bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.…
github-actions[bot] Sep 16, 2024
ae27d3b
build(deps): bump com.squareup.wire:wire-schema from 5.0.0 to 5.1.0
dependabot[bot] Sep 16, 2024
348fbfa
build(deps): bump com.squareup.wire:wire-schema from 5.0.0 to 5.1.0 (…
github-actions[bot] Sep 16, 2024
7725202
build(deps): bump aws-sdk.version from 1.12.771 to 1.12.772
dependabot[bot] Sep 16, 2024
531f7d5
build(deps): bump aws-sdk.version from 1.12.771 to 1.12.772 (#2262)
github-actions[bot] Sep 16, 2024
da4bb59
build(deps): bump org.apache.kafka:kafka-clients from 3.8.0 to 7.7.0-…
dependabot[bot] Sep 19, 2024
9a2d10a
build(deps): bump com.google.protobuf:protobuf-java in /athena-msk
dependabot[bot] Sep 19, 2024
96aaf0d
build(deps): bump com.google.protobuf:protobuf-java from 3.25.3 to 3.…
github-actions[bot] Sep 19, 2024
a03a1ed
build(deps): bump org.apache.kafka:kafka-clients
dependabot[bot] Sep 23, 2024
3033c35
build(deps): bump org.apache.kafka:kafka-clients from 7.7.0-ce to 7.7…
github-actions[bot] Sep 23, 2024
b0f0deb
build(deps): bump com.sap.cloud.db.jdbc:ngdbc from 2.21.11 to 2.22.11
dependabot[bot] Sep 23, 2024
87d1321
build(deps): bump com.sap.cloud.db.jdbc:ngdbc from 2.21.11 to 2.22.11…
github-actions[bot] Sep 23, 2024
2fcbf4e
build(deps): bump software.amazon.awssdk:bom from 2.28.1 to 2.28.6
dependabot[bot] Sep 23, 2024
3ea9087
build(deps): bump software.amazon.awssdk:bom from 2.28.1 to 2.28.6 (#…
github-actions[bot] Sep 23, 2024
6b03599
build(deps): bump com.google.cloud:google-cloud-storage
dependabot[bot] Sep 23, 2024
5e8339f
build(deps): bump com.google.cloud:google-cloud-storage from 2.42.0 t…
github-actions[bot] Sep 23, 2024
e03a108
update all ImageURI to use correct repo name (no prod)
aimethed Sep 23, 2024
ee7804d
v2 sdk changes emr (#2288)
Trianz-Akshay Sep 24, 2024
1e7cd1f
v2 sdk changes redshift (#2289)
Trianz-Akshay Sep 24, 2024
1e685f4
migrate awslogs to cloudwatchlogs (v1 to v2) (#2272)
aimethed Sep 25, 2024
ff290f0
v2 Cloudformation (#2281)
aimethed Sep 25, 2024
945ce6a
v2 DocDB (#2282)
aimethed Sep 25, 2024
057956a
V2 rds (#2273)
aimethed Sep 25, 2024
1cea184
Merge branch 'v2-master'
aimethed Sep 25, 2024
0ab6fa3
fix missed error from merge
aimethed Sep 25, 2024
edf9a95
Merge branch 'panama-sdkv2-gdcv2' into v2-master
aimethed Sep 25, 2024
e6e0805
Merge pull request #1 from awslabs/v2-master
aimethed Sep 25, 2024
3686f26
Merge branch 'panama-sdkv2-gdcv2' into panama-sdkv2-gdcv2
aimethed Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions athena-aws-cmdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,20 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-emr</artifactId>
<version>${aws-sdk.version}</version>
<groupId>software.amazon.awssdk</groupId>
<artifactId>emr</artifactId>
<version>${aws-sdk-v2.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-rds</artifactId>
<version>${aws-sdk.version}</version>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>${aws-sdk-v2.version}</version>
<exclusions>
<exclusion>
<groupId>software.amazon.awssdk</groupId>
<artifactId>netty-nio-client</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@
import com.amazonaws.athena.connectors.aws.cmdb.tables.s3.S3ObjectsTableProvider;
import com.amazonaws.services.ec2.AmazonEC2;
import com.amazonaws.services.ec2.AmazonEC2ClientBuilder;
import com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduce;
import com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceClientBuilder;
import com.amazonaws.services.rds.AmazonRDS;
import com.amazonaws.services.rds.AmazonRDSClientBuilder;
import org.apache.arrow.util.VisibleForTesting;
import software.amazon.awssdk.services.emr.EmrClient;
import software.amazon.awssdk.services.rds.RdsClient;
import software.amazon.awssdk.services.s3.S3Client;

import java.util.ArrayList;
Expand All @@ -59,14 +57,14 @@ public TableProviderFactory(java.util.Map<String, String> configOptions)
{
this(
AmazonEC2ClientBuilder.standard().build(),
AmazonElasticMapReduceClientBuilder.standard().build(),
AmazonRDSClientBuilder.standard().build(),
EmrClient.create(),
RdsClient.create(),
S3Client.create(),
configOptions);
}

@VisibleForTesting
protected TableProviderFactory(AmazonEC2 ec2, AmazonElasticMapReduce emr, AmazonRDS rds, S3Client amazonS3, java.util.Map<String, String> configOptions)
protected TableProviderFactory(AmazonEC2 ec2, EmrClient emr, RdsClient rds, S3Client amazonS3, java.util.Map<String, String> configOptions)
{
addProvider(new Ec2TableProvider(ec2));
addProvider(new EbsTableProvider(ec2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
import com.amazonaws.athena.connector.lambda.metadata.GetTableRequest;
import com.amazonaws.athena.connector.lambda.metadata.GetTableResponse;
import com.amazonaws.athena.connector.lambda.records.ReadRecordsRequest;
import com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduce;
import com.amazonaws.services.elasticmapreduce.model.Cluster;
import com.amazonaws.services.elasticmapreduce.model.ClusterSummary;
import com.amazonaws.services.elasticmapreduce.model.DescribeClusterRequest;
import com.amazonaws.services.elasticmapreduce.model.DescribeClusterResult;
import com.amazonaws.services.elasticmapreduce.model.ListClustersRequest;
import com.amazonaws.services.elasticmapreduce.model.ListClustersResult;
import org.apache.arrow.vector.types.Types;
import org.apache.arrow.vector.types.pojo.Schema;
import software.amazon.awssdk.services.emr.EmrClient;
import software.amazon.awssdk.services.emr.model.Cluster;
import software.amazon.awssdk.services.emr.model.ClusterSummary;
import software.amazon.awssdk.services.emr.model.DescribeClusterRequest;
import software.amazon.awssdk.services.emr.model.DescribeClusterResponse;
import software.amazon.awssdk.services.emr.model.ListClustersRequest;
import software.amazon.awssdk.services.emr.model.ListClustersResponse;

import java.util.List;
import java.util.stream.Collectors;
Expand All @@ -49,9 +49,9 @@ public class EmrClusterTableProvider
implements TableProvider
{
private static final Schema SCHEMA;
private AmazonElasticMapReduce emr;
private EmrClient emr;

public EmrClusterTableProvider(AmazonElasticMapReduce emr)
public EmrClusterTableProvider(EmrClient emr)
{
this.emr = emr;
}
Expand Down Expand Up @@ -93,23 +93,23 @@ public GetTableResponse getTable(BlockAllocator blockAllocator, GetTableRequest
public void readWithConstraint(BlockSpiller spiller, ReadRecordsRequest recordsRequest, QueryStatusChecker queryStatusChecker)
{
boolean done = false;
ListClustersRequest request = new ListClustersRequest();
ListClustersRequest request = ListClustersRequest.builder().build();

while (!done) {
ListClustersResult response = emr.listClusters(request);
ListClustersResponse response = emr.listClusters(request);

for (ClusterSummary next : response.getClusters()) {
for (ClusterSummary next : response.clusters()) {
Cluster cluster = null;
if (!next.getStatus().getState().toLowerCase().contains("terminated")) {
DescribeClusterResult clusterResponse = emr.describeCluster(new DescribeClusterRequest().withClusterId(next.getId()));
cluster = clusterResponse.getCluster();
if (!next.status().stateAsString().toLowerCase().contains("terminated")) {
DescribeClusterResponse clusterResponse = emr.describeCluster(DescribeClusterRequest.builder().clusterId(next.id()).build());
cluster = clusterResponse.cluster();
}
clusterToRow(next, cluster, spiller);
}

request.setMarker(response.getMarker());
request = request.toBuilder().marker(response.marker()).build();

if (response.getMarker() == null || !queryStatusChecker.isQueryRunning()) {
if (response.marker() == null || !queryStatusChecker.isQueryRunning()) {
done = true;
}
}
Expand All @@ -131,31 +131,31 @@ private void clusterToRow(ClusterSummary clusterSummary,
spiller.writeRows((Block block, int row) -> {
boolean matched = true;

matched &= block.offerValue("id", row, clusterSummary.getId());
matched &= block.offerValue("name", row, clusterSummary.getName());
matched &= block.offerValue("instance_hours", row, clusterSummary.getNormalizedInstanceHours());
matched &= block.offerValue("state", row, clusterSummary.getStatus().getState());
matched &= block.offerValue("state_code", row, clusterSummary.getStatus().getStateChangeReason().getCode());
matched &= block.offerValue("state_msg", row, clusterSummary.getStatus().getStateChangeReason().getMessage());
matched &= block.offerValue("id", row, clusterSummary.id());
matched &= block.offerValue("name", row, clusterSummary.name());
matched &= block.offerValue("instance_hours", row, clusterSummary.normalizedInstanceHours());
matched &= block.offerValue("state", row, clusterSummary.status().stateAsString());
matched &= block.offerValue("state_code", row, clusterSummary.status().stateChangeReason().codeAsString());
matched &= block.offerValue("state_msg", row, clusterSummary.status().stateChangeReason().message());

if (cluster != null) {
matched &= block.offerValue("autoscaling_role", row, cluster.getAutoScalingRole());
matched &= block.offerValue("custom_ami", row, cluster.getCustomAmiId());
matched &= block.offerValue("instance_collection_type", row, cluster.getInstanceCollectionType());
matched &= block.offerValue("log_uri", row, cluster.getLogUri());
matched &= block.offerValue("master_public_dns", row, cluster.getMasterPublicDnsName());
matched &= block.offerValue("release_label", row, cluster.getReleaseLabel());
matched &= block.offerValue("running_ami", row, cluster.getRunningAmiVersion());
matched &= block.offerValue("scale_down_behavior", row, cluster.getScaleDownBehavior());
matched &= block.offerValue("service_role", row, cluster.getServiceRole());
matched &= block.offerValue("service_role", row, cluster.getServiceRole());

List<String> applications = cluster.getApplications().stream()
.map(next -> next.getName() + ":" + next.getVersion()).collect(Collectors.toList());
matched &= block.offerValue("autoscaling_role", row, cluster.autoScalingRole());
matched &= block.offerValue("custom_ami", row, cluster.customAmiId());
matched &= block.offerValue("instance_collection_type", row, cluster.instanceCollectionTypeAsString());
matched &= block.offerValue("log_uri", row, cluster.logUri());
matched &= block.offerValue("master_public_dns", row, cluster.masterPublicDnsName());
matched &= block.offerValue("release_label", row, cluster.releaseLabel());
matched &= block.offerValue("running_ami", row, cluster.runningAmiVersion());
matched &= block.offerValue("scale_down_behavior", row, cluster.scaleDownBehaviorAsString());
matched &= block.offerValue("service_role", row, cluster.serviceRole());
matched &= block.offerValue("service_role", row, cluster.serviceRole());

List<String> applications = cluster.applications().stream()
.map(next -> next.name() + ":" + next.version()).collect(Collectors.toList());
matched &= block.offerComplexValue("applications", row, FieldResolver.DEFAULT, applications);

List<String> tags = cluster.getTags().stream()
.map(next -> next.getKey() + ":" + next.getValue()).collect(Collectors.toList());
List<String> tags = cluster.tags().stream()
.map(next -> next.key() + ":" + next.value()).collect(Collectors.toList());
matched &= block.offerComplexValue("tags", row, FieldResolver.DEFAULT, tags);
}

Expand Down
Loading
Loading