Skip to content

Commit

Permalink
Kafka Connect: Add SMTs for Debezium and AWS DMS from tabular kafka c…
Browse files Browse the repository at this point in the history
…onnect project
  • Loading branch information
ismailsimsek committed Jan 16, 2025
1 parent 6a0b394 commit cb36925
Show file tree
Hide file tree
Showing 91 changed files with 2,684 additions and 5,322 deletions.
19 changes: 16 additions & 3 deletions .baseline/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<!--
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
https://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.
-->

<!-- IMPORTANT ECLIPSE NOTE: If you change this file, you must restart Eclipse
for your changes to take effect in its Checkstyle integration. -->
Expand Down Expand Up @@ -32,7 +48,4 @@

<!-- Referencing guava classes should be allowed in classes within bundled-guava module -->
<suppress files="org.apache.iceberg.GuavaClasses" id="BanUnrelocatedGuavaClasses"/>

<!-- Ignore borrowed classes from debezium -->
<suppress files="[\\/]io.debezium.connector[\\/]" checks="."/>
</suppressions>
56 changes: 42 additions & 14 deletions .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
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
https://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.
-->
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="error"/>
Expand Down Expand Up @@ -73,6 +88,14 @@
<property name="format" value="Preconditions\.checkArgument\([^;]+%d[^;]+\);"/>
<property name="message" value="Preconditions.checkArgument does not support %d. use %s instead"/>
</module>
<module name="RegexpMultiline">
<property name="format" value="^\s*import\s+static\s+(?!\Qorg.assertj.core.api.Assertions.\E).*\.assertThatThrownBy;"/>
<property name="message" value="assertThatThrownBy() should be statically imported from org.assertj.core.api.Assertions"/>
</module>
<module name="RegexpMultiline">
<property name="format" value="^\s*import\s+\Qorg.assertj.core.api.Assertions;\E" />
<property name="message" value="org.assertj.core.api.Assertions should only be used with static imports" />
</module>
<module name="SuppressionFilter"> <!-- baseline-gradle: README.md -->
<property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
</module>
Expand Down Expand Up @@ -130,11 +153,12 @@
org.apache.spark.sql.functions.*,
org.apache.spark.sql.connector.iceberg.write.RowLevelOperation.Command.*,
org.apache.spark.sql.connector.write.RowLevelOperation.Command.*,
org.junit.Assert.*"/>
org.junit.Assert.*,
org.assertj.core.api.Assertions.*,
org.assertj.core.api.Assumptions.*"/>
</module>
<module name="ClassTypeParameterName"> <!-- Java Style Guide: Type variable names -->
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern" value="Class type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="CovariantEquals"/> <!-- Java Coding Guidelines: Override ``Object#equals`` consistently -->
<module name="DefaultComesLast"/> <!-- Java Style Guide: The default case is present -->
Expand Down Expand Up @@ -256,12 +280,13 @@
</module>
<module name="InnerAssignment"/> <!-- Java Coding Guidelines: Inner assignments: Not used -->
<module name="MemberName"> <!-- Java Style Guide: Non-constant field names -->
<property name="format" value="^[a-z][a-zA-Z0-9]+$"/>
<message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/>
<property name="format" value="^[a-z][a-zA-Z0-9]++$"/>
</module>
<module name="ConstantName">
<property name="format" value="^[A-Z][A-Z0-9]*+(_[A-Z0-9]++)*+$"/>
</module>
<module name="MethodName"> <!-- Java Style Guide: Method names -->
<property name="format" value="^[a-z][a-zA-Z0-9_]+$"/>
<message key="name.invalidPattern" value="Method name ''{0}'' must match pattern ''{1}''."/>
<property name="format" value="^[a-z][a-zA-Z0-9_]++$"/>
</module>
<module name="MethodParamPad"/> <!-- Java Style Guide: Horizontal whitespace -->
<module name="MissingDeprecated"/> <!-- Java Coding Guide: Deprecate per annotation and Javadoc -->
Expand All @@ -279,8 +304,7 @@
<module name="PackageAnnotation"/> <!-- Java Style Guide: Package statement -->
<module name="PackageDeclaration"/> <!-- Java Style Guide: Package statement -->
<module name="PackageName"> <!-- Java Style Guide: Package names -->
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
<message key="name.invalidPattern" value="Package name ''{0}'' must match pattern ''{1}''."/>
<property name="format" value="^[a-z]++(\.[a-z][a-z0-9]*+)*+$"/>
</module>
<module name="ParameterAssignment"/> <!-- Java Coding Guidelines: Final variables and parameters -->
<module name="ParenPad"/> <!-- Java Style Guide: Horizontal whitespace -->
Expand Down Expand Up @@ -390,6 +414,9 @@
<property name="format" value="@Test\(.*expected.*\)"/>
<property name="message" value="Prefer using Assertions.assertThatThrownBy(...).isInstanceOf(...) instead."/>
</module>
<module name="IllegalToken">
<property name="tokens" value="LITERAL_ASSERT"/>
</module>
<module name="IllegalImport">
<property name="id" value="BanExpectedExceptionUsage"/>
<property name="illegalClasses" value="org.junit.rules.ExpectedException"/>
Expand All @@ -400,6 +427,11 @@
<property name="illegalPkgs" value="org.hamcrest"/>
<message key="import.illegal" value="Prefer using org.assertj.core.api.Assertions instead."/>
</module>
<module name="IllegalImport">
<property name="id" value="BanJUnit5Assertions"/>
<property name="illegalPkgs" value="org.junit.jupiter.api.Assertions"/>
<message key="import.illegal" value="Prefer using org.assertj.core.api.Assertions instead."/>
</module>
<module name="RegexpSinglelineJava">
<property name="ignoreComments" value="true"/>
<property name="format" value="@Json(S|Des)erialize"/>
Expand All @@ -419,7 +451,6 @@
<message key="todo.match" value="There must be whitespace at the beginning of all comments."/>
</module>
<module name="TypeName"> <!-- Java Style Guide: Class names -->
<message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypecastParenPad"/> <!-- Java Style Guide: Horizontal whitespace -->
<module name="UnusedImports"> <!-- Java Style Guide: No unused imports -->
Expand Down Expand Up @@ -455,23 +486,20 @@
<module name="LocalFinalVariableName"/> <!-- Java Style Guide: Local variable names -->
<module name="LocalVariableName"> <!-- Java Style Guide: Local variable names -->
<property name="tokens" value="VARIABLE_DEF"/>
<property name="format" value="^[a-z][a-zA-Z0-9]+$"/>
<property name="format" value="^[a-z][a-zA-Z0-9]++$"/>
<property name="allowOneCharVarInForLoop" value="true"/>
<message key="name.invalidPattern" value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodLength"/> <!-- Java Coding Guide: Methods and functions: focused, crisp, concise -->
<module name="MethodTypeParameterName"> <!-- Java Style Guide: Type variable names -->
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern" value="Method type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="NestedForDepth">
<property name="max" value="2"/>
</module>
<module name="NestedTryDepth"/> <!-- Java Coding Guide: Try/catch blocks: never nested -->
<module name="NonEmptyAtclauseDescription"/> <!-- Java Style Guide: At-clauses -->
<module name="ParameterName"> <!-- Java Style Guide: Parameter names -->
<property name="format" value="^[a-z][a-zA-Z0-9]+$"/>
<message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
<property name="format" value="^[a-z][a-zA-Z0-9]++$"/>
<property name="ignoreOverridden" value="true"/>
</module>

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/kafka-connect-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
- run: |
./gradlew -DsparkVersions= -DhiveVersions= -DflinkVersions= -DkafkaVersions=3 \
:iceberg-kafka-connect:iceberg-kafka-connect-events:check \
:iceberg-kafka-connect:iceberg-kafka-connect-transforms:check \
:iceberg-kafka-connect:iceberg-kafka-connect:check \
:iceberg-kafka-connect:iceberg-kafka-connect-runtime:check \
-Pquick=true -x javadoc
Expand Down
Loading

0 comments on commit cb36925

Please sign in to comment.