There is a combination of ZK and REST way to find the info you are looking for.

Use a zk client and do this -

get /registry/users/<user_id>/services/org-apache-slider/<app_id>

(with appropriate <user_id> and <app_id> of the koya cluster)

>From the json dump look for element with api = "class 
>path:org.apache.slider.publisher.exports" under "external" element. Get the 
>value of "addresses"->"uri" e.g.: 
>http://c6401.ambari.apache.org:1025/ws/v1/slider/publisher/exports

Then you can do -
curl 
"http://c6401.ambari.apache.org:1025/ws/v1/slider/publisher/exports/<export_group_name>"

e.g.
curl 
"http://c6401.ambari.apache.org:1025/ws/v1/slider/publisher/exports/servers";

Does this help?

Check https://issues.apache.org/jira/browse/SLIDER-151 and 
https://issues.apache.org/jira/browse/YARN-913 for few things to look out for, 
in the future.

-Gour

On 6/1/15, 5:47 AM, "Jean-Baptiste Note" 
<jbn...@gmail.com<mailto:jbn...@gmail.com>> wrote:

Hi there,

I've successfully exported some host/port dynamic combination in slider for
Kafka on Yarn; they are made available under
publisher/exports/servers on the appmaster (see
https://github.com/jbnote/koya/).

I'm now trying to access this information (really, service location) in two
different ways:

* From within slider. Is there a public API that I could use directly in
python from other slider instances to get to this information ? -- this is
necessary for spawning Kafka mirroring from slider, for instance. From what
I can see in storm-slider, the slider binary is directly invoked.

* From the rest of the world. I was thinking of exporting the data to DNS,
and hoped to do this with a zookeeper-monitoring daemon, which is already
partially implemented. However, none of my exported data seems to be
present in ZK, which I was naively hoping for. Is there something i'm
missing ? I find the ZK way perfect, rather than the REST API which as far
as I can see will require polling. In python monitoring ZK is a breeze.

Can someone familiar with the design intent shed some light on how I should
carryout this ?

Kind regards,
JB

Reply via email to