ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juanjo Marron <>
Subject Re: Redefine Themes and Themes inheritance
Date Wed, 10 Feb 2016 01:57:18 GMT
Missing the json files in previous email. Sorry for that.

Once again thank for your time and I really appreciate your help Srimanth

Best regards

    On Tuesday, February 9, 2016 5:54 PM, Juanjo Marron <> wrote:

 Hi Srimanth,

Sure it helps. Thanks for your prompt reply and the details provided.

My goal might sound familiar, Im just trying to add PHOENIX support for HBASE in a new stack
definition since I was not present in my previous one. 
So I need to add on themes a couple of Phoenix widgets, their placements, one new Phoenix
SQL section and its subsection.

Based on your answer, and after several tries I made some progress and now I'm able to merge
both theme.json files and add the new widgets and its placement on the child theme (I can
see them when querying the restAPI for my new version of themes), but the new widgets  never
get displayed on the UI.
I'm still having issues to merge the new section for the configuration:layout property and
it never makes it to the restAPI call.

The original themes is attached with name original_theme.jsonThe new themes is attached with
name V1_new_theme.json. It is mainly:

  "configuration" : {
    "layouts": [
        "name": "default",
        "tabs": [
            "name": "settings",
              "sections": [
                  "name": "section-hbase-phoenix",
                  "display-name": "Phoenix SQL",

With this V1_new_theme.json, tabs return empty on the rest call

         "layouts" : [
              "name" : "default",
              "tabs" : [ ]

Do I need to maintaing tabs:[], sections: [], layout: [] design or just declaring the name?

If I try to just declare the names as shown in attached V2_new_theme.json:

  "configuration" : {
    "layouts": [
        "name": "default",
            "name": "settings",
                  "name": "section-hbase-phoenix",
                  "display-name": "Phoenix SQL",
                  "row-index": "2",
                  "column-index": "2",

The layout is similar to the parent but it is missing the new section           

Addtionally if I try to overwrite the whole layouts property instead (complete_layout_theme.json)
, ambari-server is not able to start showing  NPE. The issue is merging section inside layouts

1 error
        at org.apache.ambari.server.controller.AmbariServer.main(
Caused by: java.lang.NullPointerException
        at org.apache.ambari.server.state.theme.Section.mergeWithParent(
        at org.apache.ambari.server.state.theme.TabLayout.mergedSections(
        at org.apache.ambari.server.state.theme.TabLayout.mergeWithParent(
        at org.apache.ambari.server.state.theme.Tab.mergeWithParent(
        at org.apache.ambari.server.state.theme.Layout.mergeTabs(
        at org.apache.ambari.server.state.theme.Layout.mergeWithParent(
        at org.apache.ambari.server.state.theme.ThemeConfiguration.mergeLayouts(

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message