Introduction
Introduced in Ambari-2.1.0, the Enhanced Configs feature makes it possible for service providers to customize their service's configs to a great deal and determine which configs are prominently shown to user without making any UI code changes. Customization includes providing a service friendly layout, better controls (sliders, combos, lists, toggles, spinners, etc.), better validation (minimum, maximum, enums), automatic unit conversion (MB, GB, seconds, milliseconds, etc.), configuration dependencies and improved dynamic recommendations of default values.
A service provider can accomplish all the above just by changing their service definition in the stacks/ folder.
Example: Hive Enhanced Configs
Features
Define theme with custom layout of configs
Tabs
Sections
Sub-sections
Place selected configs in the layout defined above
Associate UI widget to use for a config
Radio Buttons
Slider
Combo
Time Interval Spinner
Toggle
Directory
Directories
List
Password
Text Field
Checkbox
Text Area
Automatic unit conversion for configs which have to be shown in units different from the units being saved as.
Memory - B, KB, MB, GB, TB, PB
Time - milliseconds, seconds, minutes, hours, days, months, years
Percentage - float, percentage
Ability to define dependencies between configurations across services (depends-on, depended-by).
- Ability to dynamically update values of other depended-by configs when a config is changed.
Enable Enhanced Configs - Steps
Step 1 - Create Theme (UI Metadata)
The first step is to create a theme for your service in the stack definition folder. A theme provides necessary information of the UI to construct the enhanced configs. UI information like layout (tabs, sections, sub-sections), placement of configs in the sub-sections, and which widgets and units to use for each config