Commit 597a8687 authored by 赵建伟's avatar 赵建伟

update codes

parent c211e323
...@@ -27,7 +27,7 @@ $JAR_DIR/ctr-estimate-1.0-SNAPSHOT.jar \ ...@@ -27,7 +27,7 @@ $JAR_DIR/ctr-estimate-1.0-SNAPSHOT.jar \
--retryInteral 3000 \ --retryInteral 3000 \
--checkpointPath 'hdfs://bj-gmei-hdfs/user/data/flink/ctr-estimate/checkpoint' \ --checkpointPath 'hdfs://bj-gmei-hdfs/user/data/flink/ctr-estimate/checkpoint' \
--parallelism 6 \ --parallelism 6 \
--startTime '2020-04-05 23:20:00' \ --startTime '2020-04-07 00:00:00' \
>> /data/log/ctr-estimate/ctr-estimate.out 2>&1 & >> /data/log/ctr-estimate/ctr-estimate.out 2>&1 &
tail -f /data/log/ctr-estimate/ctr-estimate.out tail -f /data/log/ctr-estimate/ctr-estimate.out
......
...@@ -21,7 +21,7 @@ public class TestCtrEstimateMainPfr { ...@@ -21,7 +21,7 @@ public class TestCtrEstimateMainPfr {
String inBrokers = parameterTool.get("inBrokers","test003:9092"); String inBrokers = parameterTool.get("inBrokers","test003:9092");
String batchSize = parameterTool.get("batchSize","1000"); String batchSize = parameterTool.get("batchSize","1000");
String maidianInTopic = parameterTool.get("maidianInTopic", "test11"); 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 windowSize = parameterTool.getInt("windowSize",60);
Integer slideSize = parameterTool.getInt("slideSize",60); Integer slideSize = parameterTool.getInt("slideSize",60);
String outJdbcUrl = parameterTool.get("outJdbcUrl", String outJdbcUrl = parameterTool.get("outJdbcUrl",
......
...@@ -91,14 +91,17 @@ public class CtrEstimateClkOperator implements BaseOperator{ ...@@ -91,14 +91,17 @@ public class CtrEstimateClkOperator implements BaseOperator{
|| ("search_result_click_infomation_item".equals(type) && "11".equals(paramsObject.getString("business_type")))){ || ("search_result_click_infomation_item".equals(type) && "11".equals(paramsObject.getString("business_type")))){
return true; 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"}; String[] cardContentTypes = {"topic_detail","topic"};
if(Arrays.asList(types).contains(type) || ("on_click_card".equals(type) && Arrays.asList(cardContentTypes).contains(cardContentType))){ if(Arrays.asList(types).contains(type) || ("on_click_card".equals(type) && Arrays.asList(cardContentTypes).contains(cardContentType))){
return true; return true;
} }
} }
String referrer = paramsObject.getString("referrer"); //String referrer = paramsObject.getString("referrer");
if("page_view".equals(type) && "answer_detail".equals(pageName) && "home".equals(referrer)){ if("page_view".equals(type) && "answer_detail".equals(pageName)
//&& "home".equals(referrer)
){
return true; return true;
} }
} }
...@@ -133,8 +136,10 @@ public class CtrEstimateClkOperator implements BaseOperator{ ...@@ -133,8 +136,10 @@ public class CtrEstimateClkOperator implements BaseOperator{
return new CtrEstimateClkEtl(clId,"content_card",1); return new CtrEstimateClkEtl(clId,"content_card",1);
} }
String pageName = paramsObject.getString("page_name"); String pageName = paramsObject.getString("page_name");
String referrer = paramsObject.getString("referrer"); //String referrer = paramsObject.getString("referrer");
if("page_view".equals(type) && "answer_detail".equals(pageName) && "home".equals(referrer)){ if("page_view".equals(type) && "answer_detail".equals(pageName)
//&& "home".equals(referrer)
){
return new CtrEstimateClkEtl(clId,"answer_card",1); return new CtrEstimateClkEtl(clId,"answer_card",1);
} }
return new CtrEstimateClkEtl(); return new CtrEstimateClkEtl();
......
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