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
7f85e762
Commit
7f85e762
authored
Nov 14, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
词映射标签过程中增加5级标签
parent
5f1896e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
dist_update_user_portrait_service.py
eda/smart_rank/dist_update_user_portrait_service.py
+4
-0
tool.py
eda/smart_rank/tool.py
+1
-1
No files found.
eda/smart_rank/dist_update_user_portrait_service.py
View file @
7f85e762
...
@@ -174,6 +174,10 @@ if __name__ == '__main__':
...
@@ -174,6 +174,10 @@ if __name__ == '__main__':
# gm_kv_cli.set(search_words_synonym_tags_key, search_words_synonym_tags_json)
# gm_kv_cli.set(search_words_synonym_tags_key, search_words_synonym_tags_json)
redis_client
.
set
(
search_words_synonym_tags_key
,
search_words_synonym_tags_json
)
redis_client
.
set
(
search_words_synonym_tags_key
,
search_words_synonym_tags_json
)
# 词的tag缓存hash
search_words_synonym_tags_hash_key
=
"gm:home:feed:words:tag"
redis_client
.
hmset
(
search_words_synonym_tags_hash_key
,
all_word_tags
)
# rdd
# rdd
sparkConf
=
SparkConf
()
.
set
(
"spark.hive.mapred.supports.subdirectories"
,
"true"
)
\
sparkConf
=
SparkConf
()
.
set
(
"spark.hive.mapred.supports.subdirectories"
,
"true"
)
\
.
set
(
"spark.hadoop.mapreduce.input.fileinputformat.input.dir.recursive"
,
"true"
)
\
.
set
(
"spark.hadoop.mapreduce.input.fileinputformat.input.dir.recursive"
,
"true"
)
\
...
...
eda/smart_rank/tool.py
View file @
7f85e762
...
@@ -136,7 +136,7 @@ def get_all_api_tags():
...
@@ -136,7 +136,7 @@ def get_all_api_tags():
:return:dict {"search_word1":[tag_list1],"search_word2":[tag_list2]...}
:return:dict {"search_word1":[tag_list1],"search_word2":[tag_list2]...}
"""
"""
try
:
try
:
sql
=
"select name, id from api_tag where tag_type
+0<'4'+0
and is_online=1"
sql
=
"select name, id from api_tag where tag_type
in ('1', '2', '3', '5')
and is_online=1"
mysql_results
=
get_data_by_mysql
(
'172.16.30.141'
,
3306
,
'work'
,
'BJQaT9VzDcuPBqkd'
,
'zhengxing'
,
sql
)
mysql_results
=
get_data_by_mysql
(
'172.16.30.141'
,
3306
,
'work'
,
'BJQaT9VzDcuPBqkd'
,
'zhengxing'
,
sql
)
result_dict
=
dict
()
result_dict
=
dict
()
for
data
in
mysql_results
:
for
data
in
mysql_results
:
...
...
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