Hi All,
I’ve been in the process of creating a custom Ambari service over the past week
and have quite a few general questions in which I haven’t found answers for in
documentation or on the wiki. I was hoping some of you could help answer any of
the following questions. Thanks in advance.
1) I’ve noticed that when restarting a services component that is of type
‘CLIENT’ that its install and configure method are invoked. I’m wondering if
it’s in intended and if so why? For components of type ‘MASTER’ a restart
doesn’t seem to invoke install and configure again, it just invokes stop then
start. I ask about this because in my custom service I have a CLIENT component
in which there are some steps I do in the install stage that I don’t want
repeated every time its restarted.
2) Can someone explain the implication of the auto-deploy and its child
elements in the context where the following snippet would be placed in the
metainfo.xml file of a custom service component
(MY_SERVICE/MY_COMPONENT_MASTER)?
<dependency>
<name>HBASE/HBASE_CLIENT</name>
<scope>host</scope>
<auto-deploy>
<enabled>true</enabled>
<co-locate>MY_SERVICE/MY_COMPONENT_CLIENT</co-locate>
</auto-deploy>
</dependency>
3) When creating a configuration file for a custom service what are the valid
entries for a <property-type> tag? PASSWORD, and what else? Is there any other
child elements of ‘property’ that are useful? Perhaps anything that allows you
to provide a regular expression for validation?
4) Is there some function to restart a service in resource_management or other
ambari python library? Or should I just be restarting services using the
command line tools and ensuring to update the appropriate pid files? I ask this
question because I’ve noticed I cannot restart a service using the Ambari API
as part of the installation/configuration steps of my custom service, as the
restart commands are queued while the custom service installation/configuration
is running, and will cause a timeout. I’m looking for a solution to this
problem, what’s recommended if not one of the approaches I’ve asked about above?
5) How can I allow for the removal of a custom service from the ambari console?
I know there is a sequence of Ambari API commands I can run to: stop the
service, stop each of its components, and then finally delete the service but
is there any way to incorporate that into the Ambari UI instead of having a
script on the filesystem that invokes those calls?
Thanks so much,
Christopher Jackson