我可以在 Zeppelin 中以编程方式检查段落的状态吗?
我在 Spark 集群上使用 Zeppelin 和 Hadoop.
I'm using Zeppelin with Hadoop on a Spark cluster.
我想检查一个段落的状态,看看它是SUCCESS、RUNNING、NOT RUN OR ERROR.
I'd like to check the status of a paragraph, to see whether it's SUCCESS, RUNNING, NOT RUN OR ERROR.
我知道我可以滚动到段落并阅读右上角的作品.
I know that I can scroll to the paragraph and read the work in the top right.
我可以以编程方式检查段落的状态吗?
Can I check the state of a paragraph programmatically?
是的,你可以.Zeppelin 公开了一个 REST API,您可以使用它来管理它.
Yes, you can. Zeppelin exposes a REST API that you can use to manage it.
正如文档中所说,您可以将 GET 请求发送到:
As it says in the documentation, you can send a GET request to:
http://[zeppelin-server]:[zeppelin-port]/api/notebook/job/[noteId]/[paragraphId]
如果成功将返回一个 JSON 响应:
and if successful will return a JSON response:
{
"status": "OK",
"body": {
"id":"20151121-212654_766735423",
"status":"FINISHED",
"finished":"Tue Nov 24 14:21:40 KST 2015",
"started":"Tue Nov 24 14:21:39 KST 2015"
}
}