Is there a basic MVN pom file for flink? The default one from GitHub does not seem to be working!
在 2018年7月1日,下午7:44,Mich Talebzadeh <[hidden email]> 写道:I have done many times with sbt or maven for spark streaming.Trying to compile a simple program that compiles ok in flink-scala.shThe imports are as followsimport java.util.Properties
import java.util.Arrays
import org.apache.flink.api.common.functions.MapFunction
import org.apache.flink.api.java.utils.ParameterTool
import org.apache.flink.streaming.api.datastream.DataStream
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment
import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer09
import org.apache.flink.streaming.util.serialization.SimpleStringSchema
import org.apache.flink.streaming.util.serialization.DeserializationSchema
import org.apache.flink.streaming.util.serialization.SimpleStringSchemawith adding to classpath the following jars it compilesflink-connector-kafka-0.9_2.11-1.5.0.jarflink-connector-kafka-base_2.11-1.5.0.jarI guess my pom.xml is incorrect.I have added these two dependencies to the pom.xml file<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.11</artifactId>
<version>1.4.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>1.5.0</version>
</dependency>However, I am getting these basic errors![ERROR] /home/hduser/dba/bin/flink/md_streaming/src/main/scala/myPackage/md_streaming.scala:4: error: object flink is not a member of package org.apache
[INFO] import org.apache.flink.api.java.utils.ParameterTool
[INFO] ^
[ERROR] /home/hduser/dba/bin/flink/md_streaming/src/main/scala/myPackage/md_streaming.scala:5: error: object flink is not a member of package org.apache
[INFO] import org.apache.flink.streaming.api.datastream.DataStream
[INFO] ^
[ERROR] /home/hduser/dba/bin/flink/md_streaming/src/main/scala/myPackage/md_streaming.scala:6: error: object flink is not a member of package org.apache
[INFO] import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment
[INFO] ^
[ERROR] /home/hduser/dba/bin/flink/md_streaming/src/main/scala/myPackage/md_streaming.scala:7: error: object flink is not a member of package org.apache
[INFO] import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer09
[INFO] ^
[ERROR] /home/hduser/dba/bin/flink/md_streaming/src/main/scala/myPackage/md_streaming.scala:8: error: object flink is not a member of package org.apache
[INFO] import org.apache.flink.streaming.util.serialization.SimpleStringSchema
[INFO] ^
[ERROR] /home/hduser/dba/bin/flink/md_streaming/src/main/scala/myPackage/md_streaming.scala:9: error: object flink is not a member of package org.apache
[INFO] import org.apache.flink.streaming.util.serialization.DeserializationSchema
[INFO] ^
[ERROR] /home/hduser/dba/bin/flink/md_streaming/src/main/scala/myPackage/md_streaming.scala:10: error: object flink is not a member of package org.apache
[INFO] import org.apache.flink.streaming.util.serialization.SimpleStringSchema
[INFO] ^
[ERROR] /home/hduser/dba/bin/flink/md_streaming/src/main/scala/myPackage/md_streaming.scala:18: error: not found: value StreamExecutionEnvironment
[INFO] val env = StreamExecutionEnvironment.getExecutionEnvironmentIs there a basic MVN pom file for flink? The default one from GitHub does not seem to be working!ThanksDr Mich Talebzadeh
Disclaimer: Use it at your own risk. Any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on this email's technical content is explicitly disclaimed. The author will in no case be liable for any monetary damages arising from such loss, damage or destruction.
Free forum by Nabble | Edit this page |