Skip to content

Commit 63061ee

Browse files
committed
[FLINK-33139] Add Prometheus Sink Table API
1 parent 233e2ff commit 63061ee

File tree

3 files changed

+189
-0
lines changed

3 files changed

+189
-0
lines changed
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
23+
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<parent>
27+
<groupId>org.apache.flink</groupId>
28+
<artifactId>flink-connector-prometheus-parent</artifactId>
29+
<version>1.1-SNAPSHOT</version>
30+
<relativePath>../pom.xml</relativePath>
31+
</parent>
32+
33+
<artifactId>flink-sql-connector-prometheus</artifactId>
34+
<name>Flink : Connectors : Prometheus : SQL </name>
35+
<packaging>jar</packaging>
36+
37+
<dependencies>
38+
<dependency>
39+
<groupId>org.apache.flink</groupId>
40+
<artifactId>flink-connector-prometheus</artifactId>
41+
<version>${project.version}</version>
42+
</dependency>
43+
44+
<dependency>
45+
<groupId>org.apache.flink</groupId>
46+
<artifactId>flink-connector-prometheus-request-signer-amp</artifactId>
47+
<version>${project.version}</version>
48+
</dependency>
49+
50+
<dependency>
51+
<groupId>org.apache.flink</groupId>
52+
<artifactId>flink-test-utils</artifactId>
53+
</dependency>
54+
</dependencies>
55+
56+
<build>
57+
<plugins>
58+
<plugin>
59+
<groupId>org.apache.maven.plugins</groupId>
60+
<artifactId>maven-shade-plugin</artifactId>
61+
<executions>
62+
<execution>
63+
<id>shade-flink</id>
64+
<phase>package</phase>
65+
<goals>
66+
<goal>shade</goal>
67+
</goals>
68+
<configuration>
69+
<artifactSet>
70+
<includes>
71+
<include>org.apache.flink:flink-connector-prometheus</include>
72+
<include>org.apache.flink:flink-connector-prometheus-request-signer-amp</include>
73+
<include>org.apache.httpcomponents.client5:*</include>
74+
<include>org.apache.httpcomponents.core5:*</include>
75+
<include>com.google.protobuf:*</include>
76+
<include>software.amazon.awssdk:*</include>
77+
</includes>
78+
</artifactSet>
79+
<relocations>
80+
<relocation>
81+
<pattern>org.apache.hc.client5</pattern>
82+
<shadedPattern>org.apache.flink.connector.prometheus.shaded.org.apache.hc.client5</shadedPattern>
83+
</relocation>
84+
<relocation>
85+
<pattern>org.apache.hc.core5</pattern>
86+
<shadedPattern>org.apache.flink.connector.prometheus.shaded.org.apache.hc.core5</shadedPattern>
87+
</relocation>
88+
<relocation>
89+
<pattern>com.google.protobuf</pattern>
90+
<shadedPattern>org.apache.flink.connector.prometheus.shaded.com.google.protobuf</shadedPattern>
91+
</relocation>
92+
<relocation>
93+
<pattern>software.amazon</pattern>
94+
<shadedPattern>org.apache.flink.connector.prometheus.shaded.software.amazon</shadedPattern>
95+
</relocation>
96+
</relocations>
97+
<filters>
98+
<filter>
99+
<artifact>org.apache.flink:flink-connector-prometheus:*</artifact>
100+
<excludes>
101+
<exclude>profile</exclude>
102+
</excludes>
103+
</filter>
104+
</filters>
105+
</configuration>
106+
</execution>
107+
</executions>
108+
</plugin>
109+
</plugins>
110+
</build>
111+
</project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
flink-sql-connector-dynamodb
2+
3+
Copyright 2022-2024 The Apache Software Foundation
4+
5+
This product includes software developed at
6+
The Apache Software Foundation (http://www.apache.org/).
7+
8+
This project bundles the following dependencies under the Apache Software License 2.0. (http://www.apache.org/licenses/LICENSE-2.0.txt)
9+
10+
- com.google.protobuf:protobuf-java:3.22.2
11+
- org.apache.httpcomponents.client5:httpclient5:5.3.1
12+
- org.apache.httpcomponents.core5:httpcore5-h2:5.2.4
13+
- org.apache.httpcomponents.core5:httpcore5:5.3
14+
- software.amazon.awssdk:annotations:2.25.69
15+
- software.amazon.awssdk:auth:2.25.69
16+
- software.amazon.awssdk:checksums-spi:2.25.69
17+
- software.amazon.awssdk:checksums:2.25.69
18+
- software.amazon.awssdk:endpoints-spi:2.25.69
19+
- software.amazon.awssdk:http-auth-aws:2.25.69
20+
- software.amazon.awssdk:http-auth-spi:2.25.69
21+
- software.amazon.awssdk:http-auth:2.25.69
22+
- software.amazon.awssdk:http-client-spi:2.25.69
23+
- software.amazon.awssdk:identity-spi:2.25.69
24+
- software.amazon.awssdk:json-utils:2.25.69
25+
- software.amazon.awssdk:metrics-spi:2.25.69
26+
- software.amazon.awssdk:profiles:2.25.69
27+
- software.amazon.awssdk:regions:2.25.69
28+
- software.amazon.awssdk:sdk-core:2.25.69
29+
- software.amazon.awssdk:third-party-jackson-core:2.25.69
30+
- software.amazon.awssdk:utils:2.25.69
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
package org.apache.flink.connector.prometheus;
20+
21+
import org.apache.flink.packaging.PackagingTestUtils;
22+
import org.apache.flink.table.factories.Factory;
23+
import org.apache.flink.test.resources.ResourceTestUtils;
24+
25+
import org.junit.jupiter.api.Test;
26+
27+
import java.nio.file.Path;
28+
import java.util.Arrays;
29+
30+
class PackagingITCase {
31+
32+
@Test
33+
void testPackaging() throws Exception {
34+
final Path jar =
35+
ResourceTestUtils.getResource(".*/flink-sql-connector-prometheus[^/]*\\.jar");
36+
37+
PackagingTestUtils.assertJarContainsOnlyFilesMatching(
38+
jar,
39+
Arrays.asList(
40+
"org/apache/flink/",
41+
"META-INF/",
42+
"mozilla/",
43+
"google/protobuf/",
44+
"mime.types",
45+
"VersionInfo.java"));
46+
PackagingTestUtils.assertJarContainsServiceEntry(jar, Factory.class);
47+
}
48+
}

0 commit comments

Comments
 (0)