Commit 6dcc1562 authored by 赵威's avatar 赵威

get streaom

parent 530d3f98
...@@ -51,22 +51,22 @@ object Main { ...@@ -51,22 +51,22 @@ object Main {
val stream: DataStream[UserInfo] = env.addSource(kafkaConsumer) val stream: DataStream[UserInfo] = env.addSource(kafkaConsumer)
stream.map { user => // stream.map { user =>
val projects = user.projects.toList // val projects = user.projects.toList
val secondDemands = user.secondDemands.toList // val secondDemands = user.secondDemands.toList
println(user.deviceId) // println(user.deviceId)
println(projects.mkString(" ")) // println(projects.mkString(" "))
val diaryReq = ES.generateDiaryRequest(projects, secondDemands, user.cityId) // val diaryReq = ES.generateDiaryRequest(projects, secondDemands, user.cityId)
val tractateReq = ES.generateTractateRequest(projects, secondDemands) // val tractateReq = ES.generateTractateRequest(projects, secondDemands)
val answerReq = ES.generateAnswerRequest(projects, secondDemands) // val answerReq = ES.generateAnswerRequest(projects, secondDemands)
ES.test(diaryReq, tractateReq, answerReq) // ES.test(diaryReq, tractateReq, answerReq)
println("########################") // println("########################")
user.deviceId // user.deviceId
} // }
// stream.print stream.print
env.execute("flink streaming user portrait") env.execute("flink streaming user portrait")
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment