Commit 1515878e authored by 赵威's avatar 赵威

update user type

parent 6dcc1562
......@@ -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")
}
}
......@@ -8,5 +8,5 @@ case class UserInfo(
cityId: Int,
secondDemands: Array[String],
projects: Array[String],
bussinessTags: Array[String]
businessTags: Array[String]
)
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