基于3.0.0-cdh6.3.2版本编译Flink1.14.4

news2024/11/19 18:27:53

一、背景

  • 异常描述

CDH-6.3.2环境下使用Flink-1.14.4的FlinkSQL的hive方言时出现如下异常

 java.lang.Runtimelxception: java,lang.IllegalArgumentException: Unrecoonized Hadoop major version number: 3.0.0-cdh6.2.1 

  • 问题说明

        开源社区hive 2.x的版本这种情况下是不支持hadoop 3.x版本。但是CDH中hive 2.1.1-cdh6.3.2版本和社区版本是不一样的,可以支持hadoop 3.x版本

二、基于3.0.0-cdh6.3.2版本编译Flink1.14.4

1、环境及软件准备

  1. Centos7.9 (非必须,建议在Linux环境编译,少撞坑..)
  2. maven-3.9.2
  3. flink-1.14.4

2、编译Flink1.14.4

  1. maven-3.9.2
vim maven-3.9.2/conf/settings.xml

<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
 
  <localRepository>/root/maven-3.9.2/repo</localRepository>

......
......
......

  <mirrors>
    <mirror>
      <id>maven-default-http-blocker</id>
      <mirrorOf>external:http:*</mirrorOf>
      <name>Pseudo repository to mirror external repositories initially using HTTP.</name>
      <url>http://0.0.0.0/</url>
      <blocked>true</blocked>
    </mirror>

   <mirror>
        <id>conjars-https</id>
        <url>https://conjars.wensel.net/repo/</url>
        <mirrorOf>conjars</mirrorOf>
   </mirror>
   <mirror>
        <id>conjars</id>
        <name>conjars</name>
        <url>https://conjars.wensel.net/repo/</url>
        <mirrorOf>conjarse</mirrorOf>
  </mirror>
  </mirrors>


......
......
......

 2. flink-1.14.4  下载、解压

vim /root/flink-1.14.4/pom.xml

配置cdh仓库地址

        <repositories>
                <repository>
                        <id>cloudera</id>
                        <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
                </repository>
        </repositories>

修改hadoop版本为cdh对应的hadoop版本

<hadoop.version>3.0.0-cdh6.3.2</hadoop.version>

vim /root/flink-1.14.4/flink-connectors/flink-sql-connector-hive-2.2.0/pom.xml

将/flink-sql-connector-hive-2.2.0中的 hive-exec 修改版本为cdh对应的hive版本2.1.1-cdh6.3.2

开始编译

mvn clean install -DskipTests -Dfast -Dhadoop.version=3.0.0-cdh6.3.2

编译结果

