Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
3e18b9c0
Commit
3e18b9c0
authored
Apr 17, 2019
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加双写
parent
670d6720
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
find_bug.scala
eda/feededa/src/main/scala/com/gmei/find_bug.scala
+6
-0
temp_analysis.scala
eda/feededa/src/main/scala/com/gmei/temp_analysis.scala
+4
-0
temp_count.scala
eda/feededa/src/main/scala/com/gmei/temp_count.scala
+13
-6
No files found.
eda/feededa/src/main/scala/com/gmei/find_bug.scala
View file @
3e18b9c0
...
@@ -126,6 +126,8 @@ object find_bug {
...
@@ -126,6 +126,8 @@ object find_bug {
result1
.
show
()
result1
.
show
()
GmeiConfig
.
writeToJDBCTable
(
result1
,
"bug_Recommendation_strategy_temp"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
result1
,
"bug_Recommendation_strategy_temp"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
"jdbc:mysql://152.136.44.138:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true"
,
result1
,
table
=
"bug_Recommendation_strategy_temp"
,
SaveMode
.
Append
)
//device_id尾号1有点击用户日记本点击数
//device_id尾号1有点击用户日记本点击数
...
@@ -291,6 +293,8 @@ object find_bug {
...
@@ -291,6 +293,8 @@ object find_bug {
result3
.
show
()
result3
.
show
()
GmeiConfig
.
writeToJDBCTable
(
result3
,
"bug_Recommendation_strategy_newUser"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
result3
,
"bug_Recommendation_strategy_newUser"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
"jdbc:mysql://152.136.44.138:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true"
,
result3
,
table
=
"bug_Recommendation_strategy_newUser"
,
SaveMode
.
Append
)
}
}
...
@@ -495,6 +499,8 @@ object CTR_precise {
...
@@ -495,6 +499,8 @@ object CTR_precise {
result3
.
show
()
result3
.
show
()
GmeiConfig
.
writeToJDBCTable
(
result3
,
"bug_precise_Recommendation_strategy_newUser"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
result3
,
"bug_precise_Recommendation_strategy_newUser"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
"jdbc:mysql://152.136.44.138:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true"
,
result3
,
table
=
"bug_precise_Recommendation_strategy_newUser"
,
SaveMode
.
Append
)
}
}
...
...
eda/feededa/src/main/scala/com/gmei/temp_analysis.scala
View file @
3e18b9c0
...
@@ -632,6 +632,8 @@ object alpha_ctr {
...
@@ -632,6 +632,8 @@ object alpha_ctr {
GmeiConfig
.
writeToJDBCTable
(
result
,
"alpha_ctr"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
result
,
"alpha_ctr"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
"jdbc:mysql://152.136.44.138:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true"
,
result
,
table
=
"alpha_ctr"
,
SaveMode
.
Append
)
val
device_duration_avge
=
sc
.
sql
(
val
device_duration_avge
=
sc
.
sql
(
...
@@ -656,6 +658,8 @@ object alpha_ctr {
...
@@ -656,6 +658,8 @@ object alpha_ctr {
val
result3
=
device_duration_avge
.
join
(
duration_everytime_avge
,
"stat_date"
)
val
result3
=
device_duration_avge
.
join
(
duration_everytime_avge
,
"stat_date"
)
GmeiConfig
.
writeToJDBCTable
(
result3
,
"alpha_duration"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
result3
,
"alpha_duration"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
"jdbc:mysql://152.136.44.138:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true"
,
result3
,
table
=
"alpha_duration"
,
SaveMode
.
Append
)
}
}
...
...
eda/feededa/src/main/scala/com/gmei/temp_count.scala
View file @
3e18b9c0
...
@@ -164,6 +164,9 @@ object temp_count {
...
@@ -164,6 +164,9 @@ object temp_count {
GmeiConfig
.
writeToJDBCTable
(
result1
,
"ffm_diary_ctr"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
result1
,
"ffm_diary_ctr"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
"jdbc:mysql://152.136.44.138:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true"
,
result1
,
table
=
"ffm_diary_ctr"
,
SaveMode
.
Append
)
}
}
...
@@ -407,11 +410,11 @@ object Repeated_content_recommendation_moreday {
...
@@ -407,11 +410,11 @@ object Repeated_content_recommendation_moreday {
val
sc
=
spark_env
.
_2
val
sc
=
spark_env
.
_2
val
ti
=
new
TiContext
(
sc
)
val
ti
=
new
TiContext
(
sc
)
ti
.
tidbMapTable
(
dbName
=
"jerry_prod"
,
tableName
=
"data_feed_exposure_precise"
)
//
ti.tidbMapTable(dbName = "jerry_prod", tableName = "data_feed_exposure_precise")
ti
.
tidbMapTable
(
dbName
=
"jerry_prod"
,
tableName
=
"data_feed_click"
)
//
ti.tidbMapTable(dbName = "jerry_prod", tableName = "data_feed_click")
ti
.
tidbMapTable
(
dbName
=
"jerry_prod"
,
tableName
=
"blacklist"
)
//
ti.tidbMapTable(dbName = "jerry_prod", tableName = "blacklist")
ti
.
tidbMapTable
(
dbName
=
"jerry_prod"
,
tableName
=
"data_feed_exposure"
)
//
ti.tidbMapTable(dbName = "jerry_prod", tableName = "data_feed_exposure")
ti
.
tidbMapTable
(
dbName
=
"jerry_prod"
,
tableName
=
"merge_queue_table"
)
//
ti.tidbMapTable(dbName = "jerry_prod", tableName = "merge_queue_table")
val
stat_date
=
GmeiConfig
.
getMinusNDate
(
1
)
val
stat_date
=
GmeiConfig
.
getMinusNDate
(
1
)
...
@@ -457,8 +460,10 @@ object Repeated_content_recommendation_moreday {
...
@@ -457,8 +460,10 @@ object Repeated_content_recommendation_moreday {
val
df_result
=
sc
.
createDataFrame
(
result
)
val
df_result
=
sc
.
createDataFrame
(
result
)
GmeiConfig
.
writeToJDBCTable
(
df_result
,
table
=
"Repeated_content_recommendation_moreday"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
df_result
,
table
=
"Repeated_content_recommendation_moreday"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
"jdbc:mysql://152.136.44.138:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true"
,
df_result
,
table
=
"Repeated_content_recommendation_moreday"
,
SaveMode
.
Append
)
// exp_diary.show()
// exp_diary.show()
// exp_diary.createOrReplaceTempView("exp_diary")
// exp_diary.createOrReplaceTempView("exp_diary")
// GmeiConfig.writeToJDBCTable(df, table = "Repeated_evaluation_indicator_moreday", SaveMode.Append)
// GmeiConfig.writeToJDBCTable(df, table = "Repeated_evaluation_indicator_moreday", SaveMode.Append)
...
@@ -624,6 +629,8 @@ object GetHiveSearchData {
...
@@ -624,6 +629,8 @@ object GetHiveSearchData {
//
//
GmeiConfig
.
writeToJDBCTable
(
df_result
,
table
=
"GetHiveSearchData_CTR"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
df_result
,
table
=
"GetHiveSearchData_CTR"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
"jdbc:mysql://152.136.44.138:4000/jerry_prod?user=root&password=3SYz54LS9#^9sBvC&rewriteBatchedStatements=true"
,
df_result
,
table
=
"GetHiveSearchData_CTR"
,
SaveMode
.
Append
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment