Commit 3afd476d authored by 王志伟's avatar 王志伟

统计运维想要数据

parent f69059e1
......@@ -846,6 +846,7 @@ object tag_value {
object app_list_yunying {
Logger.getLogger("org.apache.spark").setLevel(Level.WARN)
......@@ -882,24 +883,14 @@ object app_list_yunying {
val sc = spark_env._2
sc.sql("use jerry_prod")
// val ti = new TiContext(sc)
// ti.tidbMapTable(dbName = "jerry_prod", tableName = "diary_video")
// ti.tidbMapTable(dbName = "jerry_prod", tableName = "data_feed_click")
// ti.tidbMapTable(dbName = "jerry_prod", tableName = "blacklist")
// ti.tidbMapTable(dbName = "jerry_test", tableName = "bl_device_list")
// ti.tidbMapTable(dbName = "jerry_prod", tableName = "data_feed_exposure")
// ti.tidbMapTable(dbName = "jerry_prod", tableName = "merge_queue_table")
import sc.implicits._
import sc.implicits._
val stat_date = GmeiConfig.getMinusNDate(1)
println(stat_date)
// val stat_date = param.date
//println(param.date)
val partition_date = stat_date.replace("-","")
println(partition_date)
//每日新用户
val device_id_newUser = sc.sql(
s"""
|select distinct(device_id) as device_id
......@@ -930,20 +921,18 @@ object app_list_yunying {
app_list.show()
val result1 = app_list
result1.show()
println("开始写入")
GmeiConfig.writeToJDBCTable("jdbc:mysql://172.16.40.158:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true",result1, table="app_list_yunying",SaveMode.Overwrite)
println("写入完成")
println("开始写入")
GmeiConfig.writeToJDBCTable("jdbc:mysql://172.16.40.158:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true",result1, table="app_list_yunying",SaveMode.Overwrite)
println("写入完成")
}
......@@ -962,7 +951,6 @@ object app_list_yunying {
object test_data {
Logger.getLogger("org.apache.spark").setLevel(Level.WARN)
......
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