[INFO] --- install:2.5.2:install (default-install) @ java-ci-tools ---
[INFO] Installing /root/flink-1.14.4/tools/ci/java-ci-tools/target/java-ci-tools-1.14.4.jar to /root/.m2/repository/org/apache/flink/java-ci-tools/1.14.4/java-ci-tools-1.14.4.jar
[INFO] Installing /root/flink-1.14.4/tools/ci/java-ci-tools/target/dependency-reduced-pom.xml to /root/.m2/repository/org/apache/flink/java-ci-tools/1.14.4/java-ci-tools-1.14.4.pom
[INFO] Installing /root/flink-1.14.4/tools/ci/java-ci-tools/target/java-ci-tools-1.14.4-tests.jar to /root/.m2/repository/org/apache/flink/java-ci-tools/1.14.4/java-ci-tools-1.14.4-tests.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Flink : 1.14.4:
[INFO] 
[INFO] Flink : ............................................ SUCCESS [ 59.471 s]
[INFO] Flink : Annotations ................................ SUCCESS [ 16.499 s]
[INFO] Flink : Test utils : ............................... SUCCESS [  0.048 s]
[INFO] Flink : Test utils : Junit ......................... SUCCESS [  0.756 s]
[INFO] Flink : Metrics : .................................. SUCCESS [  0.051 s]
[INFO] Flink : Metrics : Core ............................. SUCCESS [ 32.274 s]
[INFO] Flink : Core ....................................... SUCCESS [01:24 min]
[INFO] Flink : Java ....................................... SUCCESS [ 19.666 s]
[INFO] Flink : Scala ...................................... SUCCESS [07:07 min]
[INFO] Flink : FileSystems : .............................. SUCCESS [  0.035 s]
[INFO] Flink : FileSystems : Hadoop FS .................... SUCCESS [03:25 min]
[INFO] Flink : FileSystems : Mapr FS ...................... SUCCESS [  0.701 s]
[INFO] Flink : FileSystems : Hadoop FS shaded ............. SUCCESS [ 56.192 s]
[INFO] Flink : FileSystems : S3 FS Base ................... SUCCESS [ 22.125 s]
[INFO] Flink : FileSystems : S3 FS Hadoop ................. SUCCESS [ 42.749 s]
[INFO] Flink : FileSystems : S3 FS Presto ................. SUCCESS [03:29 min]
[INFO] Flink : FileSystems : OSS FS ....................... SUCCESS [ 18.792 s]
[INFO] Flink : FileSystems : Azure FS Hadoop .............. SUCCESS [03:40 min]
[INFO] Flink : RPC : ...................................... SUCCESS [  0.032 s]
[INFO] Flink : RPC : Core ................................. SUCCESS [  0.213 s]
[INFO] Flink : RPC : Akka ................................. SUCCESS [02:45 min]
[INFO] Flink : RPC : Akka-Loader .......................... SUCCESS [  2.896 s]
[INFO] Flink : Queryable state : .......................... SUCCESS [  0.028 s]
[INFO] Flink : Queryable state : Client Java .............. SUCCESS [  0.287 s]
[INFO] Flink : Runtime .................................... SUCCESS [02:21 min]
[INFO] Flink : Optimizer .................................. SUCCESS [  1.279 s]
[INFO] Flink : Connectors : ............................... SUCCESS [  0.047 s]
[INFO] Flink : Connectors : File Sink Common .............. SUCCESS [  0.198 s]
[INFO] Flink : Streaming Java ............................. SUCCESS [  7.293 s]
[INFO] Flink : Clients .................................... SUCCESS [ 17.004 s]
[INFO] Flink : DSTL ....................................... SUCCESS [  0.029 s]
[INFO] Flink : DSTL : DFS ................................. SUCCESS [  0.352 s]
[INFO] Flink : State backends : ........................... SUCCESS [  0.028 s]
[INFO] Flink : State backends : RocksDB ................... SUCCESS [04:48 min]
[INFO] Flink : State backends : Changelog ................. SUCCESS [  0.409 s]
[INFO] Flink : Test utils : Utils ......................... SUCCESS [ 36.604 s]
[INFO] Flink : Runtime web ................................ SUCCESS [03:45 min]
[INFO] Flink : Test utils : Connectors .................... SUCCESS [  0.129 s]
[INFO] Flink : Connectors : Base .......................... SUCCESS [  0.422 s]
[INFO] Flink : Connectors : Files ......................... SUCCESS [  0.668 s]
[INFO] Flink : Examples : ................................. SUCCESS [  0.060 s]
[INFO] Flink : Examples : Batch ........................... SUCCESS [ 17.426 s]
[INFO] Flink : Connectors : Hadoop compatibility .......... SUCCESS [  4.132 s]
[INFO] Flink : Tests ...................................... SUCCESS [ 41.403 s]
[INFO] Flink : Streaming Scala ............................ SUCCESS [ 22.269 s]
[INFO] Flink : Connectors : HCatalog ...................... SUCCESS [01:46 min]
[INFO] Flink : Table : .................................... SUCCESS [  0.062 s]
[INFO] Flink : Table : Common ............................. SUCCESS [01:41 min]
[INFO] Flink : Table : API Java ........................... SUCCESS [  1.249 s]
[INFO] Flink : Table : API Java bridge .................... SUCCESS [  0.533 s]
[INFO] Flink : Formats : .................................. SUCCESS [  0.029 s]
[INFO] Flink : Format : Common ............................ SUCCESS [  0.070 s]
[INFO] Flink : Table : API Scala .......................... SUCCESS [  7.713 s]
[INFO] Flink : Table : API Scala bridge ................... SUCCESS [  7.706 s]
[INFO] Flink : Table : SQL Parser ......................... SUCCESS [01:50 min]
[INFO] Flink : Table : SQL Parser Hive .................... SUCCESS [ 12.423 s]
[INFO] Flink : Table : Code Splitter ...................... SUCCESS [01:24 min]
[INFO] Flink : Libraries : ................................ SUCCESS [  0.034 s]
[INFO] Flink : Libraries : CEP ............................ SUCCESS [  1.634 s]
[INFO] Flink : Table : Runtime ............................ SUCCESS [  3.295 s]
[INFO] Flink : Table : Planner ............................ SUCCESS [02:05 min]
[INFO] Flink : Formats : Json ............................. SUCCESS [  0.635 s]
[INFO] Flink : Connectors : Elasticsearch base ............ SUCCESS [01:47 min]
[INFO] Flink : Connectors : Elasticsearch 5 ............... SUCCESS [ 34.571 s]
[INFO] Flink : Connectors : Elasticsearch 6 ............... SUCCESS [01:05 min]
[INFO] Flink : Connectors : Elasticsearch 7 ............... SUCCESS [01:32 min]
[INFO] Flink : Connectors : HBase base .................... SUCCESS [01:05 min]
[INFO] Flink : Connectors : HBase 1.4 ..................... SUCCESS [02:10 min]
[INFO] Flink : Connectors : HBase 2.2 ..................... SUCCESS [01:40 min]
[INFO] Flink : Formats : Hadoop bulk ...................... SUCCESS [  0.972 s]
[INFO] Flink : Formats : Orc .............................. SUCCESS [  9.371 s]
[INFO] Flink : Formats : Orc nohive ....................... SUCCESS [  9.061 s]
[INFO] Flink : Formats : Avro ............................. SUCCESS [ 22.277 s]
[INFO] Flink : Formats : Parquet .......................... SUCCESS [ 46.070 s]
[INFO] Flink : Formats : Csv .............................. SUCCESS [  0.426 s]
[INFO] Flink : Connectors : Hive .......................... SUCCESS [04:35 min]
[INFO] Flink : Connectors : JDBC .......................... SUCCESS [05:52 min]
[INFO] Flink : Connectors : RabbitMQ ...................... SUCCESS [  6.576 s]
[INFO] Flink : Connectors : Twitter ....................... SUCCESS [ 25.245 s]
[INFO] Flink : Connectors : Nifi .......................... SUCCESS [ 28.031 s]
[INFO] Flink : Connectors : Cassandra ..................... SUCCESS [ 26.062 s]
[INFO] Flink : Metrics : JMX .............................. SUCCESS [  0.188 s]
[INFO] Flink : Formats : Avro confluent registry .......... SUCCESS [ 55.983 s]
[INFO] Flink : Test utils : Testing Framework ............. SUCCESS [  5.095 s]
[INFO] Flink : Connectors : Kafka ......................... SUCCESS [01:16 min]
[INFO] Flink : Connectors : Google PubSub ................. SUCCESS [ 46.304 s]
[INFO] Flink : Connectors : Kinesis ....................... SUCCESS [04:09 min]
[INFO] Flink : Connectors : Pulsar ........................ SUCCESS [08:09 min]
[INFO] Flink : Connectors : SQL : Elasticsearch 6 ......... SUCCESS [  6.595 s]
[INFO] Flink : Connectors : SQL : Elasticsearch 7 ......... SUCCESS [  8.016 s]
[INFO] Flink : Connectors : SQL : HBase 1.4 ............... SUCCESS [  7.123 s]
[INFO] Flink : Connectors : SQL : HBase 2.2 ............... SUCCESS [ 14.437 s]
[INFO] Flink : Connectors : SQL : Hive 1.2.2 .............. SUCCESS [04:18 min]
[INFO] Flink : Connectors : SQL : Hive 2.2.0 .............. SUCCESS [01:54 min]
[INFO] Flink : Connectors : SQL : Hive 2.3.6 .............. SUCCESS [05:09 min]
[INFO] Flink : Connectors : SQL : Hive 3.1.2 .............. SUCCESS [08:55 min]
[INFO] Flink : Connectors : SQL : Kafka ................... SUCCESS [  1.015 s]
[INFO] Flink : Connectors : SQL : Kinesis ................. SUCCESS [  9.111 s]
[INFO] Flink : Formats : Sequence file .................... SUCCESS [  0.436 s]
[INFO] Flink : Formats : Compress ......................... SUCCESS [  0.445 s]
[INFO] Flink : Formats : Avro AWS Glue Schema Registry .... SUCCESS [02:30 min]
[INFO] Flink : Formats : SQL Orc .......................... SUCCESS [  0.267 s]
[INFO] Flink : Formats : SQL Parquet ...................... SUCCESS [  0.630 s]
[INFO] Flink : Formats : SQL Avro ......................... SUCCESS [  1.222 s]
[INFO] Flink : Formats : SQL Avro Confluent Registry ...... SUCCESS [  5.252 s]
[INFO] Flink : Examples : Streaming ....................... SUCCESS [ 15.564 s]
[INFO] Flink : Examples : Table ........................... SUCCESS [  6.001 s]
[INFO] Flink : Examples : Build Helper : .................. SUCCESS [  0.062 s]
[INFO] Flink : Examples : Build Helper : Streaming Twitter  SUCCESS [  0.495 s]
[INFO] Flink : Examples : Build Helper : Streaming State machine SUCCESS [  0.482 s]
[INFO] Flink : Examples : Build Helper : Streaming Google PubSub SUCCESS [ 14.322 s]
[INFO] Flink : Container .................................. SUCCESS [  0.174 s]
[INFO] Flink : Queryable state : Runtime .................. SUCCESS [  0.441 s]
[INFO] Flink : Kubernetes ................................. SUCCESS [01:24 min]
[INFO] Flink : Yarn ....................................... SUCCESS [  1.518 s]
[INFO] Flink : Libraries : Gelly .......................... SUCCESS [  1.530 s]
[INFO] Flink : Libraries : Gelly scala .................... SUCCESS [ 10.840 s]
[INFO] Flink : Libraries : Gelly Examples ................. SUCCESS [ 13.025 s]
[INFO] Flink : External resources : ....................... SUCCESS [  0.023 s]
[INFO] Flink : External resources : GPU ................... SUCCESS [  0.144 s]
[INFO] Flink : Metrics : Dropwizard ....................... SUCCESS [  0.162 s]
[INFO] Flink : Metrics : Graphite ......................... SUCCESS [  2.120 s]
[INFO] Flink : Metrics : InfluxDB ......................... SUCCESS [ 39.168 s]
[INFO] Flink : Metrics : Prometheus ....................... SUCCESS [ 12.082 s]
[INFO] Flink : Metrics : StatsD ........................... SUCCESS [  0.118 s]
[INFO] Flink : Metrics : Datadog .......................... SUCCESS [  0.252 s]
[INFO] Flink : Metrics : Slf4j ............................ SUCCESS [  0.106 s]
[INFO] Flink : Libraries : CEP Scala ...................... SUCCESS [  7.770 s]
[INFO] Flink : Table : Uber ............................... SUCCESS [  7.552 s]
[INFO] Flink : Python ..................................... SUCCESS [10:14 min]
[INFO] Flink : Table : SQL Client ......................... SUCCESS [ 10.765 s]
[INFO] Flink : Libraries : State processor API ............ SUCCESS [  0.733 s]
[INFO] Flink : Scala shell ................................ SUCCESS [ 11.145 s]
[INFO] Flink : Dist ....................................... SUCCESS [03:24 min]
[INFO] Flink : Yarn Tests ................................. SUCCESS [  3.867 s]
[INFO] Flink : E2E Tests : ................................ SUCCESS [02:42 min]
[INFO] Flink : E2E Tests : CLI ............................ SUCCESS [  0.131 s]
[INFO] Flink : E2E Tests : Parent Child classloading program SUCCESS [  0.119 s]
[INFO] Flink : E2E Tests : Parent Child classloading lib-package SUCCESS [  0.103 s]
[INFO] Flink : E2E Tests : Dataset allround ............... SUCCESS [  0.119 s]
[INFO] Flink : E2E Tests : Dataset Fine-grained recovery .. SUCCESS [  0.147 s]
[INFO] Flink : E2E Tests : Datastream allround ............ SUCCESS [  0.710 s]
[INFO] Flink : E2E Tests : Batch SQL ...................... SUCCESS [  0.112 s]
[INFO] Flink : E2E Tests : Stream SQL ..................... SUCCESS [  0.122 s]
[INFO] Flink : E2E Tests : Distributed cache via blob ..... SUCCESS [  0.131 s]
[INFO] Flink : E2E Tests : High parallelism iterations .... SUCCESS [  7.028 s]
[INFO] Flink : E2E Tests : Stream stateful job upgrade .... SUCCESS [  0.577 s]
[INFO] Flink : E2E Tests : Queryable state ................ SUCCESS [  1.534 s]
[INFO] Flink : E2E Tests : Local recovery and allocation .. SUCCESS [  0.152 s]
[INFO] Flink : E2E Tests : Elasticsearch 5 ................ SUCCESS [  5.104 s]
[INFO] Flink : E2E Tests : Elasticsearch 6 ................ SUCCESS [  2.661 s]
[INFO] Flink : Quickstart : ............................... SUCCESS [  0.543 s]
[INFO] Flink : Quickstart : Java .......................... SUCCESS [01:24 min]
[INFO] Flink : Quickstart : Scala ......................... SUCCESS [  0.071 s]
[INFO] Flink : E2E Tests : Quickstart ..................... SUCCESS [  0.315 s]
[INFO] Flink : E2E Tests : Confluent schema registry ...... SUCCESS [  2.002 s]
[INFO] Flink : E2E Tests : Stream state TTL ............... SUCCESS [  5.917 s]
[INFO] Flink : E2E Tests : SQL client ..................... SUCCESS [01:18 min]
[INFO] Flink : E2E Tests : File sink ...................... SUCCESS [  0.898 s]
[INFO] Flink : E2E Tests : State evolution ................ SUCCESS [  0.501 s]
[INFO] Flink : E2E Tests : RocksDB state memory control ... SUCCESS [  0.534 s]
[INFO] Flink : E2E Tests : Common ......................... SUCCESS [  0.578 s]
[INFO] Flink : E2E Tests : Metrics availability ........... SUCCESS [  0.165 s]
[INFO] Flink : E2E Tests : Metrics reporter prometheus .... SUCCESS [  0.197 s]
[INFO] Flink : E2E Tests : Heavy deployment ............... SUCCESS [  8.971 s]
[INFO] Flink : E2E Tests : Connectors : Google PubSub ..... SUCCESS [ 48.814 s]
[INFO] Flink : E2E Tests : Streaming Kafka base ........... SUCCESS [  0.183 s]
[INFO] Flink : E2E Tests : Streaming Kafka ................ SUCCESS [  8.357 s]
[INFO] Flink : E2E Tests : Plugins : ...................... SUCCESS [  0.049 s]
[INFO] Flink : E2E Tests : Plugins : Dummy fs ............. SUCCESS [  0.093 s]
[INFO] Flink : E2E Tests : Plugins : Another dummy fs ..... SUCCESS [  0.147 s]
[INFO] Flink : E2E Tests : TPCH ........................... SUCCESS [  5.189 s]
[INFO] Flink : E2E Tests : Streaming Kinesis .............. SUCCESS [ 17.962 s]
[INFO] Flink : E2E Tests : Elasticsearch 7 ................ SUCCESS [  3.020 s]
[INFO] Flink : E2E Tests : Common Kafka ................... SUCCESS [  1.408 s]
[INFO] Flink : E2E Tests : TPCDS .......................... SUCCESS [  0.366 s]
[INFO] Flink : E2E Tests : Netty shuffle memory control ... SUCCESS [  0.132 s]
[INFO] Flink : E2E Tests : Python ......................... SUCCESS [  6.509 s]
[INFO] Flink : E2E Tests : HBase .......................... SUCCESS [  1.420 s]
[INFO] Flink : E2E Tests : AWS Glue Schema Registry ....... SUCCESS [ 19.292 s]
[INFO] Flink : E2E Tests : Pulsar ......................... SUCCESS [  1.578 s]
[INFO] Flink : State backends : Heap spillable ............ SUCCESS [  0.270 s]
[INFO] Flink : Contrib : .................................. SUCCESS [  0.022 s]
[INFO] Flink : Contrib : Connectors : Wikiedits ........... SUCCESS [  2.737 s]
[INFO] Flink : FileSystems : Tests ........................ SUCCESS [  0.718 s]
[INFO] Flink : Docs ....................................... SUCCESS [  8.164 s]
[INFO] Flink : Walkthrough : .............................. SUCCESS [  0.026 s]
[INFO] Flink : Walkthrough : Common ....................... SUCCESS [  0.232 s]
[INFO] Flink : Walkthrough : Datastream Java .............. SUCCESS [  0.061 s]
[INFO] Flink : Walkthrough : Datastream Scala ............. SUCCESS [  0.059 s]
[INFO] Flink : Tools : CI : Java .......................... SUCCESS [ 49.851 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:18 h
[INFO] Finished at: 2023-05-25T13:05:59+08:00
[INFO] ------------------------------------------------------------------------
[WARNING] 
[WARNING] Plugin validation issues were detected in 38 plugin(s)
[WARNING] 
[WARNING]  * org.apache.maven.plugins:maven-compiler-plugin:3.8.0
[WARNING]  * com.github.eirslett:frontend-maven-plugin:1.9.1
[WARNING]  * org.apache.maven.plugins:maven-checkstyle-plugin:2.17
[WARNING]  * org.apache.maven.plugins:maven-clean-plugin:3.1.0
[WARNING]  * org.apache.maven.plugins:maven-assembly-plugin:3.0.0
[WARNING]  * com.github.os72:protoc-jar-maven-plugin:3.11.4
[WARNING]  * com.github.siom79.japicmp:japicmp-maven-plugin:0.11.0
[WARNING]  * org.codehaus.gmavenplus:gmavenplus-plugin:1.8.1
[WARNING]  * org.apache.maven.plugins:maven-jar-plugin:2.4
[WARNING]  * org.apache.maven.plugins:maven-antrun-plugin:1.8
[WARNING]  * org.apache.maven.plugins:maven-clean-plugin:2.5
[WARNING]  * org.apache.maven.plugins:maven-install-plugin:2.5.2
[WARNING]  * org.apache.maven.plugins:maven-jar-plugin:2.5
[WARNING]  * net.alchim31.maven:scala-maven-plugin:3.2.2
[WARNING]  * org.apache.avro:avro-maven-plugin:1.10.0
[WARNING]  * org.antlr:antlr3-maven-plugin:3.5.2
[WARNING]  * com.googlecode.fmpp-maven-plugin:fmpp-maven-plugin:1.0
[WARNING]  * org.antlr:antlr4-maven-plugin:4.7
[WARNING]  * org.apache.maven.plugins:maven-antrun-plugin:1.7
[WARNING]  * com.diffplug.spotless:spotless-maven-plugin:2.4.2
[WARNING]  * org.apache.maven.plugins:maven-assembly-plugin:2.4
[WARNING]  * org.apache.maven.plugins:maven-remote-resources-plugin:1.5
[WARNING]  * org.apache.maven.plugins:maven-archetype-plugin:2.2
[WARNING]  * org.apache.maven.plugins:maven-shade-plugin:3.1.1
[WARNING]  * org.scalastyle:scalastyle-maven-plugin:1.0.0
[WARNING]  * pl.project13.maven:git-commit-id-plugin:4.0.2
[WARNING]  * org.apache.maven.plugins:maven-surefire-plugin:2.22.2
[WARNING]  * org.apache.maven.plugins:maven-surefire-plugin:2.22.1
[WARNING]  * org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1
[WARNING]  * org.apache.maven.plugins:maven-dependency-plugin:3.1.1
[WARNING]  * org.apache.maven.plugins:maven-source-plugin:3.0.1
[WARNING]  * org.apache.maven.plugins:maven-resources-plugin:3.1.0
[WARNING]  * org.commonjava.maven.plugins:directory-maven-plugin:0.1
[WARNING]  * org.apache.maven.plugins:maven-surefire-plugin:2.19.1
[WARNING]  * org.codehaus.mojo:exec-maven-plugin:1.5.0
[WARNING]  * org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.1
[WARNING]  * org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1
[WARNING]  * org.apache.rat:apache-rat-plugin:0.12
[WARNING] 
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING] 
[root@TCT003 flink-1.14.4]# 

