Commit c00f3e16 authored by 高雅喆's avatar 高雅喆

监控

parent f8ce940e
import requests
from datetime import datetime
from datetime import date
result = requests.get('http://192.144.193.19:4042/api/v1/applications/app-20191112140630-0664/streaming/batches')
......@@ -7,8 +7,9 @@ batchs_info = result.json()
# batchTime = '2019-11-12T07:53:44.000GMT'
log_path = "/Users/apple/Desktop/"
log_path = "/Users/apple/Desktop/spark_streaming_log/"
with open(log_path+"user_portrait_tag_name_increment_update.log", "a") as f:
today = date.today().strftime('%Y%m%d')
with open(log_path+"user_portrait_tag_name_increment_update_" + today + ".log", "a") as f:
for batch in batchs_info:
f.write('%s\n' % batch)
\ 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