longxibendi created FLINK-17123:
----------------------------------- Summary: flink-sql-connector-elasticsearch版本与 es 版本不对应 Key: FLINK-17123 URL: https://issues.apache.org/jira/browse/FLINK-17123 Project: Flink Issue Type: Bug Components: Command Line Client Affects Versions: 1.10.0 Reporter: longxibendi 一.flink-sql-connector-es 与 es 版本 不对应 二.es版本是7.6.0 ,但是用 flink-sql 连接器,只能用 es6 的,用es7的就报错了。 比如: flink-sql-connector-elasticsearch6_2.11-1.10.0.jar ,对应 es7.6.0 和 flink1.10.0 启动 sql-client.sh embedded create tb xxx insert xxx select xxx; 然后看到 submit 了,但是任务是执行失败的。报: ...skipping... java.lang.NoClassDefFoundError: org/apache/flink/elasticsearch7/shaded/org/elasticsearch/script/mustache/SearchTemplateRequest at org.apache.flink.streaming.connectors.elasticsearch7.Elasticsearch7ApiCallBridge.createClient(Elasticsearch7ApiCallBridge.java:76) at org.apache.flink.streaming.connectors.elasticsearch7.Elasticsearch7ApiCallBridge.createClient(Elasticsearch7ApiCallBridge.java:48) at org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkBase.open(ElasticsearchSinkBase.java:299) at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:36) at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102) at org.apache.flink.streaming.api.operators.StreamSink.open(StreamSink.java:48) at org.apache.flink.streaming.runtime.tasks.StreamTask.initializeStateAndOpen(StreamTask.java:1007) at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$0(StreamTask.java:454) at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.runThrowing(StreamTaskActionExecutor.java:94) at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:449) at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:461) at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:707) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:532) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassNotFoundException: org.apache.flink.elasticsearch7.shaded.org.elasticsearch.script.mustache.SearchTemplateRequest at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 14 more 三. 如果用 flink-sql-connector-elasticsearch7_2.11-1.10.0.jar , es7.6.0 ,flink1.10.0 报错了。改成 flink-sql-connector-elasticsearch6_2.11-1.10.0.jar,es7.6.0 ,flink1.10.0 没问题了 -- This message was sent by Atlassian Jira (v8.3.4#803005) |
Free forum by Nabble | Edit this page |