在idea上执行flinkCDC是正常的,结果到了Linux上报异常:
Caused by: org.apache.flink.core.fs.UnsupportedFileSystemSchemeException: Hadoop is not in the classpath/dependencies.
at org.apache.flink.core.fs.UnsupportedSchemeFactory.create(UnsupportedSchemeFactory.java:55)
at org.apache.flink.core.fs.FileSystem.getUnguardedFileSystem(FileSystem.java:528)
原因:我的1.14.4版本的Flink没有Hadoop集成,因此无法直接操作HDFS
下载相关jar包
https://repo.maven.apache.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.7.5-7.0/flink-shaded-hadoop-2-uber-2.7.5-7.0.jar
上传到flink/lib下
重启flink
ok,任务提交成功