yuxiqian commented on code in PR #3491:
URL: https://github.com/apache/flink-cdc/pull/3491#discussion_r1904800496
##########
flink-cdc-e2e-tests/flink-cdc-pipeline-e2e-tests/pom.xml:
##########
@@ -261,6 +275,33 @@ limitations under the License.
<outputDirectory>${project.build.directory}/dependencies
</outputDirectory>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.flink</groupId>
+
<artifactId>flink-cdc-pipeline-connector-paimon</artifactId>
+ <version>${project.version}</version>
+
<destFileName>paimon-cdc-pipeline-connector.jar</destFileName>
+ <type>jar</type>
+
<outputDirectory>${project.build.directory}/dependencies
+ </outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-shaded-hadoop-2-uber</artifactId>
+ <version>2.8.3-10.0</version>
+ <destFileName>flink-shade-hadoop.jar</destFileName>
+ <type>jar</type>
+
<outputDirectory>${project.build.directory}/dependencies
+ </outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.paimon</groupId>
+
<artifactId>paimon-flink-${flink.major.version}</artifactId>
Review Comment:
Flink version might vary depending on E2e runtime arguments. Maybe we need
to declare multiple Flink version and select corresponding jars dynamically
(just like JDBC connector in Source E2e tests)?
##########
flink-cdc-e2e-tests/flink-cdc-pipeline-e2e-tests/src/test/java/org/apache/flink/cdc/pipeline/tests/utils/PipelineTestEnvironment.java:
##########
@@ -114,30 +141,42 @@ public static List<String> getFlinkVersion() {
public void before() throws Exception {
LOG.info("Starting containers...");
jobManagerConsumer = new ToStringConsumer();
-
- String flinkProperties = getFlinkProperties();
-
+ // These cmds will put the FLINK_PROPERTIES to flink-conf.yaml
Review Comment:
`getFlinkProperties` could be removed now
##########
flink-cdc-e2e-tests/flink-cdc-pipeline-e2e-tests/src/test/java/org/apache/flink/cdc/pipeline/tests/utils/PipelineTestEnvironment.java:
##########
@@ -114,30 +141,42 @@ public static List<String> getFlinkVersion() {
public void before() throws Exception {
LOG.info("Starting containers...");
jobManagerConsumer = new ToStringConsumer();
-
- String flinkProperties = getFlinkProperties();
-
+ // These cmds will put the FLINK_PROPERTIES to flink-conf.yaml
+ List<String> cmds = new ArrayList<>();
+ cmds.add("cp /opt/flink/conf/flink-conf.yaml
/opt/flink/conf/flink-conf.yaml.tmp");
+ for (String prop : EXTERNAL_PROPS) {
+ cmds.add(String.format("echo '%s' >>
/opt/flink/conf/flink-conf.yaml.tmp", prop));
+ }
+ cmds.add("mv /opt/flink/conf/flink-conf.yaml.tmp
/opt/flink/conf/flink-conf.yaml");
+ String preCmd = String.join(" && ", cmds);
jobManager =
new GenericContainer<>(getFlinkDockerImageTag())
- .withCommand("jobmanager")
+ .withCommand("bash", "-c", preCmd + " && jobmanager.sh
start-foreground")
+ .withExtraHost("host.docker.internal", "host-gateway")
Review Comment:
Any reason on this `extraHost`?
##########
flink-cdc-e2e-tests/flink-cdc-pipeline-e2e-tests/src/test/java/org/apache/flink/cdc/pipeline/tests/utils/PipelineTestEnvironment.java:
##########
@@ -114,30 +141,42 @@ public static List<String> getFlinkVersion() {
public void before() throws Exception {
LOG.info("Starting containers...");
jobManagerConsumer = new ToStringConsumer();
-
- String flinkProperties = getFlinkProperties();
-
+ // These cmds will put the FLINK_PROPERTIES to flink-conf.yaml
+ List<String> cmds = new ArrayList<>();
+ cmds.add("cp /opt/flink/conf/flink-conf.yaml
/opt/flink/conf/flink-conf.yaml.tmp");
Review Comment:
Seems we can use `GenericContainer#withCopyToContainer(Transferable#of)` to
place config file in-place w/o appending startup command
##########
flink-cdc-e2e-tests/flink-cdc-pipeline-e2e-tests/src/test/java/org/apache/flink/cdc/pipeline/tests/utils/PipelineTestEnvironment.java:
##########
@@ -114,30 +141,42 @@ public static List<String> getFlinkVersion() {
public void before() throws Exception {
LOG.info("Starting containers...");
jobManagerConsumer = new ToStringConsumer();
-
- String flinkProperties = getFlinkProperties();
-
+ // These cmds will put the FLINK_PROPERTIES to flink-conf.yaml
+ List<String> cmds = new ArrayList<>();
+ cmds.add("cp /opt/flink/conf/flink-conf.yaml
/opt/flink/conf/flink-conf.yaml.tmp");
+ for (String prop : EXTERNAL_PROPS) {
+ cmds.add(String.format("echo '%s' >>
/opt/flink/conf/flink-conf.yaml.tmp", prop));
+ }
+ cmds.add("mv /opt/flink/conf/flink-conf.yaml.tmp
/opt/flink/conf/flink-conf.yaml");
Review Comment:
Should this be `config.yaml` as we're at Flink 1.19+?
Also, shouldn't these configurations take effect as we're setting
`.withEnv("FLINK_PROPERTIES", FLINK_PROPERTIES)`? Why we need to modify the
configuration YAML file manually
##########
flink-cdc-e2e-tests/flink-cdc-pipeline-e2e-tests/src/test/resources/docker/peek-paimon.sql:
##########
@@ -0,0 +1,27 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+-- Format this file with the following arguments:
+-- Warehouse Path, Database Name, and Table Name.
+
+SET 'sql-client.execution.result-mode' = 'tableau';
+SET 'execution.runtime-mode' = 'batch';
Review Comment:
We'd better set `table.display.max-column-width` to a larger value in case
if oversized output string got truncated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]