如何查询Azure HDInsight Hadoop集群中的时间轴服务器以获取作业指标?
连接到azure集群:
curl -u admin -sS -G "https://$CLUSTERNAME.azurehdinsight.net/api/v1/clusters/$CLUSTERNAME"
连接到时间轴服务器:GET /ws/v1/timeline/
我需要一个连接这两个的查询来获得Azure HDInsight Hadoop集群的作业指标。提前谢谢。
-
查询Yarn时间轴服务器:sshuser@clustername:~$curl-u管理员-Ghttps://clustername.azurehdinsight.net/ws/v1/timeline/
-
对于所有正在运行的作业:sshuser@clustername:~$纱线应用程序-列出
-
对于所有作业状态:sshuser@clustername:~$yarn应用程序-列表-appStates ALL
-
对于所有已完成的作业:sshuser@clustername:~$yarn应用程序-列表-appStates FINISHED
-
从以上结果中获取应用程序Id:sshuser@clustername:~$curl-u管理员-Ghttps://clustername.azurehdinsight.net/ws/v1/applicationhistory/apps/appID