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
ace011da
Commit
ace011da
authored
Apr 03, 2019
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计alpha点击
parent
2223e684
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
temp_analysis.scala
eda/feededa/src/main/scala/com/gmei/temp_analysis.scala
+3
-15
No files found.
eda/feededa/src/main/scala/com/gmei/temp_analysis.scala
View file @
ace011da
...
...
@@ -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
)
}
...
...
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