三、测试

1.获取编译后的Flink-1.14.4安装包

        /root/flink-1.14.4/flink-dist/target/flink-1.14.4-bin 

2. flink的lib包配置

包的来源:

flink-sql-connector-hive-2.2.0_2.11-1.14.4.jar

        /root/flink-1.14.4/flink-connectors/flink-sql-connector-hive-2.2.0/target/flink-sql-connector-hive-2.2.0_2.11-1.14.4.jar

flink-connector-hive_2.11-1.14.4.jar 

        /root/flink-1.14.4/flink-connectors/flink-connector-hive/target/flink-connector-hive_2.11-1.14.4.jar

libfb303-0.9.3.jar

         cdh lib 包下获取即可

3.sqlClient客户端验证

说明:我已经配置flink的standalone集群,在此就不在赘述了

[root@TCT001 bin]# cat /opt/flink-1.14.4/conf/sql-conf.sql 
CREATE CATALOG my_hive WITH (
    'type' = 'hive',
    'hive-version' = '2.1.1',
    'default-database' = 'default',
    'hive-conf-dir' = '/etc/hive/conf.cloudera.hive/',
    'hadoop-conf-dir'='/etc/hadoop/conf.cloudera.hdfs/'
);
-- set the HiveCatalog as the current catalog of the session
USE CATALOG my_hive;
[root@TCT001 bin]# 
[root@TCT001 bin]# 
[root@TCT001 bin]# 
[root@TCT001 bin]# ./sql-client.sh embedded -i ../conf/sql-conf.sql 
Setting HBASE_CONF_DIR=/etc/hbase/conf because no HBASE_CONF_DIR was set.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/flink-1.14.4/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Successfully initialized from sql script: file:/opt/flink-1.14.4/bin/../conf/sql-conf.sql
Command history file path: /root/.flink-sql-history

                                   ▒▓██▓██▒
                               ▓████▒▒█▓▒▓███▓▒
                            ▓███▓░░        ▒▒▒▓██▒  ▒
                          ░██▒   ▒▒▓▓█▓▓▒░      ▒████
                          ██▒         ░▒▓███▒    ▒█▒█▒
                            ░▓█            ███   ▓░▒██
                              ▓█       ▒▒▒▒▒▓██▓░▒░▓▓█
                            █░ █   ▒▒░       ███▓▓█ ▒█▒▒▒
                            ████░   ▒▓█▓      ██▒▒▒ ▓███▒
                         ░▒█▓▓██       ▓█▒    ▓█▒▓██▓ ░█░
                   ▓░▒▓████▒ ██         ▒█    █▓░▒█▒░▒█▒
                  ███▓░██▓  ▓█           █   █▓ ▒▓█▓▓█▒
                ░██▓  ░█░            █  █▒ ▒█████▓▒ ██▓░▒
               ███░ ░ █░          ▓ ░█ █████▒░░    ░█░▓  ▓░
              ██▓█ ▒▒▓▒          ▓███████▓░       ▒█▒ ▒▓ ▓██▓
           ▒██▓ ▓█ █▓█       ░▒█████▓▓▒░         ██▒▒  █ ▒  ▓█▒
           ▓█▓  ▓█ ██▓ ░▓▓▓▓▓▓▓▒              ▒██▓           ░█▒
           ▓█    █ ▓███▓▒░              ░▓▓▓███▓          ░▒░ ▓█
           ██▓    ██▒    ░▒▓▓███▓▓▓▓▓██████▓▒            ▓███  █
          ▓███▒ ███   ░▓▓▒░░   ░▓████▓░                  ░▒▓▒  █▓
          █▓▒▒▓▓██  ░▒▒░░░▒▒▒▒▓██▓░                            █▓
          ██ ▓░▒█   ▓▓▓▓▒░░  ▒█▓       ▒▓▓██▓    ▓▒          ▒▒▓
          ▓█▓ ▓▒█  █▓░  ░▒▓▓██▒            ░▓█▒   ▒▒▒░▒▒▓█████▒
           ██░ ▓█▒█▒  ▒▓▓▒  ▓█                █░      ░░░░   ░█▒
           ▓█   ▒█▓   ░     █░                ▒█              █▓
            █▓   ██         █░                 ▓▓        ▒█▓▓▓▒█░
             █▓ ░▓██░       ▓▒                  ▓█▓▒░░░▒▓█░    ▒█
              ██   ▓█▓░      ▒                    ░▒█▒██▒      ▓▓
               ▓█▒   ▒█▓▒░                         ▒▒ █▒█▓▒▒░░▒██
                ░██▒    ▒▓▓▒                     ▓██▓▒█▒ ░▓▓▓▓▒█▓
                  ░▓██▒                          ▓░  ▒█▓█  ░░▒▒▒
                      ▒▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▓▓  ▓░▒█░
          
    ______ _ _       _       _____  ____  _         _____ _ _            _  BETA   
   |  ____| (_)     | |     / ____|/ __ \| |       / ____| (_)          | |  
   | |__  | |_ _ __ | | __ | (___ | |  | | |      | |    | |_  ___ _ __ | |_ 
   |  __| | | | '_ \| |/ /  \___ \| |  | | |      | |    | | |/ _ \ '_ \| __|
   | |    | | | | | |   <   ____) | |__| | |____  | |____| | |  __/ | | | |_ 
   |_|    |_|_|_| |_|_|\_\ |_____/ \___\_\______|  \_____|_|_|\___|_| |_|\__|
          
        Welcome! Enter 'HELP;' to list all available commands. 'QUIT;' to exit.


Flink SQL> show tables;
+------------+
| table name |
+------------+
|     hive_k |
|          k |
+------------+
2 rows in set

Flink SQL>  set table.sql-dialect=hive; 
[INFO] Session property has been set.

Flink SQL> select * from hive_k;
2023-05-25 18:07:14,422 INFO  org.apache.hadoop.mapred.FileInputFormat                     [] - Total input files to process : 0

                                                                                                       SQL Query Result (Table)                                                                                                       
 Table program finished.                                                                                   Page: Last of 1                                                                                      Updated: 18:07:19.966 

    tinyint0 smallint1        int2              bigint3                         float4                        double5       decimal6 boolean7                          char8                       varchar9                       stri


四、相关资源下载

如跟我版本一样的码友们,可以直接下载去用

flink-1.14.4.tgz     下载

链接:https://pan.baidu.com/s/1L3idoPOs_LzgamOt9e5rZg?pwd=gqj0 
提取码:gqj0

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/569027.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Java时间类(十一) -- Date类工具类 -- Java获取当天、本周、本月、本年 开始及结束时间

目录 1. 今天的日期如下: 2. DateUtils工具类的源代码: 3. 测试类 1. 今天的日期如下:

React Hooks useRef 源码解读+最佳实践

参考&#xff1a;https://juejin.cn/post/7027949526170206239 入口 下篇文章有入口源码详解&#xff0c;想看的可以跳转过去&#xff0c;这里就不放源码了&#xff0c;简单梳理一下流程吧 React Hooks useState 使用详解实现原理源码分析 流程 beginWork 判断组件类型&#x…

