瀏覽代碼

feat:添加特征Spark任务告警

zhaohaipeng 11 月之前
父節點
當前提交
032a3f59ab
共有 2 個文件被更改,包括 1 次插入1 次删除
  1. 1 0
      client/YarnClient.py
  2. 0 1
      feature_spark_monitor.py

+ 1 - 0
client/YarnClient.py

@@ -29,6 +29,7 @@ class YarnClient(object):
             query_str = f"{query_str}&startedTimeEnd={started_time_end}"
 
         url = f"http://{self.cluster_ip}:8088/ws/v1/cluster/apps?{query_str}"
+        print(f"请求的Yarn Restful API为: {url}")
         response = requests.get(url)
         res = json.loads(response.text)
         result = []

+ 0 - 1
feature_spark_monitor.py

@@ -149,7 +149,6 @@ def _main():
     # 读取配置文件
     config = configparser.ConfigParser()
     config.read("config/config.ini")
-    print(config.get("feishu", 'model.webhook'))
 
     # 获取最近七小时的Spark任务
     hours_7_early = int((datetime.now() - timedelta(hours=7)).timestamp()) * 1000