Commit 94cfb9ad authored by 郭羽's avatar 郭羽

美购精排模型

parent bb060dc7
path=/srv/apps/serviceRec
day_count=$1
content_type="service"
source /srv/envs/serviceRec/bin/activate
pythonFile=${path}/spark/featureEng.py
#log_file=~/${content_type}_feature_csv_export.log
/opt/hadoop/bin/hdfs dfs -rmr /${content_type}_feature_train
......
......@@ -270,15 +270,11 @@ def featureColumnsToRedis(columns):
def featureToRedis(key,datas):
conn = connUtils.getRedisConn()
pipeline = conn.pipeline()
for k,v in datas.items():
newKey = key+k
pipeline.set(newKey,v)
pipeline.expire(newKey, 60 * 60 * 24 * 7)
conn.set(newKey,v)
conn.expire(newKey, 60 * 60 * 24 * 7)
pipeline.execute()
pipeline.close()
conn.close()
def collectFeaturesToDict(samples,columns,prefix):
idCol = prefix+"id"
......
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