Skip to content
This repository was archived by the owner on May 30, 2022. It is now read-only.
This repository was archived by the owner on May 30, 2022. It is now read-only.

How do I use krbcontext to call the api of the spark task and get the execution time of the task? #46

Description

@chinarenkai

when I use kerberos,these code need adjust,pls how to do it,Thanks guys。

请求url获取相应的json

async def get_json_from_url(url):
async with aiohttp.ClientSession() as session:
try:
async with session.get(url, timeout=10) as resp:
result = await resp.json()
return result
except Exception as e:
print(f"连接报错:{e}")
return

start = de_format_gmt_date(start_time)
end = de_format_gmt_date(end_time)
url = f"http://XXXX:18088/api/v1/applications?minDate={start}&maxDate={end}"
resource_list = await get_json_from_url(url)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions