|
@@ -1,4 +1,5 @@
|
|
|
import json
|
|
|
+from typing import List, Dict
|
|
|
|
|
|
import requests
|
|
|
|
|
@@ -9,8 +10,12 @@ class YarnClient(object):
|
|
|
def __init__(self, cluster_ip: str):
|
|
|
self.cluster_ip = cluster_ip
|
|
|
|
|
|
- def get_apps(self, queue="", finished_time_begin=0, finished_time_end=0, started_time_begin=0, started_time_end=0,
|
|
|
- limit=10) -> list[dict]:
|
|
|
+ def get_apps(self, queue="",
|
|
|
+ finished_time_begin=0,
|
|
|
+ finished_time_end=0,
|
|
|
+ started_time_begin=0,
|
|
|
+ started_time_end=0,
|
|
|
+ limit=10) -> List[Dict]:
|
|
|
query_str = f"limit=&{limit}"
|
|
|
if queue != "":
|
|
|
query_str = f"{query_str}&queue={queue}"
|