SpringCloud(26):系统自适应保护实现

Sentinel 系统自适应限流从整体维度对应用入口流量进行控制&#xff0c;结合应用的 Load、CPU 使用率、总体平均 RT、入口 QPS 和并发线程数等几个维度的监控指标&#xff0c;通过自适应的流控策略&#xff0c;让系统的入口流量和系统的负载达到一个平衡&#xff0c;让系统尽可…

ACP(MaxCompute篇)-MaxCompute自定义函数开发

概述 数据映射关系 自定义函数 相关资料 【MaxCompute】实现自定义UDF、UDTF详解_maxcompute 自定义函数_beautiful_huang的博客-CSDN博客 UDF UDTF UDAF 函数发布 test11_123>add jar C:\Users\zhang\Desktop\相关电子书\test\target\test-1.jar -f; OK: Resource tes…

Linux 分布式版本控制系统git

目录 什么是git&#xff1f; 安装git 创建版本库 工作区和版本库、 向版本库中添加文件 版本回退 远程操作 什么是git&#xff1f;  Git 是一个开源的分布式版本控制系统&#xff0c;用于敏捷高效地处理任何或小或大的项目。 linux是一个开源软件&#xff0c;第一版本&am…

【深入浅出Maven开发实战】「入门教程系列」带你零基础学习和开发使用Maven开发工具实战指南(实战技术总结)

