如何独立运行 Presto Discovery Service 使其既不是协调器也不是工作器?HTTP 端点要成为 Presto 集群的发现服务有哪些要求?
我在大卫菲利普斯写的 presto-users 邮件列表上找到了这个线程:
如果您想将发现作为独立于 Presto 的独立服务运行,这是一个选项。我们曾经发布过这样做的指令,但几年前就摆脱了它们,因为在协调器内部运行发现工作正常(即使在具有数百台机器的大型集群上)。
这还成立吗?
是的,您可以运行独立的发现服务。这种情况很少见,一般我建议只在协调器上运行它。
在您的发现节点上:
/etc在服务根目录下创建一个目录并配置node.properties和jvm.config。 http-server.http.port=8081
Run Code Online (Sandbox Code Playgroud)
discovery-server.enabled=false
discovery.uri=http://discovery.example.com:8081
Run Code Online (Sandbox Code Playgroud)
bin/launcher)curl -XGET http://discovery.example.com:8081/v1/service并且应该会看到一些包含以下内容的输出:{
"environment": "production",
"services": [
{
"id": "d2b7141e-d83f-4d23-be86-285ff2a9f53d",
"nodeId": "57ac8bd3-c55e-4170-b363-80d10023ece8",
"type": "presto",
"pool": "general",
"location": "/57ac8bd3-c55e-4170-b363-80d10023ece8",
"properties": {
"node_version": "347",
"coordinator": "true",
"http": "http://coord.example.com:8080",
"http-external": "http://coord.example.com:8080",
"connectorIds": "system"
}
},
{
"id": "f0abafae-052a-4758-95c6-d19355043bc6",
"nodeId": "57ac8bd3-c55e-4170-b363-80d10023ece8",
"type": "presto-coordinator",
"pool": "general",
"location": "/57ac8bd3-c55e-4170-b363-80d10023ece8",
"properties": {
"http": "http://coord.example.com:8080",
"http-external": "http://coord.example.com:8080"
}
},
{
"id": "1f5096de-189e-4e25-bac3-adc079981d86",
"nodeId": "8d7e820f-dd01-4227-ad6e-f74b97202647",
"type": "presto",
"pool": "general",
"location": "/8d7e820f-dd01-4227-ad6e-f74b97202647",
"properties": {
"node_version": "347",
"coordinator": "false",
"http": "http://worker1.example.com:8080",
"http-external": "http://worker1.example.com:8080",
"connectorIds": "system"
}
},
....
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
160 次 |
| 最近记录: |