ambari git commit: AMBARI-14817. ASW with Oozie can't proceed step7 (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 75be3b97a -> d38a9531e AMBARI-14817. ASW with Oozie can't proceed step7 (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d38a9531 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d38a9531 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d38a9531 Branch: refs/heads/trunk Commit: d38a9531efa667e644ce7b67e041f8f6ad2d06a9 Parents: 75be3b9 Author: Alex Antonenko Authored: Thu Jan 28 04:56:59 2016 +0200 Committer: Alex Antonenko Committed: Thu Jan 28 04:56:59 2016 +0200 -- ambari-web/app/controllers/wizard/step0_controller.js | 2 +- ambari-web/app/controllers/wizard/step3_controller.js | 3 ++- ambari-web/app/controllers/wizard/step7_controller.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d38a9531/ambari-web/app/controllers/wizard/step0_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step0_controller.js b/ambari-web/app/controllers/wizard/step0_controller.js index 4e60d1b..aa3541a 100644 --- a/ambari-web/app/controllers/wizard/step0_controller.js +++ b/ambari-web/app/controllers/wizard/step0_controller.js @@ -73,12 +73,12 @@ App.WizardStep0Controller = Em.Controller.extend({ if(App.router.nextBtnClickInProgress){ return; } -App.router.nextBtnClickInProgress = true; this.set('hasSubmitted', true); if (!this.get('invalidClusterName')) { App.clusterStatus.set('clusterName', this.get('content.cluster.name')); this.set('content.cluster.status', 'PENDING'); this.set('content.cluster.isCompleted', false); + App.router.nextBtnClickInProgress = true; App.router.send('next'); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/d38a9531/ambari-web/app/controllers/wizard/step3_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js index 6fd4563..8ae9068 100644 --- a/ambari-web/app/controllers/wizard/step3_controller.js +++ b/ambari-web/app/controllers/wizard/step3_controller.js @@ -1657,17 +1657,18 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, { if(App.router.nextBtnClickInProgress){ return; } -App.router.nextBtnClickInProgress = true; if (this.get('isHostHaveWarnings')) { return App.showConfirmationPopup( function () { self.set('confirmedHosts', self.get('bootHosts')); + App.router.nextBtnClickInProgress = true; App.router.send('next'); }, Em.I18n.t('installer.step3.hostWarningsPopup.hostHasWarnings')); } else { this.set('confirmedHosts', this.get('bootHosts')); + App.router.nextBtnClickInProgress = true; App.router.send('next'); } return null; http://git-wip-us.apache.org/repos/asf/ambari/blob/d38a9531/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 81e69d6..f6b6cb3 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -1638,6 +1638,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E * Proceed to the next step **/ moveNext: function () { +App.router.nextBtnClickInProgress = true; App.router.send('next'); this.set('submitButtonClicked', false); }, @@ -1651,7 +1652,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E if (this.get('isSubmitDisabled') || App.router.nextBtnClickInProgress) { return false; } -App.router.nextBtnClickInProgress = true; var preInstallChecksController = App.router.get('preInstallChecksController'); if (this.get('supportsPreInstallChecks')) { if (preInstallChecksController.get('preInstallChecksWhereRun')) {
ambari git commit: AMBARI-14818. Incorrect markup of some Accumulo's metrics widgets (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 646fb429f -> 75be3b97a AMBARI-14818. Incorrect markup of some Accumulo's metrics widgets (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/75be3b97 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/75be3b97 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/75be3b97 Branch: refs/heads/trunk Commit: 75be3b97a7ca771f7d2d74aea92d3c017c354159 Parents: 646fb42 Author: Alex Antonenko Authored: Wed Jan 27 19:33:51 2016 +0200 Committer: Alex Antonenko Committed: Thu Jan 28 02:40:06 2016 +0200 -- .../main/resources/stacks/HDP/2.3/services/ACCUMULO/widgets.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/75be3b97/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/widgets.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/widgets.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/widgets.json index 8bdbc22..fd919e8 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/widgets.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/widgets.json @@ -83,7 +83,7 @@ } ], "properties": { -"display_unit": "compactions", +"display_unit": "MinCs", "graph_type": "LINE", "time_range": "1" } @@ -118,7 +118,7 @@ } ], "properties": { -"display_unit": "compactions", +"display_unit": "MajCs", "graph_type": "LINE", "time_range": "1" }
ambari git commit: AMBARI-14732: Extend HAWQ service check to include querying external table through PXF (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 5695a12e9 -> eb5b9c5ca AMBARI-14732: Extend HAWQ service check to include querying external table through PXF (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/eb5b9c5c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eb5b9c5c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eb5b9c5c Branch: refs/heads/branch-2.2 Commit: eb5b9c5ca3c40fb2c1e6574f3f056d59b0b25276 Parents: 5695a12 Author: Jun Aoki Authored: Wed Jan 27 16:03:53 2016 -0800 Committer: Jun Aoki Committed: Wed Jan 27 16:03:53 2016 -0800 -- .../2.0.0/package/scripts/hawq_constants.py | 5 +- .../HAWQ/2.0.0/package/scripts/params.py| 28 .../HAWQ/2.0.0/package/scripts/service_check.py | 144 ++- .../HAWQ/2.0.0/package/scripts/utils.py | 6 +- 4 files changed, 140 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eb5b9c5c/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 55d..01de99a 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 @@ -57,8 +57,9 @@ postmaster_opts_filename = "postmaster.opts" postmaster_pid_filename = "postmaster.pid" hawq_keytab_file = "/etc/security/keytabs/hawq.service.keytab" -# Smoke check table -smoke_check_table_name = "ambari_hawq_smoke_test" +# HAWQ-PXF check params +PXF_PORT = "51200" +pxf_hdfs_test_dir = "/user/{0}/hawq_pxf_hdfs_service_check".format(hawq_user) # Timeouts default_exec_timeout = 600 http://git-wip-us.apache.org/repos/asf/ambari/blob/eb5b9c5c/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 aa3527c..604ddc0 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 @@ -18,6 +18,7 @@ limitations under the License. import os import functools +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 @@ -72,6 +73,7 @@ hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_nam 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 HdfsResource = functools.partial(HdfsResource, @@ -94,6 +96,32 @@ ExecuteHadoop = functools.partial(ExecuteHadoop, principal=hdfs_principal_name, bin_dir=execute_path) + +# For service Check +is_pxf_installed = __get_component_host("pxf_hosts") is not None +namenode_path = "{0}:{1}".format(__get_component_host("namenode_host"), PXF_PORT) if dfs_nameservice is None else dfs_nameservice +table_definition = { + "HAWQ": { +"name": "ambari_hawq_test", +"create_type": "", +"drop_type": "", +"description": "(col1 int) DISTRIBUTED RANDOMLY" + }, + "EXTERNAL_HDFS_READABLE": { +"name": "ambari_hawq_pxf_hdfs_readable_test", +"create_type": "READABLE EXTERNAL", +"drop_type": "EXTERNAL", +"description": "(col1 int) LOCATION ('pxf://{0}{1}?PROFILE=HdfsTextSimple') FORMAT 'TEXT'".format(namenode_path, pxf_hdfs_test_dir) + }, + "EXTERNAL_HDFS_WRITABLE": { +"name": "ambari_hawq_pxf_hdfs_writable_test", +"create_type": "WRITABLE EXTERNAL", +"drop_type": "EXTERNAL", +"description": "(col1 int) LOCATION ('pxf://{0}{1}?PROFILE=HdfsTextSimple') FORMAT 'TEXT'".format(namenode_path, pxf_hdfs_test_dir) + } +} + + # YARN # Note: YARN is not mandatory for HAWQ. It is required only when the users set HAWQ to use YARN as resource manager rm_host = __get_component_host('rm_host') http://git-wip-us.apache.org/repos/asf/ambari/blob/eb5
ambari git commit: AMBARI-14752: hawq_profile script conflicts with HAWQ segment init (lavjain via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 de1c8b112 -> 5695a12e9 AMBARI-14752: hawq_profile script conflicts with HAWQ segment init (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/5695a12e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5695a12e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5695a12e Branch: refs/heads/branch-2.2 Commit: 5695a12e99fa493e619e3527f1c69a7bea409175 Parents: de1c8b1 Author: Jun Aoki Authored: Wed Jan 27 15:55:15 2016 -0800 Committer: Jun Aoki Committed: Wed Jan 27 15:55:15 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/common.py| 11 .../2.0.0/package/scripts/hawq_constants.py | 1 - .../HAWQ/2.0.0/package/scripts/hawqsegment.py | 1 - .../HAWQ/2.0.0/package/scripts/master_helper.py | 10 .../2.0.0/package/templates/hawq-profile.sh.j2 | 27 5 files changed, 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5695a12e/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 42f6fc6..05b56f5 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 @@ -33,17 +33,6 @@ import utils import hawq_constants -def update_bashrc(source_file, target_file): - """ - Updates the hawq_user's .bashrc file with HAWQ env variables like - MASTER_DATA_DIRECTORY, PGHOST, PGPORT and PGUSER. - And sources the greenplum_path file. - """ - append_src_cmd = "echo 'source {0}' >> {1}".format(source_file, target_file) - src_cmd_exists = "grep 'source {0}' {1}".format(source_file, target_file) - Execute(append_src_cmd, user=hawq_constants.hawq_user, timeout=hawq_constants.default_exec_timeout, not_if=src_cmd_exists) - - def setup_user(): """ Creates HAWQ user home directory and sets up the correct ownership. http://git-wip-us.apache.org/repos/asf/ambari/blob/5695a12e/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 fe3743b..55d 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 @@ -45,7 +45,6 @@ sysctl_conf_dir = "/etc/sysctl.d" # Files hawq_slaves_file = os.path.join(hawq_config_dir, "slaves") -hawq_user_bashrc_file = os.path.join(hawq_user_home_dir, ".bashrc") hawq_greenplum_path_file = os.path.join(hawq_home_dir, "greenplum_path.sh") hawq_hosts_file = "/tmp/hawq_hosts" hawq_check_file = os.path.join(hawq_config_dir, "gpcheck.cnf") http://git-wip-us.apache.org/repos/asf/ambari/blob/5695a12e/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 37a118c..6bc9802 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,7 +42,6 @@ class HawqSegment(Script): env.set_params(hawq_constants) common.setup_user() common.setup_common_configurations() -common.update_bashrc(hawq_constants.hawq_greenplum_path_file, hawq_constants.hawq_user_bashrc_file) def __start_segment(self): http://git-wip-us.apache.org/repos/asf/ambari/blob/5695a12e/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 a685db4..2e0b6da 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py +++ b/ambari-server/src/main/
[1/2] ambari git commit: AMBARI-14806. Provide Metrics discovery API for AMS. (swagle)
Repository: ambari Updated Branches: refs/heads/trunk 73b5399b1 -> 646fb429f http://git-wip-us.apache.org/repos/asf/ambari/blob/646fb429/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/discovery/TestMetadataManager.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/discovery/TestMetadataManager.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/discovery/TestMetadataManager.java new file mode 100644 index 000..bf887be --- /dev/null +++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/discovery/TestMetadataManager.java @@ -0,0 +1,112 @@ +/** + * 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. + */ +package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.discovery; + +import junit.framework.Assert; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric; +import org.apache.hadoop.metrics2.sink.timeline.TimelineMetricMetadata; +import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics; +import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.AbstractMiniHBaseClusterTest; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; +import java.sql.SQLException; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +public class TestMetadataManager extends AbstractMiniHBaseClusterTest { + TimelineMetricMetadataManager metadataManager; + + @Before + public void insertDummyRecords() throws IOException, SQLException { +// Initialize new manager +metadataManager = new TimelineMetricMetadataManager(hdb, new Configuration()); +final long now = System.currentTimeMillis(); + +TimelineMetrics timelineMetrics = new TimelineMetrics(); +TimelineMetric metric1 = new TimelineMetric(); +metric1.setMetricName("dummy_metric1"); +metric1.setHostName("dummy_host1"); +metric1.setTimestamp(now); +metric1.setStartTime(now - 1000); +metric1.setAppId("dummy_app1"); +metric1.setType("Integer"); +metric1.setMetricValues(new TreeMap() {{ + put(now - 100, 1.0); + put(now - 200, 2.0); + put(now - 300, 3.0); +}}); +timelineMetrics.getMetrics().add(metric1); +TimelineMetric metric2 = new TimelineMetric(); +metric2.setMetricName("dummy_metric2"); +metric2.setHostName("dummy_host2"); +metric2.setTimestamp(now); +metric2.setStartTime(now - 1000); +metric2.setAppId("dummy_app2"); +metric2.setType("Integer"); +metric2.setMetricValues(new TreeMap() {{ + put(now - 100, 1.0); + put(now - 200, 2.0); + put(now - 300, 3.0); +}}); +timelineMetrics.getMetrics().add(metric2); + +hdb.insertMetricRecordsWithMetadata(metadataManager, timelineMetrics); + } + + @Test + public void testSaveMetricsMetadata() throws Exception { +Map cachedData = metadataManager.getMetadataCache(); + +Assert.assertNotNull(cachedData); +Assert.assertEquals(2, cachedData.size()); +TimelineMetricMetadataKey key1 = new TimelineMetricMetadataKey("dummy_metric1", "dummy_app1"); +TimelineMetricMetadataKey key2 = new TimelineMetricMetadataKey("dummy_metric2", "dummy_app2"); +TimelineMetricMetadata value1 = new TimelineMetricMetadata("dummy_metric1", + "dummy_app1", "Integer", null, 1L, true); +TimelineMetricMetadata value2 = new TimelineMetricMetadata("dummy_metric2", + "dummy_app2", "Integer", null, 1L, true); + +Assert.assertEquals(value1, cachedData.get(key1)); +Assert.assertEquals(value2, cachedData.get(key2)); + +TimelineMetricMetadataSync syncRunnable = new TimelineMetricMetadataSync(metadataManager); +syncRunnable.run(); + +Map savedData = + hdb.getTimelineMetricMetadata(); + +Assert.assertNotNull(savedData); +Assert.assertEquals(2, savedData.s
[2/2] ambari git commit: AMBARI-14806. Provide Metrics discovery API for AMS. (swagle)
AMBARI-14806. Provide Metrics discovery API for AMS. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/646fb429 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/646fb429 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/646fb429 Branch: refs/heads/trunk Commit: 646fb429f53adaa687dd9d4e7acdff617203caf6 Parents: 73b5399 Author: Siddharth Wagle Authored: Wed Jan 27 15:51:26 2016 -0800 Committer: Siddharth Wagle Committed: Wed Jan 27 15:51:26 2016 -0800 -- .../sink/timeline/MetadataException.java| 28 ++ .../sink/timeline/TimelineMetricMetadata.java | 163 .../timeline/HBaseTimelineMetricStore.java | 73 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 253 ++- .../timeline/TimelineMetricConfiguration.java | 9 + .../metrics/timeline/TimelineMetricStore.java | 22 +- .../TimelineMetricAggregatorFactory.java| 5 +- .../TimelineMetricAppAggregator.java| 28 +- .../TimelineMetricClusterAggregatorSecond.java | 5 +- .../discovery/TimelineMetricMetadataKey.java| 56 .../TimelineMetricMetadataManager.java | 187 ++ .../discovery/TimelineMetricMetadataSync.java | 105 .../timeline/query/PhoenixTransactSQL.java | 37 ++- .../webapp/TimelineWebServices.java | 59 - .../TestApplicationHistoryServer.java | 11 +- .../timeline/AbstractMiniHBaseClusterTest.java | 8 +- .../timeline/ITPhoenixHBaseAccessor.java| 9 +- .../timeline/TestTimelineMetricStore.java | 14 + .../aggregators/ITClusterAggregator.java| 16 +- .../timeline/discovery/TestMetadataManager.java | 112 20 files changed, 1123 insertions(+), 77 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/646fb429/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/MetadataException.java -- diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/MetadataException.java b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/MetadataException.java new file mode 100644 index 000..01230af --- /dev/null +++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/MetadataException.java @@ -0,0 +1,28 @@ +/** + * 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. + */ +package org.apache.hadoop.metrics2.sink.timeline; + +/** + * Marker for checked Exceptions thrown from Metadata management layer. + */ +public class MetadataException extends Exception { + // Default constructor + public MetadataException(String message) { +super(message); + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/646fb429/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/TimelineMetricMetadata.java -- diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/TimelineMetricMetadata.java b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/TimelineMetricMetadata.java new file mode 100644 index 000..0624f9c --- /dev/null +++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/TimelineMetricMetadata.java @@ -0,0 +1,163 @@ +/** + * 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
ambari git commit: AMBARI-14656: dfs.allow.truncate property check for Add Service wizard of HAWQ
Repository: ambari Updated Branches: refs/heads/branch-2.2 ae4ddea04 -> de1c8b112 AMBARI-14656: dfs.allow.truncate property check for Add Service wizard of HAWQ Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/de1c8b11 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/de1c8b11 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/de1c8b11 Branch: refs/heads/branch-2.2 Commit: de1c8b112faedfe360a5c9c103608448f858b174 Parents: ae4ddea Author: Jun Aoki Authored: Wed Jan 27 15:49:30 2016 -0800 Committer: Jun Aoki Committed: Wed Jan 27 15:49:30 2016 -0800 -- .../stacks/HDP/2.3/services/stack_advisor.py| 8 +++ .../stacks/2.3/common/test_stack_advisor.py | 62 +++- 2 files changed, 69 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/de1c8b11/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 2be09a1..0efed8e 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 @@ -704,6 +704,14 @@ class HDP23StackAdvisor(HDP22StackAdvisor): validationItems.append({"config-name": 'dfs.namenode.inode.attributes.provider.class', "item": self.getWarnItem( "dfs.namenode.inode.attributes.provider.class needs to be set to 'org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer' if Ranger HDFS Plugin is enabled.")}) + +# Check if dfs.allow.truncate is true +if "HAWQ" in servicesList and \ +not ("dfs.allow.truncate" in services["configurations"]["hdfs-site"]["properties"] and \ + services["configurations"]["hdfs-site"]["properties"]["dfs.allow.truncate"].lower() == 'true'): +validationItems.append({"config-name": "dfs.allow.truncate", +"item": self.getWarnItem("HAWQ requires dfs.allow.truncate in hdfs-site.xml set to True.")}) + return self.toConfigurationValidationProblems(validationItems, "hdfs-site") http://git-wip-us.apache.org/repos/asf/ambari/blob/de1c8b11/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 1e6a1eb..5267fac 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 @@ -1508,4 +1508,64 @@ class TestHDP23StackAdvisor(TestCase): recommendedConfigurations = {} self.stackAdvisor.recommendRangerConfigurations(recommendedConfigurations, clusterData, services, None) - self.assertEquals(recommendedConfigurations['ranger-admin-site']['properties']['ranger.audit.solr.zookeepers'], 'NONE') \ No newline at end of file + self.assertEquals(recommendedConfigurations['ranger-admin-site']['properties']['ranger.audit.solr.zookeepers'], 'NONE') + + def test_validateHDFSConfigurations(self): +properties = {} +recommendedDefaults = {} +configurations = { + "core-site": {"properties": {}}, +} +services = self.load_json("services-hawq-3-hosts.json") +services["configurations"]["hdfs-site"] = {} +services["configurations"]["hdfs-site"]["properties"] = {} +hosts = {} + +expected_warning = { +'config-type':'hdfs-site', +'message':'HAWQ requires dfs.allow.truncate in hdfs-site.xml set to True.', +'type':'configuration', +'config-name':'dfs.allow.truncate', +'level':'WARN' +} + +# Test following cases: +# when HAWQ is being installed and dfs.allow.truncate is not set at all, warning +# when HAWQ is being installed and dfs.allow.truncate is set to True, no warning +# when HAWQ is being installed and dfs.allow.truncate is not set to True, warning +# when HAWQ is not installed and dfs.allow.truncate is not set at all, no warning +# when HAWQ is not installed and dfs.allow.truncate is set to True, no warning +# when HAWQ is not installed and dfs.allow.truncate is not set to True, no warning +# 1 +problems = self.stackAdvisor.validateHDFSConfigurations(properties, recommendedDefaults, configurations, services, hosts) +self.assertEqual(len(problems), 1) +self.assertEqual(problems[0], expected_warning) + +# 2 + serv
[1/2] ambari git commit: AMBARI-14806. Provide Metrics discovery API for AMS. (swagle)
Repository: ambari Updated Branches: refs/heads/branch-2.2 9b4a34f16 -> ae4ddea04 http://git-wip-us.apache.org/repos/asf/ambari/blob/ae4ddea0/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/discovery/TestMetadataManager.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/discovery/TestMetadataManager.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/discovery/TestMetadataManager.java new file mode 100644 index 000..bf887be --- /dev/null +++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/discovery/TestMetadataManager.java @@ -0,0 +1,112 @@ +/** + * 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. + */ +package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.discovery; + +import junit.framework.Assert; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric; +import org.apache.hadoop.metrics2.sink.timeline.TimelineMetricMetadata; +import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics; +import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.AbstractMiniHBaseClusterTest; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; +import java.sql.SQLException; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +public class TestMetadataManager extends AbstractMiniHBaseClusterTest { + TimelineMetricMetadataManager metadataManager; + + @Before + public void insertDummyRecords() throws IOException, SQLException { +// Initialize new manager +metadataManager = new TimelineMetricMetadataManager(hdb, new Configuration()); +final long now = System.currentTimeMillis(); + +TimelineMetrics timelineMetrics = new TimelineMetrics(); +TimelineMetric metric1 = new TimelineMetric(); +metric1.setMetricName("dummy_metric1"); +metric1.setHostName("dummy_host1"); +metric1.setTimestamp(now); +metric1.setStartTime(now - 1000); +metric1.setAppId("dummy_app1"); +metric1.setType("Integer"); +metric1.setMetricValues(new TreeMap() {{ + put(now - 100, 1.0); + put(now - 200, 2.0); + put(now - 300, 3.0); +}}); +timelineMetrics.getMetrics().add(metric1); +TimelineMetric metric2 = new TimelineMetric(); +metric2.setMetricName("dummy_metric2"); +metric2.setHostName("dummy_host2"); +metric2.setTimestamp(now); +metric2.setStartTime(now - 1000); +metric2.setAppId("dummy_app2"); +metric2.setType("Integer"); +metric2.setMetricValues(new TreeMap() {{ + put(now - 100, 1.0); + put(now - 200, 2.0); + put(now - 300, 3.0); +}}); +timelineMetrics.getMetrics().add(metric2); + +hdb.insertMetricRecordsWithMetadata(metadataManager, timelineMetrics); + } + + @Test + public void testSaveMetricsMetadata() throws Exception { +Map cachedData = metadataManager.getMetadataCache(); + +Assert.assertNotNull(cachedData); +Assert.assertEquals(2, cachedData.size()); +TimelineMetricMetadataKey key1 = new TimelineMetricMetadataKey("dummy_metric1", "dummy_app1"); +TimelineMetricMetadataKey key2 = new TimelineMetricMetadataKey("dummy_metric2", "dummy_app2"); +TimelineMetricMetadata value1 = new TimelineMetricMetadata("dummy_metric1", + "dummy_app1", "Integer", null, 1L, true); +TimelineMetricMetadata value2 = new TimelineMetricMetadata("dummy_metric2", + "dummy_app2", "Integer", null, 1L, true); + +Assert.assertEquals(value1, cachedData.get(key1)); +Assert.assertEquals(value2, cachedData.get(key2)); + +TimelineMetricMetadataSync syncRunnable = new TimelineMetricMetadataSync(metadataManager); +syncRunnable.run(); + +Map savedData = + hdb.getTimelineMetricMetadata(); + +Assert.assertNotNull(savedData); +Assert.assertEquals(2, savedD
[2/2] ambari git commit: AMBARI-14806. Provide Metrics discovery API for AMS. (swagle)
AMBARI-14806. Provide Metrics discovery API for AMS. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae4ddea0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae4ddea0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae4ddea0 Branch: refs/heads/branch-2.2 Commit: ae4ddea04b350b643df9d4448f14e639d0634d39 Parents: 9b4a34f Author: Siddharth Wagle Authored: Wed Jan 27 12:58:31 2016 -0800 Committer: Siddharth Wagle Committed: Wed Jan 27 12:58:41 2016 -0800 -- .../sink/timeline/MetadataException.java| 28 ++ .../sink/timeline/TimelineMetricMetadata.java | 163 .../timeline/HBaseTimelineMetricStore.java | 73 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 253 ++- .../timeline/TimelineMetricConfiguration.java | 9 + .../metrics/timeline/TimelineMetricStore.java | 22 +- .../TimelineMetricAggregatorFactory.java| 5 +- .../TimelineMetricAppAggregator.java| 28 +- .../TimelineMetricClusterAggregatorSecond.java | 5 +- .../discovery/TimelineMetricMetadataKey.java| 56 .../TimelineMetricMetadataManager.java | 187 ++ .../discovery/TimelineMetricMetadataSync.java | 105 .../timeline/query/PhoenixTransactSQL.java | 37 ++- .../webapp/TimelineWebServices.java | 59 - .../TestApplicationHistoryServer.java | 11 +- .../timeline/AbstractMiniHBaseClusterTest.java | 8 +- .../timeline/ITPhoenixHBaseAccessor.java| 9 +- .../timeline/TestTimelineMetricStore.java | 14 + .../aggregators/ITClusterAggregator.java| 16 +- .../timeline/discovery/TestMetadataManager.java | 112 20 files changed, 1123 insertions(+), 77 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ae4ddea0/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/MetadataException.java -- diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/MetadataException.java b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/MetadataException.java new file mode 100644 index 000..01230af --- /dev/null +++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/MetadataException.java @@ -0,0 +1,28 @@ +/** + * 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. + */ +package org.apache.hadoop.metrics2.sink.timeline; + +/** + * Marker for checked Exceptions thrown from Metadata management layer. + */ +public class MetadataException extends Exception { + // Default constructor + public MetadataException(String message) { +super(message); + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/ae4ddea0/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/TimelineMetricMetadata.java -- diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/TimelineMetricMetadata.java b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/TimelineMetricMetadata.java new file mode 100644 index 000..0624f9c --- /dev/null +++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/TimelineMetricMetadata.java @@ -0,0 +1,163 @@ +/** + * 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 requ
[ambari] Git Push Summary
Repository: ambari Updated Tags: refs/tags/release-2.2.1-rc1 [created] 20986
ambari git commit: AMBARI-14812 - Alerts API Does Not Honor JPA Sorting (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-2.2 1ec6836a7 -> 9b4a34f16 AMBARI-14812 - Alerts API Does Not Honor JPA Sorting (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9b4a34f1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9b4a34f1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9b4a34f1 Branch: refs/heads/branch-2.2 Commit: 9b4a34f16c1b5d65239305c1762bf06efa5c66f1 Parents: 1ec6836 Author: Jonathan Hurley Authored: Wed Jan 27 10:00:12 2016 -0500 Committer: Jonathan Hurley Committed: Wed Jan 27 15:55:00 2016 -0500 -- .../AlertDefinitionResourceProvider.java| 4 ++- .../internal/AlertResourceProvider.java | 5 ++- .../ambari/server/orm/dao/AlertsDAOTest.java| 38 3 files changed, 45 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9b4a34f1/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java index bc5f956..6762508 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -222,7 +223,8 @@ public class AlertDefinitionResourceProvider extends AbstractControllerResourceP Set requestPropertyIds = getRequestPropertyIds(request, predicate); -Set results = new HashSet(); +// use a collection which preserves order since JPA sorts the results +Set results = new LinkedHashSet(); for (Map propertyMap : getPropertyMaps(predicate)) { String clusterName = (String) propertyMap.get(ALERT_DEF_CLUSTER_NAME); http://git-wip-us.apache.org/repos/asf/ambari/blob/9b4a34f1/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java index 4dc4dcf..b4c2768 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -41,6 +42,7 @@ import org.apache.ambari.server.orm.dao.AlertsDAO; import org.apache.ambari.server.orm.entities.AlertCurrentEntity; import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; import org.apache.ambari.server.orm.entities.AlertHistoryEntity; +import org.apache.commons.lang.StringUtils; import com.google.inject.Inject; @@ -144,7 +146,8 @@ public class AlertResourceProvider extends ReadOnlyResourceProvider implements Set requestPropertyIds = getRequestPropertyIds(request, predicate); -Set results = new HashSet(); +// use a collection which preserves order since JPA sorts the results +Set results = new LinkedHashSet(); for (Map propertyMap : getPropertyMaps(predicate)) { http://git-wip-us.apache.org/repos/asf/ambari/blob/9b4a34f1/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java index 0bbe998..10f099e 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java @@ -412,6 +412,44 @@ public class AlertsDAOTest { } /** + * Tests that the Ambari sort is correctly applied to JPA quuery. + * + * @throws Exception + */ + @Test + public void testAlertCurrentSorting() throws Exception { +AlertCurr
ambari git commit: AMBARI-14812 - Alerts API Does Not Honor JPA Sorting (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk 29243e7ff -> 73b5399b1 AMBARI-14812 - Alerts API Does Not Honor JPA Sorting (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/73b5399b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/73b5399b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/73b5399b Branch: refs/heads/trunk Commit: 73b5399b12b4c17c119d37031d8e92ca398ca195 Parents: 29243e7 Author: Jonathan Hurley Authored: Wed Jan 27 10:00:12 2016 -0500 Committer: Jonathan Hurley Committed: Wed Jan 27 15:47:17 2016 -0500 -- .../AlertDefinitionResourceProvider.java| 4 ++- .../internal/AlertResourceProvider.java | 6 ++-- .../ambari/server/orm/dao/AlertsDAOTest.java| 38 3 files changed, 45 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/73b5399b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java index 263a7b8..0f73ec6 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -223,7 +224,8 @@ public class AlertDefinitionResourceProvider extends AbstractControllerResourceP Set requestPropertyIds = getRequestPropertyIds(request, predicate); -Set results = new HashSet(); +// use a collection which preserves order since JPA sorts the results +Set results = new LinkedHashSet(); for (Map propertyMap : getPropertyMaps(predicate)) { String clusterName = (String) propertyMap.get(ALERT_DEF_CLUSTER_NAME); http://git-wip-us.apache.org/repos/asf/ambari/blob/73b5399b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java index 0492860..dc071e9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -43,9 +44,9 @@ import org.apache.ambari.server.orm.dao.AlertsDAO; import org.apache.ambari.server.orm.entities.AlertCurrentEntity; import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; import org.apache.ambari.server.orm.entities.AlertHistoryEntity; +import org.apache.commons.lang.StringUtils; import com.google.inject.Inject; -import org.apache.commons.lang.StringUtils; /** * ResourceProvider for Alert instances @@ -150,7 +151,8 @@ public class AlertResourceProvider extends ReadOnlyResourceProvider implements Set requestPropertyIds = getRequestPropertyIds(request, predicate); -Set results = new HashSet(); +// use a collection which preserves order since JPA sorts the results +Set results = new LinkedHashSet(); for (Map propertyMap : getPropertyMaps(predicate)) { http://git-wip-us.apache.org/repos/asf/ambari/blob/73b5399b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java index 0bbe998..10f099e 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java @@ -412,6 +412,44 @@ public class AlertsDAOTest { } /** + * Tests that the Ambari sort is correctly applied to JPA quuery. + * + * @throws Exception + */ +
ambari git commit: AMBARI-14749: Introduce ADD HAWQ STANDBY wizard to enable high availability in HAWQ (bhuvnesh2703 via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 a3676028a -> 1ec6836a7 AMBARI-14749: Introduce ADD HAWQ STANDBY wizard to enable high availability 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/1ec6836a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1ec6836a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1ec6836a Branch: refs/heads/branch-2.2 Commit: 1ec6836a7f2721513b0e73fa2e4e307131107c43 Parents: a367602 Author: Jun Aoki Authored: Wed Jan 27 11:59:16 2016 -0800 Committer: Jun Aoki Committed: Wed Jan 27 11:59:16 2016 -0800 -- ambari-web/app/assets/test/tests.js | 1 + ambari-web/app/controllers.js | 5 + .../hawq/addStandby/step1_controller.js | 23 ++ .../hawq/addStandby/step2_controller.js | 34 +++ .../hawq/addStandby/step3_controller.js | 142 + .../hawq/addStandby/step4_controller.js | 89 .../hawq/addStandby/wizard_controller.js| 129 +++ .../main/admin/highAvailability_controller.js | 9 + ambari-web/app/controllers/main/service/item.js | 21 +- .../app/data/HDP2.3/hawq_ha_properties.js | 43 ambari-web/app/data/controller_route.js | 4 + ambari-web/app/messages.js | 32 ++- .../wizard/wizardProgressPageController.js | 50 +++-- ambari-web/app/models/host_component.js | 8 + ambari-web/app/models/service.js| 3 +- .../app/routes/add_hawq_standby_routes.js | 212 +++ ambari-web/app/routes/main.js | 2 + .../highAvailability/hawq/addStandby/step1.hbs | 28 +++ .../highAvailability/hawq/addStandby/step3.hbs | 58 + .../highAvailability/hawq/addStandby/step4.hbs | 18 ++ .../highAvailability/hawq/addStandby/wizard.hbs | 45 ambari-web/app/utils/db.js | 1 + ambari-web/app/views.js | 5 + .../hawq/addStandby/step1_view.js | 26 +++ .../hawq/addStandby/step2_view.js | 28 +++ .../hawq/addStandby/step3_view.js | 29 +++ .../hawq/addStandby/step4_view.js | 36 .../hawq/addStandby/wizard_view.js | 74 +++ ambari-web/app/views/main/service/item.js | 3 + .../hawq/addStandby/step3_controller_test.js| 184 30 files changed, 1316 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1ec6836a/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 db29947..90115bf 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -67,6 +67,7 @@ var files = ['test/init_model_test', 'test/controllers/main/admin/highAvailability/nameNode/step3_controller_test', '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/security_test', 'test/controllers/main/admin/security/disable_test', 'test/controllers/main/admin/security/security_progress_controller_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/1ec6836a/ambari-web/app/controllers.js -- diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js index 6d1a5c6..82b0509 100644 --- a/ambari-web/app/controllers.js +++ b/ambari-web/app/controllers.js @@ -53,6 +53,11 @@ require('controllers/main/admin/highAvailability/resourceManager/step1_controlle require('controllers/main/admin/highAvailability/resourceManager/step2_controller'); require('controllers/main/admin/highAvailability/resourceManager/step3_controller'); require('controllers/main/admin/highAvailability/resourceManager/step4_controller'); +require('controllers/main/admin/highAvailability/hawq/addStandby/wizard_controller'); +require('controllers/main/admin/highAvailability/hawq/addStandby/step1_controller'); +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/rangerAdmin/wizard_controller'); require('controllers/main/admin/highAvailability/rangerAdmin/step1_controller'); require('controllers/main/admin/highAvailability/rangerAd
ambari git commit: AMBARI-14811. RU/EU 'Install packages' fail on centos and suse on non-root (Andrew Onischuk via alejandro)
Repository: ambari Updated Branches: refs/heads/branch-2.2 17093e420 -> a3676028a AMBARI-14811. RU/EU 'Install packages' fail on centos and suse on non-root (Andrew Onischuk via alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a3676028 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a3676028 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a3676028 Branch: refs/heads/branch-2.2 Commit: a3676028ae5ca3f5b44226bee1a91d5cf5154ab8 Parents: 17093e4 Author: Alejandro Fernandez Authored: Wed Jan 27 11:47:31 2016 -0800 Committer: Alejandro Fernandez Committed: Wed Jan 27 11:47:31 2016 -0800 -- .../custom_actions/scripts/install_packages.py | 6 ++-- .../custom_actions/TestInstallPackages.py | 35 +++- 2 files changed, 23 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a3676028/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py -- diff --git a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py index f68e3b1..821df77 100644 --- a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py +++ b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py @@ -170,16 +170,16 @@ class InstallPackages(Script): package_manager_cmd = "" if OSCheck.is_redhat_family(): - package_manager_cmd = "/usr/bin/yum -q clean metadata" + package_manager_cmd = ("/usr/bin/yum", "clean", "metadata") if OSCheck.is_suse_family(): - package_manager_cmd = "/usr/bin/zypper -q -n clean" + package_manager_cmd = ("/usr/bin/zypper", "-q", "-n", "clean") if OSCheck.is_ubuntu_family(): return Logger.debug("Clearing repo manager metadata") -Execute(package_manager_cmd, logoutput=False) +Execute(package_manager_cmd, logoutput=False, sudo=True) def _create_config_links_if_necessary(self, stack_id, stack_version): """ http://git-wip-us.apache.org/repos/asf/ambari/blob/a3676028/ambari-server/src/test/python/custom_actions/TestInstallPackages.py -- diff --git a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py index 59aab44..423ae9e 100644 --- a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py +++ b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py @@ -104,9 +104,10 @@ class TestInstallPackages(RMFTestCase): mirror_list=None, append_to_file=True, ) -self.assertResourceCalled('Execute', '/usr/bin/yum -q clean metadata', - logoutput = False, - ) +self.assertResourceCalled('Execute', ('/usr/bin/yum', 'clean', 'metadata'), +logoutput = False, +sudo = True, +) self.assertResourceCalled('Package', 'fuse') self.assertResourceCalled('Package', 'fuse-libs') self.assertResourceCalled('Package', 'hadoop_2_2_*', use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=['HDP-*']) @@ -167,9 +168,10 @@ class TestInstallPackages(RMFTestCase): mirror_list=None, append_to_file=True, ) -self.assertResourceCalled('Execute', '/usr/bin/zypper -q -n clean', - logoutput = False, - ) +self.assertResourceCalled('Execute', ('/usr/bin/zypper', '-q', '-n', 'clean'), +logoutput = False, +sudo = True, +) self.assertResourceCalled('Package', 'fuse') self.assertResourceCalled('Package', 'libfuse2') self.assertResourceCalled('Package', 'hadoop_2_2_0_1_885*', use_repos=['base', 'HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[]) @@ -233,9 +235,10 @@ class TestInstallPackages(RMFTestCase): mirror_list=None, append_to_file=True, ) -self.assertResourceCalled('Execute', '/usr/bin/yum -q clean metadata', - logoutput = False, - ) +self.assertResourceCalled('Execute', ('/usr/bin/yum', 'clean', 'metadata'), +logoutput = False, +sudo = True, +) self.assertResourceCalled('Package', 'fuse') self.assertResourceCalled('Package', 'fuse-libs') self.assertResourceCalled('Package', 'hadoop_2_2_*', use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[
ambari git commit: AMBARI-14811. RU/EU 'Install packages' fail on centos and suse on non-root (Andrew Onischuk via alejandro)
Repository: ambari Updated Branches: refs/heads/branch-2.2.1 6eaba8d95 -> 82ac1c302 AMBARI-14811. RU/EU 'Install packages' fail on centos and suse on non-root (Andrew Onischuk via alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82ac1c30 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82ac1c30 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82ac1c30 Branch: refs/heads/branch-2.2.1 Commit: 82ac1c302118757378b6d326194a95cef56a8375 Parents: 6eaba8d Author: Alejandro Fernandez Authored: Wed Jan 27 11:45:43 2016 -0800 Committer: Alejandro Fernandez Committed: Wed Jan 27 11:45:43 2016 -0800 -- .../custom_actions/scripts/install_packages.py | 6 ++-- .../custom_actions/TestInstallPackages.py | 35 +++- 2 files changed, 23 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/82ac1c30/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py -- diff --git a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py index f68e3b1..821df77 100644 --- a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py +++ b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py @@ -170,16 +170,16 @@ class InstallPackages(Script): package_manager_cmd = "" if OSCheck.is_redhat_family(): - package_manager_cmd = "/usr/bin/yum -q clean metadata" + package_manager_cmd = ("/usr/bin/yum", "clean", "metadata") if OSCheck.is_suse_family(): - package_manager_cmd = "/usr/bin/zypper -q -n clean" + package_manager_cmd = ("/usr/bin/zypper", "-q", "-n", "clean") if OSCheck.is_ubuntu_family(): return Logger.debug("Clearing repo manager metadata") -Execute(package_manager_cmd, logoutput=False) +Execute(package_manager_cmd, logoutput=False, sudo=True) def _create_config_links_if_necessary(self, stack_id, stack_version): """ http://git-wip-us.apache.org/repos/asf/ambari/blob/82ac1c30/ambari-server/src/test/python/custom_actions/TestInstallPackages.py -- diff --git a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py index 59aab44..423ae9e 100644 --- a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py +++ b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py @@ -104,9 +104,10 @@ class TestInstallPackages(RMFTestCase): mirror_list=None, append_to_file=True, ) -self.assertResourceCalled('Execute', '/usr/bin/yum -q clean metadata', - logoutput = False, - ) +self.assertResourceCalled('Execute', ('/usr/bin/yum', 'clean', 'metadata'), +logoutput = False, +sudo = True, +) self.assertResourceCalled('Package', 'fuse') self.assertResourceCalled('Package', 'fuse-libs') self.assertResourceCalled('Package', 'hadoop_2_2_*', use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=['HDP-*']) @@ -167,9 +168,10 @@ class TestInstallPackages(RMFTestCase): mirror_list=None, append_to_file=True, ) -self.assertResourceCalled('Execute', '/usr/bin/zypper -q -n clean', - logoutput = False, - ) +self.assertResourceCalled('Execute', ('/usr/bin/zypper', '-q', '-n', 'clean'), +logoutput = False, +sudo = True, +) self.assertResourceCalled('Package', 'fuse') self.assertResourceCalled('Package', 'libfuse2') self.assertResourceCalled('Package', 'hadoop_2_2_0_1_885*', use_repos=['base', 'HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[]) @@ -233,9 +235,10 @@ class TestInstallPackages(RMFTestCase): mirror_list=None, append_to_file=True, ) -self.assertResourceCalled('Execute', '/usr/bin/yum -q clean metadata', - logoutput = False, - ) +self.assertResourceCalled('Execute', ('/usr/bin/yum', 'clean', 'metadata'), +logoutput = False, +sudo = True, +) self.assertResourceCalled('Package', 'fuse') self.assertResourceCalled('Package', 'fuse-libs') self.assertResourceCalled('Package', 'hadoop_2_2_*', use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_rep
ambari git commit: AMBARI-14813. Unable to create config group, when adding override (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk ce7252909 -> 29243e7ff AMBARI-14813. Unable to create config group, when adding override (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/29243e7f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/29243e7f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/29243e7f Branch: refs/heads/trunk Commit: 29243e7ff9ee401e0ad8c0c17772341f44aad5dd Parents: ce72529 Author: Aleksandr Kovalenko Authored: Wed Jan 27 18:04:39 2016 +0200 Committer: Aleksandr Kovalenko Committed: Wed Jan 27 19:40:39 2016 +0200 -- ambari-web/app/mixins/main/service/configs/config_overridable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/29243e7f/ambari-web/app/mixins/main/service/configs/config_overridable.js -- diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js b/ambari-web/app/mixins/main/service/configs/config_overridable.js index cf99baa..674db2c 100644 --- a/ambari-web/app/mixins/main/service/configs/config_overridable.js +++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js @@ -139,7 +139,8 @@ App.ConfigOverridable = Em.Mixin.create({ service_id: serviceId, service_name: serviceId, hosts: [], -desired_configs: [] +desired_configs: [], +properties: [] }; App.store.load(App.ServiceConfigGroup, newConfigGroup); App.store.commit();
ambari git commit: AMBARI-14815 Unit tests for Oozie are not executed (test run is successful) (dsen)
Repository: ambari Updated Branches: refs/heads/trunk 54311b788 -> ce7252909 AMBARI-14815 Unit tests for Oozie are not executed (test run is successful) (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ce725290 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ce725290 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ce725290 Branch: refs/heads/trunk Commit: ce7252909acddde2d8872e4944e1bd52148dab03 Parents: 54311b7 Author: Dmytro Sen Authored: Wed Jan 27 18:33:34 2016 +0200 Committer: Dmytro Sen Committed: Wed Jan 27 18:33:34 2016 +0200 -- .../OOZIE/4.0.0.2.0/package/scripts/oozie.py| 2 +- .../stacks/2.0.6/OOZIE/test_oozie_client.py | 6 +- .../stacks/2.0.6/OOZIE/test_oozie_server.py | 117 +-- .../stacks/2.0.6/OOZIE/test_service_check.py| 4 - ambari-server/src/test/python/unitTests.py | 14 ++- 5 files changed, 95 insertions(+), 48 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ce725290/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py index 5fc2cfb..24a35ad 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py @@ -116,7 +116,7 @@ def oozie(is_server=False): # On some OS this folder could be not exists, so we will create it before pushing there files Directory(params.limits_conf_dir, -recursive=True, +create_parents=True, owner='root', group='root' ) http://git-wip-us.apache.org/repos/asf/ambari/blob/ce725290/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py index 4c1a9bc..aab9bb0 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py +++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py @@ -55,7 +55,7 @@ class TestOozieClient(RMFTestCase): self.assertResourceCalled('Directory', '/etc/security/limits.d', owner = 'root', group = 'root', - recursive=True, + create_parents=True, ) self.assertResourceCalled('File', '/etc/security/limits.d/oozie.conf', owner = 'root', @@ -121,7 +121,7 @@ class TestOozieClient(RMFTestCase): self.assertResourceCalled('Directory', '/etc/security/limits.d', owner = 'root', group = 'root', - recursive=True, + create_parents=True, ) self.assertResourceCalled('File', '/etc/security/limits.d/oozie.conf', owner = 'root', @@ -193,7 +193,7 @@ class TestOozieClient(RMFTestCase): self.assertResourceCalled('Directory', '/etc/security/limits.d', owner = 'root', group = 'root', - recursive=True, + create_parents=True, ) self.assertResourceCalled('File', '/etc/security/limits.d/oozie.conf', owner = 'root', http://git-wip-us.apache.org/repos/asf/ambari/blob/ce725290/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py index d167ef3..2183425 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py @@ -108,7 +108,7 @@ class TestOozieServer(RMFTestCase): self.assertResourceCalled('Directory', '/etc/security/limits.d', owner = 'root', group = 'root', - recursive=True, + create_parents=True, ) self.assertResourceCalled('File', '/e
ambari git commit: AMBARI-14810 When their are multiple Job History Servers in the cluster, QuickLinks should show the URL for all instances. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk f4edad887 -> 54311b788 AMBARI-14810 When their are multiple Job History Servers in the cluster, QuickLinks should show the URL for all instances. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/54311b78 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/54311b78 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/54311b78 Branch: refs/heads/trunk Commit: 54311b78863219e5702873e7d9ac94a942210ea9 Parents: f4edad8 Author: Andrii Tkach Authored: Wed Jan 27 15:35:40 2016 +0200 Committer: Andrii Tkach Committed: Wed Jan 27 15:35:40 2016 +0200 -- ambari-web/app/views/common/quick_view_link_view.js | 3 +++ ambari-web/test/views/common/quick_link_view_test.js | 5 + 2 files changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/54311b78/ambari-web/app/views/common/quick_view_link_view.js -- diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js index 5b26201..c2f7dcc 100644 --- a/ambari-web/app/views/common/quick_view_link_view.js +++ b/ambari-web/app/views/common/quick_view_link_view.js @@ -538,6 +538,9 @@ App.QuickViewLinks = Em.View.extend({ case "ATLAS": hosts = this.findHosts('ATLAS_SERVER', response); break; + case "MAPREDUCE2": +hosts = this.findHosts('HISTORYSERVER', response); +break; default: if (this.getWithDefault('content.hostComponents', []).someProperty('isMaster')) { hosts = this.findHosts(this.get('content.hostComponents').findProperty('isMaster').get('componentName'), response); http://git-wip-us.apache.org/repos/asf/ambari/blob/54311b78/ambari-web/test/views/common/quick_link_view_test.js -- diff --git a/ambari-web/test/views/common/quick_link_view_test.js b/ambari-web/test/views/common/quick_link_view_test.js index f619e87..93a235c 100644 --- a/ambari-web/test/views/common/quick_link_view_test.js +++ b/ambari-web/test/views/common/quick_link_view_test.js @@ -945,6 +945,11 @@ describe('App.QuickViewLinks', function () { expect(quickViewLinks.findHosts.calledWith('ATLAS_SERVER', {})).to.be.true; }); +it("MAPREDUCE2 service", function() { + expect(quickViewLinks.getHosts({}, 'MAPREDUCE2')).to.eql(['host1']); + expect(quickViewLinks.findHosts.calledWith('HISTORYSERVER', {})).to.be.true; +}); + it("custom service without master", function() { expect(quickViewLinks.getHosts({}, 'S1')).to.be.empty; });
ambari git commit: AMBARI-14810 When their are multiple Job History Servers in the cluster, QuickLinks should show the URL for all instances. (atkach)
Repository: ambari Updated Branches: refs/heads/branch-2.2 c8adfb900 -> 17093e420 AMBARI-14810 When their are multiple Job History Servers in the cluster, QuickLinks should show the URL for all instances. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/17093e42 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/17093e42 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/17093e42 Branch: refs/heads/branch-2.2 Commit: 17093e420939d0136c0a638b8a1fabc9afced3bb Parents: c8adfb9 Author: Andrii Tkach Authored: Wed Jan 27 17:40:21 2016 +0200 Committer: Andrii Tkach Committed: Wed Jan 27 17:40:21 2016 +0200 -- .../app/views/common/quick_view_link_view.js | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/17093e42/ambari-web/app/views/common/quick_view_link_view.js -- diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js index 7825c09..ece034c 100644 --- a/ambari-web/app/views/common/quick_view_link_view.js +++ b/ambari-web/app/views/common/quick_view_link_view.js @@ -228,6 +228,9 @@ App.QuickViewLinks = Em.View.extend({ } if (item.get('service_id')==='OOZIE') { newItem.url = item.get('template').fmt(protocol, host.publicHostName, port, App.router.get('loginName')); +} else if (item.get('service_id')==='MAPREDUCE2') { + var hostPortConfigValue = "%@:%@".fmt(host.publicHostName, port); + newItem.url = item.get('template').fmt(protocol, hostPortConfigValue); } else { newItem.url = item.get('template').fmt(protocol, host.publicHostName, port); } @@ -259,10 +262,11 @@ App.QuickViewLinks = Em.View.extend({ return [App.get('singleNodeAlias')]; } var hosts = []; +var components; switch (serviceName) { case 'OOZIE': // active OOZIE components -var components = this.get('content.hostComponents').filterProperty('componentName','OOZIE_SERVER').filterProperty('workStatus', 'STARTED'); +components = this.get('content.hostComponents').filterProperty('componentName','OOZIE_SERVER').filterProperty('workStatus', 'STARTED'); if (components && components.length > 1) { components.forEach(function (component) { hosts.push({ @@ -361,6 +365,18 @@ App.QuickViewLinks = Em.View.extend({ case "ATLAS": hosts[0] = this.findComponentHost(response.items, "ATLAS_SERVER"); break; + case "MAPREDUCE2": +components = this.get('content.hostComponents').filterProperty('componentName', 'HISTORYSERVER'); +if (components && components.length > 1) { + components.forEach(function (component) { +hosts.push({ + 'publicHostName': response.items.findProperty('Hosts.host_name', component.get('hostName')).Hosts.public_host_name +}); + }); +} else if (components && components.length === 1) { + hosts[0] = this.findComponentHost(response.items, 'HISTORYSERVER'); +} +break; default: var service = App.StackService.find().findProperty('serviceName', serviceName); if (service && service.get('hasMaster')) {
[05/11] ambari git commit: AMBARI-14807. Systemd on RHEL/CentOS 7.2 breaks ambari-server startup (aonishuk)
AMBARI-14807. Systemd on RHEL/CentOS 7.2 breaks ambari-server startup (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c530e009 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c530e009 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c530e009 Branch: refs/heads/branch-dev-patch-upgrade Commit: c530e00900b28b1c129dc364f70523ffa91b6f3a Parents: a816cad Author: Andrew Onishuk Authored: Wed Jan 27 11:34:08 2016 +0200 Committer: Andrew Onishuk Committed: Wed Jan 27 11:34:08 2016 +0200 -- ambari-server/pom.xml | 11 ++- ambari-server/src/main/package/deb/control/postinst | 6 +++--- ambari-server/src/main/package/deb/control/prerm| 4 ++-- ambari-server/src/main/package/rpm/postinstall.sh | 6 +++--- ambari-server/src/main/package/rpm/preremove.sh | 4 ++-- 5 files changed, 20 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index eb977ad..9b35c46 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -393,6 +393,15 @@ src/main/python/ambari_server_main.py + + + + /etc/init.d + 755 + root + root + false + sbin/ambari-server true @@ -798,7 +807,7 @@ file perm -/usr/sbin +/etc/init.d/ root root 755 http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/deb/control/postinst -- diff --git a/ambari-server/src/main/package/deb/control/postinst b/ambari-server/src/main/package/deb/control/postinst index 629ab09..c3b6235 100644 --- a/ambari-server/src/main/package/deb/control/postinst +++ b/ambari-server/src/main/package/deb/control/postinst @@ -14,12 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License -if [ -e "/etc/init.d/ambari-server" ]; then # Check is needed for upgrade +if [ -e "/usr/sbin/ambari-server" ]; then # Check is needed for upgrade # Remove link created by previous package version -rm /etc/init.d/ambari-server +rm -f /usr/sbin/ambari-server fi -ln -s /usr/sbin/ambari-server /etc/init.d/ambari-server +ln -s /etc/init.d/ambari-server /usr/sbin/ambari-server if [ "$1" == "configure" ]; then # Action is install if [ -f "/var/lib/ambari-server/install-helper.sh" ]; then http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/deb/control/prerm -- diff --git a/ambari-server/src/main/package/deb/control/prerm b/ambari-server/src/main/package/deb/control/prerm index 15d05c4..927ba4c 100644 --- a/ambari-server/src/main/package/deb/control/prerm +++ b/ambari-server/src/main/package/deb/control/prerm @@ -22,9 +22,9 @@ if [ "$1" == "remove" ]; then # Action is uninstall mv /etc/ambari-server/conf.save /etc/ambari-server/conf_$(date '+%d_%m_%y_%H_%M').save fi -if [ -e "/etc/init.d/ambari-server" ]; then +if [ -e "/usr/sbin/ambari-server" ]; then # Remove link created during install -rm /etc/init.d/ambari-server +rm /usr/sbin/ambari-server fi mv /etc/ambari-server/conf /etc/ambari-server/conf.save http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/rpm/postinstall.sh -- diff --git a/ambari-server/src/main/package/rpm/postinstall.sh b/ambari-server/src/main/package/rpm/postinstall.sh index d47a00c..9b0b54a 100644 --- a/ambari-server/src/main/package/rpm/postinstall.sh +++ b/ambari-server/src/main/package/rpm/postinstall.sh @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License -if [ -e "/etc/init.d/ambari-server" ]; then # Check is needed for upgrade +if [ -e "/usr/sbin/ambari-server" ]; then # Check is needed for upgrade # Remove link created by previous package version -rm /etc/init.d/ambari-server +rm -f /usr/sbin/ambari-server fi -ln -s /usr/sbin/ambari-server /etc/init.d/ambari-server +ln -s /etc/init.d/ambari-server /usr/sbin/ambari-server case "$1" in 1) # Action install http://git-wip-us.apache.org/repos/asf/amba
[02/11] ambari git commit: AMBARI-14769 : Stack advisor AMS memory validation seems wrong (avijayan)
AMBARI-14769 : Stack advisor AMS memory validation seems wrong (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e53d7ba0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e53d7ba0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e53d7ba0 Branch: refs/heads/branch-dev-patch-upgrade Commit: e53d7ba0cc0298ea74c6ffccac52ae9846b69fdc Parents: 5403549 Author: Aravindan Vijayan Authored: Tue Jan 26 15:09:27 2016 -0800 Committer: Aravindan Vijayan Committed: Tue Jan 26 15:27:51 2016 -0800 -- .../src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e53d7ba0/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py index 5bcebf7..9a21b71 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py @@ -1580,6 +1580,9 @@ def getHeapsizeProperties(): "METRICS_COLLECTOR": [{"config-name": "ams-hbase-env", "property": "hbase_master_heapsize", "default": "1024"}, + {"config-name": "ams-hbase-env", + "property": "hbase_regionserver_heapsize", + "default": "1024"}, {"config-name": "ams-env", "property": "metrics_collector_heapsize", "default": "512"}],
[04/11] ambari git commit: AMBARI-14801. Alerts: HBase Region servers alert should determine RegionServer liveliness differently.(vbrodetskyi)
AMBARI-14801. Alerts: HBase Region servers alert should determine RegionServer liveliness differently.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d1e59133 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d1e59133 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d1e59133 Branch: refs/heads/branch-dev-patch-upgrade Commit: d1e59133f7f867a16d6cb4c7e5cc8508893a29fe Parents: c530e00 Author: Vitaly Brodetskyi Authored: Wed Jan 27 11:02:22 2016 +0200 Committer: Vitaly Brodetskyi Committed: Wed Jan 27 11:02:22 2016 +0200 -- .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpgradeCatalog222.java | 125 +++ .../server/upgrade/UpgradeCatalog240.java | 26 ++-- .../HBASE/0.96.0.2.0/alerts.json| 37 -- .../server/upgrade/UpgradeCatalog222Test.java | 104 +++ 5 files changed, 248 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d1e59133/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java index a07d42d..89e920d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java @@ -182,6 +182,7 @@ public class SchemaUpgradeHelper { catalogBinder.addBinding().to(UpgradeCatalog2121.class); catalogBinder.addBinding().to(UpgradeCatalog220.class); catalogBinder.addBinding().to(UpgradeCatalog221.class); + catalogBinder.addBinding().to(UpgradeCatalog222.class); catalogBinder.addBinding().to(UpgradeCatalog230.class); catalogBinder.addBinding().to(UpgradeCatalog240.class); catalogBinder.addBinding().to(FinalUpgradeCatalog.class); http://git-wip-us.apache.org/repos/asf/ambari/blob/d1e59133/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java new file mode 100644 index 000..bcbbf41 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java @@ -0,0 +1,125 @@ +/* + * 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. + */ + +package org.apache.ambari.server.upgrade; + +import com.google.inject.Inject; +import com.google.inject.Injector; +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.controller.AmbariManagementController; +import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; +import org.apache.ambari.server.orm.dao.DaoUtils; +import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.Clusters; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.sql.SQLException; +import java.util.Map; + +/** + * Upgrade catalog for version 2.2.2. + */ +public class UpgradeCatalog222 extends AbstractUpgradeCatalog { + + @Inject + DaoUtils daoUtils; + + /** + * Logger. + */ + private static final Logger LOG = LoggerFactory.getLogger(UpgradeCatalog222.class); + + + + + // - Constructors -- + + /** + * Don't forget to register new UpgradeCatalogs in {@link org.apache.ambari.server.upgrade.SchemaUpgradeHelper.UpgradeHelperModule#configure()} + * + * @param injector Guice injector to track dependencies and uses bindings to inject them. + */ + @Inject + public UpgradeCatalog222(Injector injector) { +super(inject
[11/11] ambari git commit: Merge branch 'trunk' into branch-dev-patch-upgrade
Merge branch 'trunk' into branch-dev-patch-upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e7bdb7b0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e7bdb7b0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e7bdb7b0 Branch: refs/heads/branch-dev-patch-upgrade Commit: e7bdb7b05478d39970680cc92c95177595ff3277 Parents: 986a518 f4edad8 Author: Nate Cole Authored: Wed Jan 27 10:33:04 2016 -0500 Committer: Nate Cole Committed: Wed Jan 27 10:33:04 2016 -0500 -- .../app/scripts/directives/editableList.js | 9 ++ .../src/main/python/core/host_info.py | 8 +- ambari-server/pom.xml | 11 +- .../server/configuration/Configuration.java | 13 ++ .../ambari/server/controller/AmbariServer.java | 2 + .../server/controller/ControllerModule.java | 2 + .../controller/utilities/KerberosChecker.java | 127 +++ .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpgradeCatalog222.java | 125 ++ .../server/upgrade/UpgradeCatalog230.java | 2 +- .../server/upgrade/UpgradeCatalog240.java | 26 ++-- .../src/main/package/deb/control/postinst | 6 +- .../src/main/package/deb/control/prerm | 4 +- .../src/main/package/rpm/postinstall.sh | 6 +- ambari-server/src/main/package/rpm/preremove.sh | 4 +- .../python/ambari_server/serverConfiguration.py | 5 +- .../main/python/ambari_server/setupSecurity.py | 5 +- .../HBASE/0.96.0.2.0/alerts.json| 37 -- .../OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 10 ++ .../OOZIE/4.0.0.2.0/package/scripts/oozie.py| 14 ++ .../4.0.0.2.0/package/scripts/params_linux.py | 5 + .../4.0.0.2.0/package/templates/oozie.conf.j2 | 35 + .../stacks/HDP/2.0.6/services/stack_advisor.py | 3 + .../utilities/KerberosCheckerTest.java | 88 + .../server/upgrade/UpgradeCatalog222Test.java | 104 +++ .../server/upgrade/UpgradeCatalog230Test.java | 2 +- .../stacks/2.0.6/OOZIE/test_oozie_client.py | 33 + .../stacks/2.0.6/OOZIE/test_oozie_server.py | 44 +++ ambari-web/app/controllers/main/host/details.js | 7 +- ambari-web/app/messages.js | 2 + ambari-web/app/models/host_component.js | 6 + ambari-web/app/styles/application.less | 3 + .../main/host/details/host_component.hbs| 3 +- ambari-web/app/utils/ember_computed.js | 2 +- .../main/host/details/host_component_view.js| 17 +++ .../test/controllers/main/host/details_test.js | 10 ++ 36 files changed, 713 insertions(+), 68 deletions(-) --
[07/11] ambari git commit: AMBARI-14808. Add Oozie limits.conf for Oozie User as done for HDFS/YARN (aonishuk)
AMBARI-14808. Add Oozie limits.conf for Oozie User as done for HDFS/YARN (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a88678fc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a88678fc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a88678fc Branch: refs/heads/branch-dev-patch-upgrade Commit: a88678fc7d3aeba814236d53ad9c98803f3cf4b8 Parents: 34bbd8b Author: Andrew Onishuk Authored: Wed Jan 27 14:08:30 2016 +0200 Committer: Andrew Onishuk Committed: Wed Jan 27 14:08:30 2016 +0200 -- .../OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 10 + .../OOZIE/4.0.0.2.0/package/scripts/oozie.py| 14 +++ .../4.0.0.2.0/package/scripts/params_linux.py | 5 +++ .../4.0.0.2.0/package/templates/oozie.conf.j2 | 35 .../stacks/2.0.6/OOZIE/test_oozie_client.py | 33 +++ .../stacks/2.0.6/OOZIE/test_oozie_server.py | 44 6 files changed, 141 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a88678fc/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml index 3db5463..fae449e 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml @@ -98,6 +98,16 @@ 256 Oozie permanent generation size. + +oozie_user_nofile_limit +32000 +Max open files limit setting for OOZIE user. + + +oozie_user_nproc_limit +16000 +Max number of processes limit setting for OOZIE user. + http://git-wip-us.apache.org/repos/asf/ambari/blob/a88678fc/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py index db1b224..5fc2cfb 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py @@ -114,6 +114,20 @@ def oozie(is_server=False): group=params.user_group, ) + # On some OS this folder could be not exists, so we will create it before pushing there files + Directory(params.limits_conf_dir, +recursive=True, +owner='root', +group='root' + ) + + File(os.path.join(params.limits_conf_dir, 'oozie.conf'), + owner='root', + group='root', + mode=0644, + content=Template("oozie.conf.j2") + ) + if (params.log4j_props != None): File(format("{params.conf_dir}/oozie-log4j.properties"), mode=0644, http://git-wip-us.apache.org/repos/asf/ambari/blob/a88678fc/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py index fd9a462..a8a93dd 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py @@ -124,6 +124,11 @@ security_enabled = config['configurations']['cluster-env']['security_enabled'] oozie_heapsize = config['configurations']['oozie-env']['oozie_heapsize'] oozie_permsize = config['configurations']['oozie-env']['oozie_permsize'] +limits_conf_dir = "/etc/security/limits.d" + +oozie_user_nofile_limit = config['configurations']['oozie-env']['oozie_user_nofile_limit'] +oozie_user_nproc_limit = config['configurations']['oozie-env']['oozie_user_nproc_limit'] + kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) oozie_service_keytab = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.keytab.file'] oozie_principal = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.kerberos.principal'] http://git-wip-us.apache.org/repos/asf/ambari/blob/a88678fc/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/templat
[09/11] ambari git commit: AMBARI-14809 Ambari Admin: Incorrect handling of unsaved changes in Roles section. (atkach)
AMBARI-14809 Ambari Admin: Incorrect handling of unsaved changes in Roles section. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f4edad88 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f4edad88 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f4edad88 Branch: refs/heads/branch-dev-patch-upgrade Commit: f4edad887fe5881e3772e3a937cbf87eb9d0c03a Parents: 8e15bec Author: Andrii Tkach Authored: Wed Jan 27 14:13:05 2016 +0200 Committer: Andrii Tkach Committed: Wed Jan 27 15:33:28 2016 +0200 -- .../ui/admin-web/app/scripts/directives/editableList.js | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f4edad88/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js index 4b57edc..694a7bd 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js @@ -111,6 +111,13 @@ angular.module('ambariAdminConsole') break; } }); + + $elem.find('.editable-list-container').on('reset', function(event) { +$scope.editMode = false; +$scope.items = angular.copy($scope.itemsSource); +$scope.input = ''; +event.stopPropagation(); + }); }, controller: ['$scope', '$injector', '$modal', function($scope, $injector, $modal) { var $resource = $injector.get($scope.resourceType); @@ -175,6 +182,8 @@ angular.module('ambariAdminConsole') $scope.enableEditMode = function(event) { if( $scope.editable && !$scope.editMode){ + //only one editable-list could be in edit mode at once + $('.cluster-manage-access-pane div.edit-mode').trigger('reset'); $scope.editMode = true; $scope.focusOnInput(); }
[08/11] ambari git commit: AMBARI-14791 improve logging for when ambari does not have permissions to read the ambari server keytab (dsen)
AMBARI-14791 improve logging for when ambari does not have permissions to read the ambari server keytab (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8e15bec8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8e15bec8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8e15bec8 Branch: refs/heads/branch-dev-patch-upgrade Commit: 8e15bec8e941cd62ba1722e9da362cd383b7a25c Parents: a88678f Author: Dmytro Sen Authored: Wed Jan 27 15:29:47 2016 +0200 Committer: Dmytro Sen Committed: Wed Jan 27 15:29:47 2016 +0200 -- .../server/configuration/Configuration.java | 13 ++ .../ambari/server/controller/AmbariServer.java | 2 + .../server/controller/ControllerModule.java | 2 + .../controller/utilities/KerberosChecker.java | 127 +++ .../python/ambari_server/serverConfiguration.py | 5 +- .../main/python/ambari_server/setupSecurity.py | 5 +- .../utilities/KerberosCheckerTest.java | 88 + 7 files changed, 239 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8e15bec8/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 4120f34..d1453a0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -312,6 +312,8 @@ public class Configuration { public static final String KDC_CONNECTION_CHECK_TIMEOUT_DEFAULT = "1"; public static final String KERBEROS_KEYTAB_CACHE_DIR_KEY = "kerberos.keytab.cache.dir"; public static final String KERBEROS_KEYTAB_CACHE_DIR_DEFAULT = "/var/lib/ambari-server/data/cache"; + public static final String KERBEROS_CHECK_JAAS_CONFIGURATION_KEY = "kerberos.check.jaas.configuration"; + public static final String KERBEROS_CHECK_JAAS_CONFIGURATION_DEFAULT = "false"; /** * Recovery related configuration @@ -2077,6 +2079,17 @@ public class Configuration { } /** + * Determine whether or not ambari server credentials validation is enabled. + * + * @return true if ambari server credentials check is enabled + */ + public boolean isKerberosJaasConfigurationCheckEnabled() { +return Boolean.parseBoolean(properties.getProperty( + KERBEROS_CHECK_JAAS_CONFIGURATION_KEY, + KERBEROS_CHECK_JAAS_CONFIGURATION_DEFAULT)); + } + + /** * Gets the type of database by examining the {@link #getDatabaseUrl()} JDBC * URL. * http://git-wip-us.apache.org/repos/asf/ambari/blob/8e15bec8/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index 43e2dac..9c05bf8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -66,6 +66,7 @@ import org.apache.ambari.server.controller.internal.UserPrivilegeResourceProvide import org.apache.ambari.server.controller.internal.ViewPermissionResourceProvider; import org.apache.ambari.server.controller.metrics.ThreadPoolEnabledPropertyProvider; import org.apache.ambari.server.controller.utilities.DatabaseChecker; +import org.apache.ambari.server.controller.utilities.KerberosChecker; import org.apache.ambari.server.orm.GuiceJpaInitializer; import org.apache.ambari.server.orm.PersistenceType; import org.apache.ambari.server.orm.dao.BlueprintDAO; @@ -890,6 +891,7 @@ public class AmbariServer { server = injector.getInstance(AmbariServer.class); CertificateManager certMan = injector.getInstance(CertificateManager.class); certMan.initRootCert(); + KerberosChecker.checkJaasConfiguration(); ViewRegistry.initInstance(server.viewRegistry); ComponentSSLConfiguration.instance().init(server.configs); server.run(); http://git-wip-us.apache.org/repos/asf/ambari/blob/8e15bec8/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java index be0b7cc
[03/11] ambari git commit: AMBARI-14796: Fix source version in UpgradeCatalog230 (Ajit Kumar via smnaha)
AMBARI-14796: Fix source version in UpgradeCatalog230 (Ajit Kumar via smnaha) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a816cada Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a816cada Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a816cada Branch: refs/heads/branch-dev-patch-upgrade Commit: a816cada6ab75e05cd2099ed97586294ed30a73d Parents: e53d7ba Author: Nahappan Somasundaram Authored: Tue Jan 26 16:43:43 2016 -0800 Committer: Nahappan Somasundaram Committed: Tue Jan 26 16:43:43 2016 -0800 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java | 2 +- .../org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a816cada/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java index 38b3c6b..2d6fe03 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java @@ -67,7 +67,7 @@ public class UpgradeCatalog230 extends AbstractUpgradeCatalog { */ @Override public String getSourceVersion() { -return "2.2.0"; +return "2.2.1"; } /** http://git-wip-us.apache.org/repos/asf/ambari/blob/a816cada/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java index ad90127..417cf66 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java @@ -263,7 +263,7 @@ public class UpgradeCatalog230Test extends EasyMockSupport { @Test public void testGetSourceVersion() { UpgradeCatalog upgradeCatalog = injector.getInstance(UpgradeCatalog230.class); -Assert.assertEquals("2.2.0", upgradeCatalog.getSourceVersion()); +Assert.assertEquals("2.2.1", upgradeCatalog.getSourceVersion()); } }
[01/11] ambari git commit: AMBARI-14802. Confusing maintenance mode behaviour for host components (akovalenko)
Repository: ambari Updated Branches: refs/heads/branch-dev-patch-upgrade c7be26ad6 -> e7bdb7b05 AMBARI-14802. Confusing maintenance mode behaviour for host components (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5403549d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5403549d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5403549d Branch: refs/heads/branch-dev-patch-upgrade Commit: 5403549d9809bb8b9ca5d30e8e46b2d5d22a9762 Parents: 7bac2a1 Author: Aleksandr Kovalenko Authored: Tue Jan 26 19:24:48 2016 +0200 Committer: Aleksandr Kovalenko Committed: Tue Jan 26 23:50:18 2016 +0200 -- ambari-web/app/controllers/main/host/details.js| 7 --- ambari-web/app/messages.js | 2 ++ ambari-web/app/models/host_component.js| 6 ++ ambari-web/app/styles/application.less | 3 +++ .../templates/main/host/details/host_component.hbs | 3 ++- ambari-web/app/utils/ember_computed.js | 2 +- .../views/main/host/details/host_component_view.js | 17 + .../test/controllers/main/host/details_test.js | 10 ++ 8 files changed, 45 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5403549d/ambari-web/app/controllers/main/host/details.js -- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index d325cde..251d7ab 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -2307,9 +2307,10 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow }, toggleMaintenanceMode: function (event) { -var self = this; -var state = event.context.get('passiveState') === "ON" ? "OFF" : "ON"; -var message = Em.I18n.t('passiveState.turn' + state.toCapital() + 'For').format(event.context.get('displayName')); +var state, message, self = this; +if (event.context.get('isImpliedState')) return null; +state = event.context.get('passiveState') === "ON" ? "OFF" : "ON"; +message = Em.I18n.t('passiveState.turn' + state.toCapital() + 'For').format(event.context.get('displayName')); return App.showConfirmationPopup(function () { self.updateComponentPassiveState(event.context, state, message); }); http://git-wip-us.apache.org/repos/asf/ambari/blob/5403549d/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index a153408..d6ecbf3 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -314,6 +314,8 @@ Em.I18n.translations = { 'passiveState.turnOff':'Turn Off Maintenance Mode', 'passiveState.turnOnFor':'Turn On Maintenance Mode for {0}', 'passiveState.turnOffFor':'Turn Off Maintenance Mode for {0}', + 'passiveState.disabled.impliedFromHighLevel':'{0} is already in Maintenance Mode because {1} is in Maintenance Mode.', + 'passiveState.disabled.impliedFromServiceAndHost':'{0} is already in Maintenance Mode because {1} and {2} are in Maintenance Mode.', 'requestInfo.installComponents':'Install Components', 'requestInfo.installKerbeorosComponents':'Install Kerberos Components', http://git-wip-us.apache.org/repos/asf/ambari/blob/5403549d/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 5008277..77395f2 100644 --- a/ambari-web/app/models/host_component.js +++ b/ambari-web/app/models/host_component.js @@ -113,6 +113,12 @@ App.HostComponent = DS.Model.extend({ */ isActive: Em.computed.equal('passiveState', 'OFF'), + /** + * Determine if passiveState is implied from host or/and service + * @returns {Boolean} + */ + isImpliedState: Em.computed.existsIn('passiveState', ['IMPLIED_FROM_SERVICE_AND_HOST', 'IMPLIED_FROM_HOST', 'IMPLIED_FROM_SERVICE']), + passiveTooltip: Em.computed.ifThenElse('isActive', '', Em.I18n.t('hosts.component.passive.mode')), /** * Determine if component is a HDP component http://git-wip-us.apache.org/repos/asf/ambari/blob/5403549d/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 8ebf701..731903d 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -3695,6 +3695,9 @@ table.graphs { color: #808080; cursor: default; } + .allo
[06/11] ambari git commit: AMBARI-14799 Metric Monitor crashes with NoSuchProcess exception (dsen)
AMBARI-14799 Metric Monitor crashes with NoSuchProcess exception (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/34bbd8b4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/34bbd8b4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/34bbd8b4 Branch: refs/heads/branch-dev-patch-upgrade Commit: 34bbd8b458fd0bf01345abbeffd2906cc72c371b Parents: d1e5913 Author: Dmytro Sen Authored: Wed Jan 27 14:06:18 2016 +0200 Committer: Dmytro Sen Committed: Wed Jan 27 14:06:18 2016 +0200 -- .../src/main/python/core/host_info.py| 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/34bbd8b4/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py -- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py index d5a8c36..2e8c442 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py +++ b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py @@ -90,8 +90,12 @@ class HostInfo(): proc_total = 0 for proc in proc_stats: proc_total += 1 - if STATUS_RUNNING == proc.status(): -proc_run += 1 + try: +if STATUS_RUNNING == proc.status(): + proc_run += 1 + except (psutil.NoSuchProcess, psutil.AccessDenied) as e: +#NOP +pass pass return {
[10/11] ambari git commit: AMBARI-14804. Move Version Definition to its own endpoint (ncole)
AMBARI-14804. Move Version Definition to its own endpoint (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/986a5188 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/986a5188 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/986a5188 Branch: refs/heads/branch-dev-patch-upgrade Commit: 986a5188334b51cf5728b4b54c2aefc48866558e Parents: c7be26a Author: Nate Cole Authored: Tue Jan 26 15:30:06 2016 -0500 Committer: Nate Cole Committed: Wed Jan 27 09:36:31 2016 -0500 -- .../resources/ResourceInstanceFactoryImpl.java | 4 + .../VersionDefinitionResourceDefinition.java| 93 ++ .../api/services/VersionDefinitionService.java | 70 .../AbstractControllerResourceProvider.java | 3 +- .../RepositoryVersionResourceProvider.java | 93 ++ .../VersionDefinitionResourceProvider.java | 331 +++ .../ambari/server/controller/spi/Resource.java | 4 +- .../server/orm/dao/RepositoryVersionDAO.java| 16 +- .../orm/entities/RepositoryVersionEntity.java | 17 +- .../ambari/server/state/repository/Release.java | 20 ++ .../src/main/resources/version_definition.xsd | 1 + .../RepositoryVersionResourceProviderTest.java | 39 ++- 12 files changed, 601 insertions(+), 90 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/986a5188/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java index 070a505..987c11b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java @@ -412,6 +412,10 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory { resourceDefinition = new SimpleResourceDefinition(Resource.Type.AdminSetting, "admin-setting", "admin-settings"); break; + case VersionDefinition: +resourceDefinition = new VersionDefinitionResourceDefinition(); +break; + default: throw new IllegalArgumentException("Unsupported resource type: " + type); } http://git-wip-us.apache.org/repos/asf/ambari/blob/986a5188/ambari-server/src/main/java/org/apache/ambari/server/api/resources/VersionDefinitionResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/VersionDefinitionResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/VersionDefinitionResourceDefinition.java new file mode 100644 index 000..67d9439 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/VersionDefinitionResourceDefinition.java @@ -0,0 +1,93 @@ +/** + * 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. + */ +package org.apache.ambari.server.api.resources; + +import java.util.List; + +import org.apache.ambari.server.api.services.Request; +import org.apache.ambari.server.api.util.TreeNode; +import org.apache.ambari.server.controller.internal.RepositoryVersionResourceProvider; +import org.apache.ambari.server.controller.internal.VersionDefinitionResourceProvider; +import org.apache.ambari.server.controller.spi.Resource; + +import com.google.common.collect.Lists; + +/** + * The Resource Definition used for Version Definition files. + */ +public class VersionDefinitionResourceDefinition extends BaseResourceDefinition { + private static final String STACKS_NAME = new StackResourceDefinition().getPluralName(); + private static final String STACK_VERSIONS_NAME = new StackVersionResourceDefinition().getPluralName(); + private static final String REPO_V
ambari git commit: AMBARI-14791 improve logging for when ambari does not have permissions to read the ambari server keytab (dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.2 b6d299651 -> c8adfb900 AMBARI-14791 improve logging for when ambari does not have permissions to read the ambari server keytab (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c8adfb90 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c8adfb90 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c8adfb90 Branch: refs/heads/branch-2.2 Commit: c8adfb9004b2da8e6b733596434cd162fa2fa153 Parents: b6d2996 Author: Dmytro Sen Authored: Wed Jan 27 15:39:54 2016 +0200 Committer: Dmytro Sen Committed: Wed Jan 27 15:39:54 2016 +0200 -- .../server/configuration/Configuration.java | 13 ++ .../ambari/server/controller/AmbariServer.java | 2 + .../server/controller/ControllerModule.java | 2 + .../controller/utilities/KerberosChecker.java | 127 +++ .../python/ambari_server/serverConfiguration.py | 3 + .../main/python/ambari_server/setupSecurity.py | 5 +- .../utilities/KerberosCheckerTest.java | 88 + 7 files changed, 238 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c8adfb90/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 07e0962..32e2ea9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -301,6 +301,8 @@ public class Configuration { public static final String KDC_CONNECTION_CHECK_TIMEOUT_DEFAULT = "1"; public static final String KERBEROS_KEYTAB_CACHE_DIR_KEY = "kerberos.keytab.cache.dir"; public static final String KERBEROS_KEYTAB_CACHE_DIR_DEFAULT = "/var/lib/ambari-server/data/cache"; + public static final String KERBEROS_CHECK_JAAS_CONFIGURATION_KEY = "kerberos.check.jaas.configuration"; + public static final String KERBEROS_CHECK_JAAS_CONFIGURATION_DEFAULT = "false"; /** * Recovery related configuration @@ -2036,6 +2038,17 @@ public class Configuration { } /** + * Determine whether or not ambari server credentials validation is enabled. + * + * @return true if ambari server credentials check is enabled + */ + public boolean isKerberosJaasConfigurationCheckEnabled() { +return Boolean.parseBoolean(properties.getProperty( + KERBEROS_CHECK_JAAS_CONFIGURATION_KEY, + KERBEROS_CHECK_JAAS_CONFIGURATION_DEFAULT)); + } + + /** * Gets the type of database by examining the {@link #getDatabaseUrl()} JDBC * URL. * http://git-wip-us.apache.org/repos/asf/ambari/blob/c8adfb90/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index 6ac378d..433853b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -68,6 +68,7 @@ import org.apache.ambari.server.controller.internal.StackDependencyResourceProvi import org.apache.ambari.server.controller.internal.UserPrivilegeResourceProvider; import org.apache.ambari.server.controller.internal.ViewPermissionResourceProvider; import org.apache.ambari.server.controller.utilities.DatabaseChecker; +import org.apache.ambari.server.controller.utilities.KerberosChecker; import org.apache.ambari.server.orm.GuiceJpaInitializer; import org.apache.ambari.server.orm.PersistenceType; import org.apache.ambari.server.orm.dao.BlueprintDAO; @@ -813,6 +814,7 @@ public class AmbariServer { server = injector.getInstance(AmbariServer.class); CertificateManager certMan = injector.getInstance(CertificateManager.class); certMan.initRootCert(); + KerberosChecker.checkJaasConfiguration(); ViewRegistry.initInstance(server.viewRegistry); ComponentSSLConfiguration.instance().init(server.configs); server.run(); http://git-wip-us.apache.org/repos/asf/ambari/blob/c8adfb90/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org
ambari git commit: AMBARI-14809 Ambari Admin: Incorrect handling of unsaved changes in Roles section. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk 8e15bec8e -> f4edad887 AMBARI-14809 Ambari Admin: Incorrect handling of unsaved changes in Roles section. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f4edad88 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f4edad88 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f4edad88 Branch: refs/heads/trunk Commit: f4edad887fe5881e3772e3a937cbf87eb9d0c03a Parents: 8e15bec Author: Andrii Tkach Authored: Wed Jan 27 14:13:05 2016 +0200 Committer: Andrii Tkach Committed: Wed Jan 27 15:33:28 2016 +0200 -- .../ui/admin-web/app/scripts/directives/editableList.js | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f4edad88/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js index 4b57edc..694a7bd 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js @@ -111,6 +111,13 @@ angular.module('ambariAdminConsole') break; } }); + + $elem.find('.editable-list-container').on('reset', function(event) { +$scope.editMode = false; +$scope.items = angular.copy($scope.itemsSource); +$scope.input = ''; +event.stopPropagation(); + }); }, controller: ['$scope', '$injector', '$modal', function($scope, $injector, $modal) { var $resource = $injector.get($scope.resourceType); @@ -175,6 +182,8 @@ angular.module('ambariAdminConsole') $scope.enableEditMode = function(event) { if( $scope.editable && !$scope.editMode){ + //only one editable-list could be in edit mode at once + $('.cluster-manage-access-pane div.edit-mode').trigger('reset'); $scope.editMode = true; $scope.focusOnInput(); }
ambari git commit: AMBARI-14791 improve logging for when ambari does not have permissions to read the ambari server keytab (dsen)
Repository: ambari Updated Branches: refs/heads/trunk a88678fc7 -> 8e15bec8e AMBARI-14791 improve logging for when ambari does not have permissions to read the ambari server keytab (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8e15bec8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8e15bec8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8e15bec8 Branch: refs/heads/trunk Commit: 8e15bec8e941cd62ba1722e9da362cd383b7a25c Parents: a88678f Author: Dmytro Sen Authored: Wed Jan 27 15:29:47 2016 +0200 Committer: Dmytro Sen Committed: Wed Jan 27 15:29:47 2016 +0200 -- .../server/configuration/Configuration.java | 13 ++ .../ambari/server/controller/AmbariServer.java | 2 + .../server/controller/ControllerModule.java | 2 + .../controller/utilities/KerberosChecker.java | 127 +++ .../python/ambari_server/serverConfiguration.py | 5 +- .../main/python/ambari_server/setupSecurity.py | 5 +- .../utilities/KerberosCheckerTest.java | 88 + 7 files changed, 239 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8e15bec8/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 4120f34..d1453a0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -312,6 +312,8 @@ public class Configuration { public static final String KDC_CONNECTION_CHECK_TIMEOUT_DEFAULT = "1"; public static final String KERBEROS_KEYTAB_CACHE_DIR_KEY = "kerberos.keytab.cache.dir"; public static final String KERBEROS_KEYTAB_CACHE_DIR_DEFAULT = "/var/lib/ambari-server/data/cache"; + public static final String KERBEROS_CHECK_JAAS_CONFIGURATION_KEY = "kerberos.check.jaas.configuration"; + public static final String KERBEROS_CHECK_JAAS_CONFIGURATION_DEFAULT = "false"; /** * Recovery related configuration @@ -2077,6 +2079,17 @@ public class Configuration { } /** + * Determine whether or not ambari server credentials validation is enabled. + * + * @return true if ambari server credentials check is enabled + */ + public boolean isKerberosJaasConfigurationCheckEnabled() { +return Boolean.parseBoolean(properties.getProperty( + KERBEROS_CHECK_JAAS_CONFIGURATION_KEY, + KERBEROS_CHECK_JAAS_CONFIGURATION_DEFAULT)); + } + + /** * Gets the type of database by examining the {@link #getDatabaseUrl()} JDBC * URL. * http://git-wip-us.apache.org/repos/asf/ambari/blob/8e15bec8/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index 43e2dac..9c05bf8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -66,6 +66,7 @@ import org.apache.ambari.server.controller.internal.UserPrivilegeResourceProvide import org.apache.ambari.server.controller.internal.ViewPermissionResourceProvider; import org.apache.ambari.server.controller.metrics.ThreadPoolEnabledPropertyProvider; import org.apache.ambari.server.controller.utilities.DatabaseChecker; +import org.apache.ambari.server.controller.utilities.KerberosChecker; import org.apache.ambari.server.orm.GuiceJpaInitializer; import org.apache.ambari.server.orm.PersistenceType; import org.apache.ambari.server.orm.dao.BlueprintDAO; @@ -890,6 +891,7 @@ public class AmbariServer { server = injector.getInstance(AmbariServer.class); CertificateManager certMan = injector.getInstance(CertificateManager.class); certMan.initRootCert(); + KerberosChecker.checkJaasConfiguration(); ViewRegistry.initInstance(server.viewRegistry); ComponentSSLConfiguration.instance().init(server.configs); server.run(); http://git-wip-us.apache.org/repos/asf/ambari/blob/8e15bec8/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apach
ambari git commit: AMBARI-14694 Unnecessary multiple TreeMap creation (dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.2 bc9285e38 -> b6d299651 AMBARI-14694 Unnecessary multiple TreeMap creation (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b6d29965 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b6d29965 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b6d29965 Branch: refs/heads/branch-2.2 Commit: b6d2996515283cf9709fb681fccae0a2ac95515e Parents: bc9285e Author: Dmytro Sen Authored: Thu Jan 21 15:28:25 2016 +0200 Committer: Dmytro Sen Committed: Wed Jan 27 14:16:26 2016 +0200 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 2 +- .../metrics/timeline/aggregators/TimelineMetricReadHelper.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b6d29965/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java index 4dc1a95..1a3b4cb 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java @@ -205,7 +205,7 @@ public class PhoenixHBaseAccessor { @SuppressWarnings("unchecked") public static TreeMap readMetricFromJSON(String json) throws IOException { -return (TreeMap) mapper.readValue(json, metricValuesTypeRef); +return mapper.readValue(json, metricValuesTypeRef); } private Connection getConnectionRetryingOnException() http://git-wip-us.apache.org/repos/asf/ambari/blob/b6d29965/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java index dc27614..c5e60fe 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java @@ -40,8 +40,8 @@ public class TimelineMetricReadHelper { public TimelineMetric getTimelineMetricFromResultSet(ResultSet rs) throws SQLException, IOException { TimelineMetric metric = getTimelineMetricCommonsFromResultSet(rs); -TreeMap sortedByTimeMetrics = new TreeMap( -PhoenixHBaseAccessor.readMetricFromJSON(rs.getString("METRICS"))); +TreeMap sortedByTimeMetrics = + PhoenixHBaseAccessor.readMetricFromJSON(rs.getString("METRICS")); metric.setMetricValues(sortedByTimeMetrics); return metric; }
ambari git commit: AMBARI-14799 Metric Monitor crashes with NoSuchProcess exception (dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.2 7d188b63a -> bc9285e38 AMBARI-14799 Metric Monitor crashes with NoSuchProcess exception (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bc9285e3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bc9285e3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bc9285e3 Branch: refs/heads/branch-2.2 Commit: bc9285e381054f688540f1f275d2cbbfb18d Parents: 7d188b6 Author: Dmytro Sen Authored: Wed Jan 27 14:06:18 2016 +0200 Committer: Dmytro Sen Committed: Wed Jan 27 14:09:44 2016 +0200 -- .../src/main/python/core/host_info.py| 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bc9285e3/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py -- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py index 23fc4de..007dd42 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py +++ b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py @@ -90,8 +90,12 @@ class HostInfo(): proc_total = 0 for proc in proc_stats: proc_total += 1 - if STATUS_RUNNING == proc.status(): -proc_run += 1 + try: +if STATUS_RUNNING == proc.status(): + proc_run += 1 + except (psutil.NoSuchProcess, psutil.AccessDenied) as e: +#NOP +pass pass return {
[2/2] ambari git commit: AMBARI-14808. Add Oozie limits.conf for Oozie User as done for HDFS/YARN (aonishuk)
AMBARI-14808. Add Oozie limits.conf for Oozie User as done for HDFS/YARN (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7d188b63 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d188b63 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d188b63 Branch: refs/heads/branch-2.2 Commit: 7d188b63a407565f986a9da8586c99de09978998 Parents: 39e0eb2 Author: Andrew Onishuk Authored: Wed Jan 27 14:08:33 2016 +0200 Committer: Andrew Onishuk Committed: Wed Jan 27 14:08:33 2016 +0200 -- .../OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 10 + .../OOZIE/4.0.0.2.0/package/scripts/oozie.py| 14 +++ .../4.0.0.2.0/package/scripts/params_linux.py | 5 +++ .../4.0.0.2.0/package/templates/oozie.conf.j2 | 35 .../stacks/2.0.6/OOZIE/test_oozie_client.py | 33 +++ .../stacks/2.0.6/OOZIE/test_oozie_server.py | 44 6 files changed, 141 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7d188b63/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml index 1b1c8e5..3a3395a 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml @@ -100,6 +100,16 @@ 256 Oozie permanent generation size. + +oozie_user_nofile_limit +32000 +Max open files limit setting for OOZIE user. + + +oozie_user_nproc_limit +16000 +Max number of processes limit setting for OOZIE user. + http://git-wip-us.apache.org/repos/asf/ambari/blob/7d188b63/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py index ba56c26..5d6ae99 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py @@ -114,6 +114,20 @@ def oozie(is_server=False): group=params.user_group, ) + # On some OS this folder could be not exists, so we will create it before pushing there files + Directory(params.limits_conf_dir, +recursive=True, +owner='root', +group='root' + ) + + File(os.path.join(params.limits_conf_dir, 'oozie.conf'), + owner='root', + group='root', + mode=0644, + content=Template("oozie.conf.j2") + ) + if (params.log4j_props != None): File(format("{params.conf_dir}/oozie-log4j.properties"), mode=0644, http://git-wip-us.apache.org/repos/asf/ambari/blob/7d188b63/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py index 89cf8e7..66ea832 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py @@ -124,6 +124,11 @@ security_enabled = config['configurations']['cluster-env']['security_enabled'] oozie_heapsize = config['configurations']['oozie-env']['oozie_heapsize'] oozie_permsize = config['configurations']['oozie-env']['oozie_permsize'] +limits_conf_dir = "/etc/security/limits.d" + +oozie_user_nofile_limit = config['configurations']['oozie-env']['oozie_user_nofile_limit'] +oozie_user_nproc_limit = config['configurations']['oozie-env']['oozie_user_nproc_limit'] + kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) oozie_service_keytab = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.keytab.file'] oozie_principal = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.kerberos.principal'] http://git-wip-us.apache.org/repos/asf/ambari/blob/7d188b63/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/templates/oozie.con
[1/2] ambari git commit: AMBARI-14808. Add Oozie limits.conf for Oozie User as done for HDFS/YARN (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.2 39e0eb20a -> 7d188b63a refs/heads/trunk 34bbd8b45 -> a88678fc7 AMBARI-14808. Add Oozie limits.conf for Oozie User as done for HDFS/YARN (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a88678fc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a88678fc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a88678fc Branch: refs/heads/trunk Commit: a88678fc7d3aeba814236d53ad9c98803f3cf4b8 Parents: 34bbd8b Author: Andrew Onishuk Authored: Wed Jan 27 14:08:30 2016 +0200 Committer: Andrew Onishuk Committed: Wed Jan 27 14:08:30 2016 +0200 -- .../OOZIE/4.0.0.2.0/configuration/oozie-env.xml | 10 + .../OOZIE/4.0.0.2.0/package/scripts/oozie.py| 14 +++ .../4.0.0.2.0/package/scripts/params_linux.py | 5 +++ .../4.0.0.2.0/package/templates/oozie.conf.j2 | 35 .../stacks/2.0.6/OOZIE/test_oozie_client.py | 33 +++ .../stacks/2.0.6/OOZIE/test_oozie_server.py | 44 6 files changed, 141 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a88678fc/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml index 3db5463..fae449e 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-env.xml @@ -98,6 +98,16 @@ 256 Oozie permanent generation size. + +oozie_user_nofile_limit +32000 +Max open files limit setting for OOZIE user. + + +oozie_user_nproc_limit +16000 +Max number of processes limit setting for OOZIE user. + http://git-wip-us.apache.org/repos/asf/ambari/blob/a88678fc/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py index db1b224..5fc2cfb 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py @@ -114,6 +114,20 @@ def oozie(is_server=False): group=params.user_group, ) + # On some OS this folder could be not exists, so we will create it before pushing there files + Directory(params.limits_conf_dir, +recursive=True, +owner='root', +group='root' + ) + + File(os.path.join(params.limits_conf_dir, 'oozie.conf'), + owner='root', + group='root', + mode=0644, + content=Template("oozie.conf.j2") + ) + if (params.log4j_props != None): File(format("{params.conf_dir}/oozie-log4j.properties"), mode=0644, http://git-wip-us.apache.org/repos/asf/ambari/blob/a88678fc/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py index fd9a462..a8a93dd 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py @@ -124,6 +124,11 @@ security_enabled = config['configurations']['cluster-env']['security_enabled'] oozie_heapsize = config['configurations']['oozie-env']['oozie_heapsize'] oozie_permsize = config['configurations']['oozie-env']['oozie_permsize'] +limits_conf_dir = "/etc/security/limits.d" + +oozie_user_nofile_limit = config['configurations']['oozie-env']['oozie_user_nofile_limit'] +oozie_user_nproc_limit = config['configurations']['oozie-env']['oozie_user_nproc_limit'] + kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) oozie_service_keytab = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.keytab.file'] oozie_principal = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.kerberos.principal'] http://git-wip-us.apache.org/re
ambari git commit: AMBARI-14799 Metric Monitor crashes with NoSuchProcess exception (dsen)
Repository: ambari Updated Branches: refs/heads/trunk d1e59133f -> 34bbd8b45 AMBARI-14799 Metric Monitor crashes with NoSuchProcess exception (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/34bbd8b4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/34bbd8b4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/34bbd8b4 Branch: refs/heads/trunk Commit: 34bbd8b458fd0bf01345abbeffd2906cc72c371b Parents: d1e5913 Author: Dmytro Sen Authored: Wed Jan 27 14:06:18 2016 +0200 Committer: Dmytro Sen Committed: Wed Jan 27 14:06:18 2016 +0200 -- .../src/main/python/core/host_info.py| 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/34bbd8b4/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py -- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py index d5a8c36..2e8c442 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py +++ b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py @@ -90,8 +90,12 @@ class HostInfo(): proc_total = 0 for proc in proc_stats: proc_total += 1 - if STATUS_RUNNING == proc.status(): -proc_run += 1 + try: +if STATUS_RUNNING == proc.status(): + proc_run += 1 + except (psutil.NoSuchProcess, psutil.AccessDenied) as e: +#NOP +pass pass return {
ambari git commit: AMBARI-14801. Alerts: HBase Region servers alert should determine RegionServer liveliness differently.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.2 2eb139026 -> 39e0eb20a AMBARI-14801. Alerts: HBase Region servers alert should determine RegionServer liveliness differently.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/39e0eb20 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/39e0eb20 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/39e0eb20 Branch: refs/heads/branch-2.2 Commit: 39e0eb20a93ef6ef1a2fe16e07b23da4eb3d665a Parents: 2eb1390 Author: Vitaly Brodetskyi Authored: Wed Jan 27 11:13:26 2016 +0200 Committer: Vitaly Brodetskyi Committed: Wed Jan 27 11:13:26 2016 +0200 -- .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpgradeCatalog222.java | 125 +++ .../HBASE/0.96.0.2.0/alerts.json| 39 +- .../server/upgrade/UpgradeCatalog222Test.java | 104 +++ 4 files changed, 231 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/39e0eb20/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java index 4bb6843..e375f86 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java @@ -182,6 +182,7 @@ public class SchemaUpgradeHelper { catalogBinder.addBinding().to(UpgradeCatalog2121.class); catalogBinder.addBinding().to(UpgradeCatalog220.class); catalogBinder.addBinding().to(UpgradeCatalog221.class); + catalogBinder.addBinding().to(UpgradeCatalog222.class); catalogBinder.addBinding().to(FinalUpgradeCatalog.class); EventBusSynchronizer.synchronizeAmbariEventPublisher(binder()); http://git-wip-us.apache.org/repos/asf/ambari/blob/39e0eb20/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java new file mode 100644 index 000..bcbbf41 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java @@ -0,0 +1,125 @@ +/* + * 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. + */ + +package org.apache.ambari.server.upgrade; + +import com.google.inject.Inject; +import com.google.inject.Injector; +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.controller.AmbariManagementController; +import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; +import org.apache.ambari.server.orm.dao.DaoUtils; +import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.Clusters; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.sql.SQLException; +import java.util.Map; + +/** + * Upgrade catalog for version 2.2.2. + */ +public class UpgradeCatalog222 extends AbstractUpgradeCatalog { + + @Inject + DaoUtils daoUtils; + + /** + * Logger. + */ + private static final Logger LOG = LoggerFactory.getLogger(UpgradeCatalog222.class); + + + + + // - Constructors -- + + /** + * Don't forget to register new UpgradeCatalogs in {@link org.apache.ambari.server.upgrade.SchemaUpgradeHelper.UpgradeHelperModule#configure()} + * + * @param injector Guice injector to track dependencies and uses bindings to inject them. + */ + @Inject + public UpgradeCatalog222(Injector injector) { +super(injector); +this.injector = injector; + }
ambari git commit: AMBARI-14801. Alerts: HBase Region servers alert should determine RegionServer liveliness differently.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk c530e0090 -> d1e59133f AMBARI-14801. Alerts: HBase Region servers alert should determine RegionServer liveliness differently.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d1e59133 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d1e59133 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d1e59133 Branch: refs/heads/trunk Commit: d1e59133f7f867a16d6cb4c7e5cc8508893a29fe Parents: c530e00 Author: Vitaly Brodetskyi Authored: Wed Jan 27 11:02:22 2016 +0200 Committer: Vitaly Brodetskyi Committed: Wed Jan 27 11:02:22 2016 +0200 -- .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpgradeCatalog222.java | 125 +++ .../server/upgrade/UpgradeCatalog240.java | 26 ++-- .../HBASE/0.96.0.2.0/alerts.json| 37 -- .../server/upgrade/UpgradeCatalog222Test.java | 104 +++ 5 files changed, 248 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d1e59133/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java index a07d42d..89e920d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java @@ -182,6 +182,7 @@ public class SchemaUpgradeHelper { catalogBinder.addBinding().to(UpgradeCatalog2121.class); catalogBinder.addBinding().to(UpgradeCatalog220.class); catalogBinder.addBinding().to(UpgradeCatalog221.class); + catalogBinder.addBinding().to(UpgradeCatalog222.class); catalogBinder.addBinding().to(UpgradeCatalog230.class); catalogBinder.addBinding().to(UpgradeCatalog240.class); catalogBinder.addBinding().to(FinalUpgradeCatalog.class); http://git-wip-us.apache.org/repos/asf/ambari/blob/d1e59133/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java new file mode 100644 index 000..bcbbf41 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java @@ -0,0 +1,125 @@ +/* + * 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. + */ + +package org.apache.ambari.server.upgrade; + +import com.google.inject.Inject; +import com.google.inject.Injector; +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.controller.AmbariManagementController; +import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; +import org.apache.ambari.server.orm.dao.DaoUtils; +import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.Clusters; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.sql.SQLException; +import java.util.Map; + +/** + * Upgrade catalog for version 2.2.2. + */ +public class UpgradeCatalog222 extends AbstractUpgradeCatalog { + + @Inject + DaoUtils daoUtils; + + /** + * Logger. + */ + private static final Logger LOG = LoggerFactory.getLogger(UpgradeCatalog222.class); + + + + + // - Constructors -- + + /** + * Don't forget to register new UpgradeCatalogs in {@link org.apache.ambari.server.upgrade.SchemaUpgradeHelper.UpgradeHelperModule#configure()} + * + * @param injector Guice injector to track dependencies and uses bindings to inject them. + */ + @Inject + p
ambari git commit: AMBARI-14790. oozie configs rotate oozie logs that are too small.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.2 f4ddca954 -> 2eb139026 AMBARI-14790. oozie configs rotate oozie logs that are too small.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2eb13902 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2eb13902 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2eb13902 Branch: refs/heads/branch-2.2 Commit: 2eb139026e6b5ad91bce2b14d8e841ffe6c608fa Parents: f4ddca9 Author: Vitaly Brodetskyi Authored: Wed Jan 27 09:52:25 2016 +0200 Committer: Vitaly Brodetskyi Committed: Wed Jan 27 09:52:25 2016 +0200 -- .../OOZIE/4.0.0.2.0/configuration/oozie-log4j.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2eb13902/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-log4j.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-log4j.xml index 2c48cae..b4518ce 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-log4j.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/configuration/oozie-log4j.xml @@ -47,9 +47,10 @@ # If the Java System property 'oozie.log.dir' is not defined at Oozie start up time # XLogService sets its value to '${oozie.home}/logs' -log4j.appender.oozie=org.apache.log4j.DailyRollingFileAppender -log4j.appender.oozie.DatePattern='.'-MM-dd-HH +log4j.appender.oozie=org.apache.log4j.RollingFileAppender log4j.appender.oozie.File=${oozie.log.dir}/oozie.log +log4j.appender.oozie.MaxFileSize=200MB +log4j.appender.oozie.MaxBackupIndex=10 log4j.appender.oozie.Append=true log4j.appender.oozie.layout=org.apache.log4j.PatternLayout log4j.appender.oozie.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - SERVER[${oozie.instance.id}] %m%n
[2/2] ambari git commit: AMBARI-14807. Systemd on RHEL/CentOS 7.2 breaks ambari-server startup (aonishuk)
AMBARI-14807. Systemd on RHEL/CentOS 7.2 breaks ambari-server startup (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f4ddca95 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f4ddca95 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f4ddca95 Branch: refs/heads/branch-2.2 Commit: f4ddca954325561b5853be05d9fed7cee050d755 Parents: b15acbc Author: Andrew Onishuk Authored: Wed Jan 27 11:34:11 2016 +0200 Committer: Andrew Onishuk Committed: Wed Jan 27 11:34:11 2016 +0200 -- ambari-server/pom.xml | 11 ++- ambari-server/src/main/package/deb/control/postinst | 6 +++--- ambari-server/src/main/package/deb/control/prerm| 4 ++-- ambari-server/src/main/package/rpm/postinstall.sh | 6 +++--- ambari-server/src/main/package/rpm/preremove.sh | 4 ++-- 5 files changed, 20 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddca95/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index fc57ebd..f129983 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -391,6 +391,15 @@ src/main/python/ambari_server_main.py + + + + /etc/init.d + 755 + root + root + false + sbin/ambari-server true @@ -796,7 +805,7 @@ file perm -/usr/sbin +/etc/init.d/ root root 755 http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddca95/ambari-server/src/main/package/deb/control/postinst -- diff --git a/ambari-server/src/main/package/deb/control/postinst b/ambari-server/src/main/package/deb/control/postinst index 629ab09..c3b6235 100644 --- a/ambari-server/src/main/package/deb/control/postinst +++ b/ambari-server/src/main/package/deb/control/postinst @@ -14,12 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License -if [ -e "/etc/init.d/ambari-server" ]; then # Check is needed for upgrade +if [ -e "/usr/sbin/ambari-server" ]; then # Check is needed for upgrade # Remove link created by previous package version -rm /etc/init.d/ambari-server +rm -f /usr/sbin/ambari-server fi -ln -s /usr/sbin/ambari-server /etc/init.d/ambari-server +ln -s /etc/init.d/ambari-server /usr/sbin/ambari-server if [ "$1" == "configure" ]; then # Action is install if [ -f "/var/lib/ambari-server/install-helper.sh" ]; then http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddca95/ambari-server/src/main/package/deb/control/prerm -- diff --git a/ambari-server/src/main/package/deb/control/prerm b/ambari-server/src/main/package/deb/control/prerm index 15d05c4..927ba4c 100644 --- a/ambari-server/src/main/package/deb/control/prerm +++ b/ambari-server/src/main/package/deb/control/prerm @@ -22,9 +22,9 @@ if [ "$1" == "remove" ]; then # Action is uninstall mv /etc/ambari-server/conf.save /etc/ambari-server/conf_$(date '+%d_%m_%y_%H_%M').save fi -if [ -e "/etc/init.d/ambari-server" ]; then +if [ -e "/usr/sbin/ambari-server" ]; then # Remove link created during install -rm /etc/init.d/ambari-server +rm /usr/sbin/ambari-server fi mv /etc/ambari-server/conf /etc/ambari-server/conf.save http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddca95/ambari-server/src/main/package/rpm/postinstall.sh -- diff --git a/ambari-server/src/main/package/rpm/postinstall.sh b/ambari-server/src/main/package/rpm/postinstall.sh index d47a00c..9b0b54a 100644 --- a/ambari-server/src/main/package/rpm/postinstall.sh +++ b/ambari-server/src/main/package/rpm/postinstall.sh @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License -if [ -e "/etc/init.d/ambari-server" ]; then # Check is needed for upgrade +if [ -e "/usr/sbin/ambari-server" ]; then # Check is needed for upgrade # Remove link created by previous package version -rm /etc/init.d/ambari-server +rm -f /usr/sbin/ambari-server fi -ln -s /usr/sbin/ambari-server /etc/init.d/ambari-server +ln -s /etc/init.d/ambari-server /usr/sbin/ambari-server case "$1" in 1) # Action install http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddca
[1/2] ambari git commit: AMBARI-14807. Systemd on RHEL/CentOS 7.2 breaks ambari-server startup (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.2 b15acbc02 -> f4ddca954 refs/heads/trunk a816cada6 -> c530e0090 AMBARI-14807. Systemd on RHEL/CentOS 7.2 breaks ambari-server startup (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c530e009 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c530e009 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c530e009 Branch: refs/heads/trunk Commit: c530e00900b28b1c129dc364f70523ffa91b6f3a Parents: a816cad Author: Andrew Onishuk Authored: Wed Jan 27 11:34:08 2016 +0200 Committer: Andrew Onishuk Committed: Wed Jan 27 11:34:08 2016 +0200 -- ambari-server/pom.xml | 11 ++- ambari-server/src/main/package/deb/control/postinst | 6 +++--- ambari-server/src/main/package/deb/control/prerm| 4 ++-- ambari-server/src/main/package/rpm/postinstall.sh | 6 +++--- ambari-server/src/main/package/rpm/preremove.sh | 4 ++-- 5 files changed, 20 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index eb977ad..9b35c46 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -393,6 +393,15 @@ src/main/python/ambari_server_main.py + + + + /etc/init.d + 755 + root + root + false + sbin/ambari-server true @@ -798,7 +807,7 @@ file perm -/usr/sbin +/etc/init.d/ root root 755 http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/deb/control/postinst -- diff --git a/ambari-server/src/main/package/deb/control/postinst b/ambari-server/src/main/package/deb/control/postinst index 629ab09..c3b6235 100644 --- a/ambari-server/src/main/package/deb/control/postinst +++ b/ambari-server/src/main/package/deb/control/postinst @@ -14,12 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License -if [ -e "/etc/init.d/ambari-server" ]; then # Check is needed for upgrade +if [ -e "/usr/sbin/ambari-server" ]; then # Check is needed for upgrade # Remove link created by previous package version -rm /etc/init.d/ambari-server +rm -f /usr/sbin/ambari-server fi -ln -s /usr/sbin/ambari-server /etc/init.d/ambari-server +ln -s /etc/init.d/ambari-server /usr/sbin/ambari-server if [ "$1" == "configure" ]; then # Action is install if [ -f "/var/lib/ambari-server/install-helper.sh" ]; then http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/deb/control/prerm -- diff --git a/ambari-server/src/main/package/deb/control/prerm b/ambari-server/src/main/package/deb/control/prerm index 15d05c4..927ba4c 100644 --- a/ambari-server/src/main/package/deb/control/prerm +++ b/ambari-server/src/main/package/deb/control/prerm @@ -22,9 +22,9 @@ if [ "$1" == "remove" ]; then # Action is uninstall mv /etc/ambari-server/conf.save /etc/ambari-server/conf_$(date '+%d_%m_%y_%H_%M').save fi -if [ -e "/etc/init.d/ambari-server" ]; then +if [ -e "/usr/sbin/ambari-server" ]; then # Remove link created during install -rm /etc/init.d/ambari-server +rm /usr/sbin/ambari-server fi mv /etc/ambari-server/conf /etc/ambari-server/conf.save http://git-wip-us.apache.org/repos/asf/ambari/blob/c530e009/ambari-server/src/main/package/rpm/postinstall.sh -- diff --git a/ambari-server/src/main/package/rpm/postinstall.sh b/ambari-server/src/main/package/rpm/postinstall.sh index d47a00c..9b0b54a 100644 --- a/ambari-server/src/main/package/rpm/postinstall.sh +++ b/ambari-server/src/main/package/rpm/postinstall.sh @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License -if [ -e "/etc/init.d/ambari-server" ]; then # Check is needed for upgrade +if [ -e "/usr/sbin/ambari-server" ]; then # Check is needed for upgrade # Remove link created by previous package version -rm /etc/init.d/ambari-server +rm -f /usr/sbin/ambari-server fi -ln -s /usr/sbin/ambari-server /etc/init.d/ambari-server +ln -s /etc/init.d/ambari-serve