AMBARI-18998. Create smart config tab for Hive and Oozie Database settings (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cf82cf24 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cf82cf24 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cf82cf24 Branch: refs/heads/branch-feature-AMBARI-18456 Commit: cf82cf248a2e5178ea3fa35a76df338e7d258eb9 Parents: cad0130 Author: Alex Antonenko <hiv...@gmail.com> Authored: Mon Nov 28 19:48:47 2016 +0200 Committer: Alex Antonenko <hiv...@gmail.com> Committed: Mon Nov 28 19:48:58 2016 +0200 ---------------------------------------------------------------------- .../HIVE/0.12.0.2.0/configuration/hive-env.xml | 19 +++ .../OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 19 +++ .../HDP/2.2/services/HIVE/themes/theme.json | 107 ++++++++++++++++- .../services/HIVE/configuration/hive-env.xml | 35 ++++++ .../services/OOZIE/configuration/oozie-env.xml | 33 ++++++ .../stacks/HDP/2.3/services/OOZIE/metainfo.xml | 6 + .../HDP/2.3/services/OOZIE/themes/theme.json | 116 +++++++++++++++++++ .../stacks/HDP/2.5/services/OOZIE/metainfo.xml | 6 + .../HDP/2.5/services/OOZIE/themes/theme.json | 116 +++++++++++++++++++ ambari-web/app/app.js | 4 - .../data/configs/services/hive_properties.js | 4 - .../data/configs/services/oozie_properties.js | 4 - 12 files changed, 456 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml index de088dc..a3ad66a 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml @@ -74,6 +74,25 @@ </description> <value-attributes> <overridable>false</overridable> + <type>value-list</type> + <entries> + <entry> + <value>New MySQL Database</value> + <label>New MySQL</label> + </entry> + <entry> + <value>Existing MySQL / MariaDB Database</value> + <label>Existing MySQL / MariaDB</label> + </entry> + <entry> + <value>Existing PostgreSQL Database</value> + <label>Existing PostgreSQL</label> + </entry> + <entry> + <value>Existing Oracle Database</value> + <label>Existing Oracle</label> + </entry> + </entries> </value-attributes> <on-ambari-upgrade add="true"/> </property> http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml index 804c662..c966fb7 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml @@ -45,6 +45,25 @@ <description>Oozie Server Database.</description> <value-attributes> <overridable>false</overridable> + <type>value-list</type> + <entries> + <entry> + <value>New Derby Database</value> + <label>New Derby</label> + </entry> + <entry> + <value>Existing MySQL / MariaDB Database</value> + <label>Existing MySQL / MariaDB</label> + </entry> + <entry> + <value>Existing PostgreSQL Database</value> + <label>Existing PostgreSQL</label> + </entry> + <entry> + <value>Existing Oracle Database</value> + <label>Existing Oracle</label> + </entry> + </entries> </value-attributes> <on-ambari-upgrade add="true"/> </property> http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/themes/theme.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/themes/theme.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/themes/theme.json index 42bc889..f496826 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/themes/theme.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/themes/theme.json @@ -132,6 +132,42 @@ } ] } + }, + { + "name": "hive-database", + "display-name": "Database", + "layout": { + "tab-rows": 1, + "tab-columns": 1, + "sections": [ + { + "name": "hive-database-configurations", + "display-name": "Database Configurations", + "row-index": "0", + "column-index": "0", + "row-span": "0", + "column-span": "0", + "section-columns": "2", + "section-rows": "1", + "subsections": [ + { + "name": "hive-database-configurations-col-1", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "1" + }, + { + "name": "hive-database-configurations-col-2", + "row-index": "0", + "column-index": "1", + "row-span": "1", + "column-span": "1" + } + ] + } + ] + } } ] } @@ -234,6 +270,34 @@ { "config": "hive-site/hive.server2.use.SSL", "subsection-name": "security-row1-col1" + }, + { + "config": "hive-env/hive_database", + "subsection-name": "hive-database-configurations-col-1" + }, + { + "config": "hive-site/ambari.hive.db.schema.name", + "subsection-name": "hive-database-configurations-col-1" + }, + { + "config": "hive-site/javax.jdo.option.ConnectionUserName", + "subsection-name": "hive-database-configurations-col-1" + }, + { + "config": "hive-site/javax.jdo.option.ConnectionURL", + "subsection-name": "hive-database-configurations-col-1" + }, + { + "config": "hive-env/hive_database_type", + "subsection-name": "hive-database-configurations-col-2" + }, + { + "config": "hive-site/javax.jdo.option.ConnectionDriverName", + "subsection-name": "hive-database-configurations-col-2" + }, + { + "config": "hive-site/javax.jdo.option.ConnectionPassword", + "subsection-name": "hive-database-configurations-col-2" } ] }, @@ -431,8 +495,49 @@ "widget": { "type": "list" } + }, + { + "config": "hive-env/hive_database", + "widget": { + "type": "combo" + } + }, + { + "config": "hive-site/javax.jdo.option.ConnectionUserName", + "widget": { + "type": "text-field" + } + }, + { + "config": "hive-site/javax.jdo.option.ConnectionPassword", + "widget": { + "type": "password" + } + }, + { + "config": "hive-site/javax.jdo.option.ConnectionDriverName", + "widget": { + "type": "text-field" + } + }, + { + "config": "hive-site/javax.jdo.option.ConnectionURL", + "widget": { + "type": "text-field" + } + }, + { + "config": "hive-site/ambari.hive.db.schema.name", + "widget": { + "type": "text-field" + } + }, + { + "config": "hive-env/hive_database_type", + "widget": { + "type": "text-field" + } } ] } } - http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/configuration/hive-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/configuration/hive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/configuration/hive-env.xml index f62ac13..01fd6ab 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/configuration/hive-env.xml @@ -80,4 +80,39 @@ export JAVA_LIBRARY_PATH="$JAVA_LIBRARY_PATH:{{jdbc_libs_dir}}" </value-attributes> <on-ambari-upgrade add="true"/> </property> + <property> + <name>hive_database</name> + <value>New MySQL Database</value> + <display-name>Hive Database</display-name> + <description> + Property that determines whether the HIVE DB is managed by Ambari. + </description> + <value-attributes> + <overridable>false</overridable> + <type>value-list</type> + <entries> + <entry> + <value>New MySQL Database</value> + <label>New MySQL</label> + </entry> + <entry> + <value>Existing MySQL / MariaDB Database</value> + <label>Existing MySQL / MariaDB</label> + </entry> + <entry> + <value>Existing PostgreSQL Database</value> + <label>Existing PostgreSQL</label> + </entry> + <entry> + <value>Existing Oracle Database</value> + <label>Existing Oracle</label> + </entry> + <entry> + <value>Existing SQL Anywhere Database</value> + <label>Existing SQL Anywhere</label> + </entry> + </entries> + </value-attributes> + <on-ambari-upgrade add="true"/> + </property> </configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/configuration/oozie-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/configuration/oozie-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/configuration/oozie-env.xml index 6c292aa..459eab4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/configuration/oozie-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/configuration/oozie-env.xml @@ -107,4 +107,37 @@ export HADOOP_OPTS="-Dhdp.version=${HDP_VERSION} ${HADOOP_OPTS}" </value-attributes> <on-ambari-upgrade add="true"/> </property> + <property> + <name>oozie_database</name> + <value>New Derby Database</value> + <display-name>Oozie Database</display-name> + <description>Oozie Server Database.</description> + <value-attributes> + <overridable>false</overridable> + <type>value-list</type> + <entries> + <entry> + <value>New Derby Database</value> + <label>New Derby</label> + </entry> + <entry> + <value>Existing MySQL / MariaDB Database</value> + <label>Existing MySQL / MariaDB</label> + </entry> + <entry> + <value>Existing PostgreSQL Database</value> + <label>Existing PostgreSQL</label> + </entry> + <entry> + <value>Existing Oracle Database</value> + <label>Existing Oracle</label> + </entry> + <entry> + <value>Existing SQL Anywhere Database</value> + <label>Existing SQL Anywhere</label> + </entry> + </entries> + </value-attributes> + <on-ambari-upgrade add="true"/> + </property> </configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml index dcac2eb..26496f7 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml @@ -27,6 +27,12 @@ <default>true</default> </quickLinksConfiguration> </quickLinksConfigurations> + <themes> + <theme> + <fileName>theme.json</fileName> + <default>true</default> + </theme> + </themes> </service> </services> </metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/themes/theme.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/themes/theme.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/themes/theme.json new file mode 100644 index 0000000..5f325f7 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/themes/theme.json @@ -0,0 +1,116 @@ +{ + "name": "default", + "description": "Default theme for Oozie service", + "configuration": { + "layouts": [ + { + "name": "default", + "tabs": [ + { + "name": "oozie-database", + "display-name": "Database", + "layout": { + "tab-rows": 1, + "tab-columns": 1, + "sections": [ + { + "name": "oozie-database-configurations", + "display-name": "Database Configurations", + "row-index": "0", + "column-index": "0", + "row-span": "0", + "column-span": "0", + "section-columns": "2", + "section-rows": "1", + "subsections": [ + { + "name": "oozie-database-configurations-col-1", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "1" + }, + { + "name": "oozie-database-configurations-col-2", + "row-index": "0", + "column-index": "1", + "row-span": "1", + "column-span": "1" + } + ] + } + ] + } + } + ] + } + ], + "placement": { + "configuration-layout": "default", + "configs": [ + { + "config": "oozie-env/oozie_database", + "subsection-name": "oozie-database-configurations-col-1" + }, + { + "config": "oozie-site/oozie.db.schema.name", + "subsection-name": "oozie-database-configurations-col-1" + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.username", + "subsection-name": "oozie-database-configurations-col-1" + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.url", + "subsection-name": "oozie-database-configurations-col-1" + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.driver", + "subsection-name": "oozie-database-configurations-col-2" + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.password", + "subsection-name": "oozie-database-configurations-col-2" + } + ] + }, + "widgets": [ + { + "config": "oozie-env/oozie_database", + "widget": { + "type": "combo" + } + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.username", + "widget": { + "type": "text-field" + } + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.password", + "widget": { + "type": "password" + } + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.driver", + "widget": { + "type": "text-field" + } + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.url", + "widget": { + "type": "text-field" + } + }, + { + "config": "oozie-site/oozie.db.schema.name", + "widget": { + "type": "text-field" + } + } + ] + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml index f0a7754..027e8b4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml @@ -21,6 +21,12 @@ <service> <name>OOZIE</name> <extends>common-services/OOZIE/4.2.0.2.5</extends> + <themes> + <theme> + <fileName>theme.json</fileName> + <default>true</default> + </theme> + </themes> </service> </services> </metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/themes/theme.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/themes/theme.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/themes/theme.json new file mode 100644 index 0000000..5f325f7 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/themes/theme.json @@ -0,0 +1,116 @@ +{ + "name": "default", + "description": "Default theme for Oozie service", + "configuration": { + "layouts": [ + { + "name": "default", + "tabs": [ + { + "name": "oozie-database", + "display-name": "Database", + "layout": { + "tab-rows": 1, + "tab-columns": 1, + "sections": [ + { + "name": "oozie-database-configurations", + "display-name": "Database Configurations", + "row-index": "0", + "column-index": "0", + "row-span": "0", + "column-span": "0", + "section-columns": "2", + "section-rows": "1", + "subsections": [ + { + "name": "oozie-database-configurations-col-1", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "1" + }, + { + "name": "oozie-database-configurations-col-2", + "row-index": "0", + "column-index": "1", + "row-span": "1", + "column-span": "1" + } + ] + } + ] + } + } + ] + } + ], + "placement": { + "configuration-layout": "default", + "configs": [ + { + "config": "oozie-env/oozie_database", + "subsection-name": "oozie-database-configurations-col-1" + }, + { + "config": "oozie-site/oozie.db.schema.name", + "subsection-name": "oozie-database-configurations-col-1" + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.username", + "subsection-name": "oozie-database-configurations-col-1" + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.url", + "subsection-name": "oozie-database-configurations-col-1" + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.driver", + "subsection-name": "oozie-database-configurations-col-2" + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.password", + "subsection-name": "oozie-database-configurations-col-2" + } + ] + }, + "widgets": [ + { + "config": "oozie-env/oozie_database", + "widget": { + "type": "combo" + } + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.username", + "widget": { + "type": "text-field" + } + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.password", + "widget": { + "type": "password" + } + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.driver", + "widget": { + "type": "text-field" + } + }, + { + "config": "oozie-site/oozie.service.JPAService.jdbc.url", + "widget": { + "type": "text-field" + } + }, + { + "config": "oozie-site/oozie.db.schema.name", + "widget": { + "type": "text-field" + } + } + ] + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-web/app/app.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js index 051daff..ee0b6cf 100644 --- a/ambari-web/app/app.js +++ b/ambari-web/app/app.js @@ -216,10 +216,6 @@ module.exports = Em.Application.create({ return (this.get('currentStackVersion') || this.get('defaultStackVersion')).replace(regExp, ''); }.property('currentStackVersion', 'defaultStackVersion', 'currentStackName'), - isHadoop23Stack: function () { - return (stringUtils.compareVersions(this.get('currentStackVersionNumber'), "2.3") > -1); - }.property('currentStackVersionNumber'), - isHadoopWindowsStack: Em.computed.equal('currentStackName', 'HDPWIN'), /** http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-web/app/data/configs/services/hive_properties.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/configs/services/hive_properties.js b/ambari-web/app/data/configs/services/hive_properties.js index 47ba788..7386abf 100644 --- a/ambari-web/app/data/configs/services/hive_properties.js +++ b/ambari-web/app/data/configs/services/hive_properties.js @@ -74,10 +74,6 @@ module.exports = [ { "displayName": "Existing Oracle Database", "hidden": false - }, - { - "displayName": "Existing SQL Anywhere Database", - "hidden": App.get('currentStackName') !== 'SAPHD' && (App.get('currentStackName') !== 'HDP' || !App.get('isHadoop23Stack')) } ], "radioName": "hive-database", http://git-wip-us.apache.org/repos/asf/ambari/blob/cf82cf24/ambari-web/app/data/configs/services/oozie_properties.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/configs/services/oozie_properties.js b/ambari-web/app/data/configs/services/oozie_properties.js index 0f71688..68e18a8 100644 --- a/ambari-web/app/data/configs/services/oozie_properties.js +++ b/ambari-web/app/data/configs/services/oozie_properties.js @@ -74,10 +74,6 @@ module.exports = [ { "displayName": "Existing Oracle Database", "hidden": false - }, - { - "displayName": "Existing SQL Anywhere Database", - "hidden": App.get('currentStackName') !== 'SAPHD' && (App.get('currentStackName') !== 'HDP' || !App.get('isHadoop23Stack')) } ], "radioName": "oozie-database",