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

get streaom

parent 530d3f98
......@@ -51,22 +51,22 @@ object Main {
val stream: DataStream[UserInfo] = env.addSource(kafkaConsumer)
stream.map { user =>
val projects = user.projects.toList
val secondDemands = user.secondDemands.toList
println(user.deviceId)
println(projects.mkString(" "))
// stream.map { user =>
// val projects = user.projects.toList
// val secondDemands = user.secondDemands.toList
// println(user.deviceId)
// println(projects.mkString(" "))
val diaryReq = ES.generateDiaryRequest(projects, secondDemands, user.cityId)
val tractateReq = ES.generateTractateRequest(projects, secondDemands)
val answerReq = ES.generateAnswerRequest(projects, secondDemands)
ES.test(diaryReq, tractateReq, answerReq)
// val diaryReq = ES.generateDiaryRequest(projects, secondDemands, user.cityId)
// val tractateReq = ES.generateTractateRequest(projects, secondDemands)
// val answerReq = ES.generateAnswerRequest(projects, secondDemands)
// ES.test(diaryReq, tractateReq, answerReq)
println("########################")
user.deviceId
}
// println("########################")
// user.deviceId
// }
// stream.print
stream.print
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