Commit 051f80b6 authored by 郭羽's avatar 郭羽

美购精排模型

parent b3d1aaaa
...@@ -679,7 +679,7 @@ if __name__ == '__main__': ...@@ -679,7 +679,7 @@ if __name__ == '__main__':
splitAndSaveTrainingTestSamplesByTimeStamp(samplesWithUserFeatures, splitTimestamp, TRAIN_FILE_PATH) splitAndSaveTrainingTestSamplesByTimeStamp(samplesWithUserFeatures, splitTimestamp, TRAIN_FILE_PATH)
print("write to hdfs success...") print("write to hdfs success...")
timestmp7 = int(round(time.time())) timestmp7 = int(round(time.time()))
print("耗时s:{}".format(timestmp7 - timestmp6)) print("数据写入hdfs 耗时s:{}".format(timestmp7 - timestmp6))
# 离散数据字典生成 # 离散数据字典生成
print("数据字典生成...") print("数据字典生成...")
...@@ -690,5 +690,7 @@ if __name__ == '__main__': ...@@ -690,5 +690,7 @@ if __name__ == '__main__':
print("数据字典存入redis...") print("数据字典存入redis...")
dataVocabStr = json.dumps(dataVocab, ensure_ascii=False) dataVocabStr = json.dumps(dataVocab, ensure_ascii=False)
dataVocabToRedis(dataVocabStr) dataVocabToRedis(dataVocabStr)
timestmp9 = int(round(time.time()))
print("总耗时s:{}".format(timestmp9 - timestmp8))
spark.stop() spark.stop()
\ No newline at end of file
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