Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
ctr-estimate
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵建伟
ctr-estimate
Commits
597a8687
Commit
597a8687
authored
Apr 07, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
c211e323
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
start.sh
bin/start.sh
+1
-1
TestCtrEstimateMainPfr.java
...n/java/com/gmei/data/ctr/main/TestCtrEstimateMainPfr.java
+1
-1
CtrEstimateClkOperator.java
...va/com/gmei/data/ctr/operator/CtrEstimateClkOperator.java
+10
-5
No files found.
bin/start.sh
View file @
597a8687
...
...
@@ -27,7 +27,7 @@ $JAR_DIR/ctr-estimate-1.0-SNAPSHOT.jar \
--retryInteral
3000
\
--checkpointPath
'hdfs://bj-gmei-hdfs/user/data/flink/ctr-estimate/checkpoint'
\
--parallelism
6
\
--startTime
'2020-04-0
5 23:2
0:00'
\
--startTime
'2020-04-0
7 00:0
0:00'
\
>>
/data/log/ctr-estimate/ctr-estimate.out 2>&1 &
tail
-f
/data/log/ctr-estimate/ctr-estimate.out
...
...
src/main/java/com/gmei/data/ctr/main/TestCtrEstimateMainPfr.java
View file @
597a8687
...
...
@@ -21,7 +21,7 @@ public class TestCtrEstimateMainPfr {
String
inBrokers
=
parameterTool
.
get
(
"inBrokers"
,
"test003:9092"
);
String
batchSize
=
parameterTool
.
get
(
"batchSize"
,
"1000"
);
String
maidianInTopic
=
parameterTool
.
get
(
"maidianInTopic"
,
"test11"
);
String
maidianInGroupId
=
parameterTool
.
get
(
"maidianInGroupId"
,
"
ctr-estimate-clk
"
);
String
maidianInGroupId
=
parameterTool
.
get
(
"maidianInGroupId"
,
"
test-ctr-estimate-pfr
"
);
Integer
windowSize
=
parameterTool
.
getInt
(
"windowSize"
,
60
);
Integer
slideSize
=
parameterTool
.
getInt
(
"slideSize"
,
60
);
String
outJdbcUrl
=
parameterTool
.
get
(
"outJdbcUrl"
,
...
...
src/main/java/com/gmei/data/ctr/operator/CtrEstimateClkOperator.java
View file @
597a8687
...
...
@@ -91,14 +91,17 @@ public class CtrEstimateClkOperator implements BaseOperator{
||
(
"search_result_click_infomation_item"
.
equals
(
type
)
&&
"11"
.
equals
(
paramsObject
.
getString
(
"business_type"
)))){
return
true
;
}
String
[]
types
=
{
"on_click_topic_card"
,
"staggered_topic_click"
,
"zone_detail_click_topic"
,
"zone_v3_click_diary_topic"
,
"diarybook_detail_click_diary_item"
,
"on_click_ugc_topic"
};
String
[]
types
=
{
"on_click_topic_card"
,
"staggered_topic_click"
,
"zone_detail_click_topic"
,
"zone_v3_click_diary_topic"
,
"diarybook_detail_click_diary_item"
,
"on_click_ugc_topic"
};
String
[]
cardContentTypes
=
{
"topic_detail"
,
"topic"
};
if
(
Arrays
.
asList
(
types
).
contains
(
type
)
||
(
"on_click_card"
.
equals
(
type
)
&&
Arrays
.
asList
(
cardContentTypes
).
contains
(
cardContentType
))){
return
true
;
}
}
String
referrer
=
paramsObject
.
getString
(
"referrer"
);
if
(
"page_view"
.
equals
(
type
)
&&
"answer_detail"
.
equals
(
pageName
)
&&
"home"
.
equals
(
referrer
)){
//String referrer = paramsObject.getString("referrer");
if
(
"page_view"
.
equals
(
type
)
&&
"answer_detail"
.
equals
(
pageName
)
//&& "home".equals(referrer)
){
return
true
;
}
}
...
...
@@ -133,8 +136,10 @@ public class CtrEstimateClkOperator implements BaseOperator{
return
new
CtrEstimateClkEtl
(
clId
,
"content_card"
,
1
);
}
String
pageName
=
paramsObject
.
getString
(
"page_name"
);
String
referrer
=
paramsObject
.
getString
(
"referrer"
);
if
(
"page_view"
.
equals
(
type
)
&&
"answer_detail"
.
equals
(
pageName
)
&&
"home"
.
equals
(
referrer
)){
//String referrer = paramsObject.getString("referrer");
if
(
"page_view"
.
equals
(
type
)
&&
"answer_detail"
.
equals
(
pageName
)
//&& "home".equals(referrer)
){
return
new
CtrEstimateClkEtl
(
clId
,
"answer_card"
,
1
);
}
return
new
CtrEstimateClkEtl
();
...
...
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