Description
After creating Apps,containers are distributed on arbitrary hosts ,also random IPC port。how can user visit the app ? One way is to get endpoint by manual (eg:netstat -anp|grep
{pid}),the way is awful。
There is the need to expose useful endpoints of App to zk registry path。
eg: use slider to start a tomcat App,expose the ipc port:
[zk: localhost:2181(CONNECTED) 7]
get/registry/users/root/services/org-apache-slider/tomcat/components/container-1448969780678-0005-01-000002
{
"type" : "JSONServiceRecord",
"description" : "TOMCAT",
"external" : [ {
"api" : "server-xml.http.port",
"addressType" : "host/port",
"protocolType" : "tcp",
"addresses" : [ {
"port" : "39063",
"host" : "
"
} ]
} ],
"internal" : [ ],
"yarn:persistence" : "container",
"yarn:id" : "container-1448969780678-0005-01-000002"
}
User can get the host/port through zk.