ambari git commit: AMBARI-16417: More information for Standby sync alert
Repository: ambari Updated Branches: refs/heads/trunk 9c5122aaf -> b9ed455d5 AMBARI-16417: More information for Standby sync alert Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b9ed455d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b9ed455d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b9ed455d Branch: refs/heads/trunk Commit: b9ed455d5df1c5cec968234e0e6c7019413b68c8 Parents: 9c5122a Author: Jun Aoki Authored: Wed May 11 14:20:28 2016 -0700 Committer: Jun Aoki Committed: Wed May 11 14:20:28 2016 -0700 -- .../2.0.0/package/alerts/alert_sync_status.py | 24 .../stacks/2.3/HAWQ/test_alert_sync_status.py | 8 +++ 2 files changed, 18 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b9ed455d/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py index c94be9e..e916f07 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py @@ -60,11 +60,12 @@ def execute(configurations={}, parameters={}, host_name=None): return (RESULT_STATE_SKIPPED, ['HAWQSTANDBY is not installed.']) try: -sync_status = get_sync_status(configurations[HAWQMASTER_PORT]) -if sync_status in ('Synchronized', 'Synchronizing'): +summary_state, error_message = get_sync_status(configurations[HAWQMASTER_PORT]) + +if summary_state in ('Synchronized', 'Synchronizing'): return (RESULT_STATE_OK, ['HAWQSTANDBY is in sync with HAWQMASTER.']) -elif sync_status == 'Not Synchronized': - return (RESULT_STATE_WARNING, ['HAWQSTANDBY is not in sync with HAWQMASTER.']) +elif summary_state == 'Not Synchronized': + return (RESULT_STATE_WARNING, ['HAWQSTANDBY is not in sync with HAWQMASTER. ERROR: ' + error_message]) except Exception, e: logger.exception('[Alert] Retrieving HAWQSTANDBY sync status from HAWQMASTER fails on host, {0}:'.format(host_name)) logger.exception(str(e)) @@ -78,14 +79,17 @@ def get_sync_status(port): Gets the sync status of HAWQSTANDBY from HAWQMASTER by running a SQL command. summary_state can be of the following values: ('Synchronized', 'Synchronizing', 'Not Synchronized', 'None', 'Not Configured', 'Unknown') """ - query = "SELECT summary_state FROM gp_master_mirroring" - cmd = "source {0} && psql -p {1} -t -d template1 -c \"{2};\"".format(HAWQ_GREENPLUM_PATH_FILE, port, query) + + query = "SELECT summary_state, error_message FROM gp_master_mirroring" + cmd = "source {0} && psql -p {1} -t --no-align -d template1 -c \"{2};\"".format(HAWQ_GREENPLUM_PATH_FILE, port, query) - returncode, output = call(cmd, -user=HAWQ_USER, -timeout=60) + returncode, output = call(cmd, user=HAWQ_USER, timeout=60) if returncode: raise - return output.strip() + split_output = output.split("|") + summary_state = split_output[0].strip() + error_message = split_output[1].strip() + + return (summary_state, error_message) http://git-wip-us.apache.org/repos/asf/ambari/blob/b9ed455d/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py index 7d030dc..fd4f474 100644 --- a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py +++ b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_alert_sync_status.py @@ -91,7 +91,7 @@ class TestAlertSyncStatus(RMFTestCase): } # Mock calls -get_sync_status_mock.return_value = 'Synchronized' +get_sync_status_mock.return_value = ('Synchronized', "") [status, messages] = alert_sync_status.execute(configurations=configs) self.assertEqual(status, RESULT_STATE_OK) @@ -110,7 +110,7 @@ class TestAlertSyncStatus(RMFTestCase): } # Mock calls -get_sync_status_mock.return_value = 'Synchronizing' +get_sync_status_mock.return_value = ('Synchronizing', "") [status, messages] = alert_sync_status.execute(configurations=configs) self.assertEqual(status, RESULT_STATE_OK) @@ -129,12 +129,12 @@ class TestAlertSyncStatus(RMFTestCase): } # Mock calls -get_sync_status_mock.return_value = 'N
ambari git commit: AMBARI-16237: PXF alert: change the message to make it more meaningful when both namenodes are down on Secured HA cluster.
Repository: ambari Updated Branches: refs/heads/trunk 1770820a7 -> be7f69625 AMBARI-16237: PXF alert: change the message to make it more meaningful when both namenodes are down on Secured HA cluster. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/be7f6962 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/be7f6962 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/be7f6962 Branch: refs/heads/trunk Commit: be7f69625e354123facf0df369a29a3da85462ec Parents: 1770820 Author: Jun Aoki Authored: Thu May 5 11:28:20 2016 -0700 Committer: Jun Aoki Committed: Thu May 5 11:28:20 2016 -0700 -- .../libraries/functions/namenode_ha_utils.py| 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/be7f6962/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py index ee16c9b..919ccb5 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py @@ -17,7 +17,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ''' -from resource_management.libraries.script import UnknownConfiguration from resource_management.libraries.functions.is_empty import is_empty from resource_management.libraries.functions.format import format from resource_management.libraries.functions.jmx import get_value_from_jmx @@ -140,8 +139,8 @@ def get_active_namenode(hdfs_site, security_enabled, run_user): active_namenodes = get_namenode_states(hdfs_site, security_enabled, run_user)[0] if active_namenodes: return active_namenodes[0] - else: -return UnknownConfiguration('fs_root') + + raise Fail('No active NameNode was found.') def get_property_for_active_namenode(hdfs_site, property_name, security_enabled, run_user): """
ambari git commit: AMBARI-16174: Move RM wizard should update HAWQ related parameters
Repository: ambari Updated Branches: refs/heads/trunk 15a7ea3d5 -> 7d0d33a49 AMBARI-16174: Move RM wizard should update HAWQ related parameters Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7d0d33a4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d0d33a4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d0d33a4 Branch: refs/heads/trunk Commit: 7d0d33a49cfd4b8fb832ad6f0aa5f7e4b48ea048 Parents: 15a7ea3 Author: Jun Aoki Authored: Tue May 3 10:59:32 2016 -0700 Committer: Jun Aoki Committed: Tue May 3 10:59:32 2016 -0700 -- .../main/service/reassign/step4_controller.js | 42 - .../utils/configs/move_rm_config_initializer.js | 64 +++- .../service/reassign/step4_controller_test.js | 9 ++- 3 files changed, 107 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7d0d33a4/ambari-web/app/controllers/main/service/reassign/step4_controller.js -- diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js index 736f467..d8f0394 100644 --- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js @@ -574,6 +574,13 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro } } +if (componentName === 'RESOURCEMANAGER') { +if (App.Service.find().someProperty('serviceName', 'HAWQ')) { + urlParams.push('(type=hawq-site&tag=' + data.Clusters.desired_configs['hawq-site'].tag + ')'); + urlParams.push('(type=yarn-client&tag=' + data.Clusters.desired_configs['yarn-client'].tag + ')'); +} +} + return urlParams; }, @@ -629,9 +636,13 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro */ _getRmAdditionalDependencies: function (configs) { var ret = {}; -var cfg = configs['yarn-site']['yarn.resourcemanager.hostname.rm1']; -if (cfg) { - ret.rm1 = cfg; +var rm1 = configs['yarn-site']['yarn.resourcemanager.hostname.rm1']; +if (rm1) { + ret.rm1 = rm1; +} +var rm2 = configs['yarn-site']['yarn.resourcemanager.hostname.rm2']; +if (rm2) { + ret.rm2 = rm2; } return ret; }, @@ -700,6 +711,31 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro }, onLoadConfigs: function (data) { +// Find hawq-site.xml location +var hawqSiteIndex = -1; +for(var i = 0; i < data.items.length; i++){ + if(data.items[i].type == 'hawq-site'){ +hawqSiteIndex = i; +break; + } +} + +// if certain services are deployed, include related site files to additionalConfigsMap and relatedServicesMap. +if(hawqSiteIndex >= 0){ // if HAWQ is deployed + var hawqSiteProperties = { +'hawq_rm_yarn_address': ':8050', +'hawq_rm_yarn_scheduler_address': ':8030' + } + + var rmComponent = this.get('additionalConfigsMap').findProperty('componentName', "RESOURCEMANAGER"); + rmComponent.configs["hawq-site"] = hawqSiteProperties; + + if(data.items[hawqSiteIndex].properties["hawq_global_rm_type"].toLowerCase() === "yarn"){ +this.get('relatedServicesMap')['RESOURCEMANAGER'].append('HAWQ'); + } + +} + var componentName = this.get('content.reassign.component_name'); var targetHostName = this.get('content.reassignHosts.target'); var configs = {}; http://git-wip-us.apache.org/repos/asf/ambari/blob/7d0d33a4/ambari-web/app/utils/configs/move_rm_config_initializer.js -- diff --git a/ambari-web/app/utils/configs/move_rm_config_initializer.js b/ambari-web/app/utils/configs/move_rm_config_initializer.js index f8800de..5388224 100644 --- a/ambari-web/app/utils/configs/move_rm_config_initializer.js +++ b/ambari-web/app/utils/configs/move_rm_config_initializer.js @@ -33,6 +33,13 @@ function getRmHaDependedConfig(rmHaShouldBeEnabled) { }; } +function getRmHaHawqConfig(rmHaShouldBeEnabled) { + return { +type: 'rm_ha_hawq', +rmHaShouldBeEnabled: Boolean(rmHaShouldBeEnabled) + }; +} + /** * Initializer for configs which should be affected when Resource Manager is moved from one host to another * If Resource Manager HA-mode is already activated, several configs are also updated @@ -42,13 +49,16 @@ function getRmHaDependedConfig(rmHaShouldBeEnabled) { App.MoveRmConfigInitializer = App.MoveComponentConfigInitializerClass.create({ initializerTypes: [ -{name: 'rm_ha_depended', method: '_initAsRmHaDepended'} +
ambari git commit: AMBARI-15926: HAWQ activate standby wizard fails after port number change but before restart.
Repository: ambari Updated Branches: refs/heads/trunk d4ee11cc0 -> 9ed03583b AMBARI-15926: HAWQ activate standby wizard fails after port number change but before restart. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9ed03583 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9ed03583 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9ed03583 Branch: refs/heads/trunk Commit: 9ed03583b8bdce6be57f482cb88db62d185dd027 Parents: d4ee11c Author: Jun Aoki Authored: Tue Apr 19 11:39:16 2016 -0700 Committer: Jun Aoki Committed: Tue Apr 19 11:39:16 2016 -0700 -- .../common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py| 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9ed03583/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py index caba53f..45dcff0 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py @@ -59,5 +59,9 @@ class HawqStandby(Script): Logger.info("Activating HAWQ standby...") utils.exec_hawq_operation(hawq_constants.ACTIVATE, "{0} -a -M {1} -v --ignore-bad-hosts".format(hawq_constants.STANDBY, hawq_constants.FAST)) +# Stop the newly become master as the process might be running with an old port, +# which would cause a failure Start HAWQ Service step in Activate HAWQ Standby Master Wizard +common.stop_component(hawq_constants.MASTER, hawq_constants.FAST) + if __name__ == "__main__": HawqStandby().execute()
ambari git commit: AMBARI-15926: HAWQ activate standby wizard fails after port number change but before restart.
Repository: ambari Updated Branches: refs/heads/branch-2.2 997aa90d6 -> 980a4d946 AMBARI-15926: HAWQ activate standby wizard fails after port number change but before restart. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/980a4d94 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/980a4d94 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/980a4d94 Branch: refs/heads/branch-2.2 Commit: 980a4d94686446be1bd04ec67cf74f9ec88762bb Parents: 997aa90 Author: Jun Aoki Authored: Mon Apr 18 13:57:59 2016 -0700 Committer: Jun Aoki Committed: Mon Apr 18 13:57:59 2016 -0700 -- .../common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py| 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/980a4d94/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py index e2114d8..cdc58c1 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py @@ -58,6 +58,10 @@ class HawqStandby(Script): import utils Logger.info("Activating HAWQ standby...") utils.exec_hawq_operation(hawq_constants.ACTIVATE, "{0} -a -M {1} -v --ignore-bad-hosts".format(hawq_constants.STANDBY, hawq_constants.FAST)) + +# Stop the newly become master as the process might be running with an old port, +# which would cause a failure Start HAWQ Service step in Activte HAWQ Standby Master Wizard +common.stop_component(hawq_constants.MASTER, hawq_constants.FAST) if __name__ == "__main__": HawqStandby().execute()
ambari git commit: AMBARI-15926: HAWQ activate standby wizard fails after port number change but before restart.
Repository: ambari Updated Branches: refs/heads/branch-2.2.2 0bdb4bc07 -> add3a20ca AMBARI-15926: HAWQ activate standby wizard fails after port number change but before restart. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/add3a20c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/add3a20c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/add3a20c Branch: refs/heads/branch-2.2.2 Commit: add3a20cabc77902de947b05b172c1b9eb832162 Parents: 0bdb4bc Author: Jun Aoki Authored: Mon Apr 18 13:56:05 2016 -0700 Committer: Jun Aoki Committed: Mon Apr 18 13:56:05 2016 -0700 -- .../common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py| 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/add3a20c/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py index e2114d8..cdc58c1 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py @@ -58,6 +58,10 @@ class HawqStandby(Script): import utils Logger.info("Activating HAWQ standby...") utils.exec_hawq_operation(hawq_constants.ACTIVATE, "{0} -a -M {1} -v --ignore-bad-hosts".format(hawq_constants.STANDBY, hawq_constants.FAST)) + +# Stop the newly become master as the process might be running with an old port, +# which would cause a failure Start HAWQ Service step in Activte HAWQ Standby Master Wizard +common.stop_component(hawq_constants.MASTER, hawq_constants.FAST) if __name__ == "__main__": HawqStandby().execute()
ambari git commit: AMBARI-15852: Changing HAWQ Ports through Ambari prevents HAWQ service from restarting
Repository: ambari Updated Branches: refs/heads/trunk a224f2657 -> d13aa5085 AMBARI-15852: Changing HAWQ Ports through Ambari prevents HAWQ service from restarting Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d13aa508 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d13aa508 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d13aa508 Branch: refs/heads/trunk Commit: d13aa508569c2ee8afce4a746560e7a1d2b0e1a8 Parents: a224f26 Author: Jun Aoki Authored: Fri Apr 15 17:44:10 2016 -0700 Committer: Jun Aoki Committed: Fri Apr 15 17:44:10 2016 -0700 -- .../HAWQ/2.0.0/package/scripts/common.py| 13 + .../2.0.0/package/scripts/hawq_constants.py | 15 ++ .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 4 +-- .../HAWQ/2.0.0/package/scripts/hawqsegment.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstandby.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstatus.py| 25 +++-- .../HAWQ/2.0.0/package/scripts/utils.py | 8 +++--- .../python/stacks/2.3/HAWQ/test_hawqmaster.py | 4 ++- .../python/stacks/2.3/HAWQ/test_hawqsegment.py | 5 ++-- .../python/stacks/2.3/HAWQ/test_hawqstandby.py | 4 ++- .../test/python/stacks/2.3/HAWQ/test_utils.py | 29 11 files changed, 73 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d13aa508/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index abd0992..e70a959 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -31,7 +31,7 @@ import xml.etree.ElementTree as ET import utils import hawq_constants import custom_params - +import hawqstatus def setup_user(): """ @@ -235,7 +235,7 @@ def __update_sysctl_file_suse(): raise Fail("Failed to update sysctl.conf file ") -def get_local_hawq_site_property(property_name): +def get_local_hawq_site_property_value(property_name): """ Fetches the value of the property specified, from the local hawq-site.xml. """ @@ -294,16 +294,19 @@ def start_component(component_name, port, data_dir): if os.path.exists(os.path.join(data_dir, hawq_constants.postmaster_opts_filename)): return utils.exec_hawq_operation(hawq_constants.START, "{0} -a -v".format(component_name), - not_if=utils.chk_hawq_process_status_cmd(port)) + not_if=utils.generate_hawq_process_status_cmd(component_name, port)) utils.exec_hawq_operation(hawq_constants.INIT, "{0} -a -v".format(component_name)) -def stop_component(component_name, port, mode): +def stop_component(component_name, mode): """ Stops the component + Unlike start_component, port is obtained from local hawq-site.xml as Ambari pontentially have a new value through UI. """ + port_property_name = hawq_constants.COMPONENT_ATTRIBUTES_MAP[component_name]['port_property'] + port_number = get_local_hawq_site_property_value(port_property_name) utils.exec_hawq_operation(hawq_constants.STOP, "{0} -M {1} -a -v".format(component_name, mode), -only_if=utils.chk_hawq_process_status_cmd(port, component_name)) + only_if=utils.generate_hawq_process_status_cmd(component_name, port_number)) def __check_dfs_truncate_enforced(): """ http://git-wip-us.apache.org/repos/asf/ambari/blob/d13aa508/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 3f6c371..4ce0c94 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -66,3 +66,18 @@ pxf_hdfs_test_dir = "/user/{0}/hawq_pxf_hdfs_service_check".format(hawq_user) # Timeouts default_exec_timeout = 600 hawq_operation_exec_timeout = 900 + +COMPONENT_ATTRIBUTES_MAP = { + MASTER: { +'port_property': 'hawq_master_address_port', +'process_name': 'postgres' + }, + STANDBY: { +'port_pro
ambari git commit: AMBARI-15852: Changing HAWQ Ports through Ambari prevents HAWQ service from restarting
Repository: ambari Updated Branches: refs/heads/branch-2.2 6c2697ad2 -> 96e6fcec3 AMBARI-15852: Changing HAWQ Ports through Ambari prevents HAWQ service from restarting Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/96e6fcec Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/96e6fcec Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/96e6fcec Branch: refs/heads/branch-2.2 Commit: 96e6fcec3cd8808bca3cd170e49c0ec5ae81dacf Parents: 6c2697a Author: Jun Aoki Authored: Fri Apr 15 11:31:26 2016 -0700 Committer: Jun Aoki Committed: Fri Apr 15 11:31:26 2016 -0700 -- .../HAWQ/2.0.0/package/scripts/common.py| 12 +--- .../2.0.0/package/scripts/hawq_constants.py | 15 ++ .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 4 +-- .../HAWQ/2.0.0/package/scripts/hawqsegment.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstandby.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstatus.py| 25 +++-- .../HAWQ/2.0.0/package/scripts/utils.py | 8 +++--- .../python/stacks/2.3/HAWQ/test_hawqmaster.py | 4 ++- .../python/stacks/2.3/HAWQ/test_hawqsegment.py | 5 ++-- .../python/stacks/2.3/HAWQ/test_hawqstandby.py | 4 ++- .../test/python/stacks/2.3/HAWQ/test_utils.py | 29 11 files changed, 73 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/96e6fcec/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index 413cf1a..b929430 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -31,6 +31,7 @@ import xml.etree.ElementTree as ET import utils import hawq_constants import custom_params +import hawqstatus def setup_user(): """ @@ -234,7 +235,7 @@ def __update_sysctl_file_suse(): raise Fail("Failed to update sysctl.conf file ") -def get_local_hawq_site_property(property_name): +def get_local_hawq_site_property_value(property_name): """ Fetches the value of the property specified, from the local hawq-site.xml. """ @@ -293,17 +294,20 @@ def start_component(component_name, port, data_dir): if os.path.exists(os.path.join(data_dir, hawq_constants.postmaster_opts_filename)): return utils.exec_hawq_operation(hawq_constants.START, "{0} -a -v".format(component_name), - not_if=utils.chk_hawq_process_status_cmd(port)) + not_if=utils.generate_hawq_process_status_cmd(component_name, port)) utils.exec_hawq_operation(hawq_constants.INIT, "{0} -a -v".format(component_name)) -def stop_component(component_name, port, mode): +def stop_component(component_name, mode): """ Stops the component + Unlike start_component, port is obtained from local hawq-site.xml as Ambari pontentially have a new value through UI. """ + port_property_name = hawq_constants.COMPONENT_ATTRIBUTES_MAP[component_name]['port_property'] + port_number = get_local_hawq_site_property_value(port_property_name) utils.exec_hawq_operation(hawq_constants.STOP, "{0} -M {1} -a -v".format(component_name, mode), -only_if=utils.chk_hawq_process_status_cmd(port, component_name)) + only_if=utils.generate_hawq_process_status_cmd(component_name, port_number)) def __check_dfs_truncate_enforced(): """ http://git-wip-us.apache.org/repos/asf/ambari/blob/96e6fcec/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 3f6c371..4ce0c94 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -66,3 +66,18 @@ pxf_hdfs_test_dir = "/user/{0}/hawq_pxf_hdfs_service_check".format(hawq_user) # Timeouts default_exec_timeout = 600 hawq_operation_exec_timeout = 900 + +COMPONENT_ATTRIBUTES_MAP = { + MASTER: { +'port_property': 'hawq_master_address_port', +'process_name': 'postgres' + }, + STANDBY: { +
ambari git commit: AMBARI-15852: Changing HAWQ Ports through Ambari prevents HAWQ service from restarting
Repository: ambari Updated Branches: refs/heads/branch-2.2.2 900b4fc63 -> 209ade07b AMBARI-15852: Changing HAWQ Ports through Ambari prevents HAWQ service from restarting Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/209ade07 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/209ade07 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/209ade07 Branch: refs/heads/branch-2.2.2 Commit: 209ade07b42b606188d8257955f47bc79eb8f4c1 Parents: 900b4fc Author: Jun Aoki Authored: Fri Apr 15 11:29:57 2016 -0700 Committer: Jun Aoki Committed: Fri Apr 15 11:29:57 2016 -0700 -- .../HAWQ/2.0.0/package/scripts/common.py| 12 +--- .../2.0.0/package/scripts/hawq_constants.py | 15 ++ .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 4 +-- .../HAWQ/2.0.0/package/scripts/hawqsegment.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstandby.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstatus.py| 25 +++-- .../HAWQ/2.0.0/package/scripts/utils.py | 8 +++--- .../python/stacks/2.3/HAWQ/test_hawqmaster.py | 4 ++- .../python/stacks/2.3/HAWQ/test_hawqsegment.py | 5 ++-- .../python/stacks/2.3/HAWQ/test_hawqstandby.py | 4 ++- .../test/python/stacks/2.3/HAWQ/test_utils.py | 29 11 files changed, 73 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/209ade07/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index 413cf1a..b929430 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -31,6 +31,7 @@ import xml.etree.ElementTree as ET import utils import hawq_constants import custom_params +import hawqstatus def setup_user(): """ @@ -234,7 +235,7 @@ def __update_sysctl_file_suse(): raise Fail("Failed to update sysctl.conf file ") -def get_local_hawq_site_property(property_name): +def get_local_hawq_site_property_value(property_name): """ Fetches the value of the property specified, from the local hawq-site.xml. """ @@ -293,17 +294,20 @@ def start_component(component_name, port, data_dir): if os.path.exists(os.path.join(data_dir, hawq_constants.postmaster_opts_filename)): return utils.exec_hawq_operation(hawq_constants.START, "{0} -a -v".format(component_name), - not_if=utils.chk_hawq_process_status_cmd(port)) + not_if=utils.generate_hawq_process_status_cmd(component_name, port)) utils.exec_hawq_operation(hawq_constants.INIT, "{0} -a -v".format(component_name)) -def stop_component(component_name, port, mode): +def stop_component(component_name, mode): """ Stops the component + Unlike start_component, port is obtained from local hawq-site.xml as Ambari pontentially have a new value through UI. """ + port_property_name = hawq_constants.COMPONENT_ATTRIBUTES_MAP[component_name]['port_property'] + port_number = get_local_hawq_site_property_value(port_property_name) utils.exec_hawq_operation(hawq_constants.STOP, "{0} -M {1} -a -v".format(component_name, mode), -only_if=utils.chk_hawq_process_status_cmd(port, component_name)) + only_if=utils.generate_hawq_process_status_cmd(component_name, port_number)) def __check_dfs_truncate_enforced(): """ http://git-wip-us.apache.org/repos/asf/ambari/blob/209ade07/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 3f6c371..4ce0c94 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -66,3 +66,18 @@ pxf_hdfs_test_dir = "/user/{0}/hawq_pxf_hdfs_service_check".format(hawq_user) # Timeouts default_exec_timeout = 600 hawq_operation_exec_timeout = 900 + +COMPONENT_ATTRIBUTES_MAP = { + MASTER: { +'port_property': 'hawq_master_address_port', +'process_name': 'postgres' + }, + STANDBY: { +
ambari git commit: AMBARI-15475: Editing tmp dir from single to multiple dir doesn't trigger the backend change
Repository: ambari Updated Branches: refs/heads/trunk 74f314598 -> b65b7c2dd AMBARI-15475: Editing tmp dir from single to multiple dir doesn't trigger the backend change Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b65b7c2d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b65b7c2d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b65b7c2d Branch: refs/heads/trunk Commit: b65b7c2ddbe6e11d8c0514346f2c00da3feceaae Parents: 74f3145 Author: Jun Aoki Authored: Sat Mar 19 01:13:08 2016 -0700 Committer: Jun Aoki Committed: Sat Mar 19 01:13:08 2016 -0700 -- .../HAWQ/2.0.0/package/scripts/common.py | 14 ++ .../HAWQ/2.0.0/package/scripts/hawqsegment.py| 7 +++ .../HAWQ/2.0.0/package/scripts/master_helper.py | 15 ++- .../HAWQ/2.0.0/package/scripts/params.py | 4 ++-- .../test/python/stacks/2.3/HAWQ/test_hawqmaster.py | 10 +- .../test/python/stacks/2.3/HAWQ/test_hawqsegment.py | 13 + .../test/python/stacks/2.3/HAWQ/test_hawqstandby.py | 10 +- 7 files changed, 40 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b65b7c2d/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index 00349d8..0631144 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -52,6 +52,20 @@ def __create_hawq_user(): groups=[hawq_constants.hawq_group, params.user_group], ignore_failures=True) +def create_master_dir(dir_path): + """ + Creates the master directory (hawq_master_dir or hawq_segment_dir) for HAWQ + """ + utils.create_dir_as_hawq_user(dir_path) + Execute("chmod 700 {0}".format(dir_path), user=hawq_constants.root_user, timeout=hawq_constants.default_exec_timeout) + +def create_temp_dirs(dir_paths): + """ + Creates the temp directories (hawq_master_temp_dir or hawq_segment_temp_dir) for HAWQ + """ + for path in dir_paths.split(','): +if path != "": + utils.create_dir_as_hawq_user(path) def __set_home_dir_ownership(): """ http://git-wip-us.apache.org/repos/asf/ambari/blob/b65b7c2d/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py index 0a597b6..1891ede 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py @@ -42,6 +42,8 @@ class HawqSegment(Script): env.set_params(hawq_constants) common.setup_user() common.setup_common_configurations() +# temp directories are stateless and they should be recreated when configured (started) +common.create_temp_dirs(params.hawq_segment_temp_dirs) def __start_segment(self): @@ -80,10 +82,7 @@ class HawqSegment(Script): @staticmethod def __init_segment(): import params - -# Create segment directories -utils.create_dir_as_hawq_user(params.hawq_segment_dir) -utils.create_dir_as_hawq_user(params.hawq_segment_temp_dir.split(',')) +common.create_master_dir(params.hawq_segment_dir) # Initialize hawq segment utils.exec_hawq_operation(hawq_constants.INIT, "{0} -a -v".format(hawq_constants.SEGMENT)) http://git-wip-us.apache.org/repos/asf/ambari/blob/b65b7c2d/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py index 9482b35..330b6c0 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py @@ -59,20 +59,9 @@ def configure_master(): common.setup_user() common.setup_common_configurations() __setup_master_specific_conf_files() - __create_local_dirs() - - -def __create_local_dirs(): - """ -
ambari git commit: AMBARI-15435: Update Hawq GUCS: Refactor resource related GUC (goutamtadi via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 d9c6025ea -> e3a673f74 AMBARI-15435: Update Hawq GUCS: Refactor resource related GUC (goutamtadi via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e3a673f7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e3a673f7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e3a673f7 Branch: refs/heads/branch-2.2 Commit: e3a673f747bd274ec16535b4aa11302634ce39d4 Parents: d9c6025 Author: Jun Aoki Authored: Thu Mar 17 16:44:09 2016 -0700 Committer: Jun Aoki Committed: Thu Mar 17 16:44:09 2016 -0700 -- .../HAWQ/2.0.0/configuration/hawq-site.xml | 66 --- .../HAWQ/2.0.0/themes/theme.json| 113 --- .../stacks/HDP/2.3/services/stack_advisor.py| 5 +- .../stacks/2.3/common/test_stack_advisor.py | 15 +-- 4 files changed, 157 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e3a673f7/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index d187017..93ad3fe 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -114,7 +114,7 @@ hawq_master_temp_directory -HAWQ Master Temp Directory +HAWQ Master Temp Directories /tmp/hawq/master Used as temporary filespace to store workfile cache, sort/join temp files etc. @@ -128,7 +128,7 @@ hawq_segment_temp_directory -HAWQ Segment Temp Directory +HAWQ Segment Temp Directories /tmp/hawq/segment Used as temporary filespace to store workfile cache, sort/join temp files etc. @@ -146,17 +146,17 @@ Resource Manager none - HAWQ global resource manager type. Valid values are YARN ('yarn') and Native ('none'). - Native('none') indicates that the HAWQ resource manager manages its own resources exclusively for the entire cluster. + HAWQ global resource manager type. Valid values are YARN ('yarn') and Standalone ('none'). + Standalone('none') indicates that the HAWQ resource manager manages its own resources exclusively for the entire cluster. YARN ('yarn') means that HAWQ will negotiate with YARN's resource manager for resources. - The default is Native ('none'). + The default is Standalone ('none'). value-list none - Native + Standalone yarn @@ -172,7 +172,7 @@ Segment Memory Usage Limit 64GB - The maximum memory that can be used by a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Native ('none'). + The maximum memory that can be used by a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Standalone ('none'). The default is 64GB. @@ -185,7 +185,7 @@ Segment Virtual Core Usage Limit 16 - The maximum number of virtual cores that can be used for query execution in a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Native ('none'). + The maximum number of virtual cores that can be used for query execution in a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Standalone ('none'). The default is 16. @@ -299,18 +299,52 @@ -default_segment_num -Default Number of Virtual Segments -24 +default_hash_table_bucket_number +Default buckets for Hash Distributed tables +6 - The default number of virtual segments to use when executing a query statement. - When the query is actually executed, the number of virtual segments may differ from this number depending on the query's needs. - When expanding the cluster, you should adjust this number to reflect the number of nodes in the new cluster times the number of virtual segments per node. - The default is 24. + The default number of virtual segments per query for hash distributed tables that can be used for query execution in a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Standalone ('none'). + The default is 6. int -
ambari git commit: AMBARI-15435: Update Hawq GUCS: Refactor resource related GUC (goutamtadi via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 1bf667ead -> b663dbe1b AMBARI-15435: Update Hawq GUCS: Refactor resource related GUC (goutamtadi via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b663dbe1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b663dbe1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b663dbe1 Branch: refs/heads/trunk Commit: b663dbe1be5291d8d32de7ec2b4434612d0861c0 Parents: 1bf667e Author: Jun Aoki Authored: Thu Mar 17 16:42:56 2016 -0700 Committer: Jun Aoki Committed: Thu Mar 17 16:42:56 2016 -0700 -- .../HAWQ/2.0.0/configuration/hawq-site.xml | 66 --- .../HAWQ/2.0.0/themes/theme.json| 113 --- .../stacks/HDP/2.3/services/stack_advisor.py| 5 +- .../stacks/2.3/common/test_stack_advisor.py | 15 +-- 4 files changed, 157 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b663dbe1/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index d187017..93ad3fe 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -114,7 +114,7 @@ hawq_master_temp_directory -HAWQ Master Temp Directory +HAWQ Master Temp Directories /tmp/hawq/master Used as temporary filespace to store workfile cache, sort/join temp files etc. @@ -128,7 +128,7 @@ hawq_segment_temp_directory -HAWQ Segment Temp Directory +HAWQ Segment Temp Directories /tmp/hawq/segment Used as temporary filespace to store workfile cache, sort/join temp files etc. @@ -146,17 +146,17 @@ Resource Manager none - HAWQ global resource manager type. Valid values are YARN ('yarn') and Native ('none'). - Native('none') indicates that the HAWQ resource manager manages its own resources exclusively for the entire cluster. + HAWQ global resource manager type. Valid values are YARN ('yarn') and Standalone ('none'). + Standalone('none') indicates that the HAWQ resource manager manages its own resources exclusively for the entire cluster. YARN ('yarn') means that HAWQ will negotiate with YARN's resource manager for resources. - The default is Native ('none'). + The default is Standalone ('none'). value-list none - Native + Standalone yarn @@ -172,7 +172,7 @@ Segment Memory Usage Limit 64GB - The maximum memory that can be used by a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Native ('none'). + The maximum memory that can be used by a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Standalone ('none'). The default is 64GB. @@ -185,7 +185,7 @@ Segment Virtual Core Usage Limit 16 - The maximum number of virtual cores that can be used for query execution in a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Native ('none'). + The maximum number of virtual cores that can be used for query execution in a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Standalone ('none'). The default is 16. @@ -299,18 +299,52 @@ -default_segment_num -Default Number of Virtual Segments -24 +default_hash_table_bucket_number +Default buckets for Hash Distributed tables +6 - The default number of virtual segments to use when executing a query statement. - When the query is actually executed, the number of virtual segments may differ from this number depending on the query's needs. - When expanding the cluster, you should adjust this number to reflect the number of nodes in the new cluster times the number of virtual segments per node. - The default is 24. + The default number of virtual segments per query for hash distributed tables that can be used for query execution in a HAWQ segment when Resource Manager ('hawq_global_rm_type') is set to Standalone ('none'). + The default is 6. int - 0 +
ambari git commit: AMBARI-15475: Editing tmp dir from single to multiple dir doesn't trigger the backend change
Repository: ambari Updated Branches: refs/heads/branch-2.2 edfbe19b6 -> e4899550f AMBARI-15475: Editing tmp dir from single to multiple dir doesn't trigger the backend change Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e4899550 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e4899550 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e4899550 Branch: refs/heads/branch-2.2 Commit: e4899550fc1f8f1fbfb17228175e15aa4cd8a18c Parents: edfbe19 Author: Jun Aoki Authored: Fri Mar 18 18:16:48 2016 -0700 Committer: Jun Aoki Committed: Fri Mar 18 18:16:48 2016 -0700 -- .../HAWQ/2.0.0/package/scripts/common.py | 14 ++ .../HAWQ/2.0.0/package/scripts/hawqsegment.py| 7 +++ .../HAWQ/2.0.0/package/scripts/master_helper.py | 15 ++- .../HAWQ/2.0.0/package/scripts/params.py | 4 ++-- .../HAWQ/2.0.0/package/scripts/utils.py | 6 +- .../test/python/stacks/2.3/HAWQ/test_hawqmaster.py | 10 +- .../test/python/stacks/2.3/HAWQ/test_hawqsegment.py | 13 + .../test/python/stacks/2.3/HAWQ/test_hawqstandby.py | 9 + 8 files changed, 45 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e4899550/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index d62332d..20336bc 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -52,6 +52,20 @@ def __create_hawq_user(): groups=[hawq_constants.hawq_group, params.user_group], ignore_failures=True) +def create_master_dir(dir_path): + """ + Creates the master directory (hawq_master_dir or hawq_segment_dir) for HAWQ + """ + utils.create_dir_as_hawq_user(dir_path) + Execute("chmod 700 {0}".format(dir_path), user=hawq_constants.root_user, timeout=hawq_constants.default_exec_timeout) + +def create_temp_dirs(dir_paths): + """ + Creates the temp directories (hawq_master_temp_dir or hawq_segment_temp_dir) for HAWQ + """ + for path in dir_paths.split(','): +if path != "": + utils.create_dir_as_hawq_user(path) def __set_home_dir_ownership(): """ http://git-wip-us.apache.org/repos/asf/ambari/blob/e4899550/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py index 0a597b6..1891ede 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py @@ -42,6 +42,8 @@ class HawqSegment(Script): env.set_params(hawq_constants) common.setup_user() common.setup_common_configurations() +# temp directories are stateless and they should be recreated when configured (started) +common.create_temp_dirs(params.hawq_segment_temp_dirs) def __start_segment(self): @@ -80,10 +82,7 @@ class HawqSegment(Script): @staticmethod def __init_segment(): import params - -# Create segment directories -utils.create_dir_as_hawq_user(params.hawq_segment_dir) -utils.create_dir_as_hawq_user(params.hawq_segment_temp_dir.split(',')) +common.create_master_dir(params.hawq_segment_dir) # Initialize hawq segment utils.exec_hawq_operation(hawq_constants.INIT, "{0} -a -v".format(hawq_constants.SEGMENT)) http://git-wip-us.apache.org/repos/asf/ambari/blob/e4899550/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py index 9482b35..330b6c0 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py @@ -59,20 +59,9 @@ def configure_master(): common.setup_user() common.setup_common_configurations() __setup_master_specific_con
ambari git commit: AMBARI-15211: Alerts for PXF component status
Repository: ambari Updated Branches: refs/heads/trunk e1811bcad -> ec94842e2 AMBARI-15211: Alerts for PXF component status Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ec94842e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ec94842e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ec94842e Branch: refs/heads/trunk Commit: ec94842e2d7095767cbfa0634c2813b2a8c7079a Parents: e1811bc Author: Jun Aoki Authored: Thu Mar 3 13:31:18 2016 -0800 Committer: Jun Aoki Committed: Thu Mar 3 13:31:18 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 2 +- .../common-services/PXF/3.0.0/alerts.json | 19 +++ .../common-services/PXF/3.0.0/metainfo.xml | 2 +- .../PXF/3.0.0/package/alerts/api_status.py | 157 +++ .../stacks/2.3/PXF/test_alerts_api_status.py| 76 + 5 files changed, 254 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ec94842e/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index b77eb34..efcb867 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -22,7 +22,7 @@ HAWQ HAWQ - Apache HAWQ - Apache Hadoop Native SQL + Apache HAWQ - Hadoop Native SQL for High-Performance Advanced Analytics 2.0.0 http://git-wip-us.apache.org/repos/asf/ambari/blob/ec94842e/ambari-server/src/main/resources/common-services/PXF/3.0.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/alerts.json b/ambari-server/src/main/resources/common-services/PXF/3.0.0/alerts.json new file mode 100644 index 000..d32fc97 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/alerts.json @@ -0,0 +1,19 @@ +{ + "PXF": { +"PXF": [ + { +"name": "pxf_process", +"label": "This alert is triggered when the PXF is not functional.", +"description": "This alert is triggered when the PXF is not functional.", +"interval": 1, +"scope": "ANY", +"enabled": true, +"source": { + "type": "SCRIPT", + "path": "PXF/3.0.0/package/alerts/api_status.py", + "parameters": [] +} + } +] + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/ec94842e/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml index 1797b29..afe27ec 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml @@ -22,7 +22,7 @@ PXF PXF - HAWQ Extension Framework + Apache HAWQ Extension Framework for querying external data in HDFS files, Hive tables, and HBase tables 3.0.0 http://git-wip-us.apache.org/repos/asf/ambari/blob/ec94842e/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py new file mode 100644 index 000..871da2b --- /dev/null +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py @@ -0,0 +1,157 @@ +#!/usr/bin/env python + +""" +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under t
ambari git commit: AMBARI-15211: Alerts for PXF component status
Repository: ambari Updated Branches: refs/heads/branch-2.2 91b224e0f -> b4f067fd8 AMBARI-15211: Alerts for PXF component status Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b4f067fd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b4f067fd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b4f067fd Branch: refs/heads/branch-2.2 Commit: b4f067fd81f84354758ffe7cd2354f9ac25db23f Parents: 91b224e Author: Jun Aoki Authored: Thu Mar 3 13:30:04 2016 -0800 Committer: Jun Aoki Committed: Thu Mar 3 13:30:04 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 2 +- .../common-services/PXF/3.0.0/alerts.json | 19 +++ .../common-services/PXF/3.0.0/metainfo.xml | 2 +- .../PXF/3.0.0/package/alerts/api_status.py | 157 +++ .../stacks/2.3/PXF/test_alerts_api_status.py| 76 + 5 files changed, 254 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b4f067fd/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 4078990..a772839 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -22,7 +22,7 @@ HAWQ HAWQ - Apache HAWQ - Apache Hadoop Native SQL + Apache HAWQ - Hadoop Native SQL for High-Performance Advanced Analytics 2.0.0 http://git-wip-us.apache.org/repos/asf/ambari/blob/b4f067fd/ambari-server/src/main/resources/common-services/PXF/3.0.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/alerts.json b/ambari-server/src/main/resources/common-services/PXF/3.0.0/alerts.json new file mode 100644 index 000..d32fc97 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/alerts.json @@ -0,0 +1,19 @@ +{ + "PXF": { +"PXF": [ + { +"name": "pxf_process", +"label": "This alert is triggered when the PXF is not functional.", +"description": "This alert is triggered when the PXF is not functional.", +"interval": 1, +"scope": "ANY", +"enabled": true, +"source": { + "type": "SCRIPT", + "path": "PXF/3.0.0/package/alerts/api_status.py", + "parameters": [] +} + } +] + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/b4f067fd/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml index 1797b29..afe27ec 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml @@ -22,7 +22,7 @@ PXF PXF - HAWQ Extension Framework + Apache HAWQ Extension Framework for querying external data in HDFS files, Hive tables, and HBase tables 3.0.0 http://git-wip-us.apache.org/repos/asf/ambari/blob/b4f067fd/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py new file mode 100644 index 000..871da2b --- /dev/null +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py @@ -0,0 +1,157 @@ +#!/usr/bin/env python + +""" +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitatio
ambari git commit: AMBARI-15227: Move HAWQMASTER above HAWQSTANDBY in Assign Masters page (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 8d9495455 -> 93aba403c AMBARI-15227: Move HAWQMASTER above HAWQSTANDBY in Assign Masters page (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/93aba403 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/93aba403 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/93aba403 Branch: refs/heads/branch-2.2 Commit: 93aba403cbbfbdb9830cb13cbc7bc80decc10704 Parents: 8d94954 Author: Jun Aoki Authored: Tue Mar 1 16:34:10 2016 -0800 Committer: Jun Aoki Committed: Tue Mar 1 16:34:10 2016 -0800 -- .../mixins/wizard/assign_master_components.js | 3 ++ ambari-web/app/models/stack_service.js | 5 +- .../test/controllers/wizard/step5_test.js | 28 -- .../wizard/assign_master_components_test.js | 55 4 files changed, 62 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/93aba403/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index efcb02e..6fcf335 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -900,8 +900,11 @@ App.AssignMasterComponents = Em.Mixin.create({ */ sortComponentsByServiceName: function(components) { var displayOrder = App.StackService.displayOrder; +var componentsOrderForService = App.StackService.componentsOrderForService; var indexForUnordered = Math.max(displayOrder.length, components.length); return components.sort(function (a, b) { + if(a.serviceId === b.serviceId && a.serviceId in componentsOrderForService) +return componentsOrderForService[a.serviceId].indexOf(a.component_name) - componentsOrderForService[b.serviceId].indexOf(b.component_name); var aValue = displayOrder.indexOf(a.serviceId) != -1 ? displayOrder.indexOf(a.serviceId) : indexForUnordered; var bValue = displayOrder.indexOf(b.serviceId) != -1 ? displayOrder.indexOf(b.serviceId) : indexForUnordered; return aValue - bValue; http://git-wip-us.apache.org/repos/asf/ambari/blob/93aba403/ambari-web/app/models/stack_service.js -- diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index 2453514..1580b67 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -214,12 +214,15 @@ App.StackService.displayOrder = [ 'FLUME' ]; +App.StackService.componentsOrderForService = { + 'HAWQ': ['HAWQMASTER', 'HAWQSTANDBY'] +}; + //@TODO: Write unit test for no two keys in the object should have any intersecting elements in their values App.StackService.coSelected = { 'YARN': ['MAPREDUCE2'] }; - App.StackService.reviewPageHandlers = { 'HIVE': { 'Database': 'loadHiveDbValue' http://git-wip-us.apache.org/repos/asf/ambari/blob/93aba403/ambari-web/test/controllers/wizard/step5_test.js -- diff --git a/ambari-web/test/controllers/wizard/step5_test.js b/ambari-web/test/controllers/wizard/step5_test.js index b5e0ddb..995f19c 100644 --- a/ambari-web/test/controllers/wizard/step5_test.js +++ b/ambari-web/test/controllers/wizard/step5_test.js @@ -1164,32 +1164,4 @@ describe('App.WizardStep5Controller', function () { }); }); - - describe('#sortComponentsByServiceName', function () { - -var components = [{ - "component_name": "METRICS_COLLECTOR", - "serviceId": "AMBARI_METRICS" -}, {"component_name": "ZOOKEEPER_SERVER", "serviceId": "ZOOKEEPER"}, { - "component_name": "NAMENODE", - "serviceId": "HDFS" -}, {"component_name": "DRPC_SERVER", "serviceId": "STORM"}, { - "component_name": "APP_TIMELINE_SERVER", - "serviceId": "YARN" -}, {"component_name": "RESOURCEMANAGER", "serviceId": "YARN"}, { - "component_name": "SECONDARY_NAMENODE", - "serviceId": "HDFS" -}, {"component_name": "ZOOKEEPER_SERVER", "serviceId": "ZOOKEEPER"}, { - "component_name": "HISTORYSERVER&qu
ambari git commit: AMBARI-15227: Move HAWQMASTER above HAWQSTANDBY in Assign Masters page (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 874d4d577 -> fa38d29a1 AMBARI-15227: Move HAWQMASTER above HAWQSTANDBY in Assign Masters page (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fa38d29a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fa38d29a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fa38d29a Branch: refs/heads/trunk Commit: fa38d29a13fe26625f7225d249f72d05e997fa3b Parents: 874d4d5 Author: Jun Aoki Authored: Tue Mar 1 16:32:49 2016 -0800 Committer: Jun Aoki Committed: Tue Mar 1 16:32:49 2016 -0800 -- .../mixins/wizard/assign_master_components.js | 3 ++ ambari-web/app/models/stack_service.js | 4 ++ .../test/controllers/wizard/step5_test.js | 27 -- .../wizard/assign_master_components_test.js | 56 4 files changed, 63 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fa38d29a/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index c1c4d0e..0500014 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -897,8 +897,11 @@ App.AssignMasterComponents = Em.Mixin.create({ */ sortComponentsByServiceName: function(components) { var displayOrder = App.StackService.displayOrder; +var componentsOrderForService = App.StackService.componentsOrderForService; var indexForUnordered = Math.max(displayOrder.length, components.length); return components.sort(function (a, b) { + if(a.serviceId === b.serviceId && a.serviceId in componentsOrderForService) +return componentsOrderForService[a.serviceId].indexOf(a.component_name) - componentsOrderForService[b.serviceId].indexOf(b.component_name); var aValue = displayOrder.indexOf(a.serviceId) != -1 ? displayOrder.indexOf(a.serviceId) : indexForUnordered; var bValue = displayOrder.indexOf(b.serviceId) != -1 ? displayOrder.indexOf(b.serviceId) : indexForUnordered; return aValue - bValue; http://git-wip-us.apache.org/repos/asf/ambari/blob/fa38d29a/ambari-web/app/models/stack_service.js -- diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index a8ce241..dbfabc0 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -204,6 +204,10 @@ App.StackService.displayOrder = [ 'FLUME' ]; +App.StackService.componentsOrderForService = { + 'HAWQ': ['HAWQMASTER', 'HAWQSTANDBY'] +}; + //@TODO: Write unit test for no two keys in the object should have any intersecting elements in their values App.StackService.coSelected = { 'YARN': ['MAPREDUCE2'] http://git-wip-us.apache.org/repos/asf/ambari/blob/fa38d29a/ambari-web/test/controllers/wizard/step5_test.js -- diff --git a/ambari-web/test/controllers/wizard/step5_test.js b/ambari-web/test/controllers/wizard/step5_test.js index a2bc687..4140210 100644 --- a/ambari-web/test/controllers/wizard/step5_test.js +++ b/ambari-web/test/controllers/wizard/step5_test.js @@ -1261,33 +1261,6 @@ describe('App.WizardStep5Controller', function () { }); - describe('#sortComponentsByServiceName', function () { - -var components = [{ - "component_name": "METRICS_COLLECTOR", - "serviceId": "AMBARI_METRICS" -}, {"component_name": "ZOOKEEPER_SERVER", "serviceId": "ZOOKEEPER"}, { - "component_name": "NAMENODE", - "serviceId": "HDFS" -}, {"component_name": "DRPC_SERVER", "serviceId": "STORM"}, { - "component_name": "APP_TIMELINE_SERVER", - "serviceId": "YARN" -}, {"component_name": "RESOURCEMANAGER", "serviceId": "YARN"}, { - "component_name": "SECONDARY_NAMENODE", - "serviceId": "HDFS" -}, {"component_name": "ZOOKEEPER_SERVER", "serviceId": "ZOOKEEPER"}, { - "component_name": "HISTORYSERVER", - "serviceId": "MAPREDUCE2" -}, {"component_name": "NIMBUS", "serviceId": "S
ambari git commit: AMBARI-15189: Set dfs.allow.truncate = True on HDFS during HAWQ install or add service (lavjain via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk ee6929be8 -> a323c387f AMBARI-15189: Set dfs.allow.truncate = True on HDFS during HAWQ install or add service (lavjain via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a323c387 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a323c387 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a323c387 Branch: refs/heads/trunk Commit: a323c387f37b669e9cd7963f1535680abf20f8c2 Parents: ee6929b Author: Jun Aoki Authored: Mon Feb 29 17:42:45 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 29 17:42:45 2016 -0800 -- .../stacks/HDP/2.3/services/stack_advisor.py| 5 + .../stacks/2.3/common/test_stack_advisor.py | 20 2 files changed, 25 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a323c387/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index 11adca5..ae7c36e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -363,6 +363,11 @@ class HDP23StackAdvisor(HDP22StackAdvisor): putHdfsSiteProperty = self.putProperty(configurations, "hdfs-site", services) putHdfsSitePropertyAttribute = self.putPropertyAttribute(configurations, "hdfs-site") +servicesList = [service["StackServices"]["service_name"] for service in services["services"]] +if "HAWQ" in servicesList: + # Set dfs.allow.truncate to true + putHdfsSiteProperty('dfs.allow.truncate', 'true') + if ('ranger-hdfs-plugin-properties' in services['configurations']) and ('ranger-hdfs-plugin-enabled' in services['configurations']['ranger-hdfs-plugin-properties']['properties']): rangerPluginEnabled = '' if 'ranger-hdfs-plugin-properties' in configurations and 'ranger-hdfs-plugin-enabled' in configurations['ranger-hdfs-plugin-properties']['properties']: http://git-wip-us.apache.org/repos/asf/ambari/blob/a323c387/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py index 690c053..8932bde 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py @@ -595,6 +595,26 @@ class TestHDP23StackAdvisor(TestCase): self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, hosts) self.assertEquals(configurations['hdfs-site']['properties']['dfs.namenode.inode.attributes.provider.class'], 'org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer', "Test with Ranger HDFS plugin is enabled") +# Test 1 for dfs.allow.truncate with no HAWQ and dfs.allow.truncate not set +self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, hosts) +self.assertTrue('dfs.allow.truncate' not in configurations['hdfs-site']['properties']) + +# Test 2 for dfs.allow.truncate with HAWQ and dfs.allow.truncate not set +services["services"].append({"StackServices" : {"service_name" : "HAWQ"}, "components":[]}) +self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, hosts) + self.assertEquals(configurations['hdfs-site']['properties']['dfs.allow.truncate'], 'true') + +# Test 3 for dfs.allow.truncate with no HAWQ and dfs.allow.truncate set to false +services["services"].remove({"StackServices" : {"service_name" : "HAWQ"}, "components":[]}) +configurations['hdfs-site']['properties']['dfs.allow.truncate'] = 'false' +self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, hosts) + self.assertEquals(configurations['hdfs-site']['properties']['dfs.allow.truncate'], 'false') + +# Test 4 for dfs.allow.truncate with HAWQ and dfs.allow.truncate set to false +services["services"].append({"StackServices" : {"service_name" : "HAWQ"}, "components":[]}) +self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, hosts) + self.assertEquals(configurations['hdfs-site']['properties']['dfs.allow.truncate'], 'true') + def test_recommendYARNConfigurations(self): configurations = {} servicesList = ["YARN"]
ambari git commit: AMBARI-15189: Set dfs.allow.truncate = True on HDFS during HAWQ install or add service (lavjain via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 fbbc855d3 -> f3051f953 AMBARI-15189: Set dfs.allow.truncate = True on HDFS during HAWQ install or add service (lavjain via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f3051f95 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f3051f95 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f3051f95 Branch: refs/heads/branch-2.2 Commit: f3051f953f4cad56c9e8b8c162038f2f75a5a00e Parents: fbbc855 Author: Jun Aoki Authored: Mon Feb 29 17:41:31 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 29 17:41:31 2016 -0800 -- .../stacks/HDP/2.3/services/stack_advisor.py| 5 + .../stacks/2.3/common/test_stack_advisor.py | 20 2 files changed, 25 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f3051f95/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index 0b4e543..1382697 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -364,6 +364,11 @@ class HDP23StackAdvisor(HDP22StackAdvisor): putHdfsSiteProperty = self.putProperty(configurations, "hdfs-site", services) putHdfsSitePropertyAttribute = self.putPropertyAttribute(configurations, "hdfs-site") +servicesList = [service["StackServices"]["service_name"] for service in services["services"]] +if "HAWQ" in servicesList: + # Set dfs.allow.truncate to true + putHdfsSiteProperty('dfs.allow.truncate', 'true') + if ('ranger-hdfs-plugin-properties' in services['configurations']) and ('ranger-hdfs-plugin-enabled' in services['configurations']['ranger-hdfs-plugin-properties']['properties']): rangerPluginEnabled = '' if 'ranger-hdfs-plugin-properties' in configurations and 'ranger-hdfs-plugin-enabled' in configurations['ranger-hdfs-plugin-properties']['properties']: http://git-wip-us.apache.org/repos/asf/ambari/blob/f3051f95/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py index 1968c4b..316d172 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py @@ -583,6 +583,26 @@ class TestHDP23StackAdvisor(TestCase): self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, None) self.assertEquals(configurations['hdfs-site']['properties']['dfs.namenode.inode.attributes.provider.class'], 'org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer', "Test with Ranger HDFS plugin is enabled") +# Test 1 for dfs.allow.truncate with no HAWQ and dfs.allow.truncate not set +self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, hosts) +self.assertTrue('dfs.allow.truncate' not in configurations['hdfs-site']['properties']) + +# Test 2 for dfs.allow.truncate with HAWQ and dfs.allow.truncate not set +services["services"].append({"StackServices" : {"service_name" : "HAWQ"}, "components":[]}) +self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, hosts) + self.assertEquals(configurations['hdfs-site']['properties']['dfs.allow.truncate'], 'true') + +# Test 3 for dfs.allow.truncate with no HAWQ and dfs.allow.truncate set to false +services["services"].remove({"StackServices" : {"service_name" : "HAWQ"}, "components":[]}) +configurations['hdfs-site']['properties']['dfs.allow.truncate'] = 'false' +self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, hosts) + self.assertEquals(configurations['hdfs-site']['properties']['dfs.allow.truncate'], 'false') + +# Test 4 for dfs.allow.truncate with HAWQ and dfs.allow.truncate set to false +services["services"].append({"StackServices" : {"service_name" : "HAWQ"}, "components":[]}) +self.stackAdvisor.recommendHDFSConfigurations(configurations, clusterData, services, hosts) + self.assertEquals(configurations['hdfs-site']['properties']['dfs.allow.truncate'], 'true') + def test_recommendYARNConfigurations(self): configurations = {} servicesList = ["YARN"]
ambari git commit: AMBARI-15175: Hide Custom configuration category for files which does not support custom configuration in HAWQ and PXF (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 45a4a0e44 -> 5a04ef2c3 AMBARI-15175: Hide Custom configuration category for files which does not support custom configuration in HAWQ and PXF (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5a04ef2c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5a04ef2c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5a04ef2c Branch: refs/heads/branch-2.2 Commit: 5a04ef2c3633044a96d57ad03ba27eefd5243f53 Parents: 45a4a0e Author: Jun Aoki Authored: Mon Feb 29 13:52:06 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 29 13:52:06 2016 -0800 -- ambari-web/app/models/stack_service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5a04ef2c/ambari-web/app/models/stack_service.js -- diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index d9edf6e..e71b599 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -399,7 +399,7 @@ App.StackService.configCategories = function () { // Add custom section for every configType to all the services configTypes.forEach(function (type) { -var configTypesWithNoCustomSection = ['capacity-scheduler','mapred-queue-acls','flume-conf', 'pig-properties','topology','users-ldif']; +var configTypesWithNoCustomSection = ['capacity-scheduler','mapred-queue-acls','flume-conf', 'pig-properties','topology','users-ldif', 'pxf-profiles', 'pxf-public-classpath']; if (type.endsWith('-env') || type.endsWith('-log4j') || configTypesWithNoCustomSection.contains(type)) { return; }
ambari git commit: AMBARI-15175: Hide Custom configuration category for files which does not support custom configuration in HAWQ and PXF (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 3286b00f3 -> 8d38f1638 AMBARI-15175: Hide Custom configuration category for files which does not support custom configuration in HAWQ and PXF (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8d38f163 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8d38f163 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8d38f163 Branch: refs/heads/trunk Commit: 8d38f163852e07318ef15a46cc1baf4f7cba055d Parents: 3286b00 Author: Jun Aoki Authored: Mon Feb 29 13:51:03 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 29 13:51:03 2016 -0800 -- .../common-services/HAWQ/2.0.0/configuration/hawq-env.xml | 5 ++--- .../HAWQ/2.0.0/configuration/hawq-sysctl-env.xml| 2 +- .../common-services/PXF/3.0.0/configuration/pxf-profiles.xml| 2 +- .../PXF/3.0.0/configuration/pxf-public-classpath.xml| 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8d38f163/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml index a948bae..e40caca 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - + hawq_password @@ -31,5 +31,4 @@ - - \ No newline at end of file + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/8d38f163/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml index 32ae5a5..d33d314 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - + kernel.shmmax 5 http://git-wip-us.apache.org/repos/asf/ambari/blob/8d38f163/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-profiles.xml -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-profiles.xml b/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-profiles.xml index 8319741..c87ce17 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-profiles.xml +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-profiles.xml @@ -20,7 +20,7 @@ */ --> - + content http://git-wip-us.apache.org/repos/asf/ambari/blob/8d38f163/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-public-classpath.xml -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-public-classpath.xml b/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-public-classpath.xml index 7538ee5..7b7e6c4 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-public-classpath.xml +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/configuration/pxf-public-classpath.xml @@ -20,7 +20,7 @@ */ --> - + content
ambari git commit: AMBARI-15172: HAWQ temp directories should not be /tmp (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 15c992c5b -> ba59c242d AMBARI-15172: HAWQ temp directories should not be /tmp (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ba59c242 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ba59c242 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ba59c242 Branch: refs/heads/trunk Commit: ba59c242d65428e1ebcf7758a2dd7de3e90c7f5b Parents: 15c992c Author: Jun Aoki Authored: Mon Feb 29 12:34:59 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 29 12:34:59 2016 -0800 -- .../common-services/HAWQ/2.0.0/configuration/hawq-site.xml | 4 ++-- ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py | 2 +- .../src/test/python/stacks/2.3/HAWQ/test_hawqsegment.py | 2 +- .../src/test/python/stacks/2.3/HAWQ/test_hawqstandby.py | 2 +- .../src/test/python/stacks/2.3/configs/hawq_default.json | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ba59c242/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index f195215..457c1d2 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -100,7 +100,7 @@ hawq_master_temp_directory HAWQ Master Temp Directory -/tmp +/tmp/hawq/master The temporary directory reserved for HAWQ master. @@ -112,7 +112,7 @@ hawq_segment_temp_directory HAWQ Segment Temp Directory -/tmp +/tmp/hawq/segment The temporary directory reserved for HAWQ segment. http://git-wip-us.apache.org/repos/asf/ambari/blob/ba59c242/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py index 355207c..56fc5e4 100644 --- a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py +++ b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py @@ -99,7 +99,7 @@ class TestHawqMaster(RMFTestCase): create_parents = True ) -self.assertResourceCalled('Directory', '/tmp', +self.assertResourceCalled('Directory', '/tmp/hawq/master', group = self.GPADMIN, owner = self.GPADMIN, create_parents = True http://git-wip-us.apache.org/repos/asf/ambari/blob/ba59c242/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqsegment.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqsegment.py b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqsegment.py index 66800ea..b6c682f 100644 --- a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqsegment.py +++ b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqsegment.py @@ -121,7 +121,7 @@ class TestHawqSegment(RMFTestCase): create_parents = True ) -self.assertResourceCalled('Directory', '/tmp', +self.assertResourceCalled('Directory', '/tmp/hawq/segment', owner = self.GPADMIN, group = self.GPADMIN, create_parents = True http://git-wip-us.apache.org/repos/asf/ambari/blob/ba59c242/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqstandby.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqstandby.py b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqstandby.py index 26a211d..7f4d3af 100644 --- a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqstandby.py +++ b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqstandby.py @@ -98,7 +98,7 @@ class TestHawqStandby(RMFTestCase): create_parents = True ) -self.assertResourceCalled('Directory', '/tmp', +self.assertResourceCalled('Directory', '/tmp/hawq/master', group = self.GPADMIN, owner = self.GPADMIN, create_parents = True http://git-wip-us.apache.org/repos/asf/ambari/blob/ba59c242/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json -
ambari git commit: AMBARI-15172: HAWQ temp directories should not be /tmp (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 8f05ad824 -> 45a4a0e44 AMBARI-15172: HAWQ temp directories should not be /tmp (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/45a4a0e4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/45a4a0e4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/45a4a0e4 Branch: refs/heads/branch-2.2 Commit: 45a4a0e44eeb29d7a140b26b37e36156fbda0c30 Parents: 8f05ad8 Author: Jun Aoki Authored: Mon Feb 29 12:33:29 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 29 12:33:29 2016 -0800 -- .../common-services/HAWQ/2.0.0/configuration/hawq-site.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/45a4a0e4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index f195215..457c1d2 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -100,7 +100,7 @@ hawq_master_temp_directory HAWQ Master Temp Directory -/tmp +/tmp/hawq/master The temporary directory reserved for HAWQ master. @@ -112,7 +112,7 @@ hawq_segment_temp_directory HAWQ Segment Temp Directory -/tmp +/tmp/hawq/segment The temporary directory reserved for HAWQ segment.
ambari git commit: AMBARI-15104: Update description for HAWQ Sync standby alert (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 95e273d14 -> 0a76a076d AMBARI-15104: Update description for HAWQ Sync standby alert (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a76a076 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a76a076 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a76a076 Branch: refs/heads/branch-2.2 Commit: 0a76a076d002938862d8c3c142ebe35bfabb2054 Parents: 95e273d Author: Jun Aoki Authored: Fri Feb 26 17:41:37 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 26 17:41:37 2016 -0800 -- .../src/main/resources/common-services/HAWQ/2.0.0/alerts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a76a076/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json index 14ad6d7..4488cb5 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json @@ -31,7 +31,7 @@ { "name": "hawqstandby_sync_status", "label": "HAWQ Standby Sync Status", -"description": "This alert will trigger if HAWQ Standby is not synchronized with HAWQ Master", +"description": "This alert will trigger if HAWQ Standby is not synchronized with HAWQ Master. Use the service action 'Re-Synchronize HAWQ Standby' on HAWQ service page to synchronize HAWQ Standby with HAWQ Master.", "interval": 1, "scope": "ANY", "enabled": true,
ambari git commit: AMBARI-15104: Update description for HAWQ Sync standby alert (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 11137ea88 -> a281dfc09 AMBARI-15104: Update description for HAWQ Sync standby alert (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a281dfc0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a281dfc0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a281dfc0 Branch: refs/heads/trunk Commit: a281dfc097df502ed0b9941ea2e57c30b1d032ba Parents: 11137ea Author: Jun Aoki Authored: Fri Feb 26 17:40:46 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 26 17:40:46 2016 -0800 -- .../src/main/resources/common-services/HAWQ/2.0.0/alerts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a281dfc0/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json index 14ad6d7..4488cb5 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json @@ -31,7 +31,7 @@ { "name": "hawqstandby_sync_status", "label": "HAWQ Standby Sync Status", -"description": "This alert will trigger if HAWQ Standby is not synchronized with HAWQ Master", +"description": "This alert will trigger if HAWQ Standby is not synchronized with HAWQ Master. Use the service action 'Re-Synchronize HAWQ Standby' on HAWQ service page to synchronize HAWQ Standby with HAWQ Master.", "interval": 1, "scope": "ANY", "enabled": true,
[1/2] ambari git commit: AMBARI-13439: Unit tests for the HAWQ service under common-services (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 73ac59fc3 -> 2f8636e5e http://git-wip-us.apache.org/repos/asf/ambari/blob/2f8636e5/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json -- diff --git a/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json b/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json new file mode 100644 index 000..abe3559 --- /dev/null +++ b/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json @@ -0,0 +1,1324 @@ +{ +"roleCommand": "SERVICE_CHECK", +"forceRefreshConfigTagsBeforeExecution": [], +"configuration_attributes": { +"ranger-hdfs-audit": {}, +"webhcat-log4j": {}, +"ranger-yarn-plugin-properties": {}, +"ranger-hdfs-policymgr-ssl": {}, +"pig-env": {}, +"ranger-hbase-audit": {}, +"ssl-client": {}, +"ranger-hive-policymgr-ssl": {}, +"yarn-client": {}, +"ranger-hive-security": {}, +"hbase-policy": {}, +"webhcat-env": {}, +"hcat-env": {}, +"tez-site": {}, +"hdfs-site": { +"final": { +"dfs.datanode.failed.volumes.tolerated": "true", +"dfs.datanode.data.dir": "true", +"dfs.namenode.http-address": "true", +"dfs.namenode.name.dir": "true", +"dfs.webhdfs.enabled": "true" +} +}, +"yarn-log4j": {}, +"hive-env": {}, +"tez-env": {}, +"hbase-site": {}, +"hadoop-policy": {}, +"hdfs-log4j": {}, +"hive-log4j": {}, +"hive-exec-log4j": {}, +"ranger-yarn-audit": {}, +"mapred-env": {}, +"hawq-limits-env": {}, +"ranger-hive-plugin-properties": {}, +"ranger-hdfs-plugin-properties": {}, +"pig-properties": {}, +"ranger-hbase-plugin-properties": {}, +"hawq-env": {}, +"core-site": {}, +"hive-site": {}, +"yarn-env": {}, +"hawq-site": {}, +"ranger-yarn-policymgr-ssl": {}, +"hawq-check-env": {}, +"hadoop-env": {}, +"hdfs-client": {}, +"zookeeper-log4j": {}, +"yarn-site": {}, +"ranger-yarn-security": {}, +"capacity-scheduler": {}, +"hbase-log4j": {}, +"ssl-server": {}, +"webhcat-site": {}, +"hbase-env": {}, +"ranger-hive-audit": {}, +"hawq-sysctl-env": {}, +"pxf-site": {}, +"zoo.cfg": {}, +"ranger-hdfs-security": {}, +"hiveserver2-site": {}, +"ranger-hbase-policymgr-ssl": {}, +"mapred-site": {}, +"cluster-env": {}, +"zookeeper-env": {}, +"pig-log4j": {}, +"ranger-hbase-security": {} +}, +"commandParams": { +"command_timeout": "300", +"script": "scripts/service_check.py", +"script_type": "PYTHON", +"service_package_folder": "common-services/HAWQ/2.0.0/package", +"hooks_folder": "PHD/2.0.6/hooks" +}, +"stageId": 0, +"kerberosCommandParams": [], +"clusterName": "phd", +"hostname": "c6401.ambari.apache.org", +"hostLevelParams": { +"jdk_location": "http://c6401.ambari.apache.org:8080/resources/";, +"ambari_db_rca_password": "mapred", +"java_home": "/usr/jdk64/jdk1.8.0_60", +"ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", +"jce_name": "jce_policy-8.zip", +"java_version": "8", +"oracle_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//ojdbc6.jar";, +"stack_name": "PHD", +"stack_version": "3.3", +"host_sys_prepped": "false", +"db_name": "ambari", +"jdk_name": "jdk-8u60-linux-x64.tar.gz", +"ambari_db_rca_driver": "org.postgresql.Driver", +"current_version": "3.3.2.0-2950", +"ambari_db_rca_username": "mapred", +"db_driver_filename": "mysql-connector-java.jar", +"agentCacheDir": "/var/lib/ambari-agent/cache", +"mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar"; +}, +"commandType": "EXECUTION_COMMAND", +"roleParams": {}, +"serviceName": "HAWQ", +"role": "HAWQ_SERVICE_CHECK", +"requestId": 159, +"taskId": 3353, +"public_hostname": "c6401.ambari.apache.org", +"configurations": { +"ranger-hdfs-audit": { +"xasecure.audit.destination.db": "false", +"xasecure.audit.destination.solr.zookeepers": "NONE", +"xasecure.audit.destination.db.user": "{{xa_audit_db_user}}", +"xasecure.audit.destination.solr.urls": "", +"xasecure.audit.destination.db.jdbc.driver": "{{jdbc_driver}}", +"xasecure.audit.destinati
[2/2] ambari git commit: AMBARI-13439: Unit tests for the HAWQ service under common-services (nalex via jaoki)
AMBARI-13439: Unit tests for the HAWQ service under common-services (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2f8636e5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2f8636e5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2f8636e5 Branch: refs/heads/trunk Commit: 2f8636e5eafa4d9d26097a6e0d8f8dcde59d2e75 Parents: 73ac59f Author: Jun Aoki Authored: Fri Feb 26 12:24:11 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 26 12:24:11 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/__init__.py | 19 + .../HAWQ/2.0.0/package/scripts/params.py|4 +- .../python/stacks/2.3/HAWQ/test_hawqmaster.py | 292 .../python/stacks/2.3/HAWQ/test_hawqsegment.py | 160 +++ .../python/stacks/2.3/HAWQ/test_hawqstandby.py | 200 +++ .../python/stacks/2.3/configs/hawq_default.json | 1324 ++ 6 files changed, 1997 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2f8636e5/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/__init__.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/__init__.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/__init__.py new file mode 100644 index 000..5561e10 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/__init__.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +""" +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +""" http://git-wip-us.apache.org/repos/asf/ambari/blob/2f8636e5/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py index 7633731..50a8fda 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py @@ -51,9 +51,9 @@ hawq_password = unicode(config['configurations']['hawq-env']['hawq_password']) # HAWQ Hostnames hawqmaster_host = __get_component_host('hawqmaster_hosts') hawqstandby_host = __get_component_host('hawqstandby_hosts') -hawqsegment_hosts = default('/clusterHostInfo/hawqsegment_hosts', []) +hawqsegment_hosts = sorted(default('/clusterHostInfo/hawqsegment_hosts', [])) hawq_master_hosts = [host for host in hawqmaster_host, hawqstandby_host if host] -hawq_all_hosts = set(hawq_master_hosts + hawqsegment_hosts) +hawq_all_hosts = sorted(set(hawq_master_hosts + hawqsegment_hosts)) # HDFS http://git-wip-us.apache.org/repos/asf/ambari/blob/2f8636e5/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py new file mode 100644 index 000..355207c --- /dev/null +++ b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py @@ -0,0 +1,292 @@ +#!/usr/bin/env python + +''' +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is dist
ambari git commit: AMBARI-15105: Add alerts for HAWQ components status (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 15933088c -> 27e510b82 AMBARI-15105: Add alerts for HAWQ components status (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/27e510b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/27e510b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/27e510b8 Branch: refs/heads/branch-2.2 Commit: 27e510b82aefd61b31d3da4f420b455689516603 Parents: 1593308 Author: Jun Aoki Authored: Thu Feb 25 15:46:52 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 25 15:46:52 2016 -0800 -- .../common-services/HAWQ/2.0.0/alerts.json | 93 +++- .../package/alerts/alert_component_status.py| 76 ++ .../2.3/HAWQ/test_alert_component_status.py | 141 +++ ambari-web/app/views/main/dashboard/widgets.js | 2 +- 4 files changed, 310 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/27e510b8/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json index 3119a0c..14ad6d7 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json @@ -1,5 +1,32 @@ { "HAWQ": { +"service": [ + { +"name": "hawq_segment_process_percent", +"label": "Percent HAWQ Segments Available", +"description": "This alert is triggered if the number of down HAWQ Segments in the cluster is greater than the configured critical threshold.", +"interval": 1, +"scope": "SERVICE", +"enabled": true, +"source": { + "type": "AGGREGATE", + "alert_name": "hawq_segment_process", + "reporting": { +"ok": { + "text": "affected: [{1}], total: [{0}]" +}, +"warning": { + "text": "affected: [{1}], total: [{0}]", + "value": 0.1 +}, +"critical": { + "text": "affected: [{1}], total: [{0}]", + "value": 0.3 +} + } +} + } +], "HAWQMASTER": [ { "name": "hawqstandby_sync_status", @@ -13,7 +40,71 @@ "path": "HAWQ/2.0.0/package/alerts/alert_sync_status.py", "parameters": [] } + }, + { +"name": "hawq_master_process", +"label": "HAWQ Master Process", +"description": "This alert is triggered if the HAWQ Master process cannot be confirmed to be up and listening on the network.", +"interval": 1, +"scope": "ANY", +"source": { + "type": "SCRIPT", + "path": "HAWQ/2.0.0/package/alerts/alert_component_status.py", + "parameters": [ +{ + "name": "component_name", + "display_name": "Component Name", + "value": "master", + "type": "STRING", + "description": "This text string indicates if it is a Master, Standby or Segment" +} + ] +} + } +], +"HAWQSEGMENT": [ + { +"name": "hawq_segment_process", +"label": "HAWQ Segment Process", +"description": "This host-level alert is triggered if the HAWQ Segment process cannot be confirmed to be up and listening on the network.", +"interval": 1, +"scope": "HOST", +"source": { + "type": "SCRIPT", + "path": "HAWQ/2.0.0/package/alerts/alert_component_status.py", + "parameters": [ +{ + "name": "component_name", + "display_name": "Component Name", + "value": "segment", + "type": &quo
ambari git commit: AMBARI-15105: Add alerts for HAWQ components status (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 8fb17ab09 -> 29115e81e AMBARI-15105: Add alerts for HAWQ components status (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/29115e81 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/29115e81 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/29115e81 Branch: refs/heads/trunk Commit: 29115e81ee2ba6643c7725903300f070c4ba2ea5 Parents: 8fb17ab Author: Jun Aoki Authored: Thu Feb 25 15:45:58 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 25 15:45:58 2016 -0800 -- .../common-services/HAWQ/2.0.0/alerts.json | 93 +++- .../package/alerts/alert_component_status.py| 76 ++ .../2.3/HAWQ/test_alert_component_status.py | 141 +++ ambari-web/app/views/main/dashboard/widgets.js | 2 +- 4 files changed, 310 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/29115e81/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json index 3119a0c..14ad6d7 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json @@ -1,5 +1,32 @@ { "HAWQ": { +"service": [ + { +"name": "hawq_segment_process_percent", +"label": "Percent HAWQ Segments Available", +"description": "This alert is triggered if the number of down HAWQ Segments in the cluster is greater than the configured critical threshold.", +"interval": 1, +"scope": "SERVICE", +"enabled": true, +"source": { + "type": "AGGREGATE", + "alert_name": "hawq_segment_process", + "reporting": { +"ok": { + "text": "affected: [{1}], total: [{0}]" +}, +"warning": { + "text": "affected: [{1}], total: [{0}]", + "value": 0.1 +}, +"critical": { + "text": "affected: [{1}], total: [{0}]", + "value": 0.3 +} + } +} + } +], "HAWQMASTER": [ { "name": "hawqstandby_sync_status", @@ -13,7 +40,71 @@ "path": "HAWQ/2.0.0/package/alerts/alert_sync_status.py", "parameters": [] } + }, + { +"name": "hawq_master_process", +"label": "HAWQ Master Process", +"description": "This alert is triggered if the HAWQ Master process cannot be confirmed to be up and listening on the network.", +"interval": 1, +"scope": "ANY", +"source": { + "type": "SCRIPT", + "path": "HAWQ/2.0.0/package/alerts/alert_component_status.py", + "parameters": [ +{ + "name": "component_name", + "display_name": "Component Name", + "value": "master", + "type": "STRING", + "description": "This text string indicates if it is a Master, Standby or Segment" +} + ] +} + } +], +"HAWQSEGMENT": [ + { +"name": "hawq_segment_process", +"label": "HAWQ Segment Process", +"description": "This host-level alert is triggered if the HAWQ Segment process cannot be confirmed to be up and listening on the network.", +"interval": 1, +"scope": "HOST", +"source": { + "type": "SCRIPT", + "path": "HAWQ/2.0.0/package/alerts/alert_component_status.py", + "parameters": [ +{ + "name": "component_name", + "display_name": "Component Name", + "value": "segment", + "type": "STRING&q
ambari git commit: AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 a57c458c3 -> b0a714937 AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b0a71493 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b0a71493 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b0a71493 Branch: refs/heads/branch-2.2 Commit: b0a7149373d48e2c7b4cce06b0b26a6d1c87b0ec Parents: a57c458 Author: Jun Aoki Authored: Thu Feb 25 14:11:54 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 25 14:11:54 2016 -0800 -- ambari-web/app/mixins/wizard/assign_master_components.js | 10 +++--- .../test/mixins/wizard/assign_master_components_test.js | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b0a71493/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 62efdac..efcb02e 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -761,19 +761,15 @@ App.AssignMasterComponents = Em.Mixin.create({ var hostsForHostGroup = {}; recommendations.blueprint_cluster_binding.host_groups.forEach(function(hostGroup) { - hostsForHostGroup[hostGroup.name] = hostGroup.hosts.map(function(host) { -return host.fqdn; - }); + hostsForHostGroup[hostGroup.name] = hostGroup.hosts.mapProperty('fqdn'); }); recommendations.blueprint.host_groups.forEach(function (hostGroup) { - var components = hostGroup.components.map(function (component) { -return component.name; - }); + var components = hostGroup.components.mapProperty('name'); components.forEach(function (componentName) { var hostList = recommendedHostsForComponent[componentName] || []; var hostNames = hostsForHostGroup[hostGroup.name] || []; -Array.prototype.push.apply(hostList, hostNames); +hostList.pushObjects(hostNames); recommendedHostsForComponent[componentName] = hostList; }); }); http://git-wip-us.apache.org/repos/asf/ambari/blob/b0a71493/ambari-web/test/mixins/wizard/assign_master_components_test.js -- diff --git a/ambari-web/test/mixins/wizard/assign_master_components_test.js b/ambari-web/test/mixins/wizard/assign_master_components_test.js index a3ffb22..d8ccd66 100644 --- a/ambari-web/test/mixins/wizard/assign_master_components_test.js +++ b/ambari-web/test/mixins/wizard/assign_master_components_test.js @@ -93,7 +93,7 @@ describe('App.AssignMasterComponents', function () { "c2": ["h1", "h2", "h4"] }; - expect(c.get('content.recommendedHostsForComponents')).to.deep.equal(expected); + expect(JSON.stringify(c.get('content.recommendedHostsForComponents'))).to.equal(JSON.stringify(expected)); }); });
ambari git commit: AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 1df953d68 -> f495bbc02 AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f495bbc0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f495bbc0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f495bbc0 Branch: refs/heads/trunk Commit: f495bbc02e462981720956b5e61ec102f746728f Parents: 1df953d Author: Jun Aoki Authored: Thu Feb 25 14:11:19 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 25 14:11:19 2016 -0800 -- ambari-web/app/mixins/wizard/assign_master_components.js | 10 +++--- .../test/mixins/wizard/assign_master_components_test.js | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f495bbc0/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 645c996..c1c4d0e 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -754,19 +754,15 @@ App.AssignMasterComponents = Em.Mixin.create({ var hostsForHostGroup = {}; recommendations.blueprint_cluster_binding.host_groups.forEach(function(hostGroup) { - hostsForHostGroup[hostGroup.name] = hostGroup.hosts.map(function(host) { -return host.fqdn; - }); + hostsForHostGroup[hostGroup.name] = hostGroup.hosts.mapProperty('fqdn'); }); recommendations.blueprint.host_groups.forEach(function (hostGroup) { - var components = hostGroup.components.map(function (component) { -return component.name; - }); + var components = hostGroup.components.mapProperty('name'); components.forEach(function (componentName) { var hostList = recommendedHostsForComponent[componentName] || []; var hostNames = hostsForHostGroup[hostGroup.name] || []; -Array.prototype.push.apply(hostList, hostNames); +hostList.pushObjects(hostNames); recommendedHostsForComponent[componentName] = hostList; }); }); http://git-wip-us.apache.org/repos/asf/ambari/blob/f495bbc0/ambari-web/test/mixins/wizard/assign_master_components_test.js -- diff --git a/ambari-web/test/mixins/wizard/assign_master_components_test.js b/ambari-web/test/mixins/wizard/assign_master_components_test.js index a3ffb22..d8ccd66 100644 --- a/ambari-web/test/mixins/wizard/assign_master_components_test.js +++ b/ambari-web/test/mixins/wizard/assign_master_components_test.js @@ -93,7 +93,7 @@ describe('App.AssignMasterComponents', function () { "c2": ["h1", "h2", "h4"] }; - expect(c.get('content.recommendedHostsForComponents')).to.deep.equal(expected); + expect(JSON.stringify(c.get('content.recommendedHostsForComponents'))).to.equal(JSON.stringify(expected)); }); });
ambari git commit: AMBARI-14821: Unit tests doesn't export scripts from common-services folder into PYTHONPATH (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 083ac6dab -> d03205675 AMBARI-14821: Unit tests doesn't export scripts from common-services folder into PYTHONPATH (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d0320567 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d0320567 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d0320567 Branch: refs/heads/trunk Commit: d032056754246880a48939255784767bc31302e4 Parents: 083ac6d Author: Jun Aoki Authored: Tue Feb 23 16:03:37 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 23 16:03:37 2016 -0800 -- ambari-server/src/test/python/unitTests.py | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d0320567/ambari-server/src/test/python/unitTests.py -- diff --git a/ambari-server/src/test/python/unitTests.py b/ambari-server/src/test/python/unitTests.py index 6368ca1..b010804 100644 --- a/ambari-server/src/test/python/unitTests.py +++ b/ambari-server/src/test/python/unitTests.py @@ -108,6 +108,14 @@ def stack_test_executor(base_folder, service, stack, custom_tests, executor_resu if os.path.split(root)[-1] in ["scripts", "files"] and service in root: script_folders.add(root) + # Add the common-services scripts directories to the PATH + base_commserv_folder = os.path.join(server_src_dir, "main", "resources", "common-services") + for folder, subFolders, files in os.walk(os.path.join(base_commserv_folder, service)): +# folder will return the versions of the services +scripts_dir = os.path.join(folder, "package", "scripts") +if os.path.exists(scripts_dir): + script_folders.add(scripts_dir) + sys.path.extend(script_folders) tests = get_test_files(base_folder, mask = test_mask)
ambari git commit: AMBARI-15124: Can't install ambari-server in Docker environment (masatana via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 7091250a9 -> 0682fb603 AMBARI-15124: Can't install ambari-server in Docker environment (masatana via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0682fb60 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0682fb60 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0682fb60 Branch: refs/heads/trunk Commit: 0682fb603f96bf9ded5333b19751011399c33099 Parents: 7091250 Author: Jun Aoki Authored: Mon Feb 22 16:06:24 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 22 16:06:24 2016 -0800 -- dev-support/docker/docker/bin/ambaribuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0682fb60/dev-support/docker/docker/bin/ambaribuild.py -- diff --git a/dev-support/docker/docker/bin/ambaribuild.py b/dev-support/docker/docker/bin/ambaribuild.py index 50db0e2..dfb7d60 100755 --- a/dev-support/docker/docker/bin/ambaribuild.py +++ b/dev-support/docker/docker/bin/ambaribuild.py @@ -47,9 +47,9 @@ def buildAmbari(stack_distribution): return proc.wait() def install_ambari_server(): - proc = subprocess.Popen("sudo yum install -y ambari-server-*.noarch.rpm", + proc = subprocess.Popen("sudo yum install -y ambari-server-*.x86_64.rpm", shell=True, - cwd="/tmp/ambari/ambari-server/target/rpm/ambari-server/RPMS/noarch") + cwd="/tmp/ambari/ambari-server/target/rpm/ambari-server/RPMS/x86_64") return proc.wait() def install_ambari_agent():
ambari git commit: AMBARI-15103: Move HAWQ system password to General Accordion tab (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 49813c987 -> d741e438d AMBARI-15103: Move HAWQ system password to General Accordion tab (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d741e438 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d741e438 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d741e438 Branch: refs/heads/trunk Commit: d741e438db58bcea2d59f902ccf9d7ad40097b7f Parents: 49813c9 Author: Jun Aoki Authored: Mon Feb 22 14:51:07 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 22 14:51:07 2016 -0800 -- .../common-services/HAWQ/2.0.0/configuration/hawq-env.xml | 2 +- ambari-web/app/data/HDP2.3/site_properties.js | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d741e438/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml index 22777f1..a948bae 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml @@ -19,7 +19,7 @@ hawq_password -HAWQ system user password +HAWQ System User Password The password of HAWQ system user. During cluster initialization and when provisioning new hosts, ssh keys are exchanged using this password. http://git-wip-us.apache.org/repos/asf/ambari/blob/d741e438/ambari-web/app/data/HDP2.3/site_properties.js -- diff --git a/ambari-web/app/data/HDP2.3/site_properties.js b/ambari-web/app/data/HDP2.3/site_properties.js index c5fb525..e706d40 100644 --- a/ambari-web/app/data/HDP2.3/site_properties.js +++ b/ambari-web/app/data/HDP2.3/site_properties.js @@ -340,6 +340,13 @@ hdp23properties.push({ "index": 9 }, { +"name": "hawq_password", +"filename": "hawq-env.xml", +"category": "General", +"serviceName": "HAWQ", +"index": 10 + }, + { "name": "content", "serviceName": "HAWQ", "filename": "hawq-check-env.xml",
ambari git commit: AMBARI-15103: Move HAWQ system password to General Accordion tab (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 8430fbd39 -> 217d5fea5 AMBARI-15103: Move HAWQ system password to General Accordion tab (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/217d5fea Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/217d5fea Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/217d5fea Branch: refs/heads/branch-2.2 Commit: 217d5fea57b0bd900b07116e95a7e488d688ea76 Parents: 8430fbd Author: Jun Aoki Authored: Mon Feb 22 14:49:56 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 22 14:49:56 2016 -0800 -- .../common-services/HAWQ/2.0.0/configuration/hawq-env.xml | 2 +- ambari-web/app/data/HDP2.3/site_properties.js | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/217d5fea/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml index e3a97fd..324a3d8 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-env.xml @@ -19,7 +19,7 @@ hawq_password -HAWQ system user password +HAWQ System User Password The password of HAWQ system user. During cluster initialization and when provisioning new hosts, ssh keys are exchanged using this password. http://git-wip-us.apache.org/repos/asf/ambari/blob/217d5fea/ambari-web/app/data/HDP2.3/site_properties.js -- diff --git a/ambari-web/app/data/HDP2.3/site_properties.js b/ambari-web/app/data/HDP2.3/site_properties.js index c5fb525..e706d40 100644 --- a/ambari-web/app/data/HDP2.3/site_properties.js +++ b/ambari-web/app/data/HDP2.3/site_properties.js @@ -340,6 +340,13 @@ hdp23properties.push({ "index": 9 }, { +"name": "hawq_password", +"filename": "hawq-env.xml", +"category": "General", +"serviceName": "HAWQ", +"index": 10 + }, + { "name": "content", "serviceName": "HAWQ", "filename": "hawq-check-env.xml",
ambari git commit: AMBARI-15061: PXF Service checks fails with timeout (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk ecd6a3057 -> 49813c987 AMBARI-15061: PXF Service checks fails with timeout (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/49813c98 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/49813c98 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/49813c98 Branch: refs/heads/trunk Commit: 49813c987a491d1527f6499927d22746a11f3631 Parents: ecd6a30 Author: Jun Aoki Authored: Mon Feb 22 14:44:07 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 22 14:44:07 2016 -0800 -- .../PXF/3.0.0/package/scripts/params.py | 1 + .../PXF/3.0.0/package/scripts/pxf_constants.py | 3 + .../PXF/3.0.0/package/scripts/service_check.py | 167 ++- 3 files changed, 96 insertions(+), 75 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/49813c98/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py index b3e85e4..1dbed45 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py @@ -42,6 +42,7 @@ tomcat_group = "tomcat" # Directories pxf_conf_dir = "/etc/pxf/conf" pxf_instance_dir = "/var/pxf" +exec_tmp_dir = Script.get_tmp_dir() # Java home path java_home = config["hostLevelParams"]["java_home"] if "java_home" in config["hostLevelParams"] else None http://git-wip-us.apache.org/repos/asf/ambari/blob/49813c98/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py index 9d93a38..1d88893 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py @@ -24,4 +24,7 @@ pxf_hdfs_test_dir = "/pxf_hdfs_smoke_test" pxf_hdfs_read_test_file = pxf_hdfs_test_dir + "/pxf_smoke_test_read_data" pxf_hdfs_write_test_file = pxf_hdfs_test_dir + "/pxf_smoke_test_write_data" pxf_hbase_test_table = "pxf_hbase_smoke_test_table" +hbase_populate_data_script = "hbase-populate-data.sh" +hbase_cleanup_data_script = "hbase-cleanup-data.sh" pxf_hive_test_table = "pxf_hive_smoke_test_table" +hive_populate_data_script = "hive-populate-data.hql" http://git-wip-us.apache.org/repos/asf/ambari/blob/49813c98/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py index 21b7c5d..6f60661 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py @@ -16,18 +16,20 @@ See the License for the specific language governing permissions and limitations under the License. """ import json +import os from resource_management.libraries.script import Script from resource_management.core.exceptions import Fail from resource_management.core.logger import Logger from resource_management.core.system import System -from resource_management.core.resources.system import Execute +from resource_management.core.resources.system import Execute, File from resource_management.core.environment import Environment from resource_management.libraries.functions.curl_krb_request import curl_krb_request +from resource_management.core.source import InlineTemplate +from resource_management.libraries.functions.default import default from pxf_utils import makeHTTPCall, runLocalCmd import pxf_constants - class PXFServiceCheck(Script): """ Runs a set of simple PXF tests to verify if the service has been setup correctly @@ -46,13 +48,12 @@ class PXFServiceCheck(Script): "X-GP-URL-HOST": pxf_constants.service_check_hostname
ambari git commit: AMBARI-15061: PXF Service checks fails with timeout (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 990f19b8a -> 8430fbd39 AMBARI-15061: PXF Service checks fails with timeout (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8430fbd3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8430fbd3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8430fbd3 Branch: refs/heads/branch-2.2 Commit: 8430fbd3929383a6d40dc17b7a58e63a4f780e3c Parents: 990f19b Author: Jun Aoki Authored: Mon Feb 22 14:43:33 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 22 14:43:33 2016 -0800 -- .../PXF/3.0.0/package/scripts/params.py | 1 + .../PXF/3.0.0/package/scripts/pxf_constants.py | 3 + .../PXF/3.0.0/package/scripts/service_check.py | 167 ++- 3 files changed, 96 insertions(+), 75 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8430fbd3/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py index b3e85e4..1dbed45 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py @@ -42,6 +42,7 @@ tomcat_group = "tomcat" # Directories pxf_conf_dir = "/etc/pxf/conf" pxf_instance_dir = "/var/pxf" +exec_tmp_dir = Script.get_tmp_dir() # Java home path java_home = config["hostLevelParams"]["java_home"] if "java_home" in config["hostLevelParams"] else None http://git-wip-us.apache.org/repos/asf/ambari/blob/8430fbd3/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py index 9d93a38..1d88893 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py @@ -24,4 +24,7 @@ pxf_hdfs_test_dir = "/pxf_hdfs_smoke_test" pxf_hdfs_read_test_file = pxf_hdfs_test_dir + "/pxf_smoke_test_read_data" pxf_hdfs_write_test_file = pxf_hdfs_test_dir + "/pxf_smoke_test_write_data" pxf_hbase_test_table = "pxf_hbase_smoke_test_table" +hbase_populate_data_script = "hbase-populate-data.sh" +hbase_cleanup_data_script = "hbase-cleanup-data.sh" pxf_hive_test_table = "pxf_hive_smoke_test_table" +hive_populate_data_script = "hive-populate-data.hql" http://git-wip-us.apache.org/repos/asf/ambari/blob/8430fbd3/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py index 21b7c5d..6f60661 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py @@ -16,18 +16,20 @@ See the License for the specific language governing permissions and limitations under the License. """ import json +import os from resource_management.libraries.script import Script from resource_management.core.exceptions import Fail from resource_management.core.logger import Logger from resource_management.core.system import System -from resource_management.core.resources.system import Execute +from resource_management.core.resources.system import Execute, File from resource_management.core.environment import Environment from resource_management.libraries.functions.curl_krb_request import curl_krb_request +from resource_management.core.source import InlineTemplate +from resource_management.libraries.functions.default import default from pxf_utils import makeHTTPCall, runLocalCmd import pxf_constants - class PXFServiceCheck(Script): """ Runs a set of simple PXF tests to verify if the service has been setup correctly @@ -46,13 +48,12 @@ class PXFServiceCheck(Script): "X-GP-URL-HOST": pxf_constants.service_che
ambari git commit: AMBARI-15076: HAWQ standby host name not getting populated in warning msg (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 20056273e -> 1ba6722d1 AMBARI-15076: HAWQ standby host name not getting populated in warning msg (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1ba6722d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1ba6722d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1ba6722d Branch: refs/heads/trunk Commit: 1ba6722d14f54910d73f4b4d8decbb9a3cb1c5d6 Parents: 2005627 Author: Jun Aoki Authored: Fri Feb 19 14:16:20 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 19 14:16:20 2016 -0800 -- .../admin/highAvailability/hawq/addStandby/step3_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1ba6722d/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js index 513a519..fd28ad5 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js @@ -141,7 +141,7 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ submit: function () { if (!this.get('isSubmitDisabled')) { dataDir = this.get('hawqProps').items[0].properties['hawq_master_directory']; - hawqStandby = this.get('hawqProps').items[0].properties['hawq_standby_address_host'] + hawqStandby = this.get('content.hawqHosts.newHawqStandby'); App.showConfirmationPopup( function() { App.get('router.mainAdminKerberosController').getKDCSessionState(function() {
ambari git commit: AMBARI-15076: HAWQ standby host name not getting populated in warning msg (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 f848cb3c6 -> 49b6ae660 AMBARI-15076: HAWQ standby host name not getting populated in warning msg (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/49b6ae66 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/49b6ae66 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/49b6ae66 Branch: refs/heads/branch-2.2 Commit: 49b6ae660b80bab5a296361409b0cb869bc77cfb Parents: f848cb3 Author: Jun Aoki Authored: Fri Feb 19 14:15:42 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 19 14:15:42 2016 -0800 -- .../admin/highAvailability/hawq/addStandby/step3_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/49b6ae66/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js index 070acc0..1801fca 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js @@ -138,7 +138,7 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ submit: function () { if (!this.get('isSubmitDisabled')) { dataDir = this.get('hawqProps').items[0].properties['hawq_master_directory']; - hawqStandby = this.get('hawqProps').items[0].properties['hawq_standby_address_host'] + hawqStandby = this.get('content.hawqHosts.newHawqStandby'); App.showConfirmationPopup( function() { App.get('router.mainAdminKerberosController').getKDCSessionState(function() {
ambari git commit: AMBARI-15083: Add Stack Advisor validations for hawq_global_rm_type property in HAWQ (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 95d9ec61c -> f848cb3c6 AMBARI-15083: Add Stack Advisor validations for hawq_global_rm_type property in HAWQ (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f848cb3c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f848cb3c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f848cb3c Branch: refs/heads/branch-2.2 Commit: f848cb3c680eba8134d707f4c43eb5cd1a6c6a6a Parents: 95d9ec6 Author: Jun Aoki Authored: Fri Feb 19 13:39:25 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 19 13:39:25 2016 -0800 -- .../stacks/HDP/2.3/services/stack_advisor.py| 32 ++--- .../stacks/2.3/common/test_stack_advisor.py | 47 2 files changed, 63 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f848cb3c/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index 71b0e2a..d5cfac6 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -931,31 +931,31 @@ class HDP23StackAdvisor(HDP22StackAdvisor): "HAWQ Master or Standby Master cannot use the port 5432 when installed on the same host as the Ambari Server. Ambari Postgres DB uses the same port. Please choose a different value (e.g. 10432)")}) # 2. Check if any data directories are pointing to root dir '/' -prop_name = 'hawq_master_directory' -display_name = 'HAWQ Master directory' -self.validateIfRootDir (properties, validationItems, prop_name, display_name) - -prop_name = 'hawq_master_temp_directory' -display_name = 'HAWQ Master temp directory' -self.validateIfRootDir (properties, validationItems, prop_name, display_name) - -prop_name = 'hawq_segment_directory' -display_name = 'HAWQ Segment directory' -self.validateIfRootDir (properties, validationItems, prop_name, display_name) - -prop_name = 'hawq_segment_temp_directory' -display_name = 'HAWQ Segment temp directory' -self.validateIfRootDir (properties, validationItems, prop_name, display_name) +directories = { +'hawq_master_directory': 'HAWQ Master directory', +'hawq_master_temp_directory': 'HAWQ Master temp directory', +'hawq_segment_directory': 'HAWQ Segment directory', +'hawq_segment_temp_directory': 'HAWQ Segment temp directory' + } +for property_name, display_name in directories.iteritems(): + self.validateIfRootDir(properties, validationItems, property_name, display_name) # 3. Check YARN RM address properties +YARN = "YARN" servicesList = [service["StackServices"]["service_name"] for service in services["services"]] -if "YARN" in servicesList and "yarn-site" in configurations: +if YARN in servicesList and "yarn-site" in configurations: yarn_site = getSiteProperties(configurations, "yarn-site") for hs_prop, ys_prop in self.getHAWQYARNPropertyMapping().items(): if hs_prop in hawq_site and ys_prop in yarn_site and hawq_site[hs_prop] != yarn_site[ys_prop]: message = "Expected value: {0} (this property should have the same value as the property {1} in yarn-site)".format(yarn_site[ys_prop], ys_prop) validationItems.append({"config-name": hs_prop, "item": self.getWarnItem(message)}) +# 4. Check HAWQ Resource Manager type +HAWQ_GLOBAL_RM_TYPE = "hawq_global_rm_type" +if YARN not in servicesList and HAWQ_GLOBAL_RM_TYPE in hawq_site and hawq_site[HAWQ_GLOBAL_RM_TYPE].upper() == YARN: + message = "{0} must be set to none if YARN service is not installed".format(HAWQ_GLOBAL_RM_TYPE) + validationItems.append({"config-name": HAWQ_GLOBAL_RM_TYPE, "item": self.getErrorItem(message)}) + return self.toConfigurationValidationProblems(validationItems, "hawq-site") http://git-wip-us.apache.org/repos/asf/ambari/blob/f848cb3c/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
ambari git commit: AMBARI-15083: Add Stack Advisor validations for hawq_global_rm_type property in HAWQ (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk dccacb952 -> 32173ff17 AMBARI-15083: Add Stack Advisor validations for hawq_global_rm_type property in HAWQ (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/32173ff1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32173ff1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32173ff1 Branch: refs/heads/trunk Commit: 32173ff17642b8cdca6f0fdd5318683b633bb681 Parents: dccacb9 Author: Jun Aoki Authored: Fri Feb 19 13:37:08 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 19 13:37:08 2016 -0800 -- .../stacks/HDP/2.3/services/stack_advisor.py| 32 +++--- .../stacks/2.3/common/test_stack_advisor.py | 46 2 files changed, 62 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/32173ff1/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index b354378..34e4cfa 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -943,31 +943,31 @@ class HDP23StackAdvisor(HDP22StackAdvisor): "HAWQ Master or Standby Master cannot use the port 5432 when installed on the same host as the Ambari Server. Ambari Postgres DB uses the same port. Please choose a different value (e.g. 10432)")}) # 2. Check if any data directories are pointing to root dir '/' -prop_name = 'hawq_master_directory' -display_name = 'HAWQ Master directory' -self.validateIfRootDir (properties, validationItems, prop_name, display_name) - -prop_name = 'hawq_master_temp_directory' -display_name = 'HAWQ Master temp directory' -self.validateIfRootDir (properties, validationItems, prop_name, display_name) - -prop_name = 'hawq_segment_directory' -display_name = 'HAWQ Segment directory' -self.validateIfRootDir (properties, validationItems, prop_name, display_name) - -prop_name = 'hawq_segment_temp_directory' -display_name = 'HAWQ Segment temp directory' -self.validateIfRootDir (properties, validationItems, prop_name, display_name) +directories = { +'hawq_master_directory': 'HAWQ Master directory', +'hawq_master_temp_directory': 'HAWQ Master temp directory', +'hawq_segment_directory': 'HAWQ Segment directory', +'hawq_segment_temp_directory': 'HAWQ Segment temp directory' + } +for property_name, display_name in directories.iteritems(): + self.validateIfRootDir(properties, validationItems, property_name, display_name) # 3. Check YARN RM address properties +YARN = "YARN" servicesList = [service["StackServices"]["service_name"] for service in services["services"]] -if "YARN" in servicesList and "yarn-site" in configurations: +if YARN in servicesList and "yarn-site" in configurations: yarn_site = getSiteProperties(configurations, "yarn-site") for hs_prop, ys_prop in self.getHAWQYARNPropertyMapping().items(): if hs_prop in hawq_site and ys_prop in yarn_site and hawq_site[hs_prop] != yarn_site[ys_prop]: message = "Expected value: {0} (this property should have the same value as the property {1} in yarn-site)".format(yarn_site[ys_prop], ys_prop) validationItems.append({"config-name": hs_prop, "item": self.getWarnItem(message)}) +# 4. Check HAWQ Resource Manager type +HAWQ_GLOBAL_RM_TYPE = "hawq_global_rm_type" +if YARN not in servicesList and HAWQ_GLOBAL_RM_TYPE in hawq_site and hawq_site[HAWQ_GLOBAL_RM_TYPE].upper() == YARN: + message = "{0} must be set to none if YARN service is not installed".format(HAWQ_GLOBAL_RM_TYPE) + validationItems.append({"config-name": HAWQ_GLOBAL_RM_TYPE, "item": self.getErrorItem(message)}) + return self.toConfigurationValidationProblems(validationItems, "hawq-site") http://git-wip-us.apache.org/repos/asf/ambari/blob/32173ff1/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
ambari git commit: AMBARI-15060: Ambari should show no. of HAWQ segments live on main dashboard (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 997749f73 -> 82d944017 AMBARI-15060: Ambari should show no. of HAWQ segments live on main dashboard (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82d94401 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82d94401 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82d94401 Branch: refs/heads/trunk Commit: 82d944017eb90c380e374e6f7aeddab6004c6a84 Parents: 997749f Author: Jun Aoki Authored: Fri Feb 19 12:05:40 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 19 12:05:40 2016 -0800 -- ambari-web/app/assets/test/tests.js | 1 + .../app/mappers/components_state_mapper.js | 5 + ambari-web/app/messages.js | 5 + ambari-web/app/views.js | 1 + ambari-web/app/views/main/dashboard/widgets.js | 19 +- .../main/dashboard/widgets/hawqsegment_live.js | 190 +++ .../dashboard/widgets/hawqsegment_live_test.js | 69 +++ 7 files changed, 286 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/82d94401/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index 06c4c31..4edcc5e 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -239,6 +239,7 @@ var files = [ 'test/views/main/dashboard/widgets/uptime_text_widget_test', 'test/views/main/dashboard/widgets/node_managers_live_test', 'test/views/main/dashboard/widgets/datanode_live_test', + 'test/views/main/dashboard/widgets/hawqsegment_live_test', 'test/views/main/dashboard/widgets/hbase_average_load_test', 'test/views/main/dashboard/widgets/hbase_regions_in_transition_test', 'test/views/main/dashboard/widgets/namenode_rpc_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/82d94401/ambari-web/app/mappers/components_state_mapper.js -- diff --git a/ambari-web/app/mappers/components_state_mapper.js b/ambari-web/app/mappers/components_state_mapper.js index 0f2b627..ac3e1b5 100644 --- a/ambari-web/app/mappers/components_state_mapper.js +++ b/ambari-web/app/mappers/components_state_mapper.js @@ -59,6 +59,11 @@ App.componentsStateMapper = App.QuickDataMapper.create({ node_managers_installed: 'INSTALLED_PATH', node_managers_total: 'TOTAL_PATH' }, +'HAWQSEGMENT': { + hawq_segments_started: 'STARTED_PATH', + hawq_segments_installed: 'INSTALLED_PATH', + hawq_segments_total: 'TOTAL_PATH' +}, 'HBASE_REGIONSERVER': { region_servers_started: 'STARTED_PATH', region_servers_installed: 'INSTALLED_PATH', http://git-wip-us.apache.org/repos/asf/ambari/blob/82d94401/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 1b08248..2622043 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2527,6 +2527,7 @@ Em.I18n.translations = { 'dashboard.widgets.YARNLinks': 'YARN Links', 'dashboard.widgets.error.invalid': 'Invalid! Enter a number between 0 - {0}', 'dashboard.widgets.error.smaller': 'Threshold 1 should be smaller than threshold 2!', + 'dashboard.widgets.HawqSegmentUp': 'HAWQ Segments Live', 'dashboard': { 'widgets': { @@ -2631,6 +2632,10 @@ Em.I18n.translations = { 'dashboard.services.hbase.masterStarted':'Master Started', 'dashboard.services.hbase.masterActivated':'Master Activated', + 'dashboard.services.hawq.segments.started':'started', + 'dashboard.services.hawq.segments.stopped':'stopped', + 'dashboard.services.hawq.segments.total':'in total', + 'dashboard.services.hive.clients':'Hive Clients', 'dashboard.services.hive.client':'Hive Client', 'dashboard.services.hive.metastore':'Hive Metastore', http://git-wip-us.apache.org/repos/asf/ambari/blob/82d94401/ambari-web/app/views.js -- diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js index 2440086..0d3e49b 100644 --- a/ambari-web/app/views.js +++ b/ambari-web/app/views.js @@ -219,6 +219,7 @@ require(
ambari git commit: AMBARI-15060: Ambari should show no. of HAWQ segments live on main dashboard (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 a1098b6a8 -> 9e57671b4 AMBARI-15060: Ambari should show no. of HAWQ segments live on main dashboard (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9e57671b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9e57671b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9e57671b Branch: refs/heads/branch-2.2 Commit: 9e57671b4f52aad620dba5ecbc3188dffdece4e1 Parents: a1098b6 Author: Jun Aoki Authored: Fri Feb 19 12:06:51 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 19 12:06:51 2016 -0800 -- ambari-web/app/assets/test/tests.js | 1 + .../app/mappers/components_state_mapper.js | 5 + ambari-web/app/messages.js | 5 + ambari-web/app/views.js | 1 + ambari-web/app/views/main/dashboard/widgets.js | 19 +- .../main/dashboard/widgets/hawqsegment_live.js | 191 +++ .../dashboard/widgets/hawqsegment_live_test.js | 69 +++ 7 files changed, 287 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9e57671b/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index 25c3f43..94256ae 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -233,6 +233,7 @@ var files = ['test/init_model_test', 'test/views/main/dashboard/widgets/uptime_text_widget_test', 'test/views/main/dashboard/widgets/node_managers_live_test', 'test/views/main/dashboard/widgets/datanode_live_test', + 'test/views/main/dashboard/widgets/hawqsegment_live_test', 'test/views/main/dashboard/widgets/hbase_average_load_test', 'test/views/main/dashboard/widgets/hbase_regions_in_transition_test', 'test/views/main/dashboard/widgets/namenode_rpc_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/9e57671b/ambari-web/app/mappers/components_state_mapper.js -- diff --git a/ambari-web/app/mappers/components_state_mapper.js b/ambari-web/app/mappers/components_state_mapper.js index 0f2b627..ac3e1b5 100644 --- a/ambari-web/app/mappers/components_state_mapper.js +++ b/ambari-web/app/mappers/components_state_mapper.js @@ -59,6 +59,11 @@ App.componentsStateMapper = App.QuickDataMapper.create({ node_managers_installed: 'INSTALLED_PATH', node_managers_total: 'TOTAL_PATH' }, +'HAWQSEGMENT': { + hawq_segments_started: 'STARTED_PATH', + hawq_segments_installed: 'INSTALLED_PATH', + hawq_segments_total: 'TOTAL_PATH' +}, 'HBASE_REGIONSERVER': { region_servers_started: 'STARTED_PATH', region_servers_installed: 'INSTALLED_PATH', http://git-wip-us.apache.org/repos/asf/ambari/blob/9e57671b/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 2d47606..f948a97 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2496,6 +2496,7 @@ Em.I18n.translations = { 'dashboard.widgets.YARNLinks': 'YARN Links', 'dashboard.widgets.error.invalid': 'Invalid! Enter a number between 0 - {0}', 'dashboard.widgets.error.smaller': 'Threshold 1 should be smaller than threshold 2!', + 'dashboard.widgets.HawqSegmentUp': 'HAWQ Segments Live', 'dashboard': { 'widgets': { @@ -2600,6 +2601,10 @@ Em.I18n.translations = { 'dashboard.services.hbase.masterStarted':'Master Started', 'dashboard.services.hbase.masterActivated':'Master Activated', + 'dashboard.services.hawq.segments.started':'started', + 'dashboard.services.hawq.segments.stopped':'stopped', + 'dashboard.services.hawq.segments.total':'in total', + 'dashboard.services.hive.clients':'Hive Clients', 'dashboard.services.hive.client':'Hive Client', 'dashboard.services.hive.metastore':'Hive Metastore', http://git-wip-us.apache.org/repos/asf/ambari/blob/9e57671b/ambari-web/app/views.js -- diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js index 7e461f9..dc57c8a 100644 --- a/ambari-web/app/views.js +++ b/ambari-web/a
ambari git commit: AMBARI-15067: Add custom commands for HAWQ to run check and clear cache(mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 183f71f90 -> 0941997b0 AMBARI-15067: Add custom commands for HAWQ to run check and clear cache(mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0941997b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0941997b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0941997b Branch: refs/heads/trunk Commit: 0941997b0f68f1044242354c9f3f0f4b3a476c7d Parents: 183f71f Author: Jun Aoki Authored: Thu Feb 18 17:44:41 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 18 17:44:41 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 16 +++ .../2.0.0/package/scripts/hawq_constants.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 19 + .../HAWQ/2.0.0/package/scripts/master_helper.py | 16 --- .../HAWQ/2.0.0/package/scripts/params.py| 6 +++ .../HAWQ/2.0.0/package/templates/hawq-hosts.j2 | 22 -- .../HAWQ/2.0.0/package/templates/slaves.j2 | 22 -- ambari-web/app/messages.js | 2 + ambari-web/app/models/host_component.js | 44 ++-- ambari-web/app/utils/helper.js | 20 + ambari-web/app/views/main/service/item.js | 2 +- 11 files changed, 96 insertions(+), 75 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0941997b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 656d3a1..b77eb34 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -46,6 +46,22 @@ 1200 + + HAWQ_CLEAR_CACHE + +scripts/hawqmaster.py +PYTHON +1200 + + + + RUN_HAWQ_CHECK + +scripts/hawqmaster.py +PYTHON +1200 + + http://git-wip-us.apache.org/repos/asf/ambari/blob/0941997b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 9fdbde5..2a671da 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -47,7 +47,7 @@ sysctl_conf_dir = "/etc/sysctl.d" # Files hawq_slaves_file = os.path.join(hawq_config_dir, "slaves") hawq_greenplum_path_file = os.path.join(hawq_home_dir, "greenplum_path.sh") -hawq_hosts_file = "/tmp/hawq_hosts" +hawq_hosts_file = os.path.join(hawq_config_dir, "hawq_hosts") hawq_check_file = os.path.join(hawq_config_dir, "hawq_check.cnf") sysctl_suse_file = "/etc/sysctl.conf" sysctl_backup_file = "/etc/sysctl.conf.backup.{0}" http://git-wip-us.apache.org/repos/asf/ambari/blob/0941997b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py index d2f9ad0..3309561 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py @@ -17,7 +17,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from resource_management import Script +from resource_management.core.resources.system import Execute +from resource_management.core.logger import Logger from resource_management.libraries.functions.check_process_status import check_process_status +try: +from resource_management.libraries.functions import hdp_select as hadoop_select +except ImportError: +from resource_management.libraries.functions import phd_select as hadoop
ambari git commit: AMBARI-15067: Add custom commands for HAWQ to run check and clear cache(mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 86d9c1187 -> 1e93caf4f AMBARI-15067: Add custom commands for HAWQ to run check and clear cache(mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e93caf4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e93caf4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e93caf4 Branch: refs/heads/branch-2.2 Commit: 1e93caf4f7ba92f0190433303b7920eaf54c57eb Parents: 86d9c11 Author: Jun Aoki Authored: Thu Feb 18 17:43:36 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 18 17:43:36 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 16 ++ .../2.0.0/package/scripts/hawq_constants.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 19 +++ .../HAWQ/2.0.0/package/scripts/master_helper.py | 16 +- .../HAWQ/2.0.0/package/scripts/params.py| 6 .../HAWQ/2.0.0/package/templates/hawq-hosts.j2 | 22 - .../HAWQ/2.0.0/package/templates/slaves.j2 | 22 - ambari-web/app/messages.js | 2 ++ ambari-web/app/models/host_component.js | 33 +++- ambari-web/app/utils/helper.js | 20 +++- ambari-web/app/views/main/service/item.js | 3 +- 11 files changed, 90 insertions(+), 71 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1e93caf4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 942b250..4078990 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -46,6 +46,22 @@ 1200 + + HAWQ_CLEAR_CACHE + +scripts/hawqmaster.py +PYTHON +1200 + + + + RUN_HAWQ_CHECK + +scripts/hawqmaster.py +PYTHON +1200 + + http://git-wip-us.apache.org/repos/asf/ambari/blob/1e93caf4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 9fdbde5..2a671da 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -47,7 +47,7 @@ sysctl_conf_dir = "/etc/sysctl.d" # Files hawq_slaves_file = os.path.join(hawq_config_dir, "slaves") hawq_greenplum_path_file = os.path.join(hawq_home_dir, "greenplum_path.sh") -hawq_hosts_file = "/tmp/hawq_hosts" +hawq_hosts_file = os.path.join(hawq_config_dir, "hawq_hosts") hawq_check_file = os.path.join(hawq_config_dir, "hawq_check.cnf") sysctl_suse_file = "/etc/sysctl.conf" sysctl_backup_file = "/etc/sysctl.conf.backup.{0}" http://git-wip-us.apache.org/repos/asf/ambari/blob/1e93caf4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py index d2f9ad0..3309561 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py @@ -17,7 +17,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from resource_management import Script +from resource_management.core.resources.system import Execute +from resource_management.core.logger import Logger from resource_management.libraries.functions.check_process_status import check_process_status +try: +from resource_management.libraries.functions import hdp_select as hadoop_select +except ImportError: +from resource_management.libraries.functions import phd_s
ambari git commit: AMBARI-15082: HAWQ fails to install (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 494d9d78b -> 620daba7c AMBARI-15082: HAWQ fails to install (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/620daba7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/620daba7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/620daba7 Branch: refs/heads/branch-2.2 Commit: 620daba7cad89af4d2531ca74baddcf334502379 Parents: 494d9d7 Author: Jun Aoki Authored: Thu Feb 18 10:56:39 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 18 10:56:39 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/620daba7/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index edeb5af..d62332d 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -67,15 +67,15 @@ def setup_common_configurations(): """ import params - params.XmlConfig(filename="hdfs-client.xml", + params.XmlConfig("hdfs-client.xml", configurations=params.hdfs_client, configuration_attributes=params.config_attrs['hdfs-client']) - params.XmlConfig(filename="yarn-client.xml", + params.XmlConfig("yarn-client.xml", configurations=params.yarn_client, configuration_attributes=params.config_attrs['yarn-client']) - params.XmlConfig(filename="hawq-site.xml", + params.XmlConfig("hawq-site.xml", configurations=params.hawq_site, configuration_attributes=params.config_attrs['hawq-site']) __set_osparams()
ambari git commit: AMBARI-15082: HAWQ fails to install (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 1d7af0ebd -> 7da4706a3 AMBARI-15082: HAWQ fails to install (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7da4706a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7da4706a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7da4706a Branch: refs/heads/trunk Commit: 7da4706a33a03ce38739b5d5f0c11c4b2fc4bb94 Parents: 1d7af0e Author: Jun Aoki Authored: Thu Feb 18 10:55:42 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 18 10:55:42 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/common.py| 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7da4706a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index b5353e8..00349d8 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -67,18 +67,15 @@ def setup_common_configurations(): """ import params - # Write hdfs-client.xml on the local filesystem. If hdfs HA is enabled, append related parameters - params.XmlConfig(filename="hdfs-client.xml", + params.XmlConfig("hdfs-client.xml", configurations=params.hdfs_client, configuration_attributes=params.config_attrs['hdfs-client']) - # Write yarn-client.xml on the local filesystem. If yarn HA is enabled, append related parameters - params.XmlConfig(filename="yarn-client.xml", + params.XmlConfig("yarn-client.xml", configurations=params.yarn_client, configuration_attributes=params.config_attrs['yarn-client']) - # Write hawq-site.xml on the local filesystem. - params.XmlConfig(filename="hawq-site.xml", + params.XmlConfig("hawq-site.xml", configurations=params.hawq_site, configuration_attributes=params.config_attrs['hawq-site']) __set_osparams()
ambari git commit: AMBARI-14881: Enable/Disable Custom Commands on Host Component page (goutamtadi via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk b53a13fe6 -> dcebcca60 AMBARI-14881: Enable/Disable Custom Commands on Host Component page (goutamtadi via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dcebcca6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dcebcca6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dcebcca6 Branch: refs/heads/trunk Commit: dcebcca60d47743176519b7758b86505263e39a7 Parents: b53a13f Author: Jun Aoki Authored: Wed Feb 17 18:52:38 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 18:52:38 2016 -0800 -- ambari-web/app/templates/main/host/details/host_component.hbs | 2 +- ambari-web/app/views/main/host/details/host_component_view.js | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dcebcca6/ambari-web/app/templates/main/host/details/host_component.hbs -- diff --git a/ambari-web/app/templates/main/host/details/host_component.hbs b/ambari-web/app/templates/main/host/details/host_component.hbs index 00db8d1..60031de 100644 --- a/ambari-web/app/templates/main/host/details/host_component.hbs +++ b/ambari-web/app/templates/main/host/details/host_component.hbs @@ -143,7 +143,7 @@ {{/if}} {{#each command in view.customCommands}} - + {{command.label}} {{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/dcebcca6/ambari-web/app/views/main/host/details/host_component_view.js -- diff --git a/ambari-web/app/views/main/host/details/host_component_view.js b/ambari-web/app/views/main/host/details/host_component_view.js index 6205604..d059498 100644 --- a/ambari-web/app/views/main/host/details/host_component_view.js +++ b/ambari-web/app/views/main/host/details/host_component_view.js @@ -311,14 +311,15 @@ App.HostComponentView = Em.View.extend({ return; } - var isContextPresent = command in App.HostComponentActionMap.getMap(self) && App.HostComponentActionMap.getMap(self)[command].context; + var commandMap = App.HostComponentActionMap.getMap(self)[command]; customCommands.push({ label: self.getCustomCommandLabel(command), service: component.get('serviceName'), hosts: hostComponent.get('hostName'), -context: isContextPresent ? App.HostComponentActionMap.getMap(self)[command].context : null, +context: (!!commandMap && !!commandMap.context) ? commandMap.context : null, component: component.get('componentName'), -command: command +command: command, +disabled: !!commandMap ? !!commandMap.disabled : false }); });
ambari git commit: AMBARI-15019: Refactor HAWQ common.py after moving config substitution to UI (lavjain via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk f11d76db2 -> b15c0f3d7 AMBARI-15019: Refactor HAWQ common.py after moving config substitution to UI (lavjain via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b15c0f3d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b15c0f3d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b15c0f3d Branch: refs/heads/trunk Commit: b15c0f3d7432dbd6b6ce6c678b6cc2884a73c68b Parents: f11d76d Author: Jun Aoki Authored: Wed Feb 17 14:46:58 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 14:46:58 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/common.py| 63 .../HAWQ/2.0.0/package/scripts/params.py| 19 -- 2 files changed, 26 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b15c0f3d/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index 23342f5..b5353e8 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -20,9 +20,7 @@ import os import time import crypt import filecmp -from resource_management.libraries.resources.xml_config import XmlConfig from resource_management.core.resources.system import Execute, Directory, File -from resource_management.libraries.script.config_dictionary import ConfigDictionary from resource_management.core.logger import Logger from resource_management.core.system import System from resource_management.core.exceptions import Fail @@ -67,58 +65,23 @@ def setup_common_configurations(): """ Sets up the config files common to master, standby and segment nodes. """ - __update_hdfs_client() - __update_yarn_client() - __update_hawq_site() - __set_osparams() - -def __update_hdfs_client(): - """ - Writes hdfs-client.xml on the local filesystem on hawq nodes. - If hdfs ha is enabled, appends related parameters to hdfs-client.xml - """ - import params - - hdfs_client_dict = params.hdfs_client.copy() - - XmlConfig("hdfs-client.xml", -conf_dir=hawq_constants.hawq_config_dir, -configurations=ConfigDictionary(hdfs_client_dict), - configuration_attributes=params.config['configuration_attributes']['hdfs-client'], -owner=hawq_constants.hawq_user, -group=hawq_constants.hawq_group, -mode=0644) - - -def __update_yarn_client(): - """ - Writes yarn-client.xml on the local filesystem on hawq nodes. - If yarn ha is enabled, appends related parameters to yarn-client.xml - """ import params - XmlConfig("yarn-client.xml", -conf_dir=hawq_constants.hawq_config_dir, -configurations=params.yarn_client, - configuration_attributes=params.config['configuration_attributes']['yarn-client'], -owner=hawq_constants.hawq_user, -group=hawq_constants.hawq_group, -mode=0644) + # Write hdfs-client.xml on the local filesystem. If hdfs HA is enabled, append related parameters + params.XmlConfig(filename="hdfs-client.xml", + configurations=params.hdfs_client, + configuration_attributes=params.config_attrs['hdfs-client']) + # Write yarn-client.xml on the local filesystem. If yarn HA is enabled, append related parameters + params.XmlConfig(filename="yarn-client.xml", + configurations=params.yarn_client, + configuration_attributes=params.config_attrs['yarn-client']) -def __update_hawq_site(): - """ - Sets up hawq-site.xml - """ - import params - - XmlConfig("hawq-site.xml", -conf_dir=hawq_constants.hawq_config_dir, -configurations=ConfigDictionary(params.hawq_site), - configuration_attributes=params.config['configuration_attributes']['hawq-site'], -owner=hawq_constants.hawq_user, -group=hawq_constants.hawq_group, -mode=0644) + # Write hawq-site.xml on the local filesystem. + params.XmlConfig(filename="hawq-site.xml", + configurations=params.hawq_site, +
ambari git commit: AMBARI-15019: Refactor HAWQ common.py after moving config substitution to UI (lavjain via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 52b72ac59 -> bb314bd35 AMBARI-15019: Refactor HAWQ common.py after moving config substitution to UI (lavjain via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb314bd3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb314bd3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb314bd3 Branch: refs/heads/branch-2.2 Commit: bb314bd35549d1fa79534041146e2033d795514a Parents: 52b72ac Author: Jun Aoki Authored: Wed Feb 17 14:45:44 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 14:45:44 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/common.py| 60 .../HAWQ/2.0.0/package/scripts/params.py| 19 +-- 2 files changed, 23 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb314bd3/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index 05b56f5..edeb5af 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -20,9 +20,7 @@ import os import time import crypt import filecmp -from resource_management.libraries.resources.xml_config import XmlConfig from resource_management.core.resources.system import Execute, Directory, File -from resource_management.libraries.script.config_dictionary import ConfigDictionary from resource_management.core.logger import Logger from resource_management.core.system import System from resource_management.core.exceptions import Fail @@ -67,58 +65,20 @@ def setup_common_configurations(): """ Sets up the config files common to master, standby and segment nodes. """ - __update_hdfs_client() - __update_yarn_client() - __update_hawq_site() - __set_osparams() - -def __update_hdfs_client(): - """ - Writes hdfs-client.xml on the local filesystem on hawq nodes. - If hdfs ha is enabled, appends related parameters to hdfs-client.xml - """ import params - hdfs_client_dict = params.hdfs_client.copy() + params.XmlConfig(filename="hdfs-client.xml", + configurations=params.hdfs_client, + configuration_attributes=params.config_attrs['hdfs-client']) - XmlConfig("hdfs-client.xml", -conf_dir=hawq_constants.hawq_config_dir, -configurations=ConfigDictionary(hdfs_client_dict), - configuration_attributes=params.config['configuration_attributes']['hdfs-client'], -owner=hawq_constants.hawq_user, -group=hawq_constants.hawq_group, -mode=0644) + params.XmlConfig(filename="yarn-client.xml", + configurations=params.yarn_client, + configuration_attributes=params.config_attrs['yarn-client']) - -def __update_yarn_client(): - """ - Writes yarn-client.xml on the local filesystem on hawq nodes. - If yarn ha is enabled, appends related parameters to yarn-client.xml - """ - import params - - XmlConfig("yarn-client.xml", -conf_dir=hawq_constants.hawq_config_dir, -configurations=params.yarn_client, - configuration_attributes=params.config['configuration_attributes']['yarn-client'], -owner=hawq_constants.hawq_user, -group=hawq_constants.hawq_group, -mode=0644) - - -def __update_hawq_site(): - """ - Sets up hawq-site.xml - """ - import params - - XmlConfig("hawq-site.xml", -conf_dir=hawq_constants.hawq_config_dir, -configurations=ConfigDictionary(params.hawq_site), - configuration_attributes=params.config['configuration_attributes']['hawq-site'], -owner=hawq_constants.hawq_user, -group=hawq_constants.hawq_group, -mode=0644) + params.XmlConfig(filename="hawq-site.xml", + configurations=params.hawq_site, + configuration_attributes=params.config_attrs['hawq-site']) + __set_osparams() def __set_osparams(): http://git-wip-us.apache.org/repos/asf/ambari/blob/bb314bd3/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py --
ambari git commit: AMBARI-14997: Update gpcheck.cnf to hawq_check.cnf file as recommended in HAWQ documentation (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 a088c7059 -> 52b72ac59 AMBARI-14997: Update gpcheck.cnf to hawq_check.cnf file as recommended in HAWQ documentation (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52b72ac5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52b72ac5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52b72ac5 Branch: refs/heads/branch-2.2 Commit: 52b72ac5988cfa51eb4bf4fa7094f942b0cf7fb4 Parents: a088c70 Author: Jun Aoki Authored: Wed Feb 17 13:50:14 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 13:50:14 2016 -0800 -- .../HAWQ/2.0.0/configuration/gpcheck-env.xml| 86 --- .../HAWQ/2.0.0/configuration/hawq-check-env.xml | 87 .../common-services/HAWQ/2.0.0/metainfo.xml | 2 +- .../2.0.0/package/scripts/hawq_constants.py | 2 +- .../HAWQ/2.0.0/package/scripts/master_helper.py | 2 +- .../HAWQ/2.0.0/package/scripts/params.py| 2 +- .../stacks/2.3/common/services-hawq-1-host.json | 2 +- .../2.3/common/services-hawq-3-hosts.json | 2 +- .../2.3/common/services-hawq-pxf-hdfs.json | 4 +- .../services-master_ambari_colo-3-hosts.json| 2 +- .../services-master_standby_colo-3-hosts.json | 2 +- .../common/services-normal-hawq-3-hosts.json| 2 +- .../services-standby_ambari_colo-3-hosts.json | 2 +- ambari-web/app/data/HDP2.3/site_properties.js | 4 +- ambari-web/app/models/stack_service.js | 4 +- 15 files changed, 103 insertions(+), 102 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/52b72ac5/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml deleted file mode 100755 index a61a34f..000 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - content - Content - Contents of the configuration file /usr/local/hawq/etc/gpcheck.cnf. This file is used by 'hawq check' command, which can be run manually by gpadmin user on the HAWQ master host. This command validates the system parameters and HDFS parameters mentioned in this file to ensure optimal HAWQ operation. - -[global] -configfile_version = 4 - -[linux.mount] -mount.points = / - -[linux.sysctl] -sysctl.kernel.shmmax = 5 -sysctl.kernel.shmmni = 4096 -sysctl.kernel.shmall = 40 -sysctl.kernel.sem = 250 512000 100 2048 -sysctl.kernel.sysrq = 1 -sysctl.kernel.core_uses_pid = 1 -sysctl.kernel.msgmnb = 65536 -sysctl.kernel.msgmax = 65536 -sysctl.kernel.msgmni = 2048 -sysctl.net.ipv4.tcp_syncookies = 0 -sysctl.net.ipv4.ip_forward = 0 -sysctl.net.ipv4.conf.default.accept_source_route = 0 -sysctl.net.ipv4.tcp_tw_recycle = 1 -sysctl.net.ipv4.tcp_max_syn_backlog = 20 -sysctl.net.ipv4.conf.all.arp_filter = 1 -sysctl.net.ipv4.ip_local_port_range = 1281 65535 -sysctl.net.core.netdev_max_backlog = 20 -sysctl.vm.overcommit_memory = 2 -sysctl.fs.nr_open = 300 -sysctl.kernel.threads-max = 798720 -sysctl.kernel.pid_max = 798720 -# increase network -sysctl.net.core.rmem_max = 2097152 -sysctl.net.core.wmem_max = 2097152 - -[linux.limits] -soft.nofile = 290 -hard.nofile = 290 -soft.nproc = 131072 -hard.nproc = 131072 - -[linux.diskusage] -diskusage.monitor.mounts = / -diskusage.monitor.usagemax = 90% - -[hdfs] -dfs.mem.namenode.heap = 40960 -dfs.mem.datanode.heap = 6144 -# in hdfs-site.xml -dfs.support.append = true -dfs.client.enable.read.from.local = true -dfs.block.local-path-access.user = gpadmin -dfs.datanode.max.transfer.threads = 40960 -dfs.client.socket-timeout = 3 -dfs.datanode.socket.write.timeout = 720 -dfs.namenode.handler.count = 60 -ipc.server.handler.queue.size = 3300 -dfs.datanode.handler.count = 60 -ipc.client.connection.maxidletime = 360 -dfs.namenode.accesstime.precision = -1 - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/52b72ac5/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml new file mode 100644 index 000..58bfa27 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-en
ambari git commit: AMBARI-15001: Hdfs keytab for hawq service check on secured cluster
Repository: ambari Updated Branches: refs/heads/trunk 5a9bb7158 -> 0ea255c59 AMBARI-15001: Hdfs keytab for hawq service check on secured cluster Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0ea255c5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0ea255c5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0ea255c5 Branch: refs/heads/trunk Commit: 0ea255c59005eda4d5684230460d8b1c647c78f7 Parents: 5a9bb71 Author: Jun Aoki Authored: Wed Feb 17 12:27:50 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 12:27:50 2016 -0800 -- .../common-services/HAWQ/2.0.0/kerberos.json| 125 +-- 1 file changed, 56 insertions(+), 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0ea255c5/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json index cc11c15..da11986 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json @@ -1,73 +1,60 @@ { -"services": [ + "services": [ +{ + "name": "HAWQ", + "identities": [ { -"name": "HAWQ", -"identities": [ -{ -"name": "/hdfs" -} -], -"configurations": [ -{ -"hawq-site": { -"enable_secure_filesystem": "ON", -"krb_server_keyfile": "${keytab_dir}/hawq.service.keytab" -} -}, -{ -"hdfs-client": { -"hadoop.security.authentication": "kerberos" -} -} -], -"components": [ -{ -"identities": [ -{ -"keytab": { -"file": "${keytab_dir}/hawq.service.keytab", -"group": { -"access": "", -"name": "${cluster-env/user_group}" -}, -"owner": { -"access": "r", -"name": "gpadmin" -} -}, -"name": "hawq_master_hawq", -"principal": { -"type": "service", -"value": "postgres@${realm}" -} -} -], -"name": "HAWQMASTER" -}, -{ -"identities": [ -{ -"keytab": { -"file": "${keytab_dir}/hawq.service.keytab", -"group": { -"access": "", -"name": "${cluster-env/user_group}" -}, -"owner": { -"access": "r", -"name": "gpadmin" -} -}, -"name": "hawq_standby_hawq", -"principal": { -"type": "service", -"value": "postgres@${realm}" -} -} -], -"name": "HAWQSTANDBY" -} -] + "name": "/HDFS/NAMENODE/hdfs" +}, +{ + "name": "hawq_identity", + "principal": { +"type": "user", +"value": "postgres@${realm}" + }, + "keytab": { +"file": "${keytab_dir}/hawq.service.keytab", +"owner": { + "access": "r", + "name": "gpadmin" +}, +"group": { + "name": "${cluster-env/user_group}" +} + } +} + ], + "configurations": [ +{ + "hawq-site": { +"enable_secure_filesystem": "ON", +"krb_server_keyfile": "${keytab_dir}/hawq.service.keytab" + } +}, +{ + "hdfs-client": { +"had
ambari git commit: AMBARI-15001: Hdfs keytab for hawq service check on secured cluster
Repository: ambari Updated Branches: refs/heads/branch-2.2 750e4e45d -> 7517c4dad AMBARI-15001: Hdfs keytab for hawq service check on secured cluster Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7517c4da Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7517c4da Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7517c4da Branch: refs/heads/branch-2.2 Commit: 7517c4dad6a71278921037db9af404311ca35347 Parents: 750e4e4 Author: Jun Aoki Authored: Wed Feb 17 12:26:20 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 12:26:20 2016 -0800 -- .../common-services/HAWQ/2.0.0/kerberos.json| 125 +-- 1 file changed, 56 insertions(+), 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7517c4da/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json index cc11c15..da11986 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json @@ -1,73 +1,60 @@ { -"services": [ + "services": [ +{ + "name": "HAWQ", + "identities": [ { -"name": "HAWQ", -"identities": [ -{ -"name": "/hdfs" -} -], -"configurations": [ -{ -"hawq-site": { -"enable_secure_filesystem": "ON", -"krb_server_keyfile": "${keytab_dir}/hawq.service.keytab" -} -}, -{ -"hdfs-client": { -"hadoop.security.authentication": "kerberos" -} -} -], -"components": [ -{ -"identities": [ -{ -"keytab": { -"file": "${keytab_dir}/hawq.service.keytab", -"group": { -"access": "", -"name": "${cluster-env/user_group}" -}, -"owner": { -"access": "r", -"name": "gpadmin" -} -}, -"name": "hawq_master_hawq", -"principal": { -"type": "service", -"value": "postgres@${realm}" -} -} -], -"name": "HAWQMASTER" -}, -{ -"identities": [ -{ -"keytab": { -"file": "${keytab_dir}/hawq.service.keytab", -"group": { -"access": "", -"name": "${cluster-env/user_group}" -}, -"owner": { -"access": "r", -"name": "gpadmin" -} -}, -"name": "hawq_standby_hawq", -"principal": { -"type": "service", -"value": "postgres@${realm}" -} -} -], -"name": "HAWQSTANDBY" -} -] + "name": "/HDFS/NAMENODE/hdfs" +}, +{ + "name": "hawq_identity", + "principal": { +"type": "user", +"value": "postgres@${realm}" + }, + "keytab": { +"file": "${keytab_dir}/hawq.service.keytab", +"owner": { + "access": "r", + "name": "gpadmin" +}, +"group": { + "name": "${cluster-env/user_group}" +} + } +} + ], + "configurations": [ +{ + "hawq-site": { +"enable_secure_filesystem": "ON", +"krb_server_keyfile": "${keytab_dir}/hawq.service.keytab" + } +}, +{ + "hdfs-client": { +
ambari git commit: AMBARI-15020: HAWQ service check fails when PXF is present due to cmd syntax error (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 70c7432b8 -> 750e4e45d AMBARI-15020: HAWQ service check fails when PXF is present due to cmd syntax error (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/750e4e45 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/750e4e45 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/750e4e45 Branch: refs/heads/branch-2.2 Commit: 750e4e45d6ea5bf4e73129475c1f3d67f10cf662 Parents: 70c7432 Author: Jun Aoki Authored: Wed Feb 17 11:13:31 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 11:13:31 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/utils.py | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/750e4e45/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py index a8036d8..dc6c203 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py @@ -79,12 +79,8 @@ def exec_ssh_cmd(hostname, cmd): """ Runs the command on the remote host as gpadmin user """ - import params # Only gpadmin should be allowed to run command via ssh, thus not exposing user as a parameter - if params.hostname != hostname: -cmd = "su - {0} -c 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \"{2} \" '".format(hawq_constants.hawq_user, hostname, cmd) - else: -cmd = "su - {0} -c \"{1}\"".format(hawq_constants.hawq_user, cmd) + cmd = "su - {0} -c \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \\\"{2} \\\" \"".format(hawq_constants.hawq_user, hostname, cmd) Logger.info("Command executed: {0}".format(cmd)) process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) (stdout, stderr) = process.communicate() @@ -97,9 +93,9 @@ def exec_psql_cmd(command, host, port, db="template1", tuples_only=True): """ src_cmd = "export PGPORT={0} && source {1}".format(port, hawq_constants.hawq_greenplum_path_file) if tuples_only: -cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) else: -cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) retcode, out, err = exec_ssh_cmd(host, cmd) if retcode: Logger.error("SQL command executed failed: {0}\nReturncode: {1}\nStdout: {2}\nStderr: {3}".format(cmd, retcode, out, err))
ambari git commit: AMBARI-15020: HAWQ service check fails when PXF is present due to cmd syntax error (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 4124ae032 -> c282a0eec AMBARI-15020: HAWQ service check fails when PXF is present due to cmd syntax error (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c282a0ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c282a0ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c282a0ee Branch: refs/heads/trunk Commit: c282a0eec34809290be93a4c08f6686948ff896f Parents: 4124ae0 Author: Jun Aoki Authored: Wed Feb 17 11:12:57 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 11:12:57 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/utils.py | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c282a0ee/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py index 51a38d1..f40e982 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py @@ -79,12 +79,8 @@ def exec_ssh_cmd(hostname, cmd): """ Runs the command on the remote host as gpadmin user """ - import params # Only gpadmin should be allowed to run command via ssh, thus not exposing user as a parameter - if params.hostname != hostname: -cmd = "su - {0} -c 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \"{2} \" '".format(hawq_constants.hawq_user, hostname, cmd) - else: -cmd = "su - {0} -c \"{1}\"".format(hawq_constants.hawq_user, cmd) + cmd = "su - {0} -c \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \\\"{2} \\\" \"".format(hawq_constants.hawq_user, hostname, cmd) Logger.info("Command executed: {0}".format(cmd)) process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) (stdout, stderr) = process.communicate() @@ -97,9 +93,9 @@ def exec_psql_cmd(command, host, port, db="template1", tuples_only=True): """ src_cmd = "export PGPORT={0} && source {1}".format(port, hawq_constants.hawq_greenplum_path_file) if tuples_only: -cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) else: -cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) retcode, out, err = exec_ssh_cmd(host, cmd) if retcode: Logger.error("SQL command executed failed: {0}\nReturncode: {1}\nStdout: {2}\nStderr: {3}".format(cmd, retcode, out, err))
ambari git commit: AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 529c588ad -> e4800e1c9 AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e4800e1c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e4800e1c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e4800e1c Branch: refs/heads/trunk Commit: e4800e1c97709e8218989080fceb0df406e744ea Parents: 529c588 Author: Jun Aoki Authored: Tue Feb 16 16:43:39 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 16 16:43:39 2016 -0800 -- ambari-web/app/assets/test/tests.js | 1 + .../mixins/wizard/assign_master_components.js | 58 ++- .../wizard/assign_master_components_test.js | 154 +++ 3 files changed, 212 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e4800e1c/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index 44fb4f4..0695d06 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -157,6 +157,7 @@ var files = [ 'test/mixins/main/service/configs/config_overridable_test', 'test/mixins/routers/redirections_test', 'test/mixins/wizard/addSeccurityConfigs_test', + 'test/mixins/wizard/assign_master_components_test', 'test/mixins/wizard/wizard_menu_view_test', 'test/mixins/wizard/wizardProgressPageController_test', 'test/mixins/wizard/wizardEnableDone_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/e4800e1c/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index a2440a4..645c996 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -95,6 +95,22 @@ App.AssignMasterComponents = Em.Mixin.create({ showInstalledMastersFirst: false, /** + * Map of component name to list of hostnames for that component + * format: + * { + * NAMENODE: [ + * 'c6401.ambari.apache.org' + * ], + * DATANODE: [ + * 'c6402.ambari.apache.org', + * 'c6403.ambari.apache.org', + * ] + * } + * @type {Object} + */ + recommendedHostsForComponents: {}, + + /** * Array of servicesMasters objects, that will be shown on the page * Are filtered using mastersToShow * @type {Array} @@ -731,7 +747,31 @@ App.AssignMasterComponents = Em.Mixin.create({ * @method loadRecommendationsSuccessCallback */ loadRecommendationsSuccessCallback: function (data) { -this.set('content.recommendations', data.resources[0].recommendations); +var recommendations = data.resources[0].recommendations; +this.set('content.recommendations', recommendations); + +var recommendedHostsForComponent = {}; +var hostsForHostGroup = {}; + + recommendations.blueprint_cluster_binding.host_groups.forEach(function(hostGroup) { + hostsForHostGroup[hostGroup.name] = hostGroup.hosts.map(function(host) { +return host.fqdn; + }); +}); + +recommendations.blueprint.host_groups.forEach(function (hostGroup) { + var components = hostGroup.components.map(function (component) { +return component.name; + }); + components.forEach(function (componentName) { +var hostList = recommendedHostsForComponent[componentName] || []; +var hostNames = hostsForHostGroup[hostGroup.name] || []; +Array.prototype.push.apply(hostList, hostNames); +recommendedHostsForComponent[componentName] = hostList; + }); +}); + +this.set('content.recommendedHostsForComponents', recommendedHostsForComponent); }, /** @@ -817,6 +857,21 @@ App.AssignMasterComponents = Em.Mixin.create({ * @returns {*} */ getHostForMaster: function (master, allMasters) { +var masterHostList = []; + +allMasters.forEach(function (component) { + if (component.component_name === master) { +masterHostList.push(component.selectedHost); + } +}); + +var recommendedHostsForMaster = this.get('content.recommendedHostsForComponents')[master] || []; +for (var k = 0; k < recommendedHostsForMaster.length; k++) { + if(!masterHostList.contains(recommendedHostsForMaster[k])) { +
ambari git commit: AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 2daca3ca6 -> 94129bbc8 AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94129bbc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94129bbc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94129bbc Branch: refs/heads/branch-2.2 Commit: 94129bbc8289647c3e1b9e0d21d84f5d156d13ca Parents: 2daca3c Author: Jun Aoki Authored: Tue Feb 16 16:42:32 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 16 16:42:32 2016 -0800 -- ambari-web/app/assets/test/tests.js | 1 + .../mixins/wizard/assign_master_components.js | 58 ++- .../wizard/assign_master_components_test.js | 154 +++ 3 files changed, 212 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/94129bbc/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index 9d5cbc1..25c3f43 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -157,6 +157,7 @@ var files = ['test/init_model_test', 'test/mixins/main/service/configs/widget_popover_support_test', 'test/mixins/routers/redirections_test', 'test/mixins/wizard/addSeccurityConfigs_test', + 'test/mixins/wizard/assign_master_components_test', 'test/mixins/wizard/wizard_menu_view_test', 'test/mixins/wizard/wizardProgressPageController_test', 'test/mixins/wizard/wizardEnableDone_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/94129bbc/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index f6d1b1a..62efdac 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -95,6 +95,22 @@ App.AssignMasterComponents = Em.Mixin.create({ showInstalledMastersFirst: false, /** + * Map of component name to list of hostnames for that component + * format: + * { + * NAMENODE: [ + * 'c6401.ambari.apache.org' + * ], + * DATANODE: [ + * 'c6402.ambari.apache.org', + * 'c6403.ambari.apache.org', + * ] + * } + * @type {Object} + */ + recommendedHostsForComponents: {}, + + /** * Array of servicesMasters objects, that will be shown on the page * Are filtered using mastersToShow * @type {Array} @@ -738,7 +754,31 @@ App.AssignMasterComponents = Em.Mixin.create({ * @method loadRecommendationsSuccessCallback */ loadRecommendationsSuccessCallback: function (data) { -this.set('content.recommendations', data.resources[0].recommendations); +var recommendations = data.resources[0].recommendations; +this.set('content.recommendations', recommendations); + +var recommendedHostsForComponent = {}; +var hostsForHostGroup = {}; + + recommendations.blueprint_cluster_binding.host_groups.forEach(function(hostGroup) { + hostsForHostGroup[hostGroup.name] = hostGroup.hosts.map(function(host) { +return host.fqdn; + }); +}); + +recommendations.blueprint.host_groups.forEach(function (hostGroup) { + var components = hostGroup.components.map(function (component) { +return component.name; + }); + components.forEach(function (componentName) { +var hostList = recommendedHostsForComponent[componentName] || []; +var hostNames = hostsForHostGroup[hostGroup.name] || []; +Array.prototype.push.apply(hostList, hostNames); +recommendedHostsForComponent[componentName] = hostList; + }); +}); + +this.set('content.recommendedHostsForComponents', recommendedHostsForComponent); }, /** @@ -820,6 +860,21 @@ App.AssignMasterComponents = Em.Mixin.create({ * @returns {*} */ getHostForMaster: function (master, allMasters) { +var masterHostList = []; + +allMasters.forEach(function (component) { + if (component.component_name === master) { +masterHostList.push(component.selectedHost); + } +}); + +var recommendedHostsForMaster = this.get('content.recommendedHostsForComponents')[master] || []; +for (var k = 0; k < recommendedHostsForMaster.length; k++) { + if(!masterHostL
ambari git commit: AMBARI-14997: Update gpcheck.cnf to hawq_check.cnf file as recommended in HAWQ documentation (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk d412ca11c -> 529c588ad AMBARI-14997: Update gpcheck.cnf to hawq_check.cnf file as recommended in HAWQ documentation (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/529c588a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/529c588a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/529c588a Branch: refs/heads/trunk Commit: 529c588add78ce4d0a82542144ba94f89c80299e Parents: d412ca1 Author: Jun Aoki Authored: Tue Feb 16 16:27:02 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 16 16:27:02 2016 -0800 -- .../HAWQ/2.0.0/configuration/gpcheck-env.xml| 89 .../HAWQ/2.0.0/configuration/hawq-check-env.xml | 89 .../common-services/HAWQ/2.0.0/metainfo.xml | 2 +- .../2.0.0/package/scripts/hawq_constants.py | 2 +- .../HAWQ/2.0.0/package/scripts/master_helper.py | 2 +- .../HAWQ/2.0.0/package/scripts/params.py| 2 +- .../stacks/2.3/common/services-hawq-1-host.json | 2 +- .../2.3/common/services-hawq-3-hosts.json | 2 +- .../2.3/common/services-hawq-pxf-hdfs.json | 4 +- .../services-master_ambari_colo-3-hosts.json| 2 +- .../services-master_standby_colo-3-hosts.json | 2 +- .../common/services-normal-hawq-3-hosts.json| 2 +- .../services-standby_ambari_colo-3-hosts.json | 2 +- ambari-web/app/data/HDP2.3/site_properties.js | 4 +- ambari-web/app/models/stack_service.js | 4 +- 15 files changed, 105 insertions(+), 105 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/529c588a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml deleted file mode 100755 index 309a0c7..000 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - content - Content - Contents of the configuration file /usr/local/hawq/etc/gpcheck.cnf. This file is used by 'hawq check' command, which can be run manually by gpadmin user on the HAWQ master host. This command validates the system parameters and HDFS parameters mentioned in this file to ensure optimal HAWQ operation. - -[global] -configfile_version = 4 - -[linux.mount] -mount.points = / - -[linux.sysctl] -sysctl.kernel.shmmax = 5 -sysctl.kernel.shmmni = 4096 -sysctl.kernel.shmall = 40 -sysctl.kernel.sem = 250 512000 100 2048 -sysctl.kernel.sysrq = 1 -sysctl.kernel.core_uses_pid = 1 -sysctl.kernel.msgmnb = 65536 -sysctl.kernel.msgmax = 65536 -sysctl.kernel.msgmni = 2048 -sysctl.net.ipv4.tcp_syncookies = 0 -sysctl.net.ipv4.ip_forward = 0 -sysctl.net.ipv4.conf.default.accept_source_route = 0 -sysctl.net.ipv4.tcp_tw_recycle = 1 -sysctl.net.ipv4.tcp_max_syn_backlog = 20 -sysctl.net.ipv4.conf.all.arp_filter = 1 -sysctl.net.ipv4.ip_local_port_range = 1281 65535 -sysctl.net.core.netdev_max_backlog = 20 -sysctl.vm.overcommit_memory = 2 -sysctl.fs.nr_open = 300 -sysctl.kernel.threads-max = 798720 -sysctl.kernel.pid_max = 798720 -# increase network -sysctl.net.core.rmem_max = 2097152 -sysctl.net.core.wmem_max = 2097152 - -[linux.limits] -soft.nofile = 290 -hard.nofile = 290 -soft.nproc = 131072 -hard.nproc = 131072 - -[linux.diskusage] -diskusage.monitor.mounts = / -diskusage.monitor.usagemax = 90% - -[hdfs] -dfs.mem.namenode.heap = 40960 -dfs.mem.datanode.heap = 6144 -# in hdfs-site.xml -dfs.support.append = true -dfs.client.enable.read.from.local = true -dfs.block.local-path-access.user = gpadmin -dfs.datanode.max.transfer.threads = 40960 -dfs.client.socket-timeout = 3 -dfs.datanode.socket.write.timeout = 720 -dfs.namenode.handler.count = 60 -ipc.server.handler.queue.size = 3300 -dfs.datanode.handler.count = 60 -ipc.client.connection.maxidletime = 360 -dfs.namenode.accesstime.precision = -1 - - -content - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/529c588a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml new file mode 100755 index 000..185d175 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/confi
ambari git commit: AMBARI-15022: Add Custom action to sync Standby with Master (goutamtadi via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk f18601c7c -> f41fccfc8 AMBARI-15022: Add Custom action to sync Standby with Master (goutamtadi via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f41fccfc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f41fccfc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f41fccfc Branch: refs/heads/trunk Commit: f41fccfc829919546fcb8e2a79a36a4b477affa6 Parents: f18601c Author: Jun Aoki Authored: Tue Feb 16 11:33:30 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 16 11:33:30 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 14 -- .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 2 +- .../HAWQ/2.0.0/package/scripts/hawqsegment.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstandby.py | 10 - .../hawq/activateStandby/step3_controller.js| 2 +- ambari-web/app/controllers/main/service/item.js | 46 ++-- ambari-web/app/messages.js | 5 ++- ambari-web/app/models/host_component.js | 27 ambari-web/app/utils/helper.js | 14 ++ ambari-web/app/views/main/service/item.js | 41 + 10 files changed, 104 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f41fccfc/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 7a71604..fd145f4 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -39,7 +39,7 @@ - IMMEDIATE_STOP_CLUSTER + IMMEDIATE_STOP_HAWQ_SERVICE scripts/hawqmaster.py PYTHON @@ -78,7 +78,15 @@ - ACTIVATE_STANDBY + ACTIVATE_HAWQ_STANDBY + +scripts/hawqstandby.py +PYTHON +1200 + + + + RESYNC_HAWQ_STANDBY scripts/hawqstandby.py PYTHON @@ -110,7 +118,7 @@ - IMMEDIATE_STOP + IMMEDIATE_STOP_HAWQ_SEGMENT scripts/hawqsegment.py PYTHON http://git-wip-us.apache.org/repos/asf/ambari/blob/f41fccfc/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py index 8c7b0b5..d2f9ad0 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py @@ -51,7 +51,7 @@ class HawqMaster(Script): from hawqstatus import get_pid_file check_process_status(get_pid_file()) - def immediate_stop_cluster(self, env): + def immediate_stop_hawq_service(self, env): master_helper.stop(hawq_constants.IMMEDIATE, hawq_constants.CLUSTER) if __name__ == "__main__": http://git-wip-us.apache.org/repos/asf/ambari/blob/f41fccfc/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py index 6bc9802..0a597b6 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py @@ -73,7 +73,7 @@ class HawqSegment(Script): from hawqstatus import get_pid_file check_process_status(get_pid_file()) - def immediate_stop(self, env): + def immediate_stop_hawq_segment(self, env): self.stop(env, mode=hawq_constants.IMMEDIATE) http://git-wip-us.apache.org/repos/asf/ambari/blob/f41fccfc/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py -- diff --git a/ambari-server/src/main/res
ambari git commit: AMBARI-15022: Add Custom action to sync Standby with Master (goutamtadi via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 b6c8e5dce -> 8a8f16a41 AMBARI-15022: Add Custom action to sync Standby with Master (goutamtadi via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a8f16a4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a8f16a4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a8f16a4 Branch: refs/heads/branch-2.2 Commit: 8a8f16a41343dedca7441255591552b2ba115259 Parents: b6c8e5d Author: Jun Aoki Authored: Tue Feb 16 11:32:27 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 16 11:32:27 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 14 -- .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 2 +- .../HAWQ/2.0.0/package/scripts/hawqsegment.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstandby.py | 10 - .../hawq/activateStandby/step3_controller.js| 2 +- ambari-web/app/controllers/main/service/item.js | 46 ++-- ambari-web/app/messages.js | 5 ++- ambari-web/app/models/host_component.js | 28 ambari-web/app/utils/helper.js | 15 +++ ambari-web/app/views/main/service/item.js | 45 ++- 10 files changed, 109 insertions(+), 60 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8a8f16a4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 7a71604..780a327 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -39,7 +39,7 @@ - IMMEDIATE_STOP_CLUSTER + IMMEDIATE_STOP_HAWQ_SERVICE scripts/hawqmaster.py PYTHON @@ -77,8 +77,16 @@ 600 + + ACTIVATE_HAWQ_STANDBY + +scripts/hawqstandby.py +PYTHON +1200 + + - ACTIVATE_STANDBY + RESYNC_HAWQ_STANDBY scripts/hawqstandby.py PYTHON @@ -110,7 +118,7 @@ - IMMEDIATE_STOP + IMMEDIATE_STOP_HAWQ_SEGMENT scripts/hawqsegment.py PYTHON http://git-wip-us.apache.org/repos/asf/ambari/blob/8a8f16a4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py index 8c7b0b5..d2f9ad0 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py @@ -51,7 +51,7 @@ class HawqMaster(Script): from hawqstatus import get_pid_file check_process_status(get_pid_file()) - def immediate_stop_cluster(self, env): + def immediate_stop_hawq_service(self, env): master_helper.stop(hawq_constants.IMMEDIATE, hawq_constants.CLUSTER) if __name__ == "__main__": http://git-wip-us.apache.org/repos/asf/ambari/blob/8a8f16a4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py index 6bc9802..0a597b6 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py @@ -73,7 +73,7 @@ class HawqSegment(Script): from hawqstatus import get_pid_file check_process_status(get_pid_file()) - def immediate_stop(self, env): + def immediate_stop_hawq_segment(self, env): self.stop(env, mode=hawq_constants.IMMEDIATE) http://git-wip-us.apache.org/repos/asf/ambari/blob/8a8f16a4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py -- diff --git a/
ambari git commit: AMBARI-14701: assign_master_components.js breaks next step in certain case (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 289fc18bf -> 9adcea949 AMBARI-14701: assign_master_components.js breaks next step in certain case (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9adcea94 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9adcea94 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9adcea94 Branch: refs/heads/branch-2.2 Commit: 9adcea9495ea5eaee2665c64a61e815a095bb5bf Parents: 289fc18 Author: Jun Aoki Authored: Fri Feb 12 18:16:21 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 12 18:16:21 2016 -0800 -- .../mixins/wizard/assign_master_components.js | 37 +--- 1 file changed, 25 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9adcea94/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 7dc267e..f6d1b1a 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -1078,7 +1078,6 @@ App.AssignMasterComponents = Em.Mixin.create({ if (!self.get('submitDisabled')) { App.router.send('next'); } -self.set('submitButtonClicked', false); }; if (this.get('useServerValidation')) { @@ -1088,6 +1087,7 @@ App.AssignMasterComponents = Em.Mixin.create({ } else { self.updateIsSubmitDisabled(); goNextStepIfValid(); +self.set('submitButtonClicked', false); } } }, @@ -1098,18 +1098,31 @@ App.AssignMasterComponents = Em.Mixin.create({ */ showValidationIssuesAcceptBox: function(callback) { var self = this; -if (self.get('anyWarning') || self.get('anyError')) { - App.ModalPopup.show({ -primary: Em.I18n.t('common.continueAnyway'), -header: Em.I18n.t('installer.step5.validationIssuesAttention.header'), -body: Em.I18n.t('installer.step5.validationIssuesAttention'), -onPrimary: function () { - this.hide(); - callback(); -} - }); -} else { + +// If there are no warnings and no errors, return +if (!self.get('anyWarning') && !self.get('anyError')) { callback(); + self.set('submitButtonClicked', false); + return; } + +App.ModalPopup.show({ + primary: Em.I18n.t('common.continueAnyway'), + header: Em.I18n.t('installer.step5.validationIssuesAttention.header'), + body: Em.I18n.t('installer.step5.validationIssuesAttention'), + onPrimary: function () { +this._super(); +callback(); +self.set('submitButtonClicked', false); + }, + onSecondary: function () { +this._super(); +self.set('submitButtonClicked', false); + }, + onClose: function () { +this._super(); +self.set('submitButtonClicked', false); + } +}); } });
ambari git commit: AMBARI-14701: assign_master_components.js breaks next step in certain case (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk e18755393 -> 9e5dd9f89 AMBARI-14701: assign_master_components.js breaks next step in certain case (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9e5dd9f8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9e5dd9f8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9e5dd9f8 Branch: refs/heads/trunk Commit: 9e5dd9f8990956e1c9de650822d52d4fdddaba0a Parents: e187553 Author: Jun Aoki Authored: Fri Feb 12 18:15:15 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 12 18:15:15 2016 -0800 -- .../mixins/wizard/assign_master_components.js | 37 +--- 1 file changed, 25 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9e5dd9f8/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 0693507..a2440a4 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -1084,7 +1084,6 @@ App.AssignMasterComponents = Em.Mixin.create({ }else{ App.router.set('nextBtnClickInProgress', false); } -self.set('submitButtonClicked', false); }; if (this.get('useServerValidation')) { @@ -1094,6 +1093,7 @@ App.AssignMasterComponents = Em.Mixin.create({ } else { self.updateIsSubmitDisabled(); goNextStepIfValid(); +self.set('submitButtonClicked', false); } } }, @@ -1104,18 +1104,31 @@ App.AssignMasterComponents = Em.Mixin.create({ */ showValidationIssuesAcceptBox: function(callback) { var self = this; -if (self.get('anyWarning') || self.get('anyError')) { - App.ModalPopup.show({ -primary: Em.I18n.t('common.continueAnyway'), -header: Em.I18n.t('installer.step5.validationIssuesAttention.header'), -body: Em.I18n.t('installer.step5.validationIssuesAttention'), -onPrimary: function () { - this.hide(); - callback(); -} - }); -} else { + +// If there are no warnings and no errors, return +if (!self.get('anyWarning') && !self.get('anyError')) { callback(); + self.set('submitButtonClicked', false); + return; } + +App.ModalPopup.show({ + primary: Em.I18n.t('common.continueAnyway'), + header: Em.I18n.t('installer.step5.validationIssuesAttention.header'), + body: Em.I18n.t('installer.step5.validationIssuesAttention'), + onPrimary: function () { +this._super(); +callback(); +self.set('submitButtonClicked', false); + }, + onSecondary: function () { +this._super(); +self.set('submitButtonClicked', false); + }, + onClose: function () { +this._super(); +self.set('submitButtonClicked', false); + } +}); } });
ambari git commit: AMBARI-14966: Stack Advisor incorrectly recommends Slave component on a host which does not have it installed during Add service wizard (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 6c6ec6304 -> 8aab63270 AMBARI-14966: Stack Advisor incorrectly recommends Slave component on a host which does not have it installed during Add service wizard (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8aab6327 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8aab6327 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8aab6327 Branch: refs/heads/trunk Commit: 8aab63270ebfe34aa75c47a150fbb4a1838d0ec1 Parents: 6c6ec63 Author: Jun Aoki Authored: Thu Feb 11 17:05:46 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 11 17:05:46 2016 -0800 -- .../src/main/resources/stacks/stack_advisor.py | 3 +- .../stacks/2.0.6/common/test_stack_advisor.py | 59 2 files changed, 61 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8aab6327/ambari-server/src/main/resources/stacks/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py index d993feb..539bd25 100644 --- a/ambari-server/src/main/resources/stacks/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/stack_advisor.py @@ -409,7 +409,8 @@ class DefaultStackAdvisor(StackAdvisor): hostsMin = int(cardinality) if hostsMin > len(hostsForComponent): hostsForComponent.extend(freeHosts[0:hostsMin-len(hostsForComponent)]) -else: +# Components which are already installed, keep the recommendation as the existing layout +elif not componentIsPopulated: hostsForComponent.extend(freeHosts) if not hostsForComponent: # hostsForComponent is empty hostsForComponent = hostsList[-1:] http://git-wip-us.apache.org/repos/asf/ambari/blob/8aab6327/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py index 22b16bb..4f059ba 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py @@ -1941,3 +1941,62 @@ class TestHDP206StackAdvisor(TestCase): siteProperties = stack_advisor.getServicesSiteProperties(services, "ranger-admin-site") self.assertEquals(siteProperties, expected) + def test_createComponentLayoutRecommendations_addService_1freeHost(self): +""" +Test that already installed slaves are not added to any free hosts (not having any component installed) +as part of recommendation received during Add service operation. +For already installed services, recommendation for installed components should match the existing layout +""" + +services = { + "services" : [ + { +"StackServices" : { + "service_name" : "HDFS" +}, +"components" : [ { + "StackServiceComponents" : { +"cardinality" : "1+", +"component_category" : "SLAVE", +"component_name" : "DATANODE", +"hostnames" : [ "c6401.ambari.apache.org" ] + } +} ] + } ] + } + +hosts = self.prepareHosts(["c6401.ambari.apache.org", "c6402.ambari.apache.org"]) +recommendations = self.stackAdvisor.createComponentLayoutRecommendations(services, hosts) +""" +Recommendation received should be as below: + { + 'blueprint': { + 'host_groups': [{ + 'name': 'host-group-1', + 'components': [] + }, { + 'name': 'host-group-2', + 'components': [{ + 'name': 'DATANODE' +
ambari git commit: AMBARI-14966: Stack Advisor incorrectly recommends Slave component on a host which does not have it installed during Add service wizard (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 14f3b3124 -> 56403ce9a AMBARI-14966: Stack Advisor incorrectly recommends Slave component on a host which does not have it installed during Add service wizard (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/56403ce9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/56403ce9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/56403ce9 Branch: refs/heads/branch-2.2 Commit: 56403ce9a33b6888e9130728faec6438cac1b545 Parents: 14f3b31 Author: Jun Aoki Authored: Thu Feb 11 17:04:33 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 11 17:04:33 2016 -0800 -- .../src/main/resources/stacks/stack_advisor.py | 3 +- .../stacks/2.0.6/common/test_stack_advisor.py | 59 2 files changed, 61 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/56403ce9/ambari-server/src/main/resources/stacks/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py index d993feb..539bd25 100644 --- a/ambari-server/src/main/resources/stacks/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/stack_advisor.py @@ -409,7 +409,8 @@ class DefaultStackAdvisor(StackAdvisor): hostsMin = int(cardinality) if hostsMin > len(hostsForComponent): hostsForComponent.extend(freeHosts[0:hostsMin-len(hostsForComponent)]) -else: +# Components which are already installed, keep the recommendation as the existing layout +elif not componentIsPopulated: hostsForComponent.extend(freeHosts) if not hostsForComponent: # hostsForComponent is empty hostsForComponent = hostsList[-1:] http://git-wip-us.apache.org/repos/asf/ambari/blob/56403ce9/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py index c41d136..2f1959a 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py @@ -1903,3 +1903,62 @@ class TestHDP206StackAdvisor(TestCase): siteProperties = stack_advisor.getServicesSiteProperties(services, "ranger-admin-site") self.assertEquals(siteProperties, expected) + def test_createComponentLayoutRecommendations_addService_1freeHost(self): +""" +Test that already installed slaves are not added to any free hosts (not having any component installed) +as part of recommendation received during Add service operation. +For already installed services, recommendation for installed components should match the existing layout +""" + +services = { + "services" : [ + { +"StackServices" : { + "service_name" : "HDFS" +}, +"components" : [ { + "StackServiceComponents" : { +"cardinality" : "1+", +"component_category" : "SLAVE", +"component_name" : "DATANODE", +"hostnames" : [ "c6401.ambari.apache.org" ] + } +} ] + } ] + } + +hosts = self.prepareHosts(["c6401.ambari.apache.org", "c6402.ambari.apache.org"]) +recommendations = self.stackAdvisor.createComponentLayoutRecommendations(services, hosts) +""" +Recommendation received should be as below: + { + 'blueprint': { + 'host_groups': [{ + 'name': 'host-group-1', + 'components': [] + }, { + 'name': 'host-group-2', + 'components': [{ + 'name': 'DATANODE' +
ambari git commit: AMBARI-15003: Add dependency in RCO for HAWQ and PXF pre-requisites (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 9fdaf4ed7 -> 6c6ec6304 AMBARI-15003: Add dependency in RCO for HAWQ and PXF pre-requisites (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6c6ec630 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6c6ec630 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6c6ec630 Branch: refs/heads/trunk Commit: 6c6ec6304a8acf2876113cd4f930922a183aed2d Parents: 9fdaf4e Author: Jun Aoki Authored: Thu Feb 11 16:07:31 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 11 16:07:31 2016 -0800 -- .../src/main/resources/stacks/HDP/2.3/role_command_order.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6c6ec630/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json b/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json index f164ab2..5b3882f 100755 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json @@ -13,7 +13,8 @@ "HAWQMASTER-START" : ["NAMENODE-START", "DATANODE-START", "NODEMANAGER-START"], "HAWQSTANDBY-START" : ["HAWQMASTER-START"], "HAWQSEGMENT-START" : ["HAWQMASTER-START", "HAWQSTANDBY-START"], -"HAWQ_SERVICE_CHECK-SERVICE_CHECK" : ["HAWQSEGMENT-START", "HDFS_SERVICE_CHECK-SERVICE_CHECK", "YARN_SERVICE_CHECK-SERVICE_CHECK"], +"HAWQ_SERVICE_CHECK-SERVICE_CHECK" : ["HAWQSEGMENT-START", "HDFS_SERVICE_CHECK-SERVICE_CHECK", "YARN_SERVICE_CHECK-SERVICE_CHECK", "PXF_SERVICE_CHECK-SERVICE_CHECK"], +"PXF_SERVICE_CHECK-SERVICE_CHECK" : ["HDFS_SERVICE_CHECK-SERVICE_CHECK", "HBASE_SERVICE_CHECK-SERVICE_CHECK", "HIVE_SERVICE_CHECK-SERVICE_CHECK"], "KNOX_GATEWAY-START" : ["RANGER_USERSYNC-START", "NAMENODE-START"], "KAFKA_BROKER-START" : ["ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "NAMENODE-START"], "NIMBUS-START" : ["ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "NAMENODE-START"],
ambari git commit: AMBARI-15003: Add dependency in RCO for HAWQ and PXF pre-requisites (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 fbb42cde2 -> 14f3b3124 AMBARI-15003: Add dependency in RCO for HAWQ and PXF pre-requisites (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/14f3b312 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/14f3b312 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/14f3b312 Branch: refs/heads/branch-2.2 Commit: 14f3b3124fba1ef4413a2375295fd7b1d42c3da9 Parents: fbb42cd Author: Jun Aoki Authored: Thu Feb 11 16:08:20 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 11 16:08:20 2016 -0800 -- .../src/main/resources/stacks/HDP/2.3/role_command_order.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/14f3b312/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json b/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json index f164ab2..5b3882f 100755 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json @@ -13,7 +13,8 @@ "HAWQMASTER-START" : ["NAMENODE-START", "DATANODE-START", "NODEMANAGER-START"], "HAWQSTANDBY-START" : ["HAWQMASTER-START"], "HAWQSEGMENT-START" : ["HAWQMASTER-START", "HAWQSTANDBY-START"], -"HAWQ_SERVICE_CHECK-SERVICE_CHECK" : ["HAWQSEGMENT-START", "HDFS_SERVICE_CHECK-SERVICE_CHECK", "YARN_SERVICE_CHECK-SERVICE_CHECK"], +"HAWQ_SERVICE_CHECK-SERVICE_CHECK" : ["HAWQSEGMENT-START", "HDFS_SERVICE_CHECK-SERVICE_CHECK", "YARN_SERVICE_CHECK-SERVICE_CHECK", "PXF_SERVICE_CHECK-SERVICE_CHECK"], +"PXF_SERVICE_CHECK-SERVICE_CHECK" : ["HDFS_SERVICE_CHECK-SERVICE_CHECK", "HBASE_SERVICE_CHECK-SERVICE_CHECK", "HIVE_SERVICE_CHECK-SERVICE_CHECK"], "KNOX_GATEWAY-START" : ["RANGER_USERSYNC-START", "NAMENODE-START"], "KAFKA_BROKER-START" : ["ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "NAMENODE-START"], "NIMBUS-START" : ["ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "NAMENODE-START"],
ambari git commit: AMBARI-14964: AMS cannot be installed on trunk (avijayan via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk c147b27e9 -> 3242a5590 AMBARI-14964: AMS cannot be installed on trunk (avijayan via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3242a559 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3242a559 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3242a559 Branch: refs/heads/trunk Commit: 3242a5590a6cf84f9cd664e38c7ae8b1c2fe968a Parents: c147b27 Author: Jun Aoki Authored: Wed Feb 10 17:12:48 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 10 17:12:48 2016 -0800 -- .../libraries/functions/package_conditions.py | 7 ++- .../stacks/HDP/2.1.1/services/AMBARI_METRICS/metainfo.xml | 2 +- .../common-services/AMBARI_METRICS/0.1.0/metainfo.xml | 2 ++ .../AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py | 4 +++- .../AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py | 5 - .../AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py | 2 +- 6 files changed, 17 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3242a559/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py b/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py index 0fb0fe4..4ca3b7b 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py @@ -19,7 +19,8 @@ limitations under the License. Ambari Agent """ -__all__ = ["is_lzo_enabled", "should_install_phoenix", "should_install_ams_collector", "should_install_mysql", "should_install_mysl_connector"] +__all__ = ["is_lzo_enabled", "should_install_phoenix", "should_install_ams_collector", "should_install_ams_grafana", + "should_install_mysql", "should_install_mysl_connector"] import os from resource_management.libraries.script import Script @@ -41,6 +42,10 @@ def should_install_ams_collector(): config = Script.get_config() return 'role' in config and config['role'] == "METRICS_COLLECTOR" +def should_install_ams_grafana(): + config = Script.get_config() + return 'role' in config and config['role'] == "METRICS_GRAFANA" + def should_install_mysql(): config = Script.get_config() hive_database = config['configurations']['hive-env']['hive_database'] http://git-wip-us.apache.org/repos/asf/ambari/blob/3242a559/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/AMBARI_METRICS/metainfo.xml -- diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/AMBARI_METRICS/metainfo.xml b/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/AMBARI_METRICS/metainfo.xml index be99b83..fe3b860 100644 --- a/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/AMBARI_METRICS/metainfo.xml +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/AMBARI_METRICS/metainfo.xml @@ -69,7 +69,7 @@ ambari-metrics-collector - package_chooser.should_install_ams_collector() + should_install_ams_collector ambari-metrics-monitor http://git-wip-us.apache.org/repos/asf/ambari/blob/3242a559/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml index c3dbc6b..3a832eb 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml @@ -83,6 +83,7 @@ ambari-metrics-collector true + should_install_ams_collector ambari-metrics-monitor @@ -95,6 +96,7 @@ ambari-metrics-grafana true + should_install_ams_grafana gcc http://git-wip-us.apache.org/repos/asf/ambari/blob/3242a559/ambari-server/src/main
ambari git commit: AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (missing part) (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 364ee0269 -> c147b27e9 AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (missing part) (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c147b27e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c147b27e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c147b27e Branch: refs/heads/trunk Commit: c147b27e9bb886ba0380e2b926903343a568ad9d Parents: 364ee02 Author: Jun Aoki Authored: Wed Feb 10 16:45:15 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 10 16:45:15 2016 -0800 -- .../resources/common-services/HAWQ/2.0.0/metainfo.xml | 10 ++ .../HAWQ/2.0.0/package/scripts/hawq_constants.py | 1 + .../HAWQ/2.0.0/package/scripts/hawqstandby.py | 6 -- 3 files changed, 15 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c147b27e/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 21ab445..ce625eb 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -76,6 +76,16 @@ PYTHON 600 + + + ACTIVATE_STANDBY + +scripts/hawqstandby.py +PYTHON +1200 + + + HDFS/HDFS_CLIENT http://git-wip-us.apache.org/repos/asf/ambari/blob/c147b27e/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 01de99a..6a2d9ba 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -27,6 +27,7 @@ YARN = "yarn" CLUSTER = "cluster" IMMEDIATE = "immediate" FAST = "fast" +ACTIVATE = "activate" # Users root_user = "root" http://git-wip-us.apache.org/repos/asf/ambari/blob/c147b27e/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py index 7f5bab4..7da7f6d 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py @@ -51,8 +51,10 @@ class HawqStandby(Script): from hawqstatus import get_pid_file check_process_status(get_pid_file()) - def activatestandby(self, env): -pass + def activate_standby(self, env): +import utils +utils.exec_hawq_operation(hawq_constants.ACTIVATE, "{0} -a -M {1} -v".format(hawq_constants.STANDBY, hawq_constants.FAST)) + if __name__ == "__main__": HawqStandby().execute()
ambari git commit: AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (missing part) (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 c98abf3a6 -> 44373cbcd AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (missing part) (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/44373cbc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/44373cbc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/44373cbc Branch: refs/heads/branch-2.2 Commit: 44373cbcd7eed9447a25c686cdebe994d370cb5f Parents: c98abf3 Author: Jun Aoki Authored: Wed Feb 10 16:43:34 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 10 16:43:34 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/hawqstandby.py| 2 +- ambari-web/app/messages.js | 8 2 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/44373cbc/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py index 3395810..67152c1 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py @@ -51,7 +51,7 @@ class HawqStandby(Script): from hawqstatus import get_pid_file check_process_status(get_pid_file()) - def activatestandby(self, env): + def activate_standby(self, env): import utils utils.exec_hawq_operation(hawq_constants.ACTIVATE, "{0} -a -M {1} -v".format(hawq_constants.STANDBY, hawq_constants.FAST)) http://git-wip-us.apache.org/repos/asf/ambari/blob/44373cbc/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 4bea211..6b1802a 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2861,11 +2861,11 @@ Em.I18n.translations = { 'admin.addHawqStandby.wizard.step4.task3.title': 'Start HAWQ Service', 'admin.addHawqStandby.wizard.step4.notice.inProgress':'Please wait while HAWQ Standby Master is being deployed.', 'admin.addHawqStandby.wizard.step4.notice.completed':'HAWQ Standby Master has been enabled successfully.', -'admin.activateHawqStandby.button.enable': 'Activate HAWQ Standby', + 'admin.activateHawqStandby.button.enable': 'Activate HAWQ Standby', 'admin.activateHawqStandby.wizard.header': 'Activate HAWQ Standby Wizard', 'admin.activateHawqStandby.wizard.step1.header': 'Get Started', 'admin.activateHawqStandby.wizard.step1.body':'This wizard will walk you through activating HAWQ Standby.' + - 'Once activated, the HAWQ Standby will become the HAWQ Master and the old HAWQ master will be removed. ' + + 'Once activated, HAWQ Standby will become HAWQ Master, and the previous HAWQ master will be removed. ' + 'Users will be able to connect to HAWQ database using the new HAWQ Master.' + 'You should plan a cluster maintenance window and prepare for cluster downtime when ' + 'activating HAWQ Standby. During this operation, HAWQ service will be stopped and started.' + @@ -2882,7 +2882,7 @@ Em.I18n.translations = { 'HAWQ Standby will be activated to HAWQ Master.', 'admin.activateHawqStandby.wizard.step2.confirm.host.body':'Review HAWQ Master & Standby role changes.', 'admin.activateHawqStandby.wizard.step2.confirmPopup.body': 'Do you wish to continue with activating HAWQ Standy? Please confirm, before proceeding as you will not be able to rollback from Ambari.', - 'admin.activateHawqStandby.wizard.step3.header': 'Configure Components', + 'admin.activateHawqStandby.wizard.step3.header': 'Finalize Setup', 'admin.activateHawqStandby.wizard.step3.task0.title': 'Activate HAWQ Standby', 'admin.activateHawqStandby.wizard.step3.task1.title': 'Stop HAWQ Service', 'admin.activateHawqStandby.wizard.step3.task2.title': 'Reconfigure HAWQ', @@ -2895,5 +2895,5 @@ Em.I18n.translations = { ' get back to a stable state. Are you sure you want to exit the wizard?', 'admin.activateHawqStandby.wizard.step3.notice.
ambari git commit: AMBARI-14881: Enable/Disable Custom Commands on Host Component page (goutamtadi via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 20aaff5fa -> c98abf3a6 AMBARI-14881: Enable/Disable Custom Commands on Host Component page (goutamtadi via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c98abf3a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c98abf3a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c98abf3a Branch: refs/heads/branch-2.2 Commit: c98abf3a6489489b07481724f607b5bf3c684f5d Parents: 20aaff5 Author: Jun Aoki Authored: Wed Feb 10 16:22:25 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 10 16:22:25 2016 -0800 -- ambari-web/app/templates/main/host/details/host_component.hbs | 2 +- ambari-web/app/views/main/host/details/host_component_view.js | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c98abf3a/ambari-web/app/templates/main/host/details/host_component.hbs -- diff --git a/ambari-web/app/templates/main/host/details/host_component.hbs b/ambari-web/app/templates/main/host/details/host_component.hbs index 23cdb7c..69dc598 100644 --- a/ambari-web/app/templates/main/host/details/host_component.hbs +++ b/ambari-web/app/templates/main/host/details/host_component.hbs @@ -134,7 +134,7 @@ {{/if}} {{#each command in view.customCommands}} - + {{command.label}} {{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/c98abf3a/ambari-web/app/views/main/host/details/host_component_view.js -- diff --git a/ambari-web/app/views/main/host/details/host_component_view.js b/ambari-web/app/views/main/host/details/host_component_view.js index 9aabe42..bef5517 100644 --- a/ambari-web/app/views/main/host/details/host_component_view.js +++ b/ambari-web/app/views/main/host/details/host_component_view.js @@ -329,14 +329,15 @@ App.HostComponentView = Em.View.extend({ return; } - var isContextPresent = command in App.HostComponentActionMap.getMap(self) && App.HostComponentActionMap.getMap(self)[command].context; + var commandMap = App.HostComponentActionMap.getMap(self)[command]; customCommands.push({ label: self.getCustomCommandLabel(command), service: component.get('serviceName'), hosts: hostComponent.get('hostName'), -context: isContextPresent ? App.HostComponentActionMap.getMap(self)[command].context : null, +context: (!!commandMap && !!commandMap.context) ? commandMap.context : null, component: component.get('componentName'), -command: command +command: command, +disabled: !!commandMap ? !!commandMap.disabled : false }); });
ambari git commit: AMBARI-14959: Implement service check for secured PXF service (lavjain via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 529818a19 -> e191a4fe4 AMBARI-14959: Implement service check for secured PXF service (lavjain via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e191a4fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e191a4fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e191a4fe Branch: refs/heads/branch-2.2 Commit: e191a4fe468c65a5596da8347b28a434088cc92a Parents: 529818a Author: Jun Aoki Authored: Tue Feb 9 15:34:23 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 9 15:34:23 2016 -0800 -- .../PXF/3.0.0/package/scripts/params.py | 17 +++- .../PXF/3.0.0/package/scripts/service_check.py | 81 +++- 2 files changed, 76 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e191a4fe/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py index 7749de7..b3e85e4 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py @@ -22,6 +22,7 @@ from resource_management import Script from resource_management.libraries.functions.default import default from resource_management.libraries.functions import get_kinit_path from resource_management.libraries.resources.hdfs_resource import HdfsResource +from resource_management.libraries.functions.namenode_ha_utils import get_active_namenode config = Script.get_config() @@ -31,9 +32,10 @@ stack_name = str(config["hostLevelParams"]["stack_name"]) # Users and Groups pxf_user = "pxf" pxf_group = pxf_user -hdfs_superuser = config['configurations']['hadoop-env']['hdfs_user'] +hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] hdfs_superuser_group = config["configurations"]["hdfs-site"]["dfs.permissions.superusergroup"] user_group = config["configurations"]["cluster-env"]["user_group"] +hbase_user = default('configurations/hbase-env/hbase_user', None) hive_user = default('configurations/hive-env/hive_user', None) tomcat_group = "tomcat" @@ -60,14 +62,21 @@ is_hive_installed = default("/clusterHostInfo/hive_server_host", None) is not No # HDFS hdfs_site = config['configurations']['hdfs-site'] default_fs = config['configurations']['core-site']['fs.defaultFS'] +namenode_path = default('/configurations/hdfs-site/dfs.namenode.http-address', None) +dfs_nameservice = default('/configurations/hdfs-site/dfs.nameservices', None) +if dfs_nameservice: + namenode_path = get_active_namenode(hdfs_site, security_enabled, hdfs_user)[1] -hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] +# keytabs and principals kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) -hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] +hdfs_user_keytab = default('configurations/hadoop-env/hdfs_user_keytab', None) +hdfs_principal_name = default('configurations/hadoop-env/hdfs_principal_name', None) +hbase_user_keytab = default('configurations/hbase-env/hbase_user_keytab', None) +hbase_principal_name = default('configurations/hbase-env/hbase_principal_name', None) # HDFSResource partial function HdfsResource = functools.partial(HdfsResource, -user=hdfs_superuser, +user=hdfs_user, security_enabled=security_enabled, keytab=hdfs_user_keytab, kinit_path_local=kinit_path_local, http://git-wip-us.apache.org/repos/asf/ambari/blob/e191a4fe/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py index 064be04..21b7c5d 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.
ambari git commit: AMBARI-14959: Implement service check for secured PXF service (lavjain via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 73fbe14c2 -> feb50e3a3 AMBARI-14959: Implement service check for secured PXF service (lavjain via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/feb50e3a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/feb50e3a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/feb50e3a Branch: refs/heads/trunk Commit: feb50e3a3f5edb1105780d06254bb9538d19063e Parents: 73fbe14 Author: Jun Aoki Authored: Tue Feb 9 15:33:08 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 9 15:33:08 2016 -0800 -- .../PXF/3.0.0/package/scripts/params.py | 17 +++- .../PXF/3.0.0/package/scripts/service_check.py | 81 +++- 2 files changed, 76 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/feb50e3a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py index 7749de7..b3e85e4 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py @@ -22,6 +22,7 @@ from resource_management import Script from resource_management.libraries.functions.default import default from resource_management.libraries.functions import get_kinit_path from resource_management.libraries.resources.hdfs_resource import HdfsResource +from resource_management.libraries.functions.namenode_ha_utils import get_active_namenode config = Script.get_config() @@ -31,9 +32,10 @@ stack_name = str(config["hostLevelParams"]["stack_name"]) # Users and Groups pxf_user = "pxf" pxf_group = pxf_user -hdfs_superuser = config['configurations']['hadoop-env']['hdfs_user'] +hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] hdfs_superuser_group = config["configurations"]["hdfs-site"]["dfs.permissions.superusergroup"] user_group = config["configurations"]["cluster-env"]["user_group"] +hbase_user = default('configurations/hbase-env/hbase_user', None) hive_user = default('configurations/hive-env/hive_user', None) tomcat_group = "tomcat" @@ -60,14 +62,21 @@ is_hive_installed = default("/clusterHostInfo/hive_server_host", None) is not No # HDFS hdfs_site = config['configurations']['hdfs-site'] default_fs = config['configurations']['core-site']['fs.defaultFS'] +namenode_path = default('/configurations/hdfs-site/dfs.namenode.http-address', None) +dfs_nameservice = default('/configurations/hdfs-site/dfs.nameservices', None) +if dfs_nameservice: + namenode_path = get_active_namenode(hdfs_site, security_enabled, hdfs_user)[1] -hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] +# keytabs and principals kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) -hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] +hdfs_user_keytab = default('configurations/hadoop-env/hdfs_user_keytab', None) +hdfs_principal_name = default('configurations/hadoop-env/hdfs_principal_name', None) +hbase_user_keytab = default('configurations/hbase-env/hbase_user_keytab', None) +hbase_principal_name = default('configurations/hbase-env/hbase_principal_name', None) # HDFSResource partial function HdfsResource = functools.partial(HdfsResource, -user=hdfs_superuser, +user=hdfs_user, security_enabled=security_enabled, keytab=hdfs_user_keytab, kinit_path_local=kinit_path_local, http://git-wip-us.apache.org/repos/asf/ambari/blob/feb50e3a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py index 064be04..21b7c5d 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py @@ -
ambari git commit: AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 60adfbcf8 -> b95d52e98 AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b95d52e9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b95d52e9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b95d52e9 Branch: refs/heads/trunk Commit: b95d52e986d90b4f2e98d3da566a1a3d4731107b Parents: 60adfbc Author: Jun Aoki Authored: Fri Feb 5 16:14:46 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 16:14:46 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/utils.py| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b95d52e9/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py index e607a28..51a38d1 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py @@ -82,7 +82,7 @@ def exec_ssh_cmd(hostname, cmd): import params # Only gpadmin should be allowed to run command via ssh, thus not exposing user as a parameter if params.hostname != hostname: -cmd = "su - {0} -c \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \\\"{2} \\\" \"".format(hawq_constants.hawq_user, hostname, cmd) +cmd = "su - {0} -c 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \"{2} \" '".format(hawq_constants.hawq_user, hostname, cmd) else: cmd = "su - {0} -c \"{1}\"".format(hawq_constants.hawq_user, cmd) Logger.info("Command executed: {0}".format(cmd)) @@ -97,9 +97,9 @@ def exec_psql_cmd(command, host, port, db="template1", tuples_only=True): """ src_cmd = "export PGPORT={0} && source {1}".format(port, hawq_constants.hawq_greenplum_path_file) if tuples_only: -cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) else: -cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) retcode, out, err = exec_ssh_cmd(host, cmd) if retcode: Logger.error("SQL command executed failed: {0}\nReturncode: {1}\nStdout: {2}\nStderr: {3}".format(cmd, retcode, out, err))
ambari git commit: AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 6903ade21 -> e462af568 AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e462af56 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e462af56 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e462af56 Branch: refs/heads/branch-2.2 Commit: e462af5688948b9abc891d4ee76ee5bd7fb5b13d Parents: 6903ade Author: Jun Aoki Authored: Fri Feb 5 16:13:51 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 16:13:51 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/utils.py| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e462af56/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py index 051ee61..a8036d8 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py @@ -82,7 +82,7 @@ def exec_ssh_cmd(hostname, cmd): import params # Only gpadmin should be allowed to run command via ssh, thus not exposing user as a parameter if params.hostname != hostname: -cmd = "su - {0} -c \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \\\"{2} \\\" \"".format(hawq_constants.hawq_user, hostname, cmd) +cmd = "su - {0} -c 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \"{2} \" '".format(hawq_constants.hawq_user, hostname, cmd) else: cmd = "su - {0} -c \"{1}\"".format(hawq_constants.hawq_user, cmd) Logger.info("Command executed: {0}".format(cmd)) @@ -97,9 +97,9 @@ def exec_psql_cmd(command, host, port, db="template1", tuples_only=True): """ src_cmd = "export PGPORT={0} && source {1}".format(port, hawq_constants.hawq_greenplum_path_file) if tuples_only: -cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) else: -cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) retcode, out, err = exec_ssh_cmd(host, cmd) if retcode: Logger.error("SQL command executed failed: {0}\nReturncode: {1}\nStdout: {2}\nStderr: {3}".format(cmd, retcode, out, err))
ambari git commit: AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 3d9f618f9 -> 6903ade21 AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6903ade2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6903ade2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6903ade2 Branch: refs/heads/branch-2.2 Commit: 6903ade21fd6154e9b27f97f1c85434506761839 Parents: 3d9f618 Author: Jun Aoki Authored: Fri Feb 5 16:12:13 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 16:12:13 2016 -0800 -- .../hawq/addStandby/step3_controller.js | 23 ambari-web/app/messages.js | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6903ade2/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js index 5bfaa99..070acc0 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js @@ -32,6 +32,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ selectedService: null, + hawqProps: null, + hideDependenciesInfoBar: true, versionLoaded: true, @@ -106,7 +108,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ this.setDynamicConfigValues(params, data); this.setProperties({ selectedService: params, - isLoaded: true + isLoaded: true, + hawqProps: data }); }, @@ -131,11 +134,23 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ }, this); }, + submit: function () { if (!this.get('isSubmitDisabled')) { - App.get('router.mainAdminKerberosController').getKDCSessionState(function() { -App.router.send("next"); - }); + dataDir = this.get('hawqProps').items[0].properties['hawq_master_directory']; + hawqStandby = this.get('hawqProps').items[0].properties['hawq_standby_address_host'] + App.showConfirmationPopup( +function() { + App.get('router.mainAdminKerberosController').getKDCSessionState(function() { +App.router.send("next"); + }); +}, + Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.body').format(dataDir, hawqStandby), +null, +Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.title'), +"Confirm", +false + ); } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/6903ade2/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 4a132e2..8240e1e 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2879,6 +2879,8 @@ Em.I18n.translations = { '', 'admin.addHawqStandby.wizard.step3.hawqMaster': 'Current HAWQ Master', 'admin.addHawqStandby.wizard.step3.newHawqStandby': 'New HAWQ Standby Master', + 'admin.addHawqStandby.wizard.step3.confirm.dataDir.title': 'HAWQ Standby Master Directory Confirmation', + 'admin.addHawqStandby.wizard.step3.confirm.dataDir.body': 'Please confirm that the HAWQ data directory {0} on the Standby Master {1} does not exist or is empty.If there is pre-existing data then HAWQ Standby will get initialized with stale data.', 'admin.addHawqStandby.step4.save.configuration.note': 'This configuration is created by Add HAWQ Standby wizard', 'admin.addHawqStandby.wizard.step4.header': 'Configure Components', 'admin.addHawqStandby.wizard.step4.task0.title': 'Stop HAWQ Service',
ambari git commit: AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 31309e28b -> 60adfbcf8 AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60adfbcf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60adfbcf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60adfbcf Branch: refs/heads/trunk Commit: 60adfbcf8f88ec4429a5fd91af39ff9173fe Parents: 31309e2 Author: Jun Aoki Authored: Fri Feb 5 15:52:18 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 15:52:18 2016 -0800 -- .../hawq/addStandby/step3_controller.js | 23 ambari-web/app/messages.js | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/60adfbcf/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js index 0cb256d..513a519 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js @@ -33,6 +33,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ selectedService: null, + hawqProps: null, + hideDependenciesInfoBar: true, versionLoaded: true, @@ -107,7 +109,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ this.setDynamicConfigValues(params, data); this.setProperties({ selectedService: params, - isLoaded: true + isLoaded: true, + hawqProps: data }); }, @@ -134,11 +137,23 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({ }, this); }, + submit: function () { if (!this.get('isSubmitDisabled')) { - App.get('router.mainAdminKerberosController').getKDCSessionState(function() { -App.router.send("next"); - }); + dataDir = this.get('hawqProps').items[0].properties['hawq_master_directory']; + hawqStandby = this.get('hawqProps').items[0].properties['hawq_standby_address_host'] + App.showConfirmationPopup( +function() { + App.get('router.mainAdminKerberosController').getKDCSessionState(function() { +App.router.send("next"); + }); +}, + Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.body').format(dataDir, hawqStandby), +null, +Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.title'), +"Confirm", +false + ); } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/60adfbcf/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 9be6d86..b14f9f7 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2910,6 +2910,8 @@ Em.I18n.translations = { '', 'admin.addHawqStandby.wizard.step3.hawqMaster': 'Current HAWQ Master', 'admin.addHawqStandby.wizard.step3.newHawqStandby': 'New HAWQ Standby Master', + 'admin.addHawqStandby.wizard.step3.confirm.dataDir.title': 'HAWQ Standby Master Directory Confirmation', + 'admin.addHawqStandby.wizard.step3.confirm.dataDir.body': 'Please confirm that the HAWQ data directory {0} on the Standby Master {1} does not exist or is empty.If there is pre-existing data then HAWQ Standby will get initialized with stale data.', 'admin.addHawqStandby.step4.save.configuration.note': 'This configuration is created by Add HAWQ Standby wizard', 'admin.addHawqStandby.wizard.step4.header': 'Configure Components', 'admin.addHawqStandby.wizard.step4.task0.title': 'Stop HAWQ Service',
ambari git commit: AMBARI-14911: Populate hawq_site properties when YARN is installed after HAWQ. (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 360d5d2d4 -> 3d9f618f9 AMBARI-14911: Populate hawq_site properties when YARN is installed after HAWQ. (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d9f618f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d9f618f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d9f618f Branch: refs/heads/branch-2.2 Commit: 3d9f618f93dfa4d0044835c9472a24e24a5bd4ca Parents: 360d5d2 Author: Jun Aoki Authored: Fri Feb 5 15:48:55 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 15:48:55 2016 -0800 -- .../HAWQ/2.0.0/configuration/hawq-site.xml | 12 + .../stacks/HDP/2.3/services/stack_advisor.py| 37 +++--- .../stacks/2.3/common/test_stack_advisor.py | 52 +++- 3 files changed, 93 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d9f618f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index f034749..f195215 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -153,6 +153,12 @@ The address of YARN resource manager server. + + +yarn-site +yarn.resourcemanager.address + + @@ -161,6 +167,12 @@ The address of YARN scheduler server. + + +yarn-site +yarn.resourcemanager.scheduler.address + + http://git-wip-us.apache.org/repos/asf/ambari/blob/3d9f618f/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index b9bb8af..71b0e2a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -668,19 +668,32 @@ class HDP23StackAdvisor(HDP22StackAdvisor): def recommendHAWQConfigurations(self, configurations, clusterData, services, hosts): +if "hawq-site" not in services["configurations"]: + return +hawq_site = services["configurations"]["hawq-site"]["properties"] putHawqSiteProperty = self.putProperty(configurations, "hawq-site", services) -if self.isHawqMasterComponentOnAmbariServer(services): - if "hawq-site" in services["configurations"] and "hawq_master_address_port" in services["configurations"]["hawq-site"]["properties"]: -putHawqSiteProperty('hawq_master_address_port', '') -# calculate optimal number of virtual segments componentsListList = [service["components"] for service in services["services"]] componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist] +servicesList = [service["StackServices"]["service_name"] for service in services["services"]] + +# remove master port when master is colocated with Ambari server +if self.isHawqMasterComponentOnAmbariServer(services) and "hawq_master_address_port" in hawq_site: +putHawqSiteProperty('hawq_master_address_port', '') + +# calculate optimal number of virtual segments numSegments = len(self.__getHosts(componentsList, "HAWQSEGMENT")) # update default if segments are deployed -if numSegments and "hawq-site" in services["configurations"] and "default_segment_num" in services["configurations"]["hawq-site"]["properties"]: +if numSegments and "default_segment_num" in hawq_site: factor = 6 if numSegments < 50 else 4 putHawqSiteProperty('default_segment_num', numSegments * factor) - + +# update YARN RM urls with the values from yarn-site if YARN is installed +if "YARN" in servicesList and "yarn-site" in services["configurations"]: + yarn_site = services["configurations"]["yarn-site"]["properties"]
ambari git commit: AMBARI-14911: Populate hawq_site properties when YARN is installed after HAWQ. (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk f57f9b291 -> 31309e28b AMBARI-14911: Populate hawq_site properties when YARN is installed after HAWQ. (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/31309e28 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31309e28 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31309e28 Branch: refs/heads/trunk Commit: 31309e28b470f45f4a9c44ad7e0393dd31eb2dd6 Parents: f57f9b2 Author: Jun Aoki Authored: Fri Feb 5 15:47:56 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 15:47:56 2016 -0800 -- .../HAWQ/2.0.0/configuration/hawq-site.xml | 12 + .../stacks/HDP/2.3/services/stack_advisor.py| 37 +++--- .../stacks/2.3/common/test_stack_advisor.py | 51 +++- 3 files changed, 93 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/31309e28/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index f034749..f195215 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -153,6 +153,12 @@ The address of YARN resource manager server. + + +yarn-site +yarn.resourcemanager.address + + @@ -161,6 +167,12 @@ The address of YARN scheduler server. + + +yarn-site +yarn.resourcemanager.scheduler.address + + http://git-wip-us.apache.org/repos/asf/ambari/blob/31309e28/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index dae3e8a..b354378 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -678,19 +678,32 @@ class HDP23StackAdvisor(HDP22StackAdvisor): def recommendHAWQConfigurations(self, configurations, clusterData, services, hosts): +if "hawq-site" not in services["configurations"]: + return +hawq_site = services["configurations"]["hawq-site"]["properties"] putHawqSiteProperty = self.putProperty(configurations, "hawq-site", services) -if self.isHawqMasterComponentOnAmbariServer(services): - if "hawq-site" in services["configurations"] and "hawq_master_address_port" in services["configurations"]["hawq-site"]["properties"]: -putHawqSiteProperty('hawq_master_address_port', '') -# calculate optimal number of virtual segments componentsListList = [service["components"] for service in services["services"]] componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist] +servicesList = [service["StackServices"]["service_name"] for service in services["services"]] + +# remove master port when master is colocated with Ambari server +if self.isHawqMasterComponentOnAmbariServer(services) and "hawq_master_address_port" in hawq_site: +putHawqSiteProperty('hawq_master_address_port', '') + +# calculate optimal number of virtual segments numSegments = len(self.__getHosts(componentsList, "HAWQSEGMENT")) # update default if segments are deployed -if numSegments and "hawq-site" in services["configurations"] and "default_segment_num" in services["configurations"]["hawq-site"]["properties"]: +if numSegments and "default_segment_num" in hawq_site: factor = 6 if numSegments < 50 else 4 putHawqSiteProperty('default_segment_num', numSegments * factor) - + +# update YARN RM urls with the values from yarn-site if YARN is installed +if "YARN" in servicesList and "yarn-site" in services["configurations"]: + yarn_site = services["configurations"]["yarn-site"]["properties"] + for hs_prop
ambari git commit: AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 e417b5262 -> 360d5d2d4 AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/360d5d2d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/360d5d2d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/360d5d2d Branch: refs/heads/branch-2.2 Commit: 360d5d2d4c5add7073dfdeeeaf5cbed05d55d4b9 Parents: e417b52 Author: Jun Aoki Authored: Fri Feb 5 13:24:49 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 13:24:49 2016 -0800 -- .../nameNode/rollback_controller.js | 25 +++ .../nameNode/step3_controller.js| 36 +++ .../nameNode/step9_controller.js| 23 --- ambari-web/app/data/HDP2/ha_properties.js | 68 +++- 4 files changed, 119 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/360d5d2d/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js index 4aa2d73..b305845 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js @@ -268,17 +268,20 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl }); }, restoreHawqConfigs: function(){ -this.loadConfigTag("hawqSiteTag"); -var hawqSiteTag = this.get("content.hawqSiteTag"); -App.ajax.send({ - name: 'admin.high_availability.load_hawq_configs', - sender: this, - data: { -hawqSiteTag: hawqSiteTag - }, - success: 'onLoadHawqConfigs', - error: 'onTaskError' -}); +var tags = ['hawqSiteTag', 'hdfsClientTag']; +tags.forEach(function (tagName) { + this.loadConfigTag(tagName); + var tag = this.get("content." + tagName); + App.ajax.send({ +name: 'admin.high_availability.load_hawq_configs', +sender: this, +data: { + tagName: tag +}, +success: 'onLoadHawqConfigs', +error: 'onTaskError' + }); +}, this); }, deletePXF: function(){ http://git-wip-us.apache.org/repos/asf/ambari/blob/360d5d2d/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js index bf5b96a..5baf90f 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js @@ -88,6 +88,9 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({ var hawqSiteTag = data.Clusters.desired_configs['hawq-site'].tag; urlParams.push('(type=hawq-site&tag=' + hawqSiteTag + ')'); this.set("hawqSiteTag", {name : "hawqSiteTag", value : hawqSiteTag}); + var hdfsClientTag = data.Clusters.desired_configs['hdfs-client'].tag; + urlParams.push('(type=hdfs-client&tag=' + hdfsClientTag + ')'); + this.set("hdfsClientTag", {name : "hdfsClientTag", value : hdfsClientTag}); } App.ajax.send({ name: 'admin.get.all_configurations', @@ -111,8 +114,13 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({ tweakServiceConfigs: function(configs) { var nameServiceId = this.get('content.nameServiceId'); -var nameServiceConfig = configs.findProperty('name','dfs.nameservices'); -this.setConfigInitialValue(nameServiceConfig,nameServiceId); +var filesToChange = ['hdfs-site']; +// If HAWQ is on the cluster, update dfs.nameservices in hdfs-client.xml for HAWQ to work with NN HA +if (App.Service.find().someProperty('serviceName', 'HAWQ')) filesToChange.push('hdfs-client'); +filesToChange.forEach(function (filename) { + var nameServiceConfig = configs.filterProperty('filename', filename).findProperty('name','df
ambari git commit: AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk bb864df5d -> 26ad97b64 AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/26ad97b6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/26ad97b6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/26ad97b6 Branch: refs/heads/trunk Commit: 26ad97b6406008981ce8bec6158f6a47bb1459a4 Parents: bb864df Author: Jun Aoki Authored: Fri Feb 5 13:23:36 2016 -0800 Committer: Jun Aoki Committed: Fri Feb 5 13:23:36 2016 -0800 -- .../nameNode/rollback_controller.js | 24 +++ .../nameNode/step3_controller.js| 3 + .../nameNode/step9_controller.js| 23 --- ambari-web/app/data/HDP2/ha_properties.js | 68 +++- .../nameNode/step3_controller_test.js | 49 -- 5 files changed, 139 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js index 465a1d2..6895c6c 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js @@ -251,17 +251,19 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl }); }, restoreHawqConfigs: function(){ -this.loadConfigTag("hawqSiteTag"); -var hawqSiteTag = this.get("content.hawqSiteTag"); -App.ajax.send({ - name: 'admin.high_availability.load_hawq_configs', - sender: this, - data: { -hawqSiteTag: hawqSiteTag - }, - success: 'onLoadHawqConfigs', - error: 'onTaskError' -}); +var tags = ['hawqSiteTag', 'hdfsClientTag']; +tags.forEach(function (tagName) { + var tag = this.get("content." + tagName); + App.ajax.send({ +name: 'admin.high_availability.load_hawq_configs', +sender: this, +data: { + tagName: tag +}, +success: 'onLoadHawqConfigs', +error: 'onTaskError' + }); +}, this); }, deletePXF: function(){ http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js index b420687..4e4df60 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js @@ -100,6 +100,9 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({ var hawqSiteTag = data.Clusters.desired_configs['hawq-site'].tag; urlParams.push('(type=hawq-site&tag=' + hawqSiteTag + ')'); this.set("hawqSiteTag", {name : "hawqSiteTag", value : hawqSiteTag}); + var hdfsClientTag = data.Clusters.desired_configs['hdfs-client'].tag; + urlParams.push('(type=hdfs-client&tag=' + hdfsClientTag + ')'); + this.set("hdfsClientTag", {name : "hdfsClientTag", value : hdfsClientTag}); } App.ajax.send({ name: 'admin.get.all_configurations', http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js index 7745c6b..934d133 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js @@ -118,16 +118,19 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont reconfigureHawq: function () { var data = this.get('content.serviceConfigProperties
ambari git commit: AMBARI-14913: Show HAWQ default_segment_num parameter in General section (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 080991d13 -> 3d7643b41 AMBARI-14913: Show HAWQ default_segment_num parameter in General section (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d7643b4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d7643b4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d7643b4 Branch: refs/heads/trunk Commit: 3d7643b41c214dfc2bca4af2ab5dc37f27b8e652 Parents: 080991d Author: Jun Aoki Authored: Thu Feb 4 14:52:27 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 4 14:52:27 2016 -0800 -- ambari-web/app/data/HDP2.3/site_properties.js | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d7643b4/ambari-web/app/data/HDP2.3/site_properties.js -- diff --git a/ambari-web/app/data/HDP2.3/site_properties.js b/ambari-web/app/data/HDP2.3/site_properties.js index fb79cd3..61cbe88 100644 --- a/ambari-web/app/data/HDP2.3/site_properties.js +++ b/ambari-web/app/data/HDP2.3/site_properties.js @@ -333,6 +333,13 @@ hdp23properties.push({ "index": 8 }, { +"name": "default_segment_num", +"filename": "hawq-site.xml", +"category": "General", +"serviceName": "HAWQ", +"index": 9 + }, + { "name": "content", "serviceName": "HAWQ", "filename": "gpcheck-env.xml",
ambari git commit: AMBARI-14913: Show HAWQ default_segment_num parameter in General section (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 72f4367ea -> 305a85fb5 AMBARI-14913: Show HAWQ default_segment_num parameter in General section (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/305a85fb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/305a85fb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/305a85fb Branch: refs/heads/branch-2.2 Commit: 305a85fb54902e294495f4d600685bff9d902c9b Parents: 72f4367 Author: Jun Aoki Authored: Thu Feb 4 14:51:19 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 4 14:51:19 2016 -0800 -- ambari-web/app/data/HDP2.3/site_properties.js | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/305a85fb/ambari-web/app/data/HDP2.3/site_properties.js -- diff --git a/ambari-web/app/data/HDP2.3/site_properties.js b/ambari-web/app/data/HDP2.3/site_properties.js index fb79cd3..61cbe88 100644 --- a/ambari-web/app/data/HDP2.3/site_properties.js +++ b/ambari-web/app/data/HDP2.3/site_properties.js @@ -333,6 +333,13 @@ hdp23properties.push({ "index": 8 }, { +"name": "default_segment_num", +"filename": "hawq-site.xml", +"category": "General", +"serviceName": "HAWQ", +"index": 9 + }, + { "name": "content", "serviceName": "HAWQ", "filename": "gpcheck-env.xml",
ambari git commit: AMBARI-14884: Hawq standby host config should be removed on single node cluster during initial cluster installation (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 8b620a3c3 -> 16ff8f30a AMBARI-14884: Hawq standby host config should be removed on single node cluster during initial cluster installation (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/16ff8f30 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/16ff8f30 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/16ff8f30 Branch: refs/heads/branch-2.2 Commit: 16ff8f30a9108a904ebd656ebe7b162b6c3c258d Parents: 8b620a3 Author: Jun Aoki Authored: Wed Feb 3 15:41:31 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 3 15:41:31 2016 -0800 -- ambari-web/app/controllers/wizard/step7_controller.js | 3 ++- ambari-web/test/controllers/wizard/step7_test.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/16ff8f30/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index 4b27c76..a38222a 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -724,7 +724,8 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E } } } -if (App.get('isSingleNode')) this.removeHawqStandbyHostAddressConfig(configs); +// On single node cluster, update hawq configs +if (Object.keys(this.get('content.hosts')).length === 1) this.removeHawqStandbyHostAddressConfig(configs); var dependedServices = ["STORM", "YARN"]; dependedServices.forEach(function (serviceName) { if (this.get('allSelectedServiceNames').contains(serviceName)) { http://git-wip-us.apache.org/repos/asf/ambari/blob/16ff8f30/ambari-web/test/controllers/wizard/step7_test.js -- diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js index 408a43e..79f0202 100644 --- a/ambari-web/test/controllers/wizard/step7_test.js +++ b/ambari-web/test/controllers/wizard/step7_test.js @@ -1476,6 +1476,7 @@ describe('App.InstallerStep7Controller', function () { } } }); + installerStep7Controller.set('content.hosts', Em.A([{hostName: 'h1'}, {hostName: 'h2'}])); }); afterEach(function () { App.config.fileConfigsIntoTextarea.restore();
ambari git commit: AMBARI-14884: Hawq standby host config should be removed on single node cluster during initial cluster installation (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 65558a5a6 -> 4fbf172c3 AMBARI-14884: Hawq standby host config should be removed on single node cluster during initial cluster installation (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fbf172c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fbf172c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fbf172c Branch: refs/heads/trunk Commit: 4fbf172c31e65bab503ab8e0acbfefd2b7a3adbe Parents: 65558a5 Author: Jun Aoki Authored: Wed Feb 3 15:38:40 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 3 15:38:40 2016 -0800 -- .../app/controllers/wizard/step7_controller.js | 2 +- .../test/controllers/wizard/step7_test.js | 20 ++-- 2 files changed, 7 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4fbf172c/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index f6b6cb3..011833b 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -699,7 +699,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E if (App.get('isHaEnabled')) this.addHawqConfigsOnNnHa(configs); if (App.get('isRMHaEnabled')) this.addHawqConfigsOnRMHa(configs); } -if (App.get('isSingleNode')) this.removeHawqStandbyHostAddressConfig(configs); +if (Object.keys(this.get('content.hosts')).length === 1) this.removeHawqStandbyHostAddressConfig(configs); return configs }, http://git-wip-us.apache.org/repos/asf/ambari/blob/4fbf172c/ambari-web/test/controllers/wizard/step7_test.js -- diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js index d4dcb24..8a4a96f 100644 --- a/ambari-web/test/controllers/wizard/step7_test.js +++ b/ambari-web/test/controllers/wizard/step7_test.js @@ -1180,8 +1180,10 @@ describe('App.InstallerStep7Controller', function () { }); - describe('#updateHawqConfigs', function() { -var isSingleNode = false; + describe('#removeHawqStandbyHostAddressConfig', function() { +installerStep7Controller = App.WizardStep7Controller.create({ + content: Em.Object.create({}), +}); var testHawqSiteConfigs = [ { name: 'hawq_standby_address_host', @@ -1194,19 +1196,9 @@ describe('App.InstallerStep7Controller', function () { ]; var oldHawqSiteLength = testHawqSiteConfigs.length; -beforeEach(function () { - sinon.stub(App, 'get', function () { -return isSingleNode; - }); -}); - -afterEach(function () { - App.get.restore() -}); - it('hawq_standby_address_host should be removed on single node cluster', function() { - isSingleNode = true; var hawqSiteConfigs = testHawqSiteConfigs.slice(); + installerStep7Controller.set('content.hosts', {'hostname': 'h1'}); var updatedHawqSiteConfigs = installerStep7Controller.updateHawqConfigs(hawqSiteConfigs); expect(updatedHawqSiteConfigs.length).to.be.equal(oldHawqSiteLength-1); expect(updatedHawqSiteConfigs.findProperty('name', 'hawq_standby_address_host')).to.not.exist; @@ -1214,8 +1206,8 @@ describe('App.InstallerStep7Controller', function () { }); it('hawq_standby_address_host should not be removed on multi node clusters', function() { - isSingleNode = false; var hawqSiteConfigs = testHawqSiteConfigs.slice(); + installerStep7Controller.set('content.hosts', Em.A([{'hostname': 'h1'}, {'hostname': 'h2'}])); var updatedHawqSiteConfigs = installerStep7Controller.updateHawqConfigs(hawqSiteConfigs); expect(updatedHawqSiteConfigs.length).to.be.equal(oldHawqSiteLength); expect(updatedHawqSiteConfigs.findProperty('name', 'hawq_standby_address_host').value).to.be.equal('h2');
ambari git commit: AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 a539802bc -> 8b620a3c3 AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8b620a3c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8b620a3c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8b620a3c Branch: refs/heads/branch-2.2 Commit: 8b620a3c3bc1beeec76d23c4bfbf36c7ca1f88ea Parents: a539802 Author: Jun Aoki Authored: Wed Feb 3 15:29:02 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 3 15:29:02 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 10 + .../2.0.0/package/scripts/hawq_constants.py | 1 + .../HAWQ/2.0.0/package/scripts/hawqstandby.py | 3 +- ambari-web/app/assets/test/tests.js | 1 + ambari-web/app/controllers.js | 4 + .../hawq/activateStandby/step1_controller.js| 23 +++ .../hawq/activateStandby/step2_controller.js| 130 + .../hawq/activateStandby/step3_controller.js| 126 .../hawq/activateStandby/wizard_controller.js | 128 + .../main/admin/highAvailability_controller.js | 9 + ambari-web/app/controllers/main/service/item.js | 5 + .../HDP2.3/hawq_activate_standby_properties.js | 43 + ambari-web/app/data/controller_route.js | 4 + ambari-web/app/messages.js | 37 +++- .../wizard/wizardProgressPageController.js | 28 +++ ambari-web/app/models/host_component.js | 7 + .../app/routes/activate_hawq_standby_routes.js | 190 +++ ambari-web/app/routes/main.js | 2 + .../hawq/activateStandby/step1.hbs | 28 +++ .../hawq/activateStandby/step2.hbs | 53 ++ .../hawq/activateStandby/step3.hbs | 18 ++ .../hawq/activateStandby/wizard.hbs | 44 + ambari-web/app/utils/db.js | 1 + ambari-web/app/views.js | 4 + .../hawq/activateStandby/step1_view.js | 26 +++ .../hawq/activateStandby/step2_view.js | 29 +++ .../hawq/activateStandby/step3_view.js | 36 .../hawq/activateStandby/wizard_view.js | 74 ambari-web/app/views/main/service/item.js | 2 + .../activateStandby/step2_controller_test.js| 172 + 30 files changed, 1236 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8b620a3c/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 21ab445..ce625eb 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -76,6 +76,16 @@ PYTHON 600 + + + ACTIVATE_STANDBY + +scripts/hawqstandby.py +PYTHON +1200 + + + HDFS/HDFS_CLIENT http://git-wip-us.apache.org/repos/asf/ambari/blob/8b620a3c/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 01de99a..6a2d9ba 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -27,6 +27,7 @@ YARN = "yarn" CLUSTER = "cluster" IMMEDIATE = "immediate" FAST = "fast" +ACTIVATE = "activate" # Users root_user = "root" http://git-wip-us.apache.org/repos/asf/ambari/blob/8b620a3c/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py index 7f5bab4..3395810 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/script
ambari git commit: AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk ad67efd2d -> 65558a5a6 AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/65558a5a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/65558a5a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/65558a5a Branch: refs/heads/trunk Commit: 65558a5a660062ebb1c9380e4a7101ce45ad4fe2 Parents: ad67efd Author: Jun Aoki Authored: Wed Feb 3 15:27:26 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 3 15:27:26 2016 -0800 -- ambari-web/app/assets/test/tests.js | 1 + ambari-web/app/controllers.js | 4 + .../hawq/activateStandby/step1_controller.js| 23 +++ .../hawq/activateStandby/step2_controller.js| 105 +++ .../hawq/activateStandby/step3_controller.js| 126 + .../hawq/activateStandby/wizard_controller.js | 128 + .../main/admin/highAvailability_controller.js | 9 + ambari-web/app/controllers/main/service/item.js | 5 + .../HDP2.3/hawq_activate_standby_properties.js | 43 + ambari-web/app/data/controller_route.js | 4 + ambari-web/app/messages.js | 37 +++- .../wizard/wizardProgressPageController.js | 30 ambari-web/app/models/host_component.js | 9 +- .../app/routes/activate_hawq_standby_routes.js | 179 +++ ambari-web/app/routes/main.js | 2 + .../hawq/activateStandby/step1.hbs | 28 +++ .../hawq/activateStandby/step2.hbs | 53 ++ .../hawq/activateStandby/step3.hbs | 18 ++ .../hawq/activateStandby/wizard.hbs | 44 + .../hawq_activate_standby_config_initializer.js | 53 ++ .../utils/configs/hawq_ha_config_initializer.js | 2 +- ambari-web/app/utils/db.js | 1 + ambari-web/app/views.js | 4 + .../hawq/activateStandby/step1_view.js | 26 +++ .../hawq/activateStandby/step2_view.js | 29 +++ .../hawq/activateStandby/step3_view.js | 36 .../hawq/activateStandby/wizard_view.js | 74 ambari-web/app/views/main/service/item.js | 2 + .../activateStandby/step2_controller_test.js| 88 + 29 files changed, 1160 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/65558a5a/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index 215a754..85c814d 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -71,6 +71,7 @@ var files = [ 'test/controllers/main/admin/highAvailability/nameNode/step4_controller_test', 'test/controllers/main/admin/highAvailability/resourceManager/step3_controller_test', 'test/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller_test', + 'test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test', 'test/controllers/main/dashboard/config_history_controller_test', 'test/controllers/main/charts/heatmap_test', 'test/controllers/main/charts/heatmap_metrics/heatmap_metric_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/65558a5a/ambari-web/app/controllers.js -- diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js index eed54dc..8fa9e6b 100644 --- a/ambari-web/app/controllers.js +++ b/ambari-web/app/controllers.js @@ -60,6 +60,10 @@ require('controllers/main/admin/highAvailability/hawq/addStandby/step1_controlle require('controllers/main/admin/highAvailability/hawq/addStandby/step2_controller'); require('controllers/main/admin/highAvailability/hawq/addStandby/step3_controller'); require('controllers/main/admin/highAvailability/hawq/addStandby/step4_controller'); +require('controllers/main/admin/highAvailability/hawq/activateStandby/wizard_controller'); +require('controllers/main/admin/highAvailability/hawq/activateStandby/step1_controller'); +require('controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller'); +require('controllers/main/admin/highAvailability/hawq/activateStandby/step3_controller'); require('controllers/main/admin/highAvailability/rangerAdmin/wizard_controller'); require('controllers/main/admin/highAvailability/rangerAdmin/step1_controller'); require(
ambari git commit: AMBARI-14855: Add Alert for HAWQSTANDBY sync status with HAWQMASTER (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 7259d972e -> 424cca6c3 AMBARI-14855: Add Alert for HAWQSTANDBY sync status with HAWQMASTER (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/424cca6c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/424cca6c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/424cca6c Branch: refs/heads/trunk Commit: 424cca6c3744eca2c44dff0fbc47791492845f88 Parents: 7259d97 Author: Jun Aoki Authored: Wed Feb 3 10:58:56 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 3 10:58:56 2016 -0800 -- .../common-services/HAWQ/2.0.0/alerts.json | 19 ++ .../2.0.0/package/alerts/alert_sync_status.py | 91 + .../stacks/2.3/HAWQ/test_alert_sync_status.py | 194 +++ 3 files changed, 304 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/424cca6c/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json new file mode 100644 index 000..3119a0c --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json @@ -0,0 +1,19 @@ +{ + "HAWQ": { +"HAWQMASTER": [ + { +"name": "hawqstandby_sync_status", +"label": "HAWQ Standby Sync Status", +"description": "This alert will trigger if HAWQ Standby is not synchronized with HAWQ Master", +"interval": 1, +"scope": "ANY", +"enabled": true, +"source": { + "type": "SCRIPT", + "path": "HAWQ/2.0.0/package/alerts/alert_sync_status.py", + "parameters": [] +} + } +] + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/424cca6c/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py new file mode 100644 index 000..c94be9e --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python + +""" +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +import logging +from resource_management.core.shell import call + +HAWQ_USER = 'gpadmin' +HAWQ_GREENPLUM_PATH_FILE = '/usr/local/hawq/greenplum_path.sh' + +HAWQMASTER_PORT = '{{hawq-site/hawq_master_address_port}}' +HAWQSTANDBY_ADDRESS = '{{hawq-site/hawq_standby_address_host}}' + +RESULT_STATE_OK = 'OK' +RESULT_STATE_WARNING = 'WARNING' +RESULT_STATE_UNKNOWN = 'UNKNOWN' +RESULT_STATE_SKIPPED = 'SKIPPED' + +logger = logging.getLogger('ambari_alerts') + + +def get_tokens(): + """ + Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute + """ + return (HAWQMASTER_PORT, HAWQSTANDBY_ADDRESS) + + +def execute(configurations={}, parameters={}, host_name=None): + """ + Returns a tuple containing the result code and a pre-formatted result label + + Keyword arguments: + configurations (dictionary): a mapping of configuration key to value + parameters (dictionary): a mapping of script parameter key to value + host_name (string): the name of this host where the alert is running + """ + + if configurations is None: +return (RE
ambari git commit: AMBARI-14855: Add Alert for HAWQSTANDBY sync status with HAWQMASTER (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 29860c9ba -> 78c7755c0 AMBARI-14855: Add Alert for HAWQSTANDBY sync status with HAWQMASTER (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/78c7755c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/78c7755c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/78c7755c Branch: refs/heads/branch-2.2 Commit: 78c7755c00e4142898403ab5bc3af89820ad80f2 Parents: 29860c9 Author: Jun Aoki Authored: Wed Feb 3 10:57:09 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 3 10:57:09 2016 -0800 -- .../common-services/HAWQ/2.0.0/alerts.json | 19 ++ .../2.0.0/package/alerts/alert_sync_status.py | 91 + .../stacks/2.3/HAWQ/test_alert_sync_status.py | 194 +++ 3 files changed, 304 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/78c7755c/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json new file mode 100644 index 000..3119a0c --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/alerts.json @@ -0,0 +1,19 @@ +{ + "HAWQ": { +"HAWQMASTER": [ + { +"name": "hawqstandby_sync_status", +"label": "HAWQ Standby Sync Status", +"description": "This alert will trigger if HAWQ Standby is not synchronized with HAWQ Master", +"interval": 1, +"scope": "ANY", +"enabled": true, +"source": { + "type": "SCRIPT", + "path": "HAWQ/2.0.0/package/alerts/alert_sync_status.py", + "parameters": [] +} + } +] + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/78c7755c/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py new file mode 100644 index 000..c94be9e --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/alerts/alert_sync_status.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python + +""" +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +import logging +from resource_management.core.shell import call + +HAWQ_USER = 'gpadmin' +HAWQ_GREENPLUM_PATH_FILE = '/usr/local/hawq/greenplum_path.sh' + +HAWQMASTER_PORT = '{{hawq-site/hawq_master_address_port}}' +HAWQSTANDBY_ADDRESS = '{{hawq-site/hawq_standby_address_host}}' + +RESULT_STATE_OK = 'OK' +RESULT_STATE_WARNING = 'WARNING' +RESULT_STATE_UNKNOWN = 'UNKNOWN' +RESULT_STATE_SKIPPED = 'SKIPPED' + +logger = logging.getLogger('ambari_alerts') + + +def get_tokens(): + """ + Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute + """ + return (HAWQMASTER_PORT, HAWQSTANDBY_ADDRESS) + + +def execute(configurations={}, parameters={}, host_name=None): + """ + Returns a tuple containing the result code and a pre-formatted result label + + Keyword arguments: + configurations (dictionary): a mapping of configuration key to value + parameters (dictionary): a mapping of script parameter key to value + host_name (string): the name of this host where the alert is running + """ + + if configurations is None
ambari git commit: AMBARI-14850: Removed unused functions from params.py in HAWQ (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 17afb926f -> 2551d9f08 AMBARI-14850: Removed unused functions from params.py in HAWQ (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2551d9f0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2551d9f0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2551d9f0 Branch: refs/heads/branch-2.2 Commit: 2551d9f08702b44f70f9b35a32003bd9bb156ef8 Parents: 17afb92 Author: Jun Aoki Authored: Tue Feb 2 17:00:14 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 2 17:00:14 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/params.py| 21 1 file changed, 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2551d9f0/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py index 604ddc0..add3c63 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py @@ -22,14 +22,7 @@ from hawq_constants import PXF_PORT, pxf_hdfs_test_dir from resource_management import Script from resource_management.libraries.functions.default import default from resource_management.libraries.resources.hdfs_resource import HdfsResource -from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop from resource_management.libraries.functions import get_kinit_path -from resource_management.libraries.functions import conf_select -try: -from resource_management.libraries.functions import hdp_select as hadoop_select -except ImportError: -from resource_management.libraries.functions import phd_select as hadoop_select - config = Script.get_config() @@ -70,9 +63,6 @@ security_enabled = config['configurations']['cluster-env']['security_enabled'] hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] -hadoop_conf_dir = conf_select.get_hadoop_conf_dir() -hadoop_bin_dir = hadoop_select.get_hadoop_dir("bin") -execute_path = os.environ['PATH'] + os.pathsep + hadoop_bin_dir dfs_nameservice = default('/configurations/hdfs-site/dfs.nameservices', None) # HDFSResource partial function @@ -85,17 +75,6 @@ HdfsResource = functools.partial(HdfsResource, hdfs_site=hdfs_site, default_fs=default_fs) -# ExecuteHadoop partial function -ExecuteHadoop = functools.partial(ExecuteHadoop, - user=hdfs_superuser, - logoutput=True, - conf_dir=hadoop_conf_dir, - security_enabled=security_enabled, - kinit_path_local=kinit_path_local, - keytab=hdfs_user_keytab, - principal=hdfs_principal_name, - bin_dir=execute_path) - # For service Check is_pxf_installed = __get_component_host("pxf_hosts") is not None
ambari git commit: AMBARI-14816: Run a service check on PXF service for Hive (lavjain via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 5c10866d1 -> 76d54b46d AMBARI-14816: Run a service check on PXF service for Hive (lavjain via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76d54b46 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76d54b46 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76d54b46 Branch: refs/heads/branch-2.2 Commit: 76d54b46d126df8ce9839011be6acffb4810aed0 Parents: 5c10866 Author: Jun Aoki Authored: Tue Feb 2 16:20:54 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 2 16:20:54 2016 -0800 -- .../PXF/3.0.0/package/scripts/params.py | 6 +- .../PXF/3.0.0/package/scripts/pxf_constants.py | 1 + .../PXF/3.0.0/package/scripts/service_check.py | 101 +-- 3 files changed, 76 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/76d54b46/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py index 36dc7c1..7749de7 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py @@ -16,7 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. """ -import os import functools from resource_management import Script @@ -35,6 +34,7 @@ pxf_group = pxf_user hdfs_superuser = config['configurations']['hadoop-env']['hdfs_user'] hdfs_superuser_group = config["configurations"]["hdfs-site"]["dfs.permissions.superusergroup"] user_group = config["configurations"]["cluster-env"]["user_group"] +hive_user = default('configurations/hive-env/hive_user', None) tomcat_group = "tomcat" # Directories @@ -54,11 +54,13 @@ realm_name = config['configurations']['kerberos-env']['realm'] #HBase is_hbase_installed = default("/clusterHostInfo/hbase_master_hosts", None) is not None +#Hive +is_hive_installed = default("/clusterHostInfo/hive_server_host", None) is not None + # HDFS hdfs_site = config['configurations']['hdfs-site'] default_fs = config['configurations']['core-site']['fs.defaultFS'] -security_enabled = config['configurations']['cluster-env']['security_enabled'] hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] http://git-wip-us.apache.org/repos/asf/ambari/blob/76d54b46/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py index 3138379..9d93a38 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py @@ -24,3 +24,4 @@ pxf_hdfs_test_dir = "/pxf_hdfs_smoke_test" pxf_hdfs_read_test_file = pxf_hdfs_test_dir + "/pxf_smoke_test_read_data" pxf_hdfs_write_test_file = pxf_hdfs_test_dir + "/pxf_smoke_test_write_data" pxf_hbase_test_table = "pxf_hbase_smoke_test_table" +pxf_hive_test_table = "pxf_hive_smoke_test_table" http://git-wip-us.apache.org/repos/asf/ambari/blob/76d54b46/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py index 72b59e4..064be04 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py @@ -
ambari git commit: AMBARI-14816: Run a service check on PXF service for Hive (lavjain via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 6fb00585c -> 7632b7bb2 AMBARI-14816: Run a service check on PXF service for Hive (lavjain via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7632b7bb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7632b7bb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7632b7bb Branch: refs/heads/trunk Commit: 7632b7bb2454a67015308da25c588dd0bf4aafe2 Parents: 6fb0058 Author: Jun Aoki Authored: Tue Feb 2 16:19:24 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 2 16:19:24 2016 -0800 -- .../PXF/3.0.0/package/scripts/params.py | 6 +- .../PXF/3.0.0/package/scripts/pxf_constants.py | 1 + .../PXF/3.0.0/package/scripts/service_check.py | 101 +-- 3 files changed, 76 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7632b7bb/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py index 36dc7c1..7749de7 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py @@ -16,7 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. """ -import os import functools from resource_management import Script @@ -35,6 +34,7 @@ pxf_group = pxf_user hdfs_superuser = config['configurations']['hadoop-env']['hdfs_user'] hdfs_superuser_group = config["configurations"]["hdfs-site"]["dfs.permissions.superusergroup"] user_group = config["configurations"]["cluster-env"]["user_group"] +hive_user = default('configurations/hive-env/hive_user', None) tomcat_group = "tomcat" # Directories @@ -54,11 +54,13 @@ realm_name = config['configurations']['kerberos-env']['realm'] #HBase is_hbase_installed = default("/clusterHostInfo/hbase_master_hosts", None) is not None +#Hive +is_hive_installed = default("/clusterHostInfo/hive_server_host", None) is not None + # HDFS hdfs_site = config['configurations']['hdfs-site'] default_fs = config['configurations']['core-site']['fs.defaultFS'] -security_enabled = config['configurations']['cluster-env']['security_enabled'] hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] http://git-wip-us.apache.org/repos/asf/ambari/blob/7632b7bb/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py index 3138379..9d93a38 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py @@ -24,3 +24,4 @@ pxf_hdfs_test_dir = "/pxf_hdfs_smoke_test" pxf_hdfs_read_test_file = pxf_hdfs_test_dir + "/pxf_smoke_test_read_data" pxf_hdfs_write_test_file = pxf_hdfs_test_dir + "/pxf_smoke_test_write_data" pxf_hbase_test_table = "pxf_hbase_smoke_test_table" +pxf_hive_test_table = "pxf_hive_smoke_test_table" http://git-wip-us.apache.org/repos/asf/ambari/blob/7632b7bb/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py index 72b59e4..064be04 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py @@ -24,8 +2
ambari git commit: AMBARI-14872: HAWQ service check fails if master port is not 5432 (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 7c89909a8 -> 5c10866d1 AMBARI-14872: HAWQ service check fails if master port is not 5432 (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c10866d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c10866d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c10866d Branch: refs/heads/branch-2.2 Commit: 5c10866d10fa8f366188717c8bfb7192f5be233e Parents: 7c89909 Author: Jun Aoki Authored: Tue Feb 2 15:52:12 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 2 15:52:12 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/service_check.py | 22 ++-- .../HAWQ/2.0.0/package/scripts/utils.py | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5c10866d/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py index 4e5dc32..6e7ea0f 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py @@ -30,18 +30,17 @@ class HAWQServiceCheck(Script): Runs a set of HAWQ tests to verify if the service has been setup correctly """ - def __init__(self): -self.active_master_host = common.get_local_hawq_site_property("hawq_master_address_host") -self.checks_failed = 0 -self.total_checks = 3 - - def service_check(self, env): """ Runs service check for HAWQ. """ import params +self.active_master_host = params.hawqmaster_host +self.active_master_port = params.hawq_master_address_port +self.checks_failed = 0 +self.total_checks = 2 + # Checks HAWQ cluster state self.check_state() @@ -50,6 +49,7 @@ class HAWQServiceCheck(Script): # Runs check for writing and reading external tables on HDFS using PXF, if PXF is installed if params.is_pxf_installed: + self.total_checks += 1 self.check_hawq_pxf_hdfs() else: Logger.info("PXF not installed. Skipping HAWQ-PXF checks...") @@ -128,32 +128,32 @@ class HAWQServiceCheck(Script): def drop_table(self, table): Logger.info("Dropping {0} table if exists".format(table['name'])) sql_cmd = "DROP {0} TABLE IF EXISTS {1}".format(table['drop_type'], table['name']) -exec_psql_cmd(sql_cmd, self.active_master_host) +exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port) def create_table(self, table): Logger.info("Creating table {0}".format(table['name'])) sql_cmd = "CREATE {0} TABLE {1} {2}".format(table['create_type'], table['name'], table['description']) -exec_psql_cmd(sql_cmd, self.active_master_host) +exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port) def insert_data(self, table): Logger.info("Inserting data to table {0}".format(table['name'])) sql_cmd = "INSERT INTO {0} SELECT * FROM generate_series(1,10)".format(table['name']) -exec_psql_cmd(sql_cmd, self.active_master_host) +exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port) def query_data(self, table): Logger.info("Querying data from table {0}".format(table['name'])) sql_cmd = "SELECT * FROM {0}".format(table['name']) -exec_psql_cmd(sql_cmd, self.active_master_host) +exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port) def validate_data(self, table): expected_data = "55" Logger.info("Validating data inserted, finding sum of all the inserted entries. Expected output: {0}".format(expected_data)) sql_cmd = "SELECT sum(col1) FROM {0}".format(table['name']) -_, stdout, _ = exec_psql_cmd(sql_cmd, self.active_master_host, tuples_only=False) +_, stdout, _ = exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port, tuples_only=False) if expected_data != stdout.strip(): Logger.error("Incorrect data returned. Expected Data: {0} Actual Data: {1}".format(expected_data, stdout)) raise Fail("Incorrect data returned.") http://git-wip-us.apache.org/repos/asf/a
ambari git commit: AMBARI-14872: HAWQ service check fails if master port is not 5432 (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 94c13eee7 -> 6fb00585c AMBARI-14872: HAWQ service check fails if master port is not 5432 (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6fb00585 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6fb00585 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6fb00585 Branch: refs/heads/trunk Commit: 6fb00585cf9b7e55ce615bbfc4d7ee11f4ed319e Parents: 94c13ee Author: Jun Aoki Authored: Tue Feb 2 15:51:24 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 2 15:51:24 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/service_check.py | 22 ++-- .../HAWQ/2.0.0/package/scripts/utils.py | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6fb00585/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py index 4e5dc32..6e7ea0f 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/service_check.py @@ -30,18 +30,17 @@ class HAWQServiceCheck(Script): Runs a set of HAWQ tests to verify if the service has been setup correctly """ - def __init__(self): -self.active_master_host = common.get_local_hawq_site_property("hawq_master_address_host") -self.checks_failed = 0 -self.total_checks = 3 - - def service_check(self, env): """ Runs service check for HAWQ. """ import params +self.active_master_host = params.hawqmaster_host +self.active_master_port = params.hawq_master_address_port +self.checks_failed = 0 +self.total_checks = 2 + # Checks HAWQ cluster state self.check_state() @@ -50,6 +49,7 @@ class HAWQServiceCheck(Script): # Runs check for writing and reading external tables on HDFS using PXF, if PXF is installed if params.is_pxf_installed: + self.total_checks += 1 self.check_hawq_pxf_hdfs() else: Logger.info("PXF not installed. Skipping HAWQ-PXF checks...") @@ -128,32 +128,32 @@ class HAWQServiceCheck(Script): def drop_table(self, table): Logger.info("Dropping {0} table if exists".format(table['name'])) sql_cmd = "DROP {0} TABLE IF EXISTS {1}".format(table['drop_type'], table['name']) -exec_psql_cmd(sql_cmd, self.active_master_host) +exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port) def create_table(self, table): Logger.info("Creating table {0}".format(table['name'])) sql_cmd = "CREATE {0} TABLE {1} {2}".format(table['create_type'], table['name'], table['description']) -exec_psql_cmd(sql_cmd, self.active_master_host) +exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port) def insert_data(self, table): Logger.info("Inserting data to table {0}".format(table['name'])) sql_cmd = "INSERT INTO {0} SELECT * FROM generate_series(1,10)".format(table['name']) -exec_psql_cmd(sql_cmd, self.active_master_host) +exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port) def query_data(self, table): Logger.info("Querying data from table {0}".format(table['name'])) sql_cmd = "SELECT * FROM {0}".format(table['name']) -exec_psql_cmd(sql_cmd, self.active_master_host) +exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port) def validate_data(self, table): expected_data = "55" Logger.info("Validating data inserted, finding sum of all the inserted entries. Expected output: {0}".format(expected_data)) sql_cmd = "SELECT sum(col1) FROM {0}".format(table['name']) -_, stdout, _ = exec_psql_cmd(sql_cmd, self.active_master_host, tuples_only=False) +_, stdout, _ = exec_psql_cmd(sql_cmd, self.active_master_host, self.active_master_port, tuples_only=False) if expected_data != stdout.strip(): Logger.error("Incorrect data returned. Expected Data: {0} Actual Data: {1}".format(expected_data, stdout)) raise Fail("Incorrect data returned.") http://git-wip-us.apache.org/repos/asf/ambari/blob/6fb
ambari git commit: AMBARI-14850: Removed unused functions from params.py in HAWQ (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 9a0348957 -> 6ce156554 AMBARI-14850: Removed unused functions from params.py in HAWQ (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ce15655 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ce15655 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ce15655 Branch: refs/heads/trunk Commit: 6ce156554600214339c7e8c35219abaf570346e9 Parents: 9a03489 Author: Jun Aoki Authored: Mon Feb 1 17:19:59 2016 -0800 Committer: Jun Aoki Committed: Mon Feb 1 17:19:59 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/params.py| 21 1 file changed, 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6ce15655/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py index 604ddc0..add3c63 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py @@ -22,14 +22,7 @@ from hawq_constants import PXF_PORT, pxf_hdfs_test_dir from resource_management import Script from resource_management.libraries.functions.default import default from resource_management.libraries.resources.hdfs_resource import HdfsResource -from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop from resource_management.libraries.functions import get_kinit_path -from resource_management.libraries.functions import conf_select -try: -from resource_management.libraries.functions import hdp_select as hadoop_select -except ImportError: -from resource_management.libraries.functions import phd_select as hadoop_select - config = Script.get_config() @@ -70,9 +63,6 @@ security_enabled = config['configurations']['cluster-env']['security_enabled'] hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] -hadoop_conf_dir = conf_select.get_hadoop_conf_dir() -hadoop_bin_dir = hadoop_select.get_hadoop_dir("bin") -execute_path = os.environ['PATH'] + os.pathsep + hadoop_bin_dir dfs_nameservice = default('/configurations/hdfs-site/dfs.nameservices', None) # HDFSResource partial function @@ -85,17 +75,6 @@ HdfsResource = functools.partial(HdfsResource, hdfs_site=hdfs_site, default_fs=default_fs) -# ExecuteHadoop partial function -ExecuteHadoop = functools.partial(ExecuteHadoop, - user=hdfs_superuser, - logoutput=True, - conf_dir=hadoop_conf_dir, - security_enabled=security_enabled, - kinit_path_local=kinit_path_local, - keytab=hdfs_user_keytab, - principal=hdfs_principal_name, - bin_dir=execute_path) - # For service Check is_pxf_installed = __get_component_host("pxf_hosts") is not None
ambari git commit: AMBARI-14763: Expose PXF principal parameter on UI (goutamtadi via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 8aa512448 -> 2bf9469d2 AMBARI-14763: Expose PXF principal parameter on UI (goutamtadi via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2bf9469d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2bf9469d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2bf9469d Branch: refs/heads/branch-2.2 Commit: 2bf9469d212b455626e4a1885addb6b2fbcf3e7b Parents: 8aa5124 Author: Jun Aoki Authored: Fri Jan 29 16:08:31 2016 -0800 Committer: Jun Aoki Committed: Fri Jan 29 16:08:31 2016 -0800 -- .../resources/common-services/PXF/3.0.0/kerberos.json | 6 ++ .../common-services/PXF/3.0.0/package/scripts/pxf.py | 10 ++ 2 files changed, 4 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2bf9469d/ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json b/ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json index 0a3c3c7..026336c 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json @@ -6,10 +6,9 @@ "identities": [ { "keytab": { -"configuration": null, +"configuration": "pxf-site/pxf.service.kerberos.keytab", "file": "${keytab_dir}/pxf.service.keytab", "group": { -"access": "", "name": "${cluster-env/user_group}" }, "owner": { @@ -19,8 +18,7 @@ }, "name": "pxf_client_pxf", "principal": { -"configuration": null, -"local_username": null, +"configuration": "pxf-site/pxf.service.kerberos.principal", "type": "service", "value": "pxf/_HOST@${realm}" } http://git-wip-us.apache.org/repos/asf/ambari/blob/2bf9469d/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py index e9e8256..a282bec 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py @@ -106,16 +106,10 @@ class Pxf(Script): File('{0}/pxf-profiles.xml'.format(params.pxf_conf_dir), content = params.config['configurations']['pxf-profiles']['content'].lstrip()) -if params.security_enabled: - pxf_site_dict = dict(params.config['configurations']['pxf-site']) - pxf_site_dict['pxf.service.kerberos.principal'] = "{0}/_HOST@{1}".format(params.pxf_user, params.realm_name) - pxf_site = ConfigDictionary(pxf_site_dict) -else: - pxf_site = params.config['configurations']['pxf-site'] - +# Default_value of principal => pxf/_HOST@{realm} XmlConfig("pxf-site.xml", conf_dir=params.pxf_conf_dir, - configurations=pxf_site, + configurations=params.config['configurations']['pxf-site'], configuration_attributes=params.config['configuration_attributes']['pxf-site'])
ambari git commit: AMBARI-14840: Expose default_segment_num property for HAWQ (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 801e00c2c -> 6460f686c AMBARI-14840: Expose default_segment_num property for HAWQ (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6460f686 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6460f686 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6460f686 Branch: refs/heads/branch-2.2 Commit: 6460f686c54bb3d784d1dbbd2d692a1ec3dbfa20 Parents: 801e00c Author: Jun Aoki Authored: Fri Jan 29 13:35:07 2016 -0800 Committer: Jun Aoki Committed: Fri Jan 29 13:35:07 2016 -0800 -- .../HAWQ/2.0.0/configuration/hawq-site.xml | 14 .../stacks/HDP/2.3/services/stack_advisor.py| 9 +- .../common/services-normal-hawq-3-hosts.json| 11 +++ .../stacks/2.3/common/test_stack_advisor.py | 34 4 files changed, 67 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6460f686/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index 90982e9..f034749 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -205,4 +205,18 @@ + +default_segment_num +Default Number of Virtual Segments +24 + + The default number of virtual segments to use when executing a query statement. When the query is actually executed, + the number of virtual segments may differ from this number depending on the query's needs. + When expanding the cluster, you should adjust this number to reflect the number of nodes in the new cluster times the number of virtual segments per node. + + + int + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/6460f686/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index 0efed8e..b9bb8af 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -672,7 +672,14 @@ class HDP23StackAdvisor(HDP22StackAdvisor): if self.isHawqMasterComponentOnAmbariServer(services): if "hawq-site" in services["configurations"] and "hawq_master_address_port" in services["configurations"]["hawq-site"]["properties"]: putHawqSiteProperty('hawq_master_address_port', '') - +# calculate optimal number of virtual segments +componentsListList = [service["components"] for service in services["services"]] +componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist] +numSegments = len(self.__getHosts(componentsList, "HAWQSEGMENT")) +# update default if segments are deployed +if numSegments and "hawq-site" in services["configurations"] and "default_segment_num" in services["configurations"]["hawq-site"]["properties"]: + factor = 6 if numSegments < 50 else 4 + putHawqSiteProperty('default_segment_num', numSegments * factor) def getServiceConfigurationValidators(self): parentValidators = super(HDP23StackAdvisor, self).getServiceConfigurationValidators() http://git-wip-us.apache.org/repos/asf/ambari/blob/6460f686/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json b/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json index 9fab56d..7a5a7b7 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json +++ b/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json @@ -358,6 +358,17 @@ "type" : "hawq-site.xml" }, "dependencies" : [ ] +}, { + "href" : "/api/v1/stacks/HDP/v
ambari git commit: AMBARI-14840: Expose default_segment_num property for HAWQ (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk ea60d2980 -> 69c834195 AMBARI-14840: Expose default_segment_num property for HAWQ (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69c83419 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69c83419 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69c83419 Branch: refs/heads/trunk Commit: 69c83419517a5d87f9c460fc2b1bb8f41e50961a Parents: ea60d29 Author: Jun Aoki Authored: Fri Jan 29 13:31:46 2016 -0800 Committer: Jun Aoki Committed: Fri Jan 29 13:31:46 2016 -0800 -- .../HAWQ/2.0.0/configuration/hawq-site.xml | 14 .../stacks/HDP/2.3/services/stack_advisor.py| 9 +- .../common/services-normal-hawq-3-hosts.json| 11 +++ .../stacks/2.3/common/test_stack_advisor.py | 34 4 files changed, 67 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/69c83419/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml index 90982e9..f034749 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml @@ -205,4 +205,18 @@ + +default_segment_num +Default Number of Virtual Segments +24 + + The default number of virtual segments to use when executing a query statement. When the query is actually executed, + the number of virtual segments may differ from this number depending on the query's needs. + When expanding the cluster, you should adjust this number to reflect the number of nodes in the new cluster times the number of virtual segments per node. + + + int + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/69c83419/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index 0544f5a..3e60f05 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -671,7 +671,14 @@ class HDP23StackAdvisor(HDP22StackAdvisor): if self.isHawqMasterComponentOnAmbariServer(services): if "hawq-site" in services["configurations"] and "hawq_master_address_port" in services["configurations"]["hawq-site"]["properties"]: putHawqSiteProperty('hawq_master_address_port', '') - +# calculate optimal number of virtual segments +componentsListList = [service["components"] for service in services["services"]] +componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist] +numSegments = len(self.__getHosts(componentsList, "HAWQSEGMENT")) +# update default if segments are deployed +if numSegments and "hawq-site" in services["configurations"] and "default_segment_num" in services["configurations"]["hawq-site"]["properties"]: + factor = 6 if numSegments < 50 else 4 + putHawqSiteProperty('default_segment_num', numSegments * factor) def getServiceConfigurationValidators(self): parentValidators = super(HDP23StackAdvisor, self).getServiceConfigurationValidators() http://git-wip-us.apache.org/repos/asf/ambari/blob/69c83419/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json b/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json index a16ab32..d10a976 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json +++ b/ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json @@ -358,6 +358,17 @@ "type" : "hawq-site.xml" }, "dependencies" : [ ] +}, { + "href" : "/api/v1/stacks/HDP/v
ambari git commit: AMBARI-14794: Stop HAWQ Cluster Immediate command should be disabled if HAWQMASTER is stopped (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk b037ef5cf -> d63469935 AMBARI-14794: Stop HAWQ Cluster Immediate command should be disabled if HAWQMASTER is stopped (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d6346993 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d6346993 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d6346993 Branch: refs/heads/trunk Commit: d63469935d0933af5e625cfea1d581f056055685 Parents: b037ef5 Author: Jun Aoki Authored: Thu Jan 28 17:42:04 2016 -0800 Committer: Jun Aoki Committed: Thu Jan 28 17:42:04 2016 -0800 -- ambari-web/app/models/host_component.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d6346993/ambari-web/app/models/host_component.js -- diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js index 77395f2..b205d38 100644 --- a/ambari-web/app/models/host_component.js +++ b/ambari-web/app/models/host_component.js @@ -269,6 +269,7 @@ App.HostComponentActionMap = { var NN = ctx.get('controller.content.hostComponents').findProperty('componentName', 'NAMENODE'); var RM = ctx.get('controller.content.hostComponents').findProperty('componentName', 'RESOURCEMANAGER'); var RA = ctx.get('controller.content.hostComponents').findProperty('componentName', 'RANGER_ADMIN'); +var HM = ctx.get('controller.content.hostComponents').findProperty('componentName', 'HAWQMASTER'); var HS = ctx.get('controller.content.hostComponents').findProperty('componentName', 'HAWQSTANDBY'); return { RESTART_ALL: { @@ -378,7 +379,7 @@ App.HostComponentActionMap = { context: Em.I18n.t('services.service.actions.run.immediateStopHawqCluster.context'), label: Em.I18n.t('services.service.actions.run.immediateStopHawqCluster.context'), cssClass: 'icon-stop', -disabled: false +disabled: !HM || HM.get('workStatus') != App.HostComponentStatus.started }, IMMEDIATE_STOP: { customCommand: 'IMMEDIATE_STOP',
ambari git commit: AMBARI-14794: Stop HAWQ Cluster Immediate command should be disabled if HAWQMASTER is stopped (adenissov via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 3895968b7 -> 432a3d972 AMBARI-14794: Stop HAWQ Cluster Immediate command should be disabled if HAWQMASTER is stopped (adenissov via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/432a3d97 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/432a3d97 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/432a3d97 Branch: refs/heads/branch-2.2 Commit: 432a3d972f428f6e9624aa5b9173ffde7289e92b Parents: 3895968 Author: Jun Aoki Authored: Thu Jan 28 17:41:01 2016 -0800 Committer: Jun Aoki Committed: Thu Jan 28 17:41:01 2016 -0800 -- ambari-web/app/models/host_component.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/432a3d97/ambari-web/app/models/host_component.js -- diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js index b76da20..bc481b5 100644 --- a/ambari-web/app/models/host_component.js +++ b/ambari-web/app/models/host_component.js @@ -263,6 +263,7 @@ App.HostComponentStatus = { App.HostComponentActionMap = { getMap: function(ctx) { +var HM = ctx.get('controller.content.hostComponents').findProperty('componentName', 'HAWQMASTER'); var HS = ctx.get('controller.content.hostComponents').findProperty('componentName', 'HAWQSTANDBY'); return { RESTART_ALL: { @@ -372,7 +373,7 @@ App.HostComponentActionMap = { context: Em.I18n.t('services.service.actions.run.immediateStopHawqCluster.context'), label: Em.I18n.t('services.service.actions.run.immediateStopHawqCluster.context'), cssClass: 'icon-stop', -disabled: false +disabled: !HM || HM.get('workStatus') != App.HostComponentStatus.started }, IMMEDIATE_STOP: { customCommand: 'IMMEDIATE_STOP',
ambari git commit: AMBARI-14713: Service checks for PXF using HDFS and HBase (nalex via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 dcb7d4524 -> b6a591a60 AMBARI-14713: Service checks for PXF using HDFS and HBase (nalex via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b6a591a6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b6a591a6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b6a591a6 Branch: refs/heads/branch-2.2 Commit: b6a591a607b9d49a66619b5103fd037d2a838810 Parents: dcb7d45 Author: Jun Aoki Authored: Thu Jan 28 13:41:19 2016 -0800 Committer: Jun Aoki Committed: Thu Jan 28 13:41:19 2016 -0800 -- .../common-services/PXF/3.0.0/metainfo.xml | 6 + .../PXF/3.0.0/package/scripts/params.py | 31 ++- .../PXF/3.0.0/package/scripts/pxf_constants.py | 26 ++ .../PXF/3.0.0/package/scripts/pxf_utils.py | 49 .../PXF/3.0.0/package/scripts/service_check.py | 266 +++ 5 files changed, 377 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b6a591a6/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml index cb2411c..1797b29 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml @@ -66,6 +66,12 @@ + +scripts/service_check.py +PYTHON +300 + + pxf-profiles pxf-public-classpath http://git-wip-us.apache.org/repos/asf/ambari/blob/b6a591a6/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py index 1d77787..36dc7c1 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py @@ -16,17 +16,23 @@ See the License for the specific language governing permissions and limitations under the License. """ +import os +import functools + from resource_management import Script +from resource_management.libraries.functions.default import default +from resource_management.libraries.functions import get_kinit_path +from resource_management.libraries.resources.hdfs_resource import HdfsResource config = Script.get_config() - pxf_service_name = "pxf-service" stack_name = str(config["hostLevelParams"]["stack_name"]) # Users and Groups pxf_user = "pxf" pxf_group = pxf_user +hdfs_superuser = config['configurations']['hadoop-env']['hdfs_user'] hdfs_superuser_group = config["configurations"]["hdfs-site"]["dfs.permissions.superusergroup"] user_group = config["configurations"]["cluster-env"]["user_group"] tomcat_group = "tomcat" @@ -44,3 +50,26 @@ default_exec_timeout = 600 # security related security_enabled = config['configurations']['cluster-env']['security_enabled'] realm_name = config['configurations']['kerberos-env']['realm'] + +#HBase +is_hbase_installed = default("/clusterHostInfo/hbase_master_hosts", None) is not None + +# HDFS +hdfs_site = config['configurations']['hdfs-site'] +default_fs = config['configurations']['core-site']['fs.defaultFS'] + +security_enabled = config['configurations']['cluster-env']['security_enabled'] +hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] +kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) +hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] + +# HDFSResource partial function +HdfsResource = functools.partial(HdfsResource, +user=hdfs_superuser, +security_enabled=security_enabled, +keytab=hdfs_user_keytab, +kinit_path_local=kinit_path_local, +principal_name=hdfs_principal_name, +hdfs_site=hdfs_site, +default_fs=default_fs) + http://git-wip-us.apache.org/repos/asf/ambari/blob/b6a591a6/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_const