美文网首页
flink cdc 源码编译 打包 ,flink-sql-con

flink cdc 源码编译 打包 ,flink-sql-con

作者: 川流不息attitude | 来源:发表于2022-09-16 09:32 被阅读0次

    flink cdc 源码编译 打包

    如果 发行版本 mysql cdc 出现bug,无法解决,那就的拉取源码 改代码,在重新编译了.

    1. 拉取源码 https://github.com/ververica/flink-cdc-connectors

    2. 去掉不需要的 模块

        <modules>
              <module>flink-cdc-base</module>
              <module>flink-connector-debezium</module>
              <module>flink-connector-test-util</module>
              <module>flink-connector-mysql-cdc</module>
              <!--<module>flink-connector-postgres-cdc</module>
              <module>flink-connector-oracle-cdc</module>
              <module>flink-connector-mongodb-cdc</module>
              <module>flink-connector-oceanbase-cdc</module>
              <module>flink-connector-sqlserver-cdc</module>
              <module>flink-connector-tidb-cdc</module>-->
              <module>flink-sql-connector-mysql-cdc</module>
             <!-- <module>flink-sql-connector-postgres-cdc</module>
              <module>flink-sql-connector-mongodb-cdc</module>
              <module>flink-sql-connector-oracle-cdc</module>
              <module>flink-sql-connector-oceanbase-cdc</module>
              <module>flink-sql-connector-sqlserver-cdc</module>
              <module>flink-sql-connector-tidb-cdc</module>-->
             <!-- <module>flink-cdc-e2e-tests</module>-->
          </modules>
      

      去掉 Google 代码 检查

      <!--  <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
            <version>${spotless.version}</version>
            <configuration>
                <java>
                    <googleJavaFormat>
                        <version>1.7</version>
                        <style>AOSP</style>
                    </googleJavaFormat>
      
                    &lt;!&ndash; \# refers to the static imports &ndash;&gt;
                    <importOrder>
                        <order>org.apache.flink,org.apache.flink.shaded,,javax,java,scala,\#
                        </order>
                    </importOrder>
      
                    <removeUnusedImports/>
                </java>
            </configuration>
            <executions>
                <execution>
                    <id>spotless-check</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>-->
      
    image.png

    mvn clean install -DskipTests ,可能会报错,升级jdk 或者 像我一样 加个泛型

    image.png 编译成功 嘻嘻! image.png

    相关文章

      网友评论

          本文标题:flink cdc 源码编译 打包 ,flink-sql-con

          本文链接:https://www.haomeiwen.com/subject/gpwsortx.html