Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
meta_base_code
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
黎涛
meta_base_code
Commits
d923e47a
Commit
d923e47a
authored
Sep 07, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0ad276bb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
19 deletions
+39
-19
README.md
README.md
+5
-1
task.sh
task.sh
+2
-1
search_answer_ctr.py
task/search_answer_ctr.py
+8
-4
search_diary_ctr.py
task/search_diary_ctr.py
+8
-4
search_meigou_ctr.py
task/search_meigou_ctr.py
+8
-4
search_tractate_ctr.py
task/search_tractate_ctr.py
+8
-5
No files found.
README.md
View file @
d923e47a
...
@@ -10,4 +10,8 @@ metabase 数据开发相关代码
...
@@ -10,4 +10,8 @@ metabase 数据开发相关代码
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 1g --executor-cores 1 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/recommend_strategy_d.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 1g --executor-cores 1 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/recommend_strategy_d.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 1g --executor-cores 2 --num-executors 100 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/search_strategy_d.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 1g --executor-cores 2 --num-executors 100 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/search_strategy_d.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 2g --executor-cores 4 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/core_indicators_monitoring.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 2g --executor-cores 4 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/core_indicators_monitoring.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 2g --executor-cores 4 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/advertisement_strategy_d.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 1g --executor-cores 4 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/advertisement_strategy_d.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 1g --executor-cores 1 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/search_meigou_ctr.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 1g --executor-cores 1 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/search_diary_ctr.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 1g --executor-cores 1 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/search_tractate_ctr.py
/opt/spark/bin/spark-submit --master yarn --deploy-mode client --queue root.strategy --driver-memory 16g --executor-memory 1g --executor-cores 1 --num-executors 70 --conf spark.default.parallelism=100 --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --conf spark.locality.wait=0 --jars /srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/search_answer_ctr.py
task.sh
View file @
d923e47a
...
@@ -2,5 +2,6 @@ source /srv/envs/esmm/bin/activate
...
@@ -2,5 +2,6 @@ source /srv/envs/esmm/bin/activate
/opt/spark/bin/spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
1g
--executor-cores
1
--num-executors
70
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/conent_detail_page_grayscale_ctr.py
/opt/spark/bin/spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
1g
--executor-cores
1
--num-executors
70
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/conent_detail_page_grayscale_ctr.py
/opt/spark/bin/spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
1g
--executor-cores
1
--num-executors
70
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/recommend_strategy_d.py
/opt/spark/bin/spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
1g
--executor-cores
1
--num-executors
70
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/recommend_strategy_d.py
/opt/spark/bin/spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
1g
--executor-cores
1
--num-executors
70
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/search_strategy_d.py
/opt/spark/bin/spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
1g
--executor-cores
1
--num-executors
70
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/search_strategy_d.py
/opt/spark/bin/spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
2g
--executor-cores
4
--num-executors
70
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/core_indicators_monitoring.py
/opt/spark/bin/spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
1g
--executor-cores
4
--num-executors
120
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/core_indicators_monitoring.py
/opt/spark/bin/spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
1g
--executor-cores
4
--num-executors
120
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/meta_base_code/task/search_meigou_ctr.py
task/search_answer_ctr.py
View file @
d923e47a
...
@@ -204,11 +204,15 @@ and (dev.device_id is null or dev.device_id='')
...
@@ -204,11 +204,15 @@ and (dev.device_id is null or dev.device_id='')
print
(
res
)
print
(
res
)
if
res
.
ACTIVE_TYPE
:
if
res
.
ACTIVE_TYPE
:
if
res
.
ACTIVE_TYPE
in
(
'1'
,
'2'
):
if
res
.
ACTIVE_TYPE
in
(
'1'
,
'2'
):
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
CLICK_NUM
:
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
EXPOSURE
:
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
else
:
else
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
CLICK_NUM
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
EXPOSURE
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
for
active_type
in
res_dict
:
for
active_type
in
res_dict
:
for
device_os_type
in
res_dict
[
active_type
]:
for
device_os_type
in
res_dict
[
active_type
]:
...
...
task/search_diary_ctr.py
View file @
d923e47a
...
@@ -204,11 +204,15 @@ and (dev.device_id is null or dev.device_id='')
...
@@ -204,11 +204,15 @@ and (dev.device_id is null or dev.device_id='')
print
(
res
)
print
(
res
)
if
res
.
ACTIVE_TYPE
:
if
res
.
ACTIVE_TYPE
:
if
res
.
ACTIVE_TYPE
in
(
'1'
,
'2'
):
if
res
.
ACTIVE_TYPE
in
(
'1'
,
'2'
):
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
CLICK_NUM
:
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
EXPOSURE
:
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
else
:
else
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
CLICK_NUM
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
EXPOSURE
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
for
active_type
in
res_dict
:
for
active_type
in
res_dict
:
for
device_os_type
in
res_dict
[
active_type
]:
for
device_os_type
in
res_dict
[
active_type
]:
...
...
task/search_meigou_ctr.py
View file @
d923e47a
...
@@ -205,11 +205,15 @@ and (dev.device_id is null or dev.device_id='')
...
@@ -205,11 +205,15 @@ and (dev.device_id is null or dev.device_id='')
print
(
res
)
print
(
res
)
if
res
.
ACTIVE_TYPE
:
if
res
.
ACTIVE_TYPE
:
if
res
.
ACTIVE_TYPE
in
(
'1'
,
'2'
):
if
res
.
ACTIVE_TYPE
in
(
'1'
,
'2'
):
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
CLICK_NUM
:
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
EXPOSURE
:
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
else
:
else
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
CLICK_NUM
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
EXPOSURE
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
for
active_type
in
res_dict
:
for
active_type
in
res_dict
:
for
device_os_type
in
res_dict
[
active_type
]:
for
device_os_type
in
res_dict
[
active_type
]:
...
...
task/search_tractate_ctr.py
View file @
d923e47a
...
@@ -204,12 +204,15 @@ and (dev.device_id is null or dev.device_id='')
...
@@ -204,12 +204,15 @@ and (dev.device_id is null or dev.device_id='')
print
(
res
)
print
(
res
)
if
res
.
ACTIVE_TYPE
:
if
res
.
ACTIVE_TYPE
:
if
res
.
ACTIVE_TYPE
in
(
'1'
,
'2'
):
if
res
.
ACTIVE_TYPE
in
(
'1'
,
'2'
):
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
CLICK_NUM
:
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
EXPOSURE
:
res_dict
[
"新增"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
else
:
else
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
CLICK_NUM
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"click_num"
]
+=
res
.
CLICK_NUM
if
res
.
EXPOSURE
:
res_dict
[
"老活"
][
res
.
DEVICE_OS_TYPE
][
"exposure"
]
+=
res
.
EXPOSURE
for
active_type
in
res_dict
:
for
active_type
in
res_dict
:
for
device_os_type
in
res_dict
[
active_type
]:
for
device_os_type
in
res_dict
[
active_type
]:
partition_date
=
yesterday_str
partition_date
=
yesterday_str
...
...
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