ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Mildebrandt <ch...@woodenrhino.com>
Subject What to override when extending a stack in 1.5?
Date Tue, 01 Apr 2014 19:36:36 GMT
Hello,

I'd like to know how the "extends" mechanism works. I want to extend an
existing stack to use as a base for my stack. How would the following
scenarios be accomplished:

- I'd like to extend a stack under HDP, but from a directory outside of HDP
(e.g. stacks/COMPANY/2.2/). Is that possible, is that recommended, and how
does one do that? I understand I'd have to re-test when updates are made to
the base stack and any other underneath it.
- When I extend a stack, how do the python modules get loaded? Let's take
Ganglia as an example. There's a ganglia.py and ganglia_monitor.py (which
imports ganglia.py) in the package/scripts directory. If I'd like to change
the functionality of a method in ganglia.py, how is that done? Do I:
  - create a ganglia.py in my stack with only that method implemented, and
import the rest from the base?
  - have my own copy of the full ganglia.py?
    - If yes to either of the above, do I need to have my own copy of
ganglia_monitor.py so that it imports the ganglia.py from my stack instead
of the base?
  - have my own copy of the whole package/scripts directory?
  - have my own copy of the whole services/GANGLIA directory?
  - something else entirely?

Thanks for any answers/pointers,
-Chris

Mime
View raw message