Commit ace011da authored by 王志伟's avatar 王志伟

统计alpha点击

parent 2223e684
......@@ -646,7 +646,7 @@ object alpha_ctr {
//话题相关问题统计
object bug_again_count {
object add_knowledge_network {
Logger.getLogger("org.apache.spark").setLevel(Level.WARN)
Logger.getLogger("org.apache.eclipse.jetty.server").setLevel(Level.OFF)
......@@ -691,22 +691,10 @@ object bug_again_count {
import sc.implicits._
// val stat_date = GmeiConfig.getMinusNDate(1)
val stat_date=param.date
//println(param.date)
val partition_date = stat_date.replace("-","")
val input = sc.sparkContext.textFile("/home/wangzhiwei/mouse_knowledge.csv").toDF("project","relationship","property")
val data_count = sc.sql(
s"""
|SELECT cl_id as device_id,count(cl_id) as open_num,sum(params['duration']) as time_all,sum(params['duration'])/count(cl_id) as avge_time
|from online.tl_hdfs_maidian_view
|where partition_date='${partition_date}'
|and action ='on_app_session_over'
|GROUP BY cl_id
""".stripMargin
)
GmeiConfig.writeToJDBCTable(data_count, "spam_invalid_user_data", SaveMode.Append)
GmeiConfig.writeToJDBCTable(input, "Knowledge_network", SaveMode.Append)
}
......
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