我正在尝试使用 cm_api/get_yarn_applications 获取正在运行的 YARN 应用程序列表。我在 cm-api (9.0.0) & CM 5.3.2
我正在关注这个https://github.com/cloudera/cm_api/blob/master/python/src/cm_api/endpoints/services.py
lastHourDateTime = datetime.datetime.now() - datetime.timedelta(hours = 1)
nowDateTime = datetime.datetime.now()
yarn_applications = cm.get_service().get_yarn_applications(lastHourDateTime, nowDateTime)
但我得到以下异常
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/services.py", line 418, in get_yarn_applications
params=params, api_version=6)
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/types.py", line 357, in _get
api_version)
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/types.py", line 380, in _call
api_version)
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/types.py", line 139, in call
ret = method(path, params=params)
File "/usr/lib/python2.6/site-packages/cm_api/resource.py", line 100, in get
return self.invoke("GET", relpath, params)
File "/usr/lib/python2.6/site-packages/cm_api/resource.py", line 63, in invoke
headers=headers)
File "/usr/lib/python2.6/site-packages/cm_api/http_client.py", line 161, in execute
raise self._exc_class(ex)
cm_api.api_client.ApiException: (error 404)
如何使用filter_str获取正在运行的纱线应用程序列表