案例
波波鱼头
加油
展开
-
Flink处理数据写入mysql(scala实现)
import java.sql.{Connection, DriverManager, PreparedStatement}import org.apache.flink.configuration.Configurationimport org.apache.flink.streaming.api.functions.sink.{RichSinkFunction, SinkFunction}import org.apache.flink.streaming.api.scala._/* * 建表原创 2021-03-24 20:16:02 · 2050 阅读 · 1 评论 -
Flink自定义数据源(scala实现)
import org.apache.flink.streaming.api.scala._case class SensorReading(id: String, timestamp: Long, temperature: Double)//样例类对象object Sensor { def main(args: Array[String]): Unit = { val env = StreamExecutionEnvironment.getExecutionEnvironment原创 2021-03-24 19:19:37 · 590 阅读 · 0 评论