XW512 opened a new pull request #18441:
URL: https://github.com/apache/flink/pull/18441


   flink version: 1.14.3
   
   consumer code:  
   
   KafkaSource<String> kafkaSource = KafkaSource.<String>builder()
                   .setBootstrapServers("xxx:9092,xxx:9092,xxx:9092")
                   .setGroupId("consumer")
                   .setTopics("logs")
                   .setStartingOffsets(OffsetsInitializer.latest())
                   .setValueOnlyDeserializer(new SimpleStringSchema())
                   .build();
   DataStream<String> inputStream = env.fromSource(kafkaSource, 
WatermarkStrategy.noWatermarks(), "kafka-source");
   
   When I submit a task to the Flink cluster, the following error occurs
   
   2022-01-21 19:58:22,593 INFO  
org.apache.flink.streaming.runtime.tasks.StreamTask          [] - Using 
job/cluster config to configure application-defined state backend: 
EmbeddedRocksDBStateBackend{, localRocksDbDirectories=null, 
enableIncrementalCheckpointing=UNDEFINED, numberOfTransferThreads=-1, 
writeBatchSize=-1}
   2022-01-21 19:58:22,593 INFO  
org.apache.flink.contrib.streaming.state.EmbeddedRocksDBStateBackend [] - Using 
predefined options: DEFAULT.
   2022-01-21 19:58:22,593 WARN  org.apache.flink.runtime.taskmanager.Task      
              [] - Source: kafka-source -> Filter -> Map -> 
Timestamps/Watermarks -> Sink: Unnamed (2/4)#48 
(3b4734745a62c15ec94f5d29f86516e4) switched from INITIALIZING to FAILED with 
failure cause: java.lang.NoSuchMethodError: 
org.apache.flink.api.connector.source.SourceReaderContext.metricGroup()Lorg/apache/flink/metrics/MetricGroup;
        at 
org.apache.flink.connector.kafka.source.KafkaSource.createReader(KafkaSource.java:149)
        at 
org.apache.flink.connector.kafka.source.KafkaSource.createReader(KafkaSource.java:127)
        at 
org.apache.flink.streaming.api.operators.SourceOperator.initReader(SourceOperator.java:264)
        at 
org.apache.flink.streaming.runtime.tasks.SourceOperatorStreamTask.init(SourceOperatorStreamTask.java:70)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:677)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:654)
        at 
org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)
        at 
org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927)
        at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766)
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575)
        at java.lang.Thread.run(Thread.java:748)
   
   I guess it's the lack of the Flink package. I copy the Flink core to the Lib 
of the Flink cluster, but I still can't start the task
   
   How should I solve this problem
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to