Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 05-08-2017 04:51 PM
I'm creating a CSD for a custom service with multiple roles. Some of the roles need to have knowledge of which host(s) other roles are running on, similar to how a NameNode needs to know which hosts have DataNodes.
I think this information should be accessible somehow after a user has chosen the role hosts in the CM UI, but I can't figure out how.
So, how can I access a role's hostname from the service.sdl or control.sh files?
Created 05-11-2017 05:13 PM
I've figured out a way to do this. I used peerConfigGenerators in the SDL file. Peer configs create a properties file with key/value pairs--the key/value pairs themselves weren't useful to me, but each line of the file is prepended by hostname that the chose role is running on. I then parsed that file for the hostname in the control script.
Created 05-08-2017 05:49 PM
Dont mistake me I am not savy when it comes to CSD . I have few links in my desktop sleeping.
I believe it might come handy for you. if I understand correctly these links should gear you up.
https://github.com/cloudera/cm_ext/wiki
https://github.com/cloudera/cm_csds
Created 05-09-2017 01:47 PM
Thanks for the reply @csguna. I have seen those links before, and haven't found the answer I'm looking for yet.
Created 05-10-2017 04:06 AM
@benbluetalonMy bad mate.
Created 05-11-2017 05:13 PM
I've figured out a way to do this. I used peerConfigGenerators in the SDL file. Peer configs create a properties file with key/value pairs--the key/value pairs themselves weren't useful to me, but each line of the file is prepended by hostname that the chose role is running on. I then parsed that file for the hostname in the control script.
Created 05-11-2017 06:24 PM
Sounds good .