Apache Zeppelin Notebook REST API

注册的 interpreters列表

DescriptionThis GET method returns all the registered interpreters available on the server.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter
Success code200
Fail code500
Sample JSON response
{
  "status": "OK",
  "message": "",
  "body": {
    "md.md": {
      "name": "md",
      "group": "md",
      "className": "org.apache.zeppelin.markdown.Markdown",
      "properties": {},
      "path": "/zeppelin/interpreter/md"
    },
    "spark.spark": {
      "name": "spark",
      "group": "spark",
      "className": "org.apache.zeppelin.spark.SparkInterpreter",
      "properties": {
        "spark.executor.memory": {
          "defaultValue": "1g",
          "description": "Executor memory per worker instance. ex) 512m, 32g"
        },
        "spark.cores.max": {
          "defaultValue": "",
          "description": "Total number of cores to use. Empty value uses all available core."
        },
      },
      "path": "/zeppelin/interpreter/spark"
    },
    "spark.sql": {
      "name": "sql",
      "group": "spark",
      "className": "org.apache.zeppelin.spark.SparkSqlInterpreter",
      "properties": {
        "zeppelin.spark.maxResult": {
          "defaultValue": "1000",
          "description": "Max number of Spark SQL result to display."
        }
      },
      "path": "/zeppelin/interpreter/spark"
    }
  }
}

注册的 interpreter 设置列表

DescriptionThis GET method returns all the interpreters settings registered on the server.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting
Success code200
Fail code500
Sample JSON response
{
  "status": "OK",
  "message": "",
  "body": [
    {
      "id": "2AYUGP2D5",
      "name": "md",
      "group": "md",
      "properties": {
        "empty": ""
      },
      "interpreterGroup": [
        {
          "class": "org.apache.zeppelin.markdown.Markdown",
          "name": "md"
        }
      ],
      "dependencies": []
    },

    {
      "id": "2AY6GV7Q3",
      "name": "spark",
      "group": "spark",
      "properties": {
        "spark.cores.max": "",
        "spark.executor.memory": "1g",
      },
      "interpreterGroup": [
        {
          "class": "org.apache.zeppelin.spark.SparkInterpreter",
          "name": "spark"
        },
        {
          "class": "org.apache.zeppelin.spark.SparkSqlInterpreter",
          "name": "sql"
        }
      ],
      "dependencies": [
        {
          "groupArtifactVersion": "com.databricks:spark-csv_2.10:1.3.0"
        }
      ]
    }
  ]
}

通过设置ID得到注册 interpreter 设置

DescriptionThis GET method returns a registered interpreter setting on the server.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/[setting ID]
Success code200
Fail code400 if such interpreter setting id does not exist
500 for any other errors
Sample JSON response
{
  "status": "OK",
  "message": "",
  "body": {
    "id": "2AYW25ANY",
    "name": "Markdown setting name",
    "group": "md",
    "properties": {
      "propname": "propvalue"
    },
    "interpreterGroup": [
      {
        "class": "org.apache.zeppelin.markdown.Markdown",
        "name": "md"
      }
    ],
    "dependencies": [
      {
        "groupArtifactVersion": "groupId:artifactId:version",
        "exclusions": [
          "groupId:artifactId"
        ]
      }
    ]
  }
}

创建新的 interpreter 设置

DescriptionThis POST method adds a new interpreter setting using a registered interpreter to the server.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting
Success code200
Fail code400 if the input json is empty
500 for any other errors
Sample JSON input
{
  "name": "Markdown setting name",
  "group": "md",
  "properties": {
    "propname": "propvalue"
  },
  "interpreterGroup": [
    {
      "class": "org.apache.zeppelin.markdown.Markdown",
      "name": "md"
    }
  ],
  "dependencies": [
    {
      "groupArtifactVersion": "groupId:artifactId:version",
      "exclusions": [
        "groupId:artifactId"
      ]
    }
  ]
}
Sample JSON response
{
  "status": "CREATED",
  "message": "",
  "body": {
    "id": "2AYW25ANY",
    "name": "Markdown setting name",
    "group": "md",
    "properties": {
      "propname": "propvalue"
    },
    "interpreterGroup": [
      {
        "class": "org.apache.zeppelin.markdown.Markdown",
        "name": "md"
      }
    ],
    "dependencies": [
      {
        "groupArtifactVersion": "groupId:artifactId:version",
        "exclusions": [
          "groupId:artifactId"
        ]
      }
    ]
  }
}

更新 interpreter 设置

DescriptionThis PUT method updates an interpreter setting with new properties.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/[interpreter ID]
Success code200
Fail code500
Sample JSON input
{
  "name": "Markdown setting name",
  "group": "md",
  "properties": {
    "propname": "Otherpropvalue"
  },
  "interpreterGroup": [
    {
      "class": "org.apache.zeppelin.markdown.Markdown",
      "name": "md"
    }
  ],
  "dependencies": [
    {
      "groupArtifactVersion": "groupId:artifactId:version",
      "exclusions": [
        "groupId:artifactId"
      ]
    }
  ]
}
Sample JSON response
{
  "status": "OK",
  "message": "",
  "body": {
    "id": "2AYW25ANY",
    "name": "Markdown setting name",
    "group": "md",
    "properties": {
      "propname": "Otherpropvalue"
    },
    "interpreterGroup": [
      {
        "class": "org.apache.zeppelin.markdown.Markdown",
        "name": "md"
      }
    ],
    "dependencies": [
      {
        "groupArtifactVersion": "groupId:artifactId:version",
        "exclusions": [
          "groupId:artifactId"
        ]
      }
    ]
  }
}

删除 interpreter 设置

DescriptionThis DELETE method deletes an given interpreter setting.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/[interpreter ID]
Success code200
Fail code500
Sample JSON response{"status":"OK"}

重新启动 interpreter

DescriptionThis PUT method restarts the given interpreter id.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/setting/restart/[interpreter ID]
Success code200
Fail code500
Sample JSON input (Optional)
{
  "noteId": "2AVQJVC8N"
}
Sample JSON response{"status":"OK"}

添加新的 repository到依赖性引用

DescriptionThis POST method adds new repository.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/repository
Success code200
Fail code500
Sample JSON input
{
  "id": "securecentral",
  "url": "https://repo1.maven.org/maven2",
  "snapshot": false
}
Sample JSON response{"status":"OK"}

删除依赖性引用的 repository

DescriptionThis DELETE method delete repository with given id.
URLhttp://[zeppelin-server]:[zeppelin-port]/api/interpreter/repository/[repository ID]
Success code200
Fail code

500

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值