Maven介绍 由于Java的生态非常丰富&#xff0c;无论你想实现什么功能&#xff0c;都能找到对应的工具类&#xff0c;这些工具类都是以jar包的形式出现的&#xff0c;例如Spring,SpringMVC、MyBatis、数据库驱动&#xff0c;等等&#xff0c;都是以jar包的形式出现的&#xff0…

华为OD机试之完美走位(Java源码)

完美走位 题目描述 在第一人称射击游戏中&#xff0c;玩家通过键盘的A、S、D、W四个按键控制游戏人物分别向左、向后、向右、向前进行移动&#xff0c;从而完成走位。 假设玩家每按动一次键盘&#xff0c;游戏任务会向某个方向移动一步&#xff0c;如果玩家在操作一定次数的键…

Eureka 心跳和服务续约源码探秘——图解、源码级解析

&#x1f34a; Java学习&#xff1a;社区快速通道 &#x1f34a; 深入浅出RocketMQ设计思想&#xff1a;深入浅出RocketMQ设计思想 &#x1f34a; 绝对不一样的职场干货&#xff1a;大厂最佳实践经验指南 &#x1f4c6; 最近更新&#xff1a;2023年5月25日 &#x1f34a; 点…

【SA8295P 源码分析】03 - SA8295P QNX Host 上电开机流程分析

