Jiabao-Sun commented on code in PR #1: URL: https://github.com/apache/flink-connector-mongodb/pull/1#discussion_r1011476914
########## pom.xml: ########## @@ -0,0 +1,457 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> +<project + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>io.github.zentol.flink</groupId> + <artifactId>flink-connector-parent</artifactId> + <version>1.0</version> + </parent> + + <groupId>org.apache.flink</groupId> + <artifactId>flink-connector-mongodb-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + + <name>Flink : Connectors : MongoDB Parent</name> + <packaging>pom</packaging> + <url>https://flink.apache.org</url> + <inceptionYear>2022</inceptionYear> + + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + + <scm> + <url>https://github.com/apache/flink-connector-mongodb</url> + <connection>[email protected]:apache/flink-connector-mongodb.git</connection> + <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/flink-connector-mongodb.git</developerConnection> + </scm> + + <properties> + <mongodb.version>4.7.1</mongodb.version> + + <flink.version>1.16-SNAPSHOT</flink.version> + <flink.shaded.version>15.0</flink.shaded.version> + + <junit4.version>4.13.2</junit4.version> + <junit5.version>5.8.1</junit5.version> + <hamcrest.version>1.3</hamcrest.version> + <assertj.version>3.21.0</assertj.version> + <archunit.version>0.22.0</archunit.version> + <testcontainers.version>1.17.2</testcontainers.version> + <mockito.version>3.4.6</mockito.version> + + <japicmp.skip>false</japicmp.skip> + <japicmp.referenceVersion>1.15.0</japicmp.referenceVersion> + + <slf4j.version>1.7.36</slf4j.version> + <log4j.version>2.17.2</log4j.version> + + <flink.parent.artifactId>flink-connector-mongodb-parent</flink.parent.artifactId> + </properties> + + <modules> + <module>flink-connector-mongodb</module> + <module>flink-sql-connector-mongodb</module> + <module>flink-connector-mongodb-e2e-tests</module> + </modules> + + <dependencies> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-shaded-force-shading</artifactId> + <version>${flink.shaded.version}</version> + </dependency> + + <!-- Root dependencies for all projects --> + + <!-- Logging API --> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <scope>provided</scope> + </dependency> + + <!-- 'javax.annotation' classes like '@Nullable' --> + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> + <scope>provided</scope> + </dependency> + + <!-- Test dependencies --> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.junit.vintage</groupId> + <artifactId>junit-vintage-engine</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-all</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-inline</artifactId> + <type>jar</type> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <type>jar</type> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.testcontainers</groupId> + <artifactId>junit-jupiter</artifactId> + <scope>test</scope> + </dependency> + + <!-- Tests will have log4j as the default logging framework available --> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <!-- API bridge between log4j 1 and 2 --> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-test-utils-junit</artifactId> + <scope>test</scope> + </dependency> + + <!-- ArchUit test dependencies --> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-architecture-tests-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-architecture-tests-production</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.mongodb</groupId> + <artifactId>mongodb-driver-sync</artifactId> Review Comment: In order to reduce dependencies, source and sink reuse the same driver. In most read scenarios, we need to wait for the clear result of the previous query before proceeding to the next step. Since we use the multi-reader model, there is no obvious performance improvement for asynchronous reading (except lookup), but there will be additional thread overhead. In the write scenario, asynchronous writing will indeed reduce the block time, but in order to prevent out-of-order writes, some additional synchronization control is required. By the way, We can define a thread pool to implement asynchronous writing in future evolution, and it is not necessary to use the reactive driver. -- 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]