【SA8295P 源码分析】03 - SA8295P QNX Host上电开机流程分析 一、阶段1 固件开机自检 (SM BIST):APPS PBL加载XBL后触发 INT_RESET进行Warm Reset二、阶段2 固件开机自检 (SM BIST):加载TZ,初始Hypervisor,启动QNX Kernel,加载并启动各子系统系列文章汇总见:《【SA8295P…

如何用前端技术打造自己的2048游戏

部分数据来源&#xff1a;ChatGPT 2048游戏规则 2048是一款数字益智类游戏&#xff0c;玩家需要通过合并数字方块来获得更高的分数。游戏的规则非常简单&#xff0c;只需要使用上下左右方向键移动数字方块&#xff0c;当两个相同数字方块碰撞时&#xff0c;会合并成一个数字方…

【KVM虚拟化】· KVM中的网络

目录 &#x1f34e;虚拟机的网络模式 &#x1f352;网络配置文件 &#x1f352;virsh查看命令 &#x1f34e;基于NAT的虚拟网络 &#x1f34e;基于网桥的虚拟网络 &#x1f34e;基于隔离的虚拟网络 &#x1f990;博客主页&#xff1a;大虾好吃吗的博客 &#x1f990;专栏地址&a…

全网最全的多模态实体识别论文列表-【原文+代码】

文章目录 写在前面的话【2017年】【2018年】【2019年】【2020年】【2021年】【2022年】【2023年】【写在最后的话】 写在前面的话 近期在梳理多模态NER相关的论文&#xff0c;因此&#xff0c;本篇文章主要是为大家整理了比较全面的聚焦于多模态实体识别任务的论文列表&#x…

Linux权限相关介绍

目录 前言 1.Linux操作系统下的两种用户 Linux权限管理 Linux文件访问对象分类 文件类型和访问权限 文件类型 基本权限 文件访问权限的相关设置方法 chmod chown chgrp umask掩码 目录权限 粘滞位 前言 权限指的就是我们对于某件事物所能够相关操作&#xff0c;而对于…

x86汇编语法基础(gnu格式)

一、寄存器 1.1 通用寄存器 一个x86-64的中央处理单元&#xff08;CPU&#xff09;包含一组16个存储64位值的通用寄存器。这些寄存器用来存储整数数据和指针。下图显示了这16个寄存器。它们的名字都以%r开头&#xff0c;不过后面还跟着不同命名规则的名字&#xff0c;这是由于…

macbook2023系统清理软件cleanmymac中文版

cleanmymac x 中文版基本都是大家首选Mac清理软件了。它集各种功能于一身&#xff0c;几乎满足用户所有的清理需求。它可以清理&#xff0c;优化&#xff0c;保养和监测您的电脑&#xff0c;确保您的Mac运行畅通无阻&#xff01;支持一键快速清理Mac&#xff0c;快速检查并安全…

opencv_c++学习(二十二)

一、凸包检测 图中左侧为边缘检测的效果&#xff0c;中间为图像经过二值化的效果&#xff0c;右图为凸包检测效果。 convexHull(lnputArraypoints, OutputArray hull&#xff0c;bool clockwise false, bool returnPoints true)points:输入的2D点集。 hull:输出凸包的顶点。…

【大学物理实验】基本测量

50分度的游标卡尺&#xff0c;最小分度为&#xff1a; A. 0.1mm B. 0.2mm C. 0.5mm D. 0.02mm 正确答案&#xff1a; D 保存游标卡尺和螺旋测微器是&#xff0c;下面说法正确的是&#xff1a; A. 游标卡尺测量位置应闭合&#xff0c;螺旋测微器小砧和螺杆间隙也应闭合 B. 游标…

PyG的Planetoid无法直接下载Cora等数据集的解决方法

问题描述&#xff1a; 在使用PyG的时候&#xff0c;通常会涉及到一些公共数据集的下载&#xff0c;由于网络问题&#xff0c;导致无法下载出现以下问题&#xff1a; 尝试了很多的方法都没有成功&#xff08;主要是个人比较菜&#xff01;&#xff09;。但是皇天不负有心人&am…

基于Springboot的高校固定资产管理系统的设计与实现(源码完整)

项目描述 临近学期结束&#xff0c;还是毕业设计&#xff0c;你还在做java程序网络编程&#xff0c;期末作业&#xff0c;老师的作业要求觉得大了吗?不知道毕业设计该怎么办?网页功能的数量是否太多?没有合适的类型或系统?等等。这里根据你想解决的问题&#xff0c;今天给…

1.标注自己的关键点检测数据集

1.标注自己的关键点检测数据集 1.1 labelme标注数据 labelme GitHub项目地址&#xff1a;https://github.com/wkentaro/labelme 1.1.1exe文件下载 https://github.com/wkentaro/labelme/releases 可直接下载打包好的exe文件 1.1.2python安装labelme cmd命令行中输入以下命…