ambari git commit: AMBARI-12319 - Views : S020 Data storage error for Hive view (Mysql db) (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 c679234d3 - 21cef44b3 AMBARI-12319 - Views : S020 Data storage error for Hive view (Mysql db) (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21cef44b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21cef44b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21cef44b Branch: refs/heads/branch-2.1 Commit: 21cef44b3e49f6d6ee4eb15fbf567c9fcf43eb5d Parents: c679234 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Wed Jul 8 08:34:41 2015 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Wed Jul 8 08:35:57 2015 -0400 -- .../server/view/persistence/DataStoreImpl.java | 21 - .../view/persistence/DataStoreImplTest.java | 81 2 files changed, 100 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/21cef44b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java index 6d31a08..333ff19 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java @@ -25,6 +25,7 @@ import org.apache.ambari.view.PersistenceException; import org.eclipse.persistence.dynamic.DynamicClassLoader; import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.dynamic.DynamicType; +import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper; import org.eclipse.persistence.jpa.dynamic.JPADynamicTypeBuilder; import org.eclipse.persistence.mappings.DirectToFieldMapping; @@ -117,7 +118,12 @@ public class DataStoreImpl implements DataStore { /** * Max length of entity string field. */ - protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 4000; + protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 3200; + + /** + * Max total length of all the fields of an entity. + */ + protected static final int MAX_ENTITY_FIELD_LENGTH_TOTAL = 65000; /** * Table / column name prefix. @@ -286,6 +292,8 @@ public class DataStoreImpl implements DataStore { MapString, PropertyDescriptor descriptorMap = getDescriptorMap(clazz); + long totalLength = 0L; + for (Map.EntryString, PropertyDescriptor descriptorEntry : descriptorMap.entrySet()) { String fieldName = descriptorEntry.getKey(); @@ -302,9 +310,18 @@ public class DataStoreImpl implements DataStore { if (isDirectMappingType(propertyType)) { DirectToFieldMapping mapping = typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); + DatabaseField field = mapping.getField(); + // explicitly set the length of string fields if (String.class.isAssignableFrom(propertyType)) { -mapping.getField().setLength(MAX_ENTITY_STRING_FIELD_LENGTH); +field.setLength(MAX_ENTITY_STRING_FIELD_LENGTH); + } + totalLength += field.getLength(); + if (totalLength MAX_ENTITY_FIELD_LENGTH_TOTAL) { +String msg = String.format(The total length of the fields of the %s entity can not exceed %d characters., +clazz.getSimpleName(), MAX_ENTITY_FIELD_LENGTH_TOTAL); +LOG.error(msg); +throw new IllegalStateException(msg); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/21cef44b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java index 1b4758d..9be6e4f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java @@ -189,6 +189,46 @@ public class DataStoreImplTest { } @Test + public void testStore_create_largeEntity() throws Exception { +DynamicClassLoader classLoader = new DynamicClassLoader(DataStoreImplTest.class.getClassLoader()); + +// create mocks +EntityManagerFactory entityManagerFactory = createMock(EntityManagerFactory.class); +EntityManager entityManager =
ambari git commit: AMBARI-12319 - Views : S020 Data storage error for Hive view (Mysql db) (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 877141d78 - b490df785 AMBARI-12319 - Views : S020 Data storage error for Hive view (Mysql db) (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b490df78 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b490df78 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b490df78 Branch: refs/heads/trunk Commit: b490df785e19e2c59c1c90c5b9586aaacd3163a9 Parents: 877141d Author: tbeerbower tbeerbo...@hortonworks.com Authored: Wed Jul 8 08:34:41 2015 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Wed Jul 8 08:34:50 2015 -0400 -- .../server/view/persistence/DataStoreImpl.java | 21 - .../view/persistence/DataStoreImplTest.java | 81 2 files changed, 100 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b490df78/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java index 6d31a08..333ff19 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java @@ -25,6 +25,7 @@ import org.apache.ambari.view.PersistenceException; import org.eclipse.persistence.dynamic.DynamicClassLoader; import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.dynamic.DynamicType; +import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper; import org.eclipse.persistence.jpa.dynamic.JPADynamicTypeBuilder; import org.eclipse.persistence.mappings.DirectToFieldMapping; @@ -117,7 +118,12 @@ public class DataStoreImpl implements DataStore { /** * Max length of entity string field. */ - protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 4000; + protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 3200; + + /** + * Max total length of all the fields of an entity. + */ + protected static final int MAX_ENTITY_FIELD_LENGTH_TOTAL = 65000; /** * Table / column name prefix. @@ -286,6 +292,8 @@ public class DataStoreImpl implements DataStore { MapString, PropertyDescriptor descriptorMap = getDescriptorMap(clazz); + long totalLength = 0L; + for (Map.EntryString, PropertyDescriptor descriptorEntry : descriptorMap.entrySet()) { String fieldName = descriptorEntry.getKey(); @@ -302,9 +310,18 @@ public class DataStoreImpl implements DataStore { if (isDirectMappingType(propertyType)) { DirectToFieldMapping mapping = typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); + DatabaseField field = mapping.getField(); + // explicitly set the length of string fields if (String.class.isAssignableFrom(propertyType)) { -mapping.getField().setLength(MAX_ENTITY_STRING_FIELD_LENGTH); +field.setLength(MAX_ENTITY_STRING_FIELD_LENGTH); + } + totalLength += field.getLength(); + if (totalLength MAX_ENTITY_FIELD_LENGTH_TOTAL) { +String msg = String.format(The total length of the fields of the %s entity can not exceed %d characters., +clazz.getSimpleName(), MAX_ENTITY_FIELD_LENGTH_TOTAL); +LOG.error(msg); +throw new IllegalStateException(msg); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/b490df78/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java index 1b4758d..9be6e4f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java @@ -189,6 +189,46 @@ public class DataStoreImplTest { } @Test + public void testStore_create_largeEntity() throws Exception { +DynamicClassLoader classLoader = new DynamicClassLoader(DataStoreImplTest.class.getClassLoader()); + +// create mocks +EntityManagerFactory entityManagerFactory = createMock(EntityManagerFactory.class); +EntityManager entityManager =
[1/2] ambari git commit: AMBARI-12326. on non-root agent RU ZK restart fails (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 d81c31ed0 - c679234d3 refs/heads/trunk 02dfbab58 - 877141d78 AMBARI-12326. on non-root agent RU ZK restart fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/877141d7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/877141d7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/877141d7 Branch: refs/heads/trunk Commit: 877141d784b6dba018ca0926abe4297ca4eae2cc Parents: 02dfbab Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 12:18:34 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 12:18:34 2015 +0300 -- .../python/resource_management/libraries/functions/validate.py | 4 ++-- .../ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py| 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/877141d7/ambari-common/src/main/python/resource_management/libraries/functions/validate.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py index 63196f7..c3c9ae7 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py @@ -25,12 +25,12 @@ from resource_management.core.exceptions import Fail @retry(times=10, sleep_time=2) -def call_and_match_output(command, regex_expression, err_message): +def call_and_match_output(command, regex_expression, err_message, **call_kwargs): Call the command and performs a regex match on the output for the specified expression. :param command: Command to call :param regex_expression: Regex expression to search in the output - code, out = shell.call(command, logoutput=True) + code, out = shell.call(command, logoutput=True, quiet=False, **call_kwargs) if not (out and re.search(regex_expression, out, re.IGNORECASE)): raise Fail(err_message) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/877141d7/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py -- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py index 240882f..b7fb578 100644 --- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py +++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py @@ -91,9 +91,9 @@ class ZookeeperServerLinux(ZookeeperServer): delete_command = format(echo 'delete /{unique} ' | {cli_shell}) quorum_err_message = Failed to establish zookeeper quorum -call_and_match_output(create_command, 'Created', quorum_err_message) -call_and_match_output(list_command, r\[.*? + unique + .*?\], quorum_err_message) -shell.call(delete_command) +call_and_match_output(create_command, 'Created', quorum_err_message, user=params.zk_user) +call_and_match_output(list_command, r\[.*? + unique + .*?\], quorum_err_message, user=params.zk_user) +shell.call(delete_command, user=params.zk_user) if params.client_port: check_leader_command = format(echo stat | nc localhost {client_port} | grep Mode)
[2/2] ambari git commit: AMBARI-12326. on non-root agent RU ZK restart fails (aonishuk)
AMBARI-12326. on non-root agent RU ZK restart fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c679234d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c679234d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c679234d Branch: refs/heads/branch-2.1 Commit: c679234d38f420d92fb4243de9e338691cd6e036 Parents: d81c31e Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 12:18:36 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 12:18:36 2015 +0300 -- .../python/resource_management/libraries/functions/validate.py | 4 ++-- .../ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py| 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c679234d/ambari-common/src/main/python/resource_management/libraries/functions/validate.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py index 63196f7..c3c9ae7 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py @@ -25,12 +25,12 @@ from resource_management.core.exceptions import Fail @retry(times=10, sleep_time=2) -def call_and_match_output(command, regex_expression, err_message): +def call_and_match_output(command, regex_expression, err_message, **call_kwargs): Call the command and performs a regex match on the output for the specified expression. :param command: Command to call :param regex_expression: Regex expression to search in the output - code, out = shell.call(command, logoutput=True) + code, out = shell.call(command, logoutput=True, quiet=False, **call_kwargs) if not (out and re.search(regex_expression, out, re.IGNORECASE)): raise Fail(err_message) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/c679234d/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py -- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py index 240882f..b7fb578 100644 --- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py +++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py @@ -91,9 +91,9 @@ class ZookeeperServerLinux(ZookeeperServer): delete_command = format(echo 'delete /{unique} ' | {cli_shell}) quorum_err_message = Failed to establish zookeeper quorum -call_and_match_output(create_command, 'Created', quorum_err_message) -call_and_match_output(list_command, r\[.*? + unique + .*?\], quorum_err_message) -shell.call(delete_command) +call_and_match_output(create_command, 'Created', quorum_err_message, user=params.zk_user) +call_and_match_output(list_command, r\[.*? + unique + .*?\], quorum_err_message, user=params.zk_user) +shell.call(delete_command, user=params.zk_user) if params.client_port: check_leader_command = format(echo stat | nc localhost {client_port} | grep Mode)
ambari git commit: AMBARI-12327 [Usability] Stackadvisor bug for hive.auto.convert.join.noconditionaltask.size. (atkach)
Repository: ambari Updated Branches: refs/heads/branch-2.1 21cef44b3 - 982f606d9 AMBARI-12327 [Usability] Stackadvisor bug for hive.auto.convert.join.noconditionaltask.size. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/982f606d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/982f606d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/982f606d Branch: refs/heads/branch-2.1 Commit: 982f606d9f5e81a00b716ce8a22735c9f56c9ede Parents: 21cef44 Author: Andrii Tkach atk...@hortonworks.com Authored: Wed Jul 8 14:15:43 2015 +0300 Committer: Andrii Tkach atk...@hortonworks.com Committed: Wed Jul 8 16:50:37 2015 +0300 -- .../views/common/configs/widgets/slider_config_widget_view.js| 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/982f606d/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js -- diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js index 0905a09..c61ff5b 100644 --- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js +++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js @@ -272,6 +272,10 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({ if (!Em.isNone(this.get('config.savedValue')) parsed == parseFunction(this.widgetValueByConfigAttributes(this.get('config.savedValue' { this.set('config.value', this.get('config.savedValue')); } + // ignore precision during set recommended value + if (!Em.isNone(this.get('config.recommendedValue')) parsed == parseFunction(this.widgetValueByConfigAttributes(this.get('config.recommendedValue' { +this.set('config.value', this.get('config.recommendedValue')); + } } else { this.set('isMirrorValueValid', false); this.set('config.errorMessage', 'Invalid value');
ambari git commit: AMBARI-12327 [Usability] Stackadvisor bug for hive.auto.convert.join.noconditionaltask.size. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk b490df785 - 2dbad5bf4 AMBARI-12327 [Usability] Stackadvisor bug for hive.auto.convert.join.noconditionaltask.size. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2dbad5bf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2dbad5bf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2dbad5bf Branch: refs/heads/trunk Commit: 2dbad5bf4bab097a6f373e9defed03dff998ad3a Parents: b490df7 Author: Andrii Tkach atk...@hortonworks.com Authored: Wed Jul 8 16:52:05 2015 +0300 Committer: Andrii Tkach atk...@hortonworks.com Committed: Wed Jul 8 16:52:05 2015 +0300 -- .../views/common/configs/widgets/slider_config_widget_view.js| 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2dbad5bf/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js -- diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js index 0905a09..c61ff5b 100644 --- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js +++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js @@ -272,6 +272,10 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({ if (!Em.isNone(this.get('config.savedValue')) parsed == parseFunction(this.widgetValueByConfigAttributes(this.get('config.savedValue' { this.set('config.value', this.get('config.savedValue')); } + // ignore precision during set recommended value + if (!Em.isNone(this.get('config.recommendedValue')) parsed == parseFunction(this.widgetValueByConfigAttributes(this.get('config.recommendedValue' { +this.set('config.value', this.get('config.recommendedValue')); + } } else { this.set('isMirrorValueValid', false); this.set('config.errorMessage', 'Invalid value');
ambari git commit: AMBARI-12090. Hive configs: save and discard buttons are blinking all the time (onechiporenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 982f606d9 - e1f142f0e AMBARI-12090. Hive configs: save and discard buttons are blinking all the time (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e1f142f0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e1f142f0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e1f142f0 Branch: refs/heads/branch-2.1 Commit: e1f142f0e1f5500e14da9ad3059c4b8f3df07c29 Parents: 982f606 Author: Oleg Nechiporenko onechipore...@apache.org Authored: Wed Jul 8 17:12:51 2015 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Wed Jul 8 17:13:03 2015 +0300 -- .../configs/widgets/slider_config_widget_view.js | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e1f142f0/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js -- diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js index c61ff5b..b9cbc46 100644 --- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js +++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js @@ -554,10 +554,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({ if (arguments.length) { this.refreshSliderObserver(); } -else { - // hack for slider-overrides - this._changeBoundariesOnceLater(don't call me more!); -} } catch (e) { console.error('error while rebuilding slider for config: ' + this.get('config.name')); } @@ -574,11 +570,9 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({ * @method changeBoundariesOnceLater */ _changeBoundariesOnceLater: function() { -console.debug('_changeBoundariesOnceLater', arguments); -var args = arguments; var self = this; Em.run.later('sync', function() { - self.changeBoundariesOnce(args); + self.changeBoundariesOnce(); }, 10); }, @@ -587,9 +581,12 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({ * @method refreshSliderObserver */ refreshSliderObserver: function() { +var self = this; var sliderTickLabel = this.$('.ui-slider-wrapper:eq(0) .slider-tick-label:first'); if (sliderTickLabel.width() == 0 this.isValueCompatibleWithWidget()) { - this._changeBoundariesOnceLater(); + Em.run.next(function() { +self._changeBoundariesOnceLater(); + }); } }.observes('parentView.content.isActive', 'parentView.parentView.tab.isActive'),
[2/2] ambari git commit: AMBARI-12331. on non-root agent RU Oozie restart fails (aonishuk)
AMBARI-12331. on non-root agent RU Oozie restart fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ea0b83c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ea0b83c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ea0b83c Branch: refs/heads/branch-2.1 Commit: 6ea0b83c84bcd23a84577996d6e5b7e7a4af98ba Parents: 58fc42e Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 17:48:03 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 17:48:03 2015 +0300 -- .../libraries/functions/tar_archive.py | 40 ++--- .../1.4.0.2.0/package/scripts/flume_upgrade.py | 5 +- .../0.5.0.2.2/package/scripts/knox_gateway.py | 6 +- .../package/scripts/oozie_server_upgrade.py | 23 +-- .../stacks/2.0.6/HDFS/test_hdfs_client.py | 3 + .../stacks/2.0.6/OOZIE/test_oozie_server.py | 124 +-- .../stacks/2.1/FALCON/test_falcon_server.py | 158 ++- .../python/stacks/2.2/KNOX/test_knox_gateway.py | 85 ++ 8 files changed, 309 insertions(+), 135 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6ea0b83c/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py b/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py index f1fb597..49caf88 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py @@ -18,16 +18,12 @@ See the License for the specific language governing permissions and limitations under the License. ''' -import os -import tarfile -from contextlib import closing +from resource_management.core.resources.system import Execute def archive_dir(output_filename, input_dir): - with closing(tarfile.open(output_filename, w:gz)) as tar: -try: - tar.add(input_dir, arcname=os.path.basename(.)) -finally: - tar.close() + Execute(('tar', '-zcvf', output_filename, input_dir), +sudo = True, + ) def archive_directory_dereference(archive, directory): @@ -38,19 +34,15 @@ def archive_directory_dereference(archive, directory): :param directory: the directory to include :return: None - tarball = None - try: -# !!! dereference must be TRUE since the conf is a symlink and we want -# its contents instead of the actual symlink -tarball = tarfile.open(archive, mode=w, dereference=True) - -# tar the files, chopping off everything in front of directory -# /foo/bar/conf/a, /foo/bar/conf/b, /foo/bar/conf/dir/c -# becomes -# a -# b -# dir/c -tarball.add(directory, arcname=os.path.relpath(directory, start=directory)) - finally: -if tarball: - tarball.close() \ No newline at end of file + + Execute(('tar', '-zcvhf', archive, directory), +sudo = True, + ) + +def untar_archive(archive, directory): + + :param directory: can be a symlink and is followed + + Execute(('tar','-xvf',archive,'-C',directory+/), + sudo = True, + ) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/6ea0b83c/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py index 32cc1b9..7743619 100644 --- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py +++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py @@ -70,10 +70,7 @@ def pre_start_restore(): directoryMappings[directory]) if os.path.isfile(archive): - Logger.info('Extracting {0} to {1}'.format(archive, directory)) - Execute(('tar','-xvf',archive,'-C',directory+/), - sudo = True, - ) + tar_archive.untar_archive(archive, directory) # cleanup if os.path.exists(os.path.join(tempfile.gettempdir(), BACKUP_TEMP_DIR)): http://git-wip-us.apache.org/repos/asf/ambari/blob/6ea0b83c/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py
[1/2] ambari git commit: AMBARI-12331. on non-root agent RU Oozie restart fails (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 58fc42e16 - 6ea0b83c8 refs/heads/trunk bebe23872 - cebb515d4 AMBARI-12331. on non-root agent RU Oozie restart fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cebb515d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cebb515d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cebb515d Branch: refs/heads/trunk Commit: cebb515d4a4109d951687d5c932fdd9af27e3b48 Parents: bebe238 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 17:48:01 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 17:48:01 2015 +0300 -- .../libraries/functions/tar_archive.py | 40 ++--- .../1.4.0.2.0/package/scripts/flume_upgrade.py | 5 +- .../0.5.0.2.2/package/scripts/knox_gateway.py | 6 +- .../package/scripts/oozie_server_upgrade.py | 23 +-- .../stacks/2.0.6/HDFS/test_hdfs_client.py | 3 + .../stacks/2.0.6/OOZIE/test_oozie_server.py | 124 +-- .../stacks/2.1/FALCON/test_falcon_server.py | 158 ++- .../python/stacks/2.2/KNOX/test_knox_gateway.py | 85 ++ 8 files changed, 309 insertions(+), 135 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cebb515d/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py b/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py index f1fb597..49caf88 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py @@ -18,16 +18,12 @@ See the License for the specific language governing permissions and limitations under the License. ''' -import os -import tarfile -from contextlib import closing +from resource_management.core.resources.system import Execute def archive_dir(output_filename, input_dir): - with closing(tarfile.open(output_filename, w:gz)) as tar: -try: - tar.add(input_dir, arcname=os.path.basename(.)) -finally: - tar.close() + Execute(('tar', '-zcvf', output_filename, input_dir), +sudo = True, + ) def archive_directory_dereference(archive, directory): @@ -38,19 +34,15 @@ def archive_directory_dereference(archive, directory): :param directory: the directory to include :return: None - tarball = None - try: -# !!! dereference must be TRUE since the conf is a symlink and we want -# its contents instead of the actual symlink -tarball = tarfile.open(archive, mode=w, dereference=True) - -# tar the files, chopping off everything in front of directory -# /foo/bar/conf/a, /foo/bar/conf/b, /foo/bar/conf/dir/c -# becomes -# a -# b -# dir/c -tarball.add(directory, arcname=os.path.relpath(directory, start=directory)) - finally: -if tarball: - tarball.close() \ No newline at end of file + + Execute(('tar', '-zcvhf', archive, directory), +sudo = True, + ) + +def untar_archive(archive, directory): + + :param directory: can be a symlink and is followed + + Execute(('tar','-xvf',archive,'-C',directory+/), + sudo = True, + ) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/cebb515d/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py index 32cc1b9..7743619 100644 --- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py +++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py @@ -70,10 +70,7 @@ def pre_start_restore(): directoryMappings[directory]) if os.path.isfile(archive): - Logger.info('Extracting {0} to {1}'.format(archive, directory)) - Execute(('tar','-xvf',archive,'-C',directory+/), - sudo = True, - ) + tar_archive.untar_archive(archive, directory) # cleanup if os.path.exists(os.path.join(tempfile.gettempdir(), BACKUP_TEMP_DIR)): http://git-wip-us.apache.org/repos/asf/ambari/blob/cebb515d/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py -- diff --git
ambari git commit: AMBARI-12333 - Unit Test UpgradeResourceProviderTest.testCreatePartialDowngrade Is Failing (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-2.1 23d7b1742 - 9cf3502ab AMBARI-12333 - Unit Test UpgradeResourceProviderTest.testCreatePartialDowngrade Is Failing (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9cf3502a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9cf3502a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9cf3502a Branch: refs/heads/branch-2.1 Commit: 9cf3502ab67e4bad06f38401dc366e438c77a6ea Parents: 23d7b17 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Jul 8 10:50:58 2015 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Jul 8 10:59:57 2015 -0400 -- .../internal/UpgradeResourceProviderTest.java | 27 +++- 1 file changed, 21 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9cf3502a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java index 1b6ad36..1498d1f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java @@ -394,7 +394,6 @@ public class UpgradeResourceProviderTest { @Test public void testCreatePartialDowngrade() throws Exception { - clusters.addHost(h2); Host host = clusters.getHost(h2); MapString, String hostAttributes = new HashMapString, String(); @@ -412,9 +411,26 @@ public class UpgradeResourceProviderTest { ServiceComponentHost sch = component.addServiceComponentHost(h2); sch.setVersion(2.2.2.2); +// start out with 0 (sanity check) ListUpgradeEntity upgrades = upgradeDao.findUpgrades(cluster.getClusterId()); assertEquals(0, upgrades.size()); +// a downgrade MUST have an upgrade to come from, so populate an upgrade in +// the DB +UpgradeEntity upgradeEntity = new UpgradeEntity(); +upgradeEntity.setClusterId(cluster.getClusterId()); +upgradeEntity.setDirection(Direction.UPGRADE); +upgradeEntity.setFromVersion(2.1.1.1); +upgradeEntity.setToVersion(2.2.2.2); +upgradeEntity.setRequestId(1L); + +upgradeDao.create(upgradeEntity); +upgrades = upgradeDao.findUpgrades(cluster.getClusterId()); +assertEquals(1, upgrades.size()); + +UpgradeEntity lastUpgrade = upgradeDao.findLastUpgradeForCluster(cluster.getClusterId()); +assertNotNull(lastUpgrade); + MapString, Object requestProps = new HashMapString, Object(); requestProps.put(UpgradeResourceProvider.UPGRADE_CLUSTER_NAME, c1); requestProps.put(UpgradeResourceProvider.UPGRADE_VERSION, 2.1.1.1); @@ -428,13 +444,12 @@ public class UpgradeResourceProviderTest { upgradeResourceProvider.createResources(request); upgrades = upgradeDao.findUpgrades(cluster.getClusterId()); -assertEquals(1, upgrades.size()); - +assertEquals(2, upgrades.size()); -UpgradeEntity entity = upgrades.get(0); -assertEquals(cluster.getClusterId(), entity.getClusterId().longValue()); +UpgradeEntity downgrade = upgrades.get(1); +assertEquals(cluster.getClusterId(), downgrade.getClusterId().longValue()); -ListUpgradeGroupEntity upgradeGroups = entity.getUpgradeGroups(); +ListUpgradeGroupEntity upgradeGroups = downgrade.getUpgradeGroups(); assertEquals(3, upgradeGroups.size()); UpgradeGroupEntity group = upgradeGroups.get(1);
ambari git commit: AMBARI-12090. Hive configs: save and discard buttons are blinking all the time (onechiporenko)
Repository: ambari Updated Branches: refs/heads/trunk 2dbad5bf4 - d637d5f0b AMBARI-12090. Hive configs: save and discard buttons are blinking all the time (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d637d5f0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d637d5f0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d637d5f0 Branch: refs/heads/trunk Commit: d637d5f0b114032839a2beb83b4ce5162a86058b Parents: 2dbad5b Author: Oleg Nechiporenko onechipore...@apache.org Authored: Wed Jul 8 17:12:51 2015 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Wed Jul 8 17:20:12 2015 +0300 -- .../configs/widgets/slider_config_widget_view.js | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d637d5f0/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js -- diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js index c61ff5b..b9cbc46 100644 --- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js +++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js @@ -554,10 +554,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({ if (arguments.length) { this.refreshSliderObserver(); } -else { - // hack for slider-overrides - this._changeBoundariesOnceLater(don't call me more!); -} } catch (e) { console.error('error while rebuilding slider for config: ' + this.get('config.name')); } @@ -574,11 +570,9 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({ * @method changeBoundariesOnceLater */ _changeBoundariesOnceLater: function() { -console.debug('_changeBoundariesOnceLater', arguments); -var args = arguments; var self = this; Em.run.later('sync', function() { - self.changeBoundariesOnce(args); + self.changeBoundariesOnce(); }, 10); }, @@ -587,9 +581,12 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({ * @method refreshSliderObserver */ refreshSliderObserver: function() { +var self = this; var sliderTickLabel = this.$('.ui-slider-wrapper:eq(0) .slider-tick-label:first'); if (sliderTickLabel.width() == 0 this.isValueCompatibleWithWidget()) { - this._changeBoundariesOnceLater(); + Em.run.next(function() { +self._changeBoundariesOnceLater(); + }); } }.observes('parentView.content.isActive', 'parentView.parentView.tab.isActive'),
ambari git commit: AMBARI-12317 - False alert on NameNode High Availability Health due to Missing JMX objects (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk d637d5f0b - bebe23872 AMBARI-12317 - False alert on NameNode High Availability Health due to Missing JMX objects (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bebe2387 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bebe2387 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bebe2387 Branch: refs/heads/trunk Commit: bebe23872db9cfbc666849fe589df4c7833f241e Parents: d637d5f Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Jul 7 13:49:56 2015 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Jul 8 10:33:52 2015 -0400 -- .../python/ambari_agent/alerts/metric_alert.py | 15 ++-- .../python/ambari_agent/alerts/web_alert.py | 5 +- .../src/test/python/ambari_agent/TestAlerts.py | 2 +- .../libraries/functions/curl_krb_request.py | 20 +++-- .../package/alerts/alert_checkpoint_time.py | 14 ++- .../package/alerts/alert_ha_namenode_health.py | 58 ++--- .../package/alerts/alert_nodemanager_health.py | 7 +- .../alerts/alert_nodemanagers_summary.py| 13 ++- .../package/files/alert_ha_namenode_health.py | 91 +--- 9 files changed, 176 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bebe2387/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py index ece6063..6bcdacd 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py @@ -58,8 +58,9 @@ class MetricAlert(BaseAlert): if 'connection_timeout' in uri: connection_timeout = uri['connection_timeout'] -# python uses 5.0, not 5 +# python uses 5.0, CURL uses 5 self.connection_timeout = float(connection_timeout) +self.curl_connection_timeout = int(connection_timeout) self.config = config @@ -206,7 +207,9 @@ class MetricAlert(BaseAlert): smokeuser = self._get_configuration_value('{{cluster-env/smokeuser}}') response, error_msg, time_millis = curl_krb_request(tmp_dir, kerberos_keytab, kerberos_principal, url, - metric_alert, kerberos_executable_search_paths, False, self.get_name(), smokeuser) +metric_alert, kerberos_executable_search_paths, False, self.get_name(), smokeuser, +connection_timeout=self.curl_connection_timeout) + content = response else: url_opener = urllib2.build_opener(RefreshHeaderProcessor()) @@ -242,10 +245,10 @@ class MetricAlert(BaseAlert): value_list.append(json_data[attr]) http_response_code = None - if not json_is_valid and security_enabled and \ -kerberos_principal is not None and kerberos_keytab is not None: -http_response_code, error_msg, time_millis = curl_krb_request(tmp_dir, kerberos_keytab, kerberos_principal, url, - metric_alert, kerberos_executable_search_paths, True, self.get_name(), smokeuser) + if not json_is_valid and security_enabled and kerberos_principal is not None and kerberos_keytab is not None: +http_response_code, error_msg, time_millis = curl_krb_request(tmp_dir, kerberos_keytab, + kerberos_principal, url, metric_alert, kerberos_executable_search_paths, True, + self.get_name(), smokeuser, connection_timeout=self.curl_connection_timeout) return (value_list, http_response_code) http://git-wip-us.apache.org/repos/asf/ambari/blob/bebe2387/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py index 04d1b01..b76d5e0 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py @@ -68,7 +68,7 @@ class WebAlert(BaseAlert): # python uses 5.0, CURL uses 5 self.connection_timeout = float(connection_timeout) -self.curl_connection_timeout = str(int(connection_timeout)) +self.curl_connection_timeout = int(connection_timeout) self.config = config @@ -180,7 +180,8 @@ class WebAlert(BaseAlert): smokeuser = self._get_configuration_value('{{cluster-env/smokeuser}}') response_code, error_msg, time_millis = curl_krb_request(tmp_dir, kerberos_keytab, kerberos_principal,
ambari git commit: AMBARI-12317 - False alert on NameNode High Availability Health due to Missing JMX objects (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-2.1 e1f142f0e - 58fc42e16 AMBARI-12317 - False alert on NameNode High Availability Health due to Missing JMX objects (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/58fc42e1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/58fc42e1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/58fc42e1 Branch: refs/heads/branch-2.1 Commit: 58fc42e1661e7323b21a20511530251817d1c46a Parents: e1f142f Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Jul 7 13:49:56 2015 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Jul 8 10:35:09 2015 -0400 -- .../python/ambari_agent/alerts/metric_alert.py | 15 ++-- .../python/ambari_agent/alerts/web_alert.py | 5 +- .../src/test/python/ambari_agent/TestAlerts.py | 2 +- .../libraries/functions/curl_krb_request.py | 20 +++-- .../package/alerts/alert_checkpoint_time.py | 14 ++- .../package/alerts/alert_ha_namenode_health.py | 58 ++--- .../package/alerts/alert_nodemanager_health.py | 7 +- .../alerts/alert_nodemanagers_summary.py| 13 ++- .../package/files/alert_ha_namenode_health.py | 91 +--- 9 files changed, 176 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/58fc42e1/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py index ece6063..6bcdacd 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py @@ -58,8 +58,9 @@ class MetricAlert(BaseAlert): if 'connection_timeout' in uri: connection_timeout = uri['connection_timeout'] -# python uses 5.0, not 5 +# python uses 5.0, CURL uses 5 self.connection_timeout = float(connection_timeout) +self.curl_connection_timeout = int(connection_timeout) self.config = config @@ -206,7 +207,9 @@ class MetricAlert(BaseAlert): smokeuser = self._get_configuration_value('{{cluster-env/smokeuser}}') response, error_msg, time_millis = curl_krb_request(tmp_dir, kerberos_keytab, kerberos_principal, url, - metric_alert, kerberos_executable_search_paths, False, self.get_name(), smokeuser) +metric_alert, kerberos_executable_search_paths, False, self.get_name(), smokeuser, +connection_timeout=self.curl_connection_timeout) + content = response else: url_opener = urllib2.build_opener(RefreshHeaderProcessor()) @@ -242,10 +245,10 @@ class MetricAlert(BaseAlert): value_list.append(json_data[attr]) http_response_code = None - if not json_is_valid and security_enabled and \ -kerberos_principal is not None and kerberos_keytab is not None: -http_response_code, error_msg, time_millis = curl_krb_request(tmp_dir, kerberos_keytab, kerberos_principal, url, - metric_alert, kerberos_executable_search_paths, True, self.get_name(), smokeuser) + if not json_is_valid and security_enabled and kerberos_principal is not None and kerberos_keytab is not None: +http_response_code, error_msg, time_millis = curl_krb_request(tmp_dir, kerberos_keytab, + kerberos_principal, url, metric_alert, kerberos_executable_search_paths, True, + self.get_name(), smokeuser, connection_timeout=self.curl_connection_timeout) return (value_list, http_response_code) http://git-wip-us.apache.org/repos/asf/ambari/blob/58fc42e1/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py index 04d1b01..b76d5e0 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py @@ -68,7 +68,7 @@ class WebAlert(BaseAlert): # python uses 5.0, CURL uses 5 self.connection_timeout = float(connection_timeout) -self.curl_connection_timeout = str(int(connection_timeout)) +self.curl_connection_timeout = int(connection_timeout) self.config = config @@ -180,7 +180,8 @@ class WebAlert(BaseAlert): smokeuser = self._get_configuration_value('{{cluster-env/smokeuser}}') response_code, error_msg, time_millis = curl_krb_request(tmp_dir, kerberos_keytab,
[2/2] ambari git commit: AMBARI-12334. YARN service check issues (aonishuk)
AMBARI-12334. YARN service check issues (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/23d7b174 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/23d7b174 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/23d7b174 Branch: refs/heads/branch-2.1 Commit: 23d7b17428bd674cc8665c571e10e73a9e4a68be Parents: 6ea0b83 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 17:53:57 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 17:53:57 2015 +0300 -- .../YARN/2.1.0.2.0/package/scripts/params_linux.py| 3 ++- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 2 +- .../src/test/python/stacks/2.0.6/configs/client-upgrade.json | 3 ++- ambari-server/src/test/python/stacks/2.0.6/configs/default.json | 3 ++- ambari-server/src/test/python/stacks/2.0.6/configs/secured.json | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/23d7b174/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 0b1bec5..77092c1 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -121,7 +121,7 @@ kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executab rm_hosts = config['clusterHostInfo']['rm_host'] rm_host = rm_hosts[0] rm_port = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'].split(':')[-1] -rm_https_port = 8090 +rm_https_port = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'].split(':')[-1] # TODO UPGRADE default, update site during upgrade rm_nodes_exclude_path = default(/configurations/yarn-site/yarn.resourcemanager.nodes.exclude-path,/etc/hadoop/conf/yarn.exclude) @@ -285,6 +285,7 @@ yarn_http_policy = config['configurations']['yarn-site']['yarn.http.policy'] yarn_https_on = (yarn_http_policy.upper() == 'HTTPS_ONLY') scheme = 'http' if not yarn_https_on else 'https' yarn_rm_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] if not yarn_https_on else config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'] +rm_active_port = rm_https_port if yarn_https_on else rm_port #ranger yarn properties if has_ranger_admin: http://git-wip-us.apache.org/repos/asf/ambari/blob/23d7b174/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index a58db1d..1d593ba 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -114,7 +114,7 @@ class ServiceCheckDefault(ServiceCheck): json_response_received = False for rm_host in params.rm_hosts: - info_app_url = params.scheme + :// + params.yarn_rm_address + /ws/v1/cluster/apps/ + application_name + info_app_url = params.scheme + :// + rm_host + : + params.rm_active_port + /ws/v1/cluster/apps/ + application_name get_app_info_cmd = curl --negotiate -u : -ksL --connect-timeout + CURL_CONNECTION_TIMEOUT + + info_app_url http://git-wip-us.apache.org/repos/asf/ambari/blob/23d7b174/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json index a8bc490..c13e5c9 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json @@ -484,7 +484,8 @@ yarn.timeline-service.webapp.https.address: c6402.ambari.apache.org:8190, yarn.resourcemanager.connect.retry-interval.ms: 3, yarn.timeline-service.leveldb-timeline-store.start-time-write-cache-size: 1, -yarn.http.policy: HTTP_ONLY +
ambari git commit: AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/trunk 197c84793 - d881d0d98 AMBARI-12329 - Review HIVE recommendations and changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d881d0d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d881d0d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d881d0d9 Branch: refs/heads/trunk Commit: d881d0d98fc25b067cd9b42826a44133402ba41e Parents: 197c847 Author: Artem Baranchuk abaranc...@hortonworks.con Authored: Tue Jul 7 14:37:13 2015 +0300 Committer: Artem Baranchuk abaranc...@hortonworks.con Committed: Wed Jul 8 18:09:49 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 40 +++-- .../stacks/HDP/2.2/services/stack_advisor.py| 32 +++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 +++-- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 161 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d881d0d9/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 3d4d701..2a333c2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1394,21 +1394,51 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType(hive-env) != null) { -MapString, String hiveProps = new HashMapString, String(); +MapString, String hiveEnvProps = new HashMapString, String(); +SetString hiveServerSiteRemoveProps = new HashSetString(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType(hive-env).getProperties().get(content); if(content != null) { content = updateHiveEnvContent(content); - hiveProps.put(content, content); + hiveEnvProps.put(content, content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive.client.heapsize)) { - hiveProps.put(hive.client.heapsize, 512m); + hiveEnvProps.put(hive.client.heapsize, 512m); } if (!cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive.metastore.heapsize)) { - hiveProps.put(hive.metastore.heapsize, 1024m); + hiveEnvProps.put(hive.metastore.heapsize, 1024m); } -updateConfigurationPropertiesForCluster(cluster, hive-env, hiveProps, true, true); +if (cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive_security_authorization) + none.equalsIgnoreCase(cluster.getDesiredConfigByType(hive-env).getProperties().get(hive_security_authorization))) { + hiveServerSiteRemoveProps.add(hive.security.authorization.manager); + hiveServerSiteRemoveProps.add(hive.security.authenticator.manager); +} +updateConfigurationPropertiesForCluster(cluster, hive-env, hiveEnvProps, true, true); +updateConfigurationPropertiesForCluster(cluster, hiveserver2-site, new HashMapString, String(), hiveServerSiteRemoveProps, false, true); + } + + if(cluster.getDesiredConfigByType(hive-site) != null) { +SetString hiveSiteRemoveProps = new HashSetString(); +String hive_server2_auth = ; +if (cluster.getDesiredConfigByType(hive-site).getProperties().containsKey(hive.server2.authentication)) { + hive_server2_auth = cluster.getDesiredConfigByType(hive-site).getProperties().get(hive.server2.authentication); +} +if (!pam.equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add(hive.server2.authentication.pam.services); +} +if (!custom.equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add(hive.server2.custom.authentication.class); +} +if (!ldap.equalsIgnoreCase(hive_server2_auth)) { +
[1/2] ambari git commit: AMBARI-12334. YARN service check issues (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 6ea0b83c8 - 23d7b1742 refs/heads/trunk cebb515d4 - 601af4efb AMBARI-12334. YARN service check issues (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/601af4ef Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/601af4ef Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/601af4ef Branch: refs/heads/trunk Commit: 601af4efb5d8053bcb2d972ce5930ab8be6f3665 Parents: cebb515 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 17:53:55 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 17:53:55 2015 +0300 -- .../YARN/2.1.0.2.0/package/scripts/params_linux.py| 3 ++- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 2 +- .../src/test/python/stacks/2.0.6/configs/client-upgrade.json | 3 ++- ambari-server/src/test/python/stacks/2.0.6/configs/default.json | 3 ++- ambari-server/src/test/python/stacks/2.0.6/configs/secured.json | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/601af4ef/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 0b1bec5..77092c1 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -121,7 +121,7 @@ kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executab rm_hosts = config['clusterHostInfo']['rm_host'] rm_host = rm_hosts[0] rm_port = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'].split(':')[-1] -rm_https_port = 8090 +rm_https_port = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'].split(':')[-1] # TODO UPGRADE default, update site during upgrade rm_nodes_exclude_path = default(/configurations/yarn-site/yarn.resourcemanager.nodes.exclude-path,/etc/hadoop/conf/yarn.exclude) @@ -285,6 +285,7 @@ yarn_http_policy = config['configurations']['yarn-site']['yarn.http.policy'] yarn_https_on = (yarn_http_policy.upper() == 'HTTPS_ONLY') scheme = 'http' if not yarn_https_on else 'https' yarn_rm_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] if not yarn_https_on else config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'] +rm_active_port = rm_https_port if yarn_https_on else rm_port #ranger yarn properties if has_ranger_admin: http://git-wip-us.apache.org/repos/asf/ambari/blob/601af4ef/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index a58db1d..1d593ba 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -114,7 +114,7 @@ class ServiceCheckDefault(ServiceCheck): json_response_received = False for rm_host in params.rm_hosts: - info_app_url = params.scheme + :// + params.yarn_rm_address + /ws/v1/cluster/apps/ + application_name + info_app_url = params.scheme + :// + rm_host + : + params.rm_active_port + /ws/v1/cluster/apps/ + application_name get_app_info_cmd = curl --negotiate -u : -ksL --connect-timeout + CURL_CONNECTION_TIMEOUT + + info_app_url http://git-wip-us.apache.org/repos/asf/ambari/blob/601af4ef/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json index a8bc490..c13e5c9 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json @@ -484,7 +484,8 @@ yarn.timeline-service.webapp.https.address: c6402.ambari.apache.org:8190, yarn.resourcemanager.connect.retry-interval.ms: 3,
Git Push Summary
Repository: ambari Updated Tags: refs/tags/release-2.1.0-rc0 [created] 85018f56b
ambari git commit: AMBARI-12333 - Unit Test UpgradeResourceProviderTest.testCreatePartialDowngrade Is Failing (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk 601af4efb - 197c84793 AMBARI-12333 - Unit Test UpgradeResourceProviderTest.testCreatePartialDowngrade Is Failing (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/197c8479 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/197c8479 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/197c8479 Branch: refs/heads/trunk Commit: 197c8479301c83a36c2aa69afac4207d01f5a5e4 Parents: 601af4e Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Jul 8 10:50:58 2015 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Jul 8 10:59:14 2015 -0400 -- .../internal/UpgradeResourceProviderTest.java | 27 +++- 1 file changed, 21 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/197c8479/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java index 1b6ad36..1498d1f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java @@ -394,7 +394,6 @@ public class UpgradeResourceProviderTest { @Test public void testCreatePartialDowngrade() throws Exception { - clusters.addHost(h2); Host host = clusters.getHost(h2); MapString, String hostAttributes = new HashMapString, String(); @@ -412,9 +411,26 @@ public class UpgradeResourceProviderTest { ServiceComponentHost sch = component.addServiceComponentHost(h2); sch.setVersion(2.2.2.2); +// start out with 0 (sanity check) ListUpgradeEntity upgrades = upgradeDao.findUpgrades(cluster.getClusterId()); assertEquals(0, upgrades.size()); +// a downgrade MUST have an upgrade to come from, so populate an upgrade in +// the DB +UpgradeEntity upgradeEntity = new UpgradeEntity(); +upgradeEntity.setClusterId(cluster.getClusterId()); +upgradeEntity.setDirection(Direction.UPGRADE); +upgradeEntity.setFromVersion(2.1.1.1); +upgradeEntity.setToVersion(2.2.2.2); +upgradeEntity.setRequestId(1L); + +upgradeDao.create(upgradeEntity); +upgrades = upgradeDao.findUpgrades(cluster.getClusterId()); +assertEquals(1, upgrades.size()); + +UpgradeEntity lastUpgrade = upgradeDao.findLastUpgradeForCluster(cluster.getClusterId()); +assertNotNull(lastUpgrade); + MapString, Object requestProps = new HashMapString, Object(); requestProps.put(UpgradeResourceProvider.UPGRADE_CLUSTER_NAME, c1); requestProps.put(UpgradeResourceProvider.UPGRADE_VERSION, 2.1.1.1); @@ -428,13 +444,12 @@ public class UpgradeResourceProviderTest { upgradeResourceProvider.createResources(request); upgrades = upgradeDao.findUpgrades(cluster.getClusterId()); -assertEquals(1, upgrades.size()); - +assertEquals(2, upgrades.size()); -UpgradeEntity entity = upgrades.get(0); -assertEquals(cluster.getClusterId(), entity.getClusterId().longValue()); +UpgradeEntity downgrade = upgrades.get(1); +assertEquals(cluster.getClusterId(), downgrade.getClusterId().longValue()); -ListUpgradeGroupEntity upgradeGroups = entity.getUpgradeGroups(); +ListUpgradeGroupEntity upgradeGroups = downgrade.getUpgradeGroups(); assertEquals(3, upgradeGroups.size()); UpgradeGroupEntity group = upgradeGroups.get(1);
ambari git commit: AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/branch-2.1 9cf3502ab - 4484e91ef AMBARI-12329 - Review HIVE recommendations and changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4484e91e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4484e91e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4484e91e Branch: refs/heads/branch-2.1 Commit: 4484e91ef25c69f4fdb588d6c74389a9dc9b8d3f Parents: 9cf3502 Author: Artem Baranchuk abaranc...@hortonworks.con Authored: Wed Jul 8 18:13:12 2015 +0300 Committer: Artem Baranchuk abaranc...@hortonworks.con Committed: Wed Jul 8 18:13:12 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 40 +++-- .../stacks/HDP/2.2/services/stack_advisor.py| 32 +++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 +++-- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 161 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4484e91e/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 3d4d701..2a333c2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1394,21 +1394,51 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType(hive-env) != null) { -MapString, String hiveProps = new HashMapString, String(); +MapString, String hiveEnvProps = new HashMapString, String(); +SetString hiveServerSiteRemoveProps = new HashSetString(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType(hive-env).getProperties().get(content); if(content != null) { content = updateHiveEnvContent(content); - hiveProps.put(content, content); + hiveEnvProps.put(content, content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive.client.heapsize)) { - hiveProps.put(hive.client.heapsize, 512m); + hiveEnvProps.put(hive.client.heapsize, 512m); } if (!cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive.metastore.heapsize)) { - hiveProps.put(hive.metastore.heapsize, 1024m); + hiveEnvProps.put(hive.metastore.heapsize, 1024m); } -updateConfigurationPropertiesForCluster(cluster, hive-env, hiveProps, true, true); +if (cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive_security_authorization) + none.equalsIgnoreCase(cluster.getDesiredConfigByType(hive-env).getProperties().get(hive_security_authorization))) { + hiveServerSiteRemoveProps.add(hive.security.authorization.manager); + hiveServerSiteRemoveProps.add(hive.security.authenticator.manager); +} +updateConfigurationPropertiesForCluster(cluster, hive-env, hiveEnvProps, true, true); +updateConfigurationPropertiesForCluster(cluster, hiveserver2-site, new HashMapString, String(), hiveServerSiteRemoveProps, false, true); + } + + if(cluster.getDesiredConfigByType(hive-site) != null) { +SetString hiveSiteRemoveProps = new HashSetString(); +String hive_server2_auth = ; +if (cluster.getDesiredConfigByType(hive-site).getProperties().containsKey(hive.server2.authentication)) { + hive_server2_auth = cluster.getDesiredConfigByType(hive-site).getProperties().get(hive.server2.authentication); +} +if (!pam.equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add(hive.server2.authentication.pam.services); +} +if (!custom.equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add(hive.server2.custom.authentication.class); +} +if (!ldap.equalsIgnoreCase(hive_server2_auth)) { +
ambari git commit: Revert AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/branch-2.1 b7e5797ff - e92499d78 Revert AMBARI-12329 - Review HIVE recommendations and changes on upgrade This reverts commit 4484e91ef25c69f4fdb588d6c74389a9dc9b8d3f. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e92499d7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e92499d7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e92499d7 Branch: refs/heads/branch-2.1 Commit: e92499d78a7c524abe55e660141366eded165596 Parents: b7e5797 Author: Jaimin Jetly jai...@hortonworks.com Authored: Wed Jul 8 11:29:16 2015 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Wed Jul 8 11:29:16 2015 -0700 -- .../server/upgrade/UpgradeCatalog210.java | 40 ++--- .../stacks/HDP/2.2/services/stack_advisor.py| 32 +++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 ++--- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 54 insertions(+), 161 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e92499d7/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 2a333c2..3d4d701 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1394,51 +1394,21 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType(hive-env) != null) { -MapString, String hiveEnvProps = new HashMapString, String(); -SetString hiveServerSiteRemoveProps = new HashSetString(); +MapString, String hiveProps = new HashMapString, String(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType(hive-env).getProperties().get(content); if(content != null) { content = updateHiveEnvContent(content); - hiveEnvProps.put(content, content); + hiveProps.put(content, content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive.client.heapsize)) { - hiveEnvProps.put(hive.client.heapsize, 512m); + hiveProps.put(hive.client.heapsize, 512m); } if (!cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive.metastore.heapsize)) { - hiveEnvProps.put(hive.metastore.heapsize, 1024m); + hiveProps.put(hive.metastore.heapsize, 1024m); } -if (cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive_security_authorization) - none.equalsIgnoreCase(cluster.getDesiredConfigByType(hive-env).getProperties().get(hive_security_authorization))) { - hiveServerSiteRemoveProps.add(hive.security.authorization.manager); - hiveServerSiteRemoveProps.add(hive.security.authenticator.manager); -} -updateConfigurationPropertiesForCluster(cluster, hive-env, hiveEnvProps, true, true); -updateConfigurationPropertiesForCluster(cluster, hiveserver2-site, new HashMapString, String(), hiveServerSiteRemoveProps, false, true); - } - - if(cluster.getDesiredConfigByType(hive-site) != null) { -SetString hiveSiteRemoveProps = new HashSetString(); -String hive_server2_auth = ; -if (cluster.getDesiredConfigByType(hive-site).getProperties().containsKey(hive.server2.authentication)) { - hive_server2_auth = cluster.getDesiredConfigByType(hive-site).getProperties().get(hive.server2.authentication); -} -if (!pam.equalsIgnoreCase(hive_server2_auth)) { - hiveSiteRemoveProps.add(hive.server2.authentication.pam.services); -} -if (!custom.equalsIgnoreCase(hive_server2_auth)) { - hiveSiteRemoveProps.add(hive.server2.custom.authentication.class); -} -if (!ldap.equalsIgnoreCase(hive_server2_auth)) { - hiveSiteRemoveProps.add(hive.server2.authentication.ldap.url); -
ambari git commit: Revert AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/trunk 4e201d411 - c68bc6237 Revert AMBARI-12329 - Review HIVE recommendations and changes on upgrade This reverts commit 4484e91ef25c69f4fdb588d6c74389a9dc9b8d3f. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c68bc623 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c68bc623 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c68bc623 Branch: refs/heads/trunk Commit: c68bc623786bc5ec7bf1d29bcca29eb300c4cbe6 Parents: 4e201d4 Author: Jaimin Jetly jai...@hortonworks.com Authored: Wed Jul 8 11:29:16 2015 -0700 Committer: Jaimin Jetly jai...@hortonworks.com Committed: Wed Jul 8 11:39:42 2015 -0700 -- .../server/upgrade/UpgradeCatalog210.java | 40 ++--- .../stacks/HDP/2.2/services/stack_advisor.py| 32 +++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 ++--- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 54 insertions(+), 161 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c68bc623/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 2a333c2..3d4d701 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1394,51 +1394,21 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType(hive-env) != null) { -MapString, String hiveEnvProps = new HashMapString, String(); -SetString hiveServerSiteRemoveProps = new HashSetString(); +MapString, String hiveProps = new HashMapString, String(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType(hive-env).getProperties().get(content); if(content != null) { content = updateHiveEnvContent(content); - hiveEnvProps.put(content, content); + hiveProps.put(content, content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive.client.heapsize)) { - hiveEnvProps.put(hive.client.heapsize, 512m); + hiveProps.put(hive.client.heapsize, 512m); } if (!cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive.metastore.heapsize)) { - hiveEnvProps.put(hive.metastore.heapsize, 1024m); + hiveProps.put(hive.metastore.heapsize, 1024m); } -if (cluster.getDesiredConfigByType(hive-env).getProperties().containsKey(hive_security_authorization) - none.equalsIgnoreCase(cluster.getDesiredConfigByType(hive-env).getProperties().get(hive_security_authorization))) { - hiveServerSiteRemoveProps.add(hive.security.authorization.manager); - hiveServerSiteRemoveProps.add(hive.security.authenticator.manager); -} -updateConfigurationPropertiesForCluster(cluster, hive-env, hiveEnvProps, true, true); -updateConfigurationPropertiesForCluster(cluster, hiveserver2-site, new HashMapString, String(), hiveServerSiteRemoveProps, false, true); - } - - if(cluster.getDesiredConfigByType(hive-site) != null) { -SetString hiveSiteRemoveProps = new HashSetString(); -String hive_server2_auth = ; -if (cluster.getDesiredConfigByType(hive-site).getProperties().containsKey(hive.server2.authentication)) { - hive_server2_auth = cluster.getDesiredConfigByType(hive-site).getProperties().get(hive.server2.authentication); -} -if (!pam.equalsIgnoreCase(hive_server2_auth)) { - hiveSiteRemoveProps.add(hive.server2.authentication.pam.services); -} -if (!custom.equalsIgnoreCase(hive_server2_auth)) { - hiveSiteRemoveProps.add(hive.server2.custom.authentication.class); -} -if (!ldap.equalsIgnoreCase(hive_server2_auth)) { - hiveSiteRemoveProps.add(hive.server2.authentication.ldap.url); -
ambari git commit: AMBARI-12330. Changes in upgrades json and upgradehelper.py for Ranger plugins (Gautam Borad via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk c68bc6237 - 4b97eb779 AMBARI-12330. Changes in upgrades json and upgradehelper.py for Ranger plugins (Gautam Borad via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4b97eb77 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4b97eb77 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4b97eb77 Branch: refs/heads/trunk Commit: 4b97eb7791b083b0cb734fa37ec10e30333e31b2 Parents: c68bc62 Author: Sumit Mohanty smoha...@hortonworks.com Authored: Wed Jul 8 11:39:52 2015 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Wed Jul 8 11:40:55 2015 -0700 -- ambari-server/src/main/python/upgradeHelper.py | 139 +++-- .../catalog/UpgradeCatalog_2.2_to_2.3.json | 507 +++ 2 files changed, 402 insertions(+), 244 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4b97eb77/ambari-server/src/main/python/upgradeHelper.py -- diff --git a/ambari-server/src/main/python/upgradeHelper.py b/ambari-server/src/main/python/upgradeHelper.py index 2d5a589..dd72bdc 100644 --- a/ambari-server/src/main/python/upgradeHelper.py +++ b/ambari-server/src/main/python/upgradeHelper.py @@ -189,7 +189,7 @@ class Options(Const): KAFKA_BROKER_CONF = kafka-broker RANGER_ADMIN = admin-properties KAFKA_PORT = port - RANGER_EXTERNAL_URL = ranger.externalurl + RANGER_EXTERNAL_URL = policymgr_external_url ZK_CLIENTPORT = clientPort DELETE_OLD_TAG = DELETE_OLD @@ -1057,43 +1057,79 @@ def get_ranger_xaaudit_hdfs_destination_directory(): return hdfs://{0}:8020/ranger/audit.format(namenode_hostname) def get_ranger_policymgr_external_url(): - url = {{ranger_external_url}} + url = {{policymgr_mgr_url}} if Options.server_config_factory is not None and Options.RANGER_ADMIN in Options.server_config_factory.items(): props = Options.server_config_factory.get_config(Options.RANGER_ADMIN) if Options.RANGER_EXTERNAL_URL in props.properties: url = props.properties[Options.RANGER_EXTERNAL_URL] return url -def get_jdbc_driver(config_name): +def get_jdbc_driver(): driver = {{jdbc_driver}} - if Options.server_config_factory is not None and config_name in Options.server_config_factory.items(): -props = Options.server_config_factory.get_config(config_name) -if XAAUDIT.DB.FLAVOUR in props.properties: - db = props.properties[XAAUDIT.DB.FLAVOUR] + if Options.server_config_factory is not None and Options.RANGER_ADMIN in Options.server_config_factory.items(): +props = Options.server_config_factory.get_config(Options.RANGER_ADMIN) +if DB_FLAVOR in props.properties: + db = props.properties[DB_FLAVOR] - if db == mysql: + if db.lower() == mysql: driver = com.mysql.jdbc.Driver - elif db == oracle: + elif db.lower() == oracle: driver = oracle.jdbc.OracleDriver return driver -def get_audit_jdbc_url(config_name): +def get_audit_jdbc_url(): audit_jdbc_url = {{audit_jdbc_url}} - if Options.server_config_factory is not None and config_name in Options.server_config_factory.items(): -props = Options.server_config_factory.get_config(config_name) -if XAAUDIT.DB.FLAVOUR in props.properties: - xa_audit_db_flavor = props.properties[XAAUDIT.DB.FLAVOUR] -if XAAUDIT.DB.HOSTNAME in props.properties: - xa_db_host = props.properties[XAAUDIT.DB.HOSTNAME] -if XAAUDIT.DB.DATABASE_NAME in props.properties: - xa_audit_db_name = props.properties[XAAUDIT.DB.DATABASE_NAME] - - if xa_audit_db_flavor == 'mysql': + if Options.server_config_factory is not None and Options.RANGER_ADMIN in Options.server_config_factory.items(): +props = Options.server_config_factory.get_config(Options.RANGER_ADMIN) +if DB_FLAVOR in props.properties: + xa_audit_db_flavor = props.properties[DB_FLAVOR] +if db_host in props.properties: + xa_db_host = props.properties[db_host] +if audit_db_name in props.properties: + xa_audit_db_name = props.properties[audit_db_name] + + if xa_audit_db_flavor.lower() == 'mysql': audit_jdbc_url = jdbc:mysql://{0}/{1}.format(xa_db_host, xa_audit_db_name) - elif xa_audit_db_flavor == 'oracle': + elif xa_audit_db_flavor.lower() == 'oracle': audit_jdbc_url = jdbc:oracle:thin:\@//{0}.format(xa_db_host) return audit_jdbc_url +def get_audit_db_passwd(): + audit_db_passwd = crypted + if Options.server_config_factory is not None and Options.RANGER_ADMIN in Options.server_config_factory.items(): +props = Options.server_config_factory.get_config(Options.RANGER_ADMIN) +if audit_db_password in props.properties: + audit_db_passwd = props.properties['audit_db_password'] + return audit_db_passwd +
ambari git commit: AMBARI-12330. Changes in upgrades json and upgradehelper.py for Ranger plugins (Gautam Borad via smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.1 e92499d78 - 57d853f5c AMBARI-12330. Changes in upgrades json and upgradehelper.py for Ranger plugins (Gautam Borad via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/57d853f5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/57d853f5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/57d853f5 Branch: refs/heads/branch-2.1 Commit: 57d853f5cc0e182739b5623a0f6a19c7d0c25a49 Parents: e92499d Author: Sumit Mohanty smoha...@hortonworks.com Authored: Wed Jul 8 11:39:52 2015 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Wed Jul 8 11:41:31 2015 -0700 -- ambari-server/src/main/python/upgradeHelper.py | 139 +++-- .../catalog/UpgradeCatalog_2.2_to_2.3.json | 507 +++ 2 files changed, 402 insertions(+), 244 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/57d853f5/ambari-server/src/main/python/upgradeHelper.py -- diff --git a/ambari-server/src/main/python/upgradeHelper.py b/ambari-server/src/main/python/upgradeHelper.py index 2d5a589..dd72bdc 100644 --- a/ambari-server/src/main/python/upgradeHelper.py +++ b/ambari-server/src/main/python/upgradeHelper.py @@ -189,7 +189,7 @@ class Options(Const): KAFKA_BROKER_CONF = kafka-broker RANGER_ADMIN = admin-properties KAFKA_PORT = port - RANGER_EXTERNAL_URL = ranger.externalurl + RANGER_EXTERNAL_URL = policymgr_external_url ZK_CLIENTPORT = clientPort DELETE_OLD_TAG = DELETE_OLD @@ -1057,43 +1057,79 @@ def get_ranger_xaaudit_hdfs_destination_directory(): return hdfs://{0}:8020/ranger/audit.format(namenode_hostname) def get_ranger_policymgr_external_url(): - url = {{ranger_external_url}} + url = {{policymgr_mgr_url}} if Options.server_config_factory is not None and Options.RANGER_ADMIN in Options.server_config_factory.items(): props = Options.server_config_factory.get_config(Options.RANGER_ADMIN) if Options.RANGER_EXTERNAL_URL in props.properties: url = props.properties[Options.RANGER_EXTERNAL_URL] return url -def get_jdbc_driver(config_name): +def get_jdbc_driver(): driver = {{jdbc_driver}} - if Options.server_config_factory is not None and config_name in Options.server_config_factory.items(): -props = Options.server_config_factory.get_config(config_name) -if XAAUDIT.DB.FLAVOUR in props.properties: - db = props.properties[XAAUDIT.DB.FLAVOUR] + if Options.server_config_factory is not None and Options.RANGER_ADMIN in Options.server_config_factory.items(): +props = Options.server_config_factory.get_config(Options.RANGER_ADMIN) +if DB_FLAVOR in props.properties: + db = props.properties[DB_FLAVOR] - if db == mysql: + if db.lower() == mysql: driver = com.mysql.jdbc.Driver - elif db == oracle: + elif db.lower() == oracle: driver = oracle.jdbc.OracleDriver return driver -def get_audit_jdbc_url(config_name): +def get_audit_jdbc_url(): audit_jdbc_url = {{audit_jdbc_url}} - if Options.server_config_factory is not None and config_name in Options.server_config_factory.items(): -props = Options.server_config_factory.get_config(config_name) -if XAAUDIT.DB.FLAVOUR in props.properties: - xa_audit_db_flavor = props.properties[XAAUDIT.DB.FLAVOUR] -if XAAUDIT.DB.HOSTNAME in props.properties: - xa_db_host = props.properties[XAAUDIT.DB.HOSTNAME] -if XAAUDIT.DB.DATABASE_NAME in props.properties: - xa_audit_db_name = props.properties[XAAUDIT.DB.DATABASE_NAME] - - if xa_audit_db_flavor == 'mysql': + if Options.server_config_factory is not None and Options.RANGER_ADMIN in Options.server_config_factory.items(): +props = Options.server_config_factory.get_config(Options.RANGER_ADMIN) +if DB_FLAVOR in props.properties: + xa_audit_db_flavor = props.properties[DB_FLAVOR] +if db_host in props.properties: + xa_db_host = props.properties[db_host] +if audit_db_name in props.properties: + xa_audit_db_name = props.properties[audit_db_name] + + if xa_audit_db_flavor.lower() == 'mysql': audit_jdbc_url = jdbc:mysql://{0}/{1}.format(xa_db_host, xa_audit_db_name) - elif xa_audit_db_flavor == 'oracle': + elif xa_audit_db_flavor.lower() == 'oracle': audit_jdbc_url = jdbc:oracle:thin:\@//{0}.format(xa_db_host) return audit_jdbc_url +def get_audit_db_passwd(): + audit_db_passwd = crypted + if Options.server_config_factory is not None and Options.RANGER_ADMIN in Options.server_config_factory.items(): +props = Options.server_config_factory.get_config(Options.RANGER_ADMIN) +if audit_db_password in props.properties: + audit_db_passwd = props.properties['audit_db_password'] + return
ambari git commit: AMBARI-12335. Unittest failure for python 2.6.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.1 4484e91ef - 934306e26 AMBARI-12335. Unittest failure for python 2.6.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/934306e2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/934306e2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/934306e2 Branch: refs/heads/branch-2.1 Commit: 934306e260bcfdf471a771d6aee26a334d7353d5 Parents: 4484e91 Author: Vitaly Brodetskyi vbrodets...@hortonworks.com Authored: Wed Jul 8 20:01:58 2015 +0300 Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com Committed: Wed Jul 8 20:01:58 2015 +0300 -- .../test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/934306e2/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py index 60ff5ed..1711f69 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py @@ -21,7 +21,6 @@ import json from mock.mock import MagicMock, patch from stacks.utils.RMFTestCase import * -from unittest import skip @patch(platform.linux_distribution, new = MagicMock(return_value = Linux)) @@ -141,8 +140,10 @@ class TestPhoenixQueryServer(RMFTestCase): ) self.assertNoMoreResources() - @skip(there's nothing to upgrade to yet) + def test_start_default_24(self): +# @skip(there's nothing to upgrade to yet) +return self.executeScript( self.COMMON_SERVICES_PACKAGE_DIR + /scripts/phoenix_queryserver.py, classname = PhoenixQueryServer,
ambari git commit: AMBARI-12335. Unittest failure for python 2.6.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk d881d0d98 - 27712cc8c AMBARI-12335. Unittest failure for python 2.6.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/27712cc8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/27712cc8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/27712cc8 Branch: refs/heads/trunk Commit: 27712cc8c2ecf8dbb1fa40a64fc4dfa787ad86fa Parents: d881d0d Author: Vitaly Brodetskyi vbrodets...@hortonworks.com Authored: Wed Jul 8 20:00:58 2015 +0300 Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com Committed: Wed Jul 8 20:00:58 2015 +0300 -- .../test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/27712cc8/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py index 60ff5ed..1711f69 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py @@ -21,7 +21,6 @@ import json from mock.mock import MagicMock, patch from stacks.utils.RMFTestCase import * -from unittest import skip @patch(platform.linux_distribution, new = MagicMock(return_value = Linux)) @@ -141,8 +140,10 @@ class TestPhoenixQueryServer(RMFTestCase): ) self.assertNoMoreResources() - @skip(there's nothing to upgrade to yet) + def test_start_default_24(self): +# @skip(there's nothing to upgrade to yet) +return self.executeScript( self.COMMON_SERVICES_PACKAGE_DIR + /scripts/phoenix_queryserver.py, classname = PhoenixQueryServer,
[1/2] ambari git commit: AMBARI-12323. Ambari Dashboard HDFS - JMX metrics missing. (swagle)
Repository: ambari Updated Branches: refs/heads/branch-2.1 934306e26 - 5950981b2 AMBARI-12323. Ambari Dashboard HDFS - JMX metrics missing. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5950981b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5950981b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5950981b Branch: refs/heads/branch-2.1 Commit: 5950981b286516a089593f6b4ab274cc5b23fdf2 Parents: dec2c2f Author: Siddharth Wagle swa...@hortonworks.com Authored: Tue Jul 7 17:55:04 2015 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Wed Jul 8 10:39:59 2015 -0700 -- .../internal/AbstractProviderModule.java| 35 +++- .../controller/jmx/JMXPropertyProvider.java | 3 ++ 2 files changed, 23 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5950981b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java index a4c8493..380a0fe 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java @@ -736,8 +736,8 @@ public abstract class AbstractProviderModule implements ProviderModule, } private String getPortString(String value) { -return value != null value.contains(:) ? value.substring -(value.lastIndexOf(:) + 1, value.length()) : value; +return value != null value.contains(:) ? + value.substring(value.lastIndexOf(:) + 1, value.length()) : value; } private String getDesiredConfigVersion(String clusterName, @@ -746,11 +746,10 @@ public abstract class AbstractProviderModule implements ProviderModule, SystemException { // Get config version tag -ResourceProvider clusterResourceProvider = getResourceProvider(Resource -.Type.Cluster); -Predicate basePredicate = new PredicateBuilder().property -(ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID).equals(clusterName) -.toPredicate(); +ResourceProvider clusterResourceProvider = getResourceProvider(Resource.Type.Cluster); +Predicate basePredicate = new PredicateBuilder() + .property(ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID).equals(clusterName) + .toPredicate(); SetResource clusterResource = null; try { @@ -774,8 +773,7 @@ public abstract class AbstractProviderModule implements ProviderModule, if (clusterResource != null) { for (Resource resource : clusterResource) { MapString, Object configs = -resource.getPropertiesMap().get(ClusterResourceProvider -.CLUSTER_DESIRED_CONFIGS_PROPERTY_ID); + resource.getPropertiesMap().get(ClusterResourceProvider.CLUSTER_DESIRED_CONFIGS_PROPERTY_ID); if (configs != null) { DesiredConfig config = (DesiredConfig) configs.get(configType); if (config != null) { @@ -787,10 +785,9 @@ public abstract class AbstractProviderModule implements ProviderModule, return versionTag; } - private MapString, String getDesiredConfigMap(String clusterName, - String versionTag, String configType, MapString, String[] keys) throws - NoSuchParentResourceException, UnsupportedPropertyException, - SystemException { + private MapString, String getDesiredConfigMap(String clusterName, String versionTag, + String configType, MapString, String[] keys) throws NoSuchParentResourceException, + UnsupportedPropertyException, SystemException { // Get desired configs based on the tag ResourceProvider configResourceProvider = getResourceProvider(Resource.Type.Configuration); Predicate configPredicate = new PredicateBuilder().property @@ -818,8 +815,16 @@ public abstract class AbstractProviderModule implements ProviderModule, for (String pname : entry.getValue()) { propName = pname; -value = (String) res.getPropertyValue(PropertyHelper.getPropertyId( -PROPERTIES_CATEGORY, pname)); +// For NN HA the property key contains nameservice id +MapString, Object properties = res.getPropertiesMap().get(PROPERTIES_CATEGORY); +if (properties != null) { + for (Map.EntryString, Object propertyEntry : properties.entrySet()) { +if
[2/2] ambari git commit: AMBARI-12322. Installer wizard: cluster deploy failed due to deadlock. (swagle)
AMBARI-12322. Installer wizard: cluster deploy failed due to deadlock. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dec2c2fb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dec2c2fb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dec2c2fb Branch: refs/heads/branch-2.1 Commit: dec2c2fbb790d4b6bbacbb6e09f03408d494a80f Parents: 934306e Author: Siddharth Wagle swa...@hortonworks.com Authored: Tue Jul 7 17:54:05 2015 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Wed Jul 8 10:39:59 2015 -0700 -- .../alerts/AlertServiceStateListener.java | 49 ++-- 1 file changed, 36 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dec2c2fb/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java index 44f9b50..41f9e81 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java @@ -34,6 +34,8 @@ import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; import org.apache.ambari.server.orm.dao.AlertDispatchDAO; import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; import org.apache.ambari.server.orm.entities.AlertGroupEntity; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.alert.AlertDefinition; import org.apache.ambari.server.state.alert.AlertDefinitionFactory; import org.slf4j.Logger; @@ -90,6 +92,12 @@ public class AlertServiceStateListener { private AlertDefinitionDAO m_definitionDao; /** + * Used to retrieve a cluster using clusterId from event. + */ + @Inject + private ProviderClusters clusters; + + /** * Constructor. * * @param publisher @@ -160,23 +168,38 @@ public class AlertServiceStateListener { @AllowConcurrentEvents public void onAmbariEvent(ServiceRemovedEvent event) { LOG.debug(Received event {}, event); +Cluster cluster = null; -ListAlertDefinitionEntity definitions = m_definitionDao.findByService(event.getClusterId(), -event.getServiceName()); +try { + cluster = clusters.get().getClusterById(event.getClusterId()); +} catch (AmbariException e) { + LOG.warn(Unable to retrieve cluster info for id: + event.getClusterId()); +} -for (AlertDefinitionEntity definition : definitions) { +if (cluster != null) { + // TODO: Explicit locking used to prevent deadlock situation caused during cluster delete + cluster.getClusterGlobalLock().writeLock().lock(); try { -m_definitionDao.remove(definition); - -// remove the default group for the service -AlertGroupEntity group = m_alertDispatchDao.findGroupByName(event.getClusterId(), -event.getServiceName()); - -if (null != group group.isDefault()) { - m_alertDispatchDao.remove(group); +ListAlertDefinitionEntity definitions = m_definitionDao.findByService(event.getClusterId(), + event.getServiceName()); + +for (AlertDefinitionEntity definition : definitions) { + try { +m_definitionDao.remove(definition); + +// remove the default group for the service +AlertGroupEntity group = m_alertDispatchDao.findGroupByName(event.getClusterId(), + event.getServiceName()); + +if (null != group group.isDefault()) { + m_alertDispatchDao.remove(group); +} + } catch (Exception exception) { +LOG.error(Unable to remove alert definition {}, definition.getDefinitionName(), exception); + } } - } catch (Exception exception) { -LOG.error(Unable to remove alert definition {}, definition.getDefinitionName(), exception); + } finally { +cluster.getClusterGlobalLock().writeLock().unlock(); } } }
ambari git commit: AMBARI-12332. Fix atlas related property names in Hive stack params script
Repository: ambari Updated Branches: refs/heads/trunk 2275ae839 - 8a31b1043 AMBARI-12332. Fix atlas related property names in Hive stack params script Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a31b104 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a31b104 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a31b104 Branch: refs/heads/trunk Commit: 8a31b1043e9c5bae78b2171937d7a25a1a9bfa37 Parents: 2275ae8 Author: Jon Maron jma...@hortonworks.com Authored: Wed Jul 8 13:49:29 2015 -0400 Committer: John Speidel jspei...@hortonworks.com Committed: Wed Jul 8 13:51:43 2015 -0400 -- .../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8a31b104/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index bee455f..3f6532c 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -377,7 +377,7 @@ if not has_atlas: hive_exclude_packages.append(atlas_plugin_package) else: # hive-site - hive_site_config['hive.cluster.name'] = config['clusterName'] + hive_site_config['atlas.cluster.name'] = config['clusterName'] atlas_config = config['configurations']['application-properties'] metadata_port = config['configurations']['atlas-env']['metadata_port'] metadata_host = atlas_hosts[0] @@ -386,7 +386,7 @@ else: scheme = https else: scheme = http - hive_site_config['hive.hook.dgi.url'] = format('{scheme}://{metadata_host}:{metadata_port}') + hive_site_config['atlas.rest.address'] = format('{scheme}://{metadata_host}:{metadata_port}') if not 'hive.exec.post.hooks' in hive_site_config: hive_site_config['hive.exec.post.hooks'] = 'org.apache.atlas.hive.hook.HiveHook'
ambari git commit: AMBARI-12336. Ensure HDP-2.3 has correct version number for member services (smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.1 b0b154ac9 - b7e5797ff AMBARI-12336. Ensure HDP-2.3 has correct version number for member services (smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b7e5797f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b7e5797f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b7e5797f Branch: refs/heads/branch-2.1 Commit: b7e5797ff3a5834f94104f0acd0bcfa6d4ec2f3a Parents: b0b154a Author: Sumit Mohanty smoha...@hortonworks.com Authored: Wed Jul 8 11:12:13 2015 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Wed Jul 8 11:12:47 2015 -0700 -- .../resources/stacks/HDP/2.3/services/FALCON/metainfo.xml | 2 +- .../resources/stacks/HDP/2.3/services/HBASE/metainfo.xml| 2 +- .../resources/stacks/HDP/2.3/services/HIVE/metainfo.xml | 2 +- .../resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml | 9 + 4 files changed, 8 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b7e5797f/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml index eba0e58..6fdad8b 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml @@ -20,7 +20,7 @@ services service nameFALCON/name - version0.6.1/version + version0.6.1.2.3/version osSpecifics osSpecific osFamilyredhat7,redhat6,suse11/osFamily http://git-wip-us.apache.org/repos/asf/ambari/blob/b7e5797f/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml index 921a225..f99cf47 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml @@ -20,7 +20,7 @@ services service nameHBASE/name - version1.1.0.2.3/version + version1.1.1.2.3/version commentA Non-relational distributed database, plus Phoenix, a high performance SQL layer for low latency applications./comment components component http://git-wip-us.apache.org/repos/asf/ambari/blob/b7e5797f/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml index 2e5651a..c505db4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml @@ -20,7 +20,7 @@ services service nameHIVE/name - version1.2.0.2.3/version + version1.2.1.2.3/version osSpecifics osSpecific http://git-wip-us.apache.org/repos/asf/ambari/blob/b7e5797f/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml index 6c4ef96..c25827e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml @@ -18,9 +18,10 @@ metainfo schemaVersion2.0/schemaVersion services -service -nameMAHOUT/name -extendscommon-services/MAHOUT/1.0.0.2.3/extends -/service + service +nameMAHOUT/name +version0.9.0.2.3/version +extendscommon-services/MAHOUT/1.0.0.2.3/extends + /service /services /metainfo \ No newline at end of file
[2/2] ambari git commit: AMBARI-12322. Installer wizard: cluster deploy failed due to deadlock. (swagle)
AMBARI-12322. Installer wizard: cluster deploy failed due to deadlock. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2275ae83 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2275ae83 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2275ae83 Branch: refs/heads/trunk Commit: 2275ae8392432d986bcf014dca88ac0a190dab91 Parents: 1c7f70f Author: Siddharth Wagle swa...@hortonworks.com Authored: Wed Jul 8 10:41:01 2015 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Wed Jul 8 10:41:01 2015 -0700 -- .../alerts/AlertServiceStateListener.java | 49 ++-- 1 file changed, 36 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2275ae83/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java index 44f9b50..41f9e81 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java @@ -34,6 +34,8 @@ import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; import org.apache.ambari.server.orm.dao.AlertDispatchDAO; import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; import org.apache.ambari.server.orm.entities.AlertGroupEntity; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.alert.AlertDefinition; import org.apache.ambari.server.state.alert.AlertDefinitionFactory; import org.slf4j.Logger; @@ -90,6 +92,12 @@ public class AlertServiceStateListener { private AlertDefinitionDAO m_definitionDao; /** + * Used to retrieve a cluster using clusterId from event. + */ + @Inject + private ProviderClusters clusters; + + /** * Constructor. * * @param publisher @@ -160,23 +168,38 @@ public class AlertServiceStateListener { @AllowConcurrentEvents public void onAmbariEvent(ServiceRemovedEvent event) { LOG.debug(Received event {}, event); +Cluster cluster = null; -ListAlertDefinitionEntity definitions = m_definitionDao.findByService(event.getClusterId(), -event.getServiceName()); +try { + cluster = clusters.get().getClusterById(event.getClusterId()); +} catch (AmbariException e) { + LOG.warn(Unable to retrieve cluster info for id: + event.getClusterId()); +} -for (AlertDefinitionEntity definition : definitions) { +if (cluster != null) { + // TODO: Explicit locking used to prevent deadlock situation caused during cluster delete + cluster.getClusterGlobalLock().writeLock().lock(); try { -m_definitionDao.remove(definition); - -// remove the default group for the service -AlertGroupEntity group = m_alertDispatchDao.findGroupByName(event.getClusterId(), -event.getServiceName()); - -if (null != group group.isDefault()) { - m_alertDispatchDao.remove(group); +ListAlertDefinitionEntity definitions = m_definitionDao.findByService(event.getClusterId(), + event.getServiceName()); + +for (AlertDefinitionEntity definition : definitions) { + try { +m_definitionDao.remove(definition); + +// remove the default group for the service +AlertGroupEntity group = m_alertDispatchDao.findGroupByName(event.getClusterId(), + event.getServiceName()); + +if (null != group group.isDefault()) { + m_alertDispatchDao.remove(group); +} + } catch (Exception exception) { +LOG.error(Unable to remove alert definition {}, definition.getDefinitionName(), exception); + } } - } catch (Exception exception) { -LOG.error(Unable to remove alert definition {}, definition.getDefinitionName(), exception); + } finally { +cluster.getClusterGlobalLock().writeLock().unlock(); } } }
[1/2] ambari git commit: AMBARI-12323. Ambari Dashboard HDFS - JMX metrics missing. (swagle)
Repository: ambari Updated Branches: refs/heads/trunk 27712cc8c - 2275ae839 AMBARI-12323. Ambari Dashboard HDFS - JMX metrics missing. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1c7f70f8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1c7f70f8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1c7f70f8 Branch: refs/heads/trunk Commit: 1c7f70f8fc25b42e46470be7060f72ee310eb289 Parents: 27712cc Author: Siddharth Wagle swa...@hortonworks.com Authored: Wed Jul 8 10:40:45 2015 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Wed Jul 8 10:40:45 2015 -0700 -- .../internal/AbstractProviderModule.java| 35 +++- .../controller/jmx/JMXPropertyProvider.java | 3 ++ 2 files changed, 23 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1c7f70f8/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java index a4c8493..380a0fe 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java @@ -736,8 +736,8 @@ public abstract class AbstractProviderModule implements ProviderModule, } private String getPortString(String value) { -return value != null value.contains(:) ? value.substring -(value.lastIndexOf(:) + 1, value.length()) : value; +return value != null value.contains(:) ? + value.substring(value.lastIndexOf(:) + 1, value.length()) : value; } private String getDesiredConfigVersion(String clusterName, @@ -746,11 +746,10 @@ public abstract class AbstractProviderModule implements ProviderModule, SystemException { // Get config version tag -ResourceProvider clusterResourceProvider = getResourceProvider(Resource -.Type.Cluster); -Predicate basePredicate = new PredicateBuilder().property -(ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID).equals(clusterName) -.toPredicate(); +ResourceProvider clusterResourceProvider = getResourceProvider(Resource.Type.Cluster); +Predicate basePredicate = new PredicateBuilder() + .property(ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID).equals(clusterName) + .toPredicate(); SetResource clusterResource = null; try { @@ -774,8 +773,7 @@ public abstract class AbstractProviderModule implements ProviderModule, if (clusterResource != null) { for (Resource resource : clusterResource) { MapString, Object configs = -resource.getPropertiesMap().get(ClusterResourceProvider -.CLUSTER_DESIRED_CONFIGS_PROPERTY_ID); + resource.getPropertiesMap().get(ClusterResourceProvider.CLUSTER_DESIRED_CONFIGS_PROPERTY_ID); if (configs != null) { DesiredConfig config = (DesiredConfig) configs.get(configType); if (config != null) { @@ -787,10 +785,9 @@ public abstract class AbstractProviderModule implements ProviderModule, return versionTag; } - private MapString, String getDesiredConfigMap(String clusterName, - String versionTag, String configType, MapString, String[] keys) throws - NoSuchParentResourceException, UnsupportedPropertyException, - SystemException { + private MapString, String getDesiredConfigMap(String clusterName, String versionTag, + String configType, MapString, String[] keys) throws NoSuchParentResourceException, + UnsupportedPropertyException, SystemException { // Get desired configs based on the tag ResourceProvider configResourceProvider = getResourceProvider(Resource.Type.Configuration); Predicate configPredicate = new PredicateBuilder().property @@ -818,8 +815,16 @@ public abstract class AbstractProviderModule implements ProviderModule, for (String pname : entry.getValue()) { propName = pname; -value = (String) res.getPropertyValue(PropertyHelper.getPropertyId( -PROPERTIES_CATEGORY, pname)); +// For NN HA the property key contains nameservice id +MapString, Object properties = res.getPropertiesMap().get(PROPERTIES_CATEGORY); +if (properties != null) { + for (Map.EntryString, Object propertyEntry : properties.entrySet()) { +if
ambari git commit: AMBARI-12332. Fix atlas related property names in Hive stack params script
Repository: ambari Updated Branches: refs/heads/branch-2.1 5950981b2 - b0b154ac9 AMBARI-12332. Fix atlas related property names in Hive stack params script Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b0b154ac Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b0b154ac Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b0b154ac Branch: refs/heads/branch-2.1 Commit: b0b154ac9caaa2f55659132233a8ac0738dc42b1 Parents: 5950981 Author: Jon Maron jma...@hortonworks.com Authored: Wed Jul 8 13:49:29 2015 -0400 Committer: John Speidel jspei...@hortonworks.com Committed: Wed Jul 8 13:52:24 2015 -0400 -- .../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b0b154ac/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index bee455f..3f6532c 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -377,7 +377,7 @@ if not has_atlas: hive_exclude_packages.append(atlas_plugin_package) else: # hive-site - hive_site_config['hive.cluster.name'] = config['clusterName'] + hive_site_config['atlas.cluster.name'] = config['clusterName'] atlas_config = config['configurations']['application-properties'] metadata_port = config['configurations']['atlas-env']['metadata_port'] metadata_host = atlas_hosts[0] @@ -386,7 +386,7 @@ else: scheme = https else: scheme = http - hive_site_config['hive.hook.dgi.url'] = format('{scheme}://{metadata_host}:{metadata_port}') + hive_site_config['atlas.rest.address'] = format('{scheme}://{metadata_host}:{metadata_port}') if not 'hive.exec.post.hooks' in hive_site_config: hive_site_config['hive.exec.post.hooks'] = 'org.apache.atlas.hive.hook.HiveHook'
ambari git commit: AMBARI-12336. Ensure HDP-2.3 has correct version number for member services (smohanty)
Repository: ambari Updated Branches: refs/heads/trunk 8a31b1043 - 4e201d411 AMBARI-12336. Ensure HDP-2.3 has correct version number for member services (smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4e201d41 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4e201d41 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4e201d41 Branch: refs/heads/trunk Commit: 4e201d411ac033df397cf6de8235bbdc9f209281 Parents: 8a31b10 Author: Sumit Mohanty smoha...@hortonworks.com Authored: Wed Jul 8 11:12:13 2015 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Wed Jul 8 11:12:18 2015 -0700 -- .../resources/stacks/HDP/2.3/services/FALCON/metainfo.xml | 2 +- .../resources/stacks/HDP/2.3/services/HBASE/metainfo.xml| 2 +- .../resources/stacks/HDP/2.3/services/HIVE/metainfo.xml | 2 +- .../resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml | 9 + 4 files changed, 8 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4e201d41/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml index eba0e58..6fdad8b 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml @@ -20,7 +20,7 @@ services service nameFALCON/name - version0.6.1/version + version0.6.1.2.3/version osSpecifics osSpecific osFamilyredhat7,redhat6,suse11/osFamily http://git-wip-us.apache.org/repos/asf/ambari/blob/4e201d41/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml index 921a225..f99cf47 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml @@ -20,7 +20,7 @@ services service nameHBASE/name - version1.1.0.2.3/version + version1.1.1.2.3/version commentA Non-relational distributed database, plus Phoenix, a high performance SQL layer for low latency applications./comment components component http://git-wip-us.apache.org/repos/asf/ambari/blob/4e201d41/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml index 2e5651a..c505db4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml @@ -20,7 +20,7 @@ services service nameHIVE/name - version1.2.0.2.3/version + version1.2.1.2.3/version osSpecifics osSpecific http://git-wip-us.apache.org/repos/asf/ambari/blob/4e201d41/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml index 6c4ef96..c25827e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/MAHOUT/metainfo.xml @@ -18,9 +18,10 @@ metainfo schemaVersion2.0/schemaVersion services -service -nameMAHOUT/name -extendscommon-services/MAHOUT/1.0.0.2.3/extends -/service + service +nameMAHOUT/name +version0.9.0.2.3/version +extendscommon-services/MAHOUT/1.0.0.2.3/extends + /service /services /metainfo \ No newline at end of file
ambari git commit: AMBARI-10743. Falcon process submission fails due to expression language missing function called currentWeek (alejandro)
Repository: ambari Updated Branches: refs/heads/trunk a50573bc6 - cd782f9d8 AMBARI-10743. Falcon process submission fails due to expression language missing function called currentWeek (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd782f9d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd782f9d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd782f9d Branch: refs/heads/trunk Commit: cd782f9d820830768419c2a50201ab4929ca445e Parents: a50573b Author: Alejandro Fernandez afernan...@hortonworks.com Authored: Tue Jul 7 21:26:57 2015 -0700 Committer: Alejandro Fernandez afernan...@hortonworks.com Committed: Wed Jul 8 13:54:21 2015 -0700 -- .../FALCON/configuration/oozie-site.xml | 176 +++ .../FALCON/configuration/oozie-site.xml | 173 ++ 2 files changed, 349 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cd782f9d/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml new file mode 100644 index 000..c6962f3 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml @@ -0,0 +1,176 @@ +?xml version=1.0? +!-- + 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. +-- + +configuration supports_final=true + property + nameoozie.service.ELService.ext.functions.coord-job-submit-instances/name +value + now=org.apache.oozie.extensions.OozieELExtensions#ph1_now_echo, + today=org.apache.oozie.extensions.OozieELExtensions#ph1_today_echo, + yesterday=org.apache.oozie.extensions.OozieELExtensions#ph1_yesterday_echo, + currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_currentMonth_echo, + lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_lastMonth_echo, + currentYear=org.apache.oozie.extensions.OozieELExtensions#ph1_currentYear_echo, + lastYear=org.apache.oozie.extensions.OozieELExtensions#ph1_lastYear_echo, + formatTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_formatTime_echo, + latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo, + future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo +/value +description + EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD. + This property is a convenience property to add extensions to the built in executors without having to + include all the built in ones. +/description + /property + + property +nameoozie.service.ELService.ext.functions.coord-action-create-inst/name +value + now=org.apache.oozie.extensions.OozieELExtensions#ph2_now_inst, + today=org.apache.oozie.extensions.OozieELExtensions#ph2_today_inst, + yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday_inst, + currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth_inst, + lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth_inst, + currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear_inst, + lastYear=org.apache.oozie.extensions.OozieELExtensions#ph2_lastYear_inst, + latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo, + future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo, + formatTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_formatTime, + user=org.apache.oozie.coord.CoordELFunctions#coord_user +/value +description + EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD. + This property is a convenience property to add extensions to the built in executors without having to + include all the built in
ambari git commit: AMBARI-12341. RU: invalid symlinks on upgraded cluster (ncole)
Repository: ambari Updated Branches: refs/heads/branch-2.1 494f954d6 - 1d84518f8 AMBARI-12341. RU: invalid symlinks on upgraded cluster (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1d84518f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1d84518f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1d84518f Branch: refs/heads/branch-2.1 Commit: 1d84518f8a1835fcdd70702c9850fab0b083d61f Parents: 494f954 Author: Nate Cole nc...@hortonworks.com Authored: Wed Jul 8 17:07:23 2015 -0400 Committer: Nate Cole nc...@hortonworks.com Committed: Wed Jul 8 17:47:44 2015 -0400 -- .../libraries/functions/conf_select.py | 255 +- .../1.4.0.2.0/package/scripts/flume_handler.py | 2 + .../0.12.0.2.0/package/scripts/pig_client.py| 3 +- .../custom_actions/scripts/ru_set_all.py| 7 +- .../scripts/shared_initialization.py| 94 -- .../python/stacks/2.0.6/PIG/test_pig_client.py | 14 +- .../hooks/after-INSTALL/test_after_install.py | 337 ++- 7 files changed, 415 insertions(+), 297 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1d84518f/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py index 8b3f930..9c91497 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py @@ -30,82 +30,150 @@ from resource_management.core.logger import Logger from resource_management.core.resources.system import Directory PACKAGE_DIRS = { - accumulo: { -conf_dir: /etc/accumulo/conf, -current_dir: /usr/hdp/current/accumulo-client/conf - }, - falcon: { -conf_dir: /etc/falcon/conf, -current_dir: /usr/hdp/current/falcon-client/conf - }, - hadoop: { -conf_dir: /etc/hadoop/conf, -current_dir: /usr/hdp/current/hadoop-client/conf - }, - hbase: { -conf_dir: /etc/hbase/conf, -current_dir: /usr/hdp/current/hbase-client/conf - }, - hive: { -conf_dir: /etc/hive/conf, -current_dir: /usr/hdp/current/hive-client/conf - }, - kafka: { -conf_dir: /etc/kafka/conf, -current_dir: /usr/hdp/current/kafka-broker/conf - }, - knox: { -conf_dir: /etc/knox/conf, -current_dir: /usr/hdp/current/knox-server/conf - }, - mahout: { -conf_dir: /etc/mahout/conf, -current_dir: /usr/hdp/current/mahout-client/conf - }, - oozie: { -conf_dir: /etc/oozie/conf, -current_dir: /usr/hdp/current/oozie-client/conf - }, - phoenix: { -conf_dir: /etc/phoenix/conf, -current_dir: /usr/hdp/current/phoenix-client/conf - }, - ranger-admin: { -conf_dir: /etc/ranger/admin/conf, -current_dir: /usr/hdp/current/ranger-admin/conf - }, - ranger-kms: { -conf_dir: /etc/ranger/kms/conf, -current_dir: /usr/hdp/current/ranger-kms/conf - }, - ranger-usersync: { -conf_dir: /etc/ranger/kms/usersync, -current_dir: /usr/hdp/current/ranger-usersync/conf - }, - slider: { -conf_dir: /etc/slider/conf, -current_dir: /usr/hdp/current/slider-client/conf - }, - spark: { -conf_dir: /etc/spark/conf, -current_dir: /usr/hdp/current/spark-client/conf - }, - sqoop: { -conf_dir: /etc/sqoop/conf, -current_dir: /usr/hdp/current/sqoop-client/conf - }, - storm: { -conf_dir: /etc/storm/conf, -current_dir: /usr/hdp/current/storm-client/conf - }, - tez: { -conf_dir: /etc/tez/conf, -current_dir: /usr/hdp/current/tez-client/conf - }, - zookeeper: { -conf_dir: /etc/zookeeper/conf, -current_dir: /usr/hdp/current/zookeeper-client/conf - } + accumulo: [ +{ + conf_dir: /etc/accumulo/conf, + current_dir: /usr/hdp/current/accumulo-client/conf +} + ], + falcon: [ +{ + conf_dir: /etc/falcon/conf, + current_dir: /usr/hdp/current/falcon-client/conf +} + ], + hadoop: [ +{ + conf_dir: /etc/hadoop/conf, + current_dir: /usr/hdp/current/hadoop-client/conf +} + ], + hbase: [ +{ + conf_dir: /etc/hbase/conf, + current_dir: /usr/hdp/current/hbase-client/conf +} + ], + hive: [ +{ + conf_dir: /etc/hive/conf, + current_dir: /usr/hdp/current/hive-client/conf +} + ], + kafka: [ +{ + conf_dir: /etc/kafka/conf, + current_dir: /usr/hdp/current/kafka-broker/conf +} + ], + knox: [ +{ + conf_dir: /etc/knox/conf, + current_dir: /usr/hdp/current/knox-server/conf +} + ], + mahout: [ +{ +
ambari git commit: AMBARI-12338. Accessing Cluster with read-only user throws error. (swagle)
Repository: ambari Updated Branches: refs/heads/branch-2.1 57d853f5c - a0ed51883 AMBARI-12338. Accessing Cluster with read-only user throws error. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a0ed5188 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a0ed5188 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a0ed5188 Branch: refs/heads/branch-2.1 Commit: a0ed518838fcf780b58b7d40166d68f36d104417 Parents: 57d853f Author: Siddharth Wagle swa...@hortonworks.com Authored: Wed Jul 8 12:39:28 2015 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Wed Jul 8 12:39:36 2015 -0700 -- .../AmbariAuthorizationFilter.java | 23 ++-- .../AmbariAuthorizationFilterTest.java | 1 + 2 files changed, 13 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a0ed5188/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java index 5a12d64..44c9613 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java @@ -111,7 +111,7 @@ public class AmbariAuthorizationFilter implements Filter { AmbariGrantedAuthority ambariGrantedAuthority = (AmbariGrantedAuthority) grantedAuthority; PrivilegeEntity privilegeEntity = ambariGrantedAuthority.getPrivilegeEntity(); - Integer permissionId= privilegeEntity.getPermission().getId(); + Integer permissionId = privilegeEntity.getPermission().getId(); // admin has full access if (permissionId.equals(PermissionEntity.AMBARI_ADMIN_PERMISSION)) { @@ -119,20 +119,21 @@ public class AmbariAuthorizationFilter implements Filter { break; } -// clusters require permission - if (requestURI.matches(API_CLUSTERS_ALL_PATTERN)) { + // clusters require permission + if (requestURI.matches(API_CLUSTERS_ALL_PATTERN)) { if (permissionId.equals(PermissionEntity.CLUSTER_READ_PERMISSION) || - permissionId.equals(PermissionEntity.CLUSTER_OPERATE_PERMISSION)) { + permissionId.equals(PermissionEntity.CLUSTER_OPERATE_PERMISSION)) { authorized = true; break; } } else if (STACK_ADVISOR_REGEX.matcher(requestURI).matches()) { //TODO permissions model doesn't manage stacks api, but we need access to stack advisor to save configs -if (permissionId.equals(PermissionEntity.CLUSTER_OPERATE_PERMISSION)) { +if (permissionId.equals(PermissionEntity.CLUSTER_READ_PERMISSION) || + permissionId.equals(PermissionEntity.CLUSTER_OPERATE_PERMISSION)) { authorized = true; break; } - } else if (requestURI.matches(API_VIEWS_ALL_PATTERN)) { + } else if (requestURI.matches(API_VIEWS_ALL_PATTERN)) { // views require permission if (permissionId.equals(PermissionEntity.VIEW_USE_PERMISSION)) { authorized = true; @@ -163,10 +164,10 @@ public class AmbariAuthorizationFilter implements Filter { // allow GET for everything except /views, /api/v1/users, /api/v1/groups, /api/v1/ldap_sync_events if (!authorized (!httpRequest.getMethod().equals(GET) - || requestURI.matches(VIEWS_CONTEXT_ALL_PATTERN) - || requestURI.matches(API_USERS_ALL_PATTERN) - || requestURI.matches(API_GROUPS_ALL_PATTERN) - || requestURI.matches(API_LDAP_SYNC_EVENTS_ALL_PATTERN))) { +|| requestURI.matches(VIEWS_CONTEXT_ALL_PATTERN) +|| requestURI.matches(API_USERS_ALL_PATTERN) +|| requestURI.matches(API_GROUPS_ALL_PATTERN) +|| requestURI.matches(API_LDAP_SYNC_EVENTS_ALL_PATTERN))) { httpResponse.setHeader(WWW-Authenticate, Basic realm=\ + realm + \); httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN, You do not have permissions to access this resource.); @@ -175,7 +176,7 @@ public class AmbariAuthorizationFilter implements Filter { } } -if(AuthorizationHelper.getAuthenticatedName() != null) { +if (AuthorizationHelper.getAuthenticatedName() != null) {
ambari git commit: AMBARI-12224. Ambari should not configure hbase.regionserver.global.memstore.upperLimit in HDP-2.3 (Dmytro Grinenko via smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.1 98d2d9d1c - 6b40fdccf AMBARI-12224. Ambari should not configure hbase.regionserver.global.memstore.upperLimit in HDP-2.3 (Dmytro Grinenko via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6b40fdcc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b40fdcc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b40fdcc Branch: refs/heads/branch-2.1 Commit: 6b40fdccf628f204ef19018e1730b5592449c63f Parents: 98d2d9d Author: Sumit Mohanty smoha...@hortonworks.com Authored: Wed Jul 8 13:04:06 2015 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Wed Jul 8 13:06:21 2015 -0700 -- .../upgrades/HBaseConfigCalculation.java| 99 .../HDP/2.2/services/HBASE/themes/theme.json| 4 +- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 7 ++ .../services/HBASE/configuration/hbase-site.xml | 12 ++- .../stacks/HDP/2.3/services/HBASE/metainfo.xml | 7 ++ .../HDP/2.3/services/HBASE/themes/theme.json| 33 +++ .../HDPWIN/2.2/services/HBASE/themes/theme.json | 4 +- .../services/HBASE/configuration/hbase-site.xml | 12 ++- .../HDPWIN/2.3/services/HBASE/metainfo.xml | 7 ++ .../HDPWIN/2.3/services/HBASE/themes/theme.json | 33 +++ 10 files changed, 212 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6b40fdcc/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HBaseConfigCalculation.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HBaseConfigCalculation.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HBaseConfigCalculation.java new file mode 100644 index 000..7f6d4b1 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HBaseConfigCalculation.java @@ -0,0 +1,99 @@ +/* + * 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.serveraction.upgrades; + +import com.google.inject.Inject; +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.actionmanager.HostRoleStatus; +import org.apache.ambari.server.agent.CommandReport; +import org.apache.ambari.server.serveraction.AbstractServerAction; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.Clusters; +import org.apache.ambari.server.state.Config; + +import java.math.BigDecimal; +import java.util.Map; +import java.util.concurrent.ConcurrentMap; + +/** + * Computes HBase properties. This class is only used when moving from + * HDP-2.2 to HDP-2.3 in that upgrade pack. + */ +public class HBaseConfigCalculation extends AbstractServerAction { + private static final String SOURCE_CONFIG_TYPE = hbase-site; + private static final String OLD_UPPER_LIMIT_PROPERTY_NAME = hbase.regionserver.global.memstore.upperLimit; + private static final String OLD_LOWER_LIMIT_PROPERTY_NAME = hbase.regionserver.global.memstore.lowerLimit; + private static final String NEW_LOWER_LIMIT_PROPERTY_NAME = hbase.regionserver.global.memstore.size.lower.limit; + + @Inject + private Clusters clusters; + + @Override + public CommandReport execute(ConcurrentMapString, Object requestSharedDataContext) +throws AmbariException, InterruptedException { + +String clusterName = getExecutionCommand().getClusterName(); + +Cluster cluster = clusters.getCluster(clusterName); + +Config config = cluster.getDesiredConfigByType(SOURCE_CONFIG_TYPE); + +if (config == null) { + return createCommandReport(0, HostRoleStatus.FAILED,{}, + String.format(Source type %s not found, SOURCE_CONFIG_TYPE), ); +} + +MapString, String properties = config.getProperties(); +String upperLimitStr = properties.get(OLD_UPPER_LIMIT_PROPERTY_NAME); +String lowerLimitStr =
ambari git commit: AMBARI-12341. RU: invalid symlinks on upgraded cluster (ncole)
Repository: ambari Updated Branches: refs/heads/trunk fb0ee419c - ffa9f75bd AMBARI-12341. RU: invalid symlinks on upgraded cluster (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ffa9f75b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ffa9f75b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ffa9f75b Branch: refs/heads/trunk Commit: ffa9f75bd87f1f8473269546d7114850aa9d2577 Parents: fb0ee41 Author: Nate Cole nc...@hortonworks.com Authored: Wed Jul 8 16:51:01 2015 -0400 Committer: Nate Cole nc...@hortonworks.com Committed: Wed Jul 8 17:47:19 2015 -0400 -- .../libraries/functions/conf_select.py | 255 +- .../1.4.0.2.0/package/scripts/flume_handler.py | 2 + .../0.12.0.2.0/package/scripts/pig_client.py| 3 +- .../custom_actions/scripts/ru_set_all.py| 7 +- .../scripts/shared_initialization.py| 94 -- .../python/stacks/2.0.6/PIG/test_pig_client.py | 14 +- .../hooks/after-INSTALL/test_after_install.py | 337 ++- 7 files changed, 415 insertions(+), 297 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ffa9f75b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py index 8b3f930..9c91497 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py @@ -30,82 +30,150 @@ from resource_management.core.logger import Logger from resource_management.core.resources.system import Directory PACKAGE_DIRS = { - accumulo: { -conf_dir: /etc/accumulo/conf, -current_dir: /usr/hdp/current/accumulo-client/conf - }, - falcon: { -conf_dir: /etc/falcon/conf, -current_dir: /usr/hdp/current/falcon-client/conf - }, - hadoop: { -conf_dir: /etc/hadoop/conf, -current_dir: /usr/hdp/current/hadoop-client/conf - }, - hbase: { -conf_dir: /etc/hbase/conf, -current_dir: /usr/hdp/current/hbase-client/conf - }, - hive: { -conf_dir: /etc/hive/conf, -current_dir: /usr/hdp/current/hive-client/conf - }, - kafka: { -conf_dir: /etc/kafka/conf, -current_dir: /usr/hdp/current/kafka-broker/conf - }, - knox: { -conf_dir: /etc/knox/conf, -current_dir: /usr/hdp/current/knox-server/conf - }, - mahout: { -conf_dir: /etc/mahout/conf, -current_dir: /usr/hdp/current/mahout-client/conf - }, - oozie: { -conf_dir: /etc/oozie/conf, -current_dir: /usr/hdp/current/oozie-client/conf - }, - phoenix: { -conf_dir: /etc/phoenix/conf, -current_dir: /usr/hdp/current/phoenix-client/conf - }, - ranger-admin: { -conf_dir: /etc/ranger/admin/conf, -current_dir: /usr/hdp/current/ranger-admin/conf - }, - ranger-kms: { -conf_dir: /etc/ranger/kms/conf, -current_dir: /usr/hdp/current/ranger-kms/conf - }, - ranger-usersync: { -conf_dir: /etc/ranger/kms/usersync, -current_dir: /usr/hdp/current/ranger-usersync/conf - }, - slider: { -conf_dir: /etc/slider/conf, -current_dir: /usr/hdp/current/slider-client/conf - }, - spark: { -conf_dir: /etc/spark/conf, -current_dir: /usr/hdp/current/spark-client/conf - }, - sqoop: { -conf_dir: /etc/sqoop/conf, -current_dir: /usr/hdp/current/sqoop-client/conf - }, - storm: { -conf_dir: /etc/storm/conf, -current_dir: /usr/hdp/current/storm-client/conf - }, - tez: { -conf_dir: /etc/tez/conf, -current_dir: /usr/hdp/current/tez-client/conf - }, - zookeeper: { -conf_dir: /etc/zookeeper/conf, -current_dir: /usr/hdp/current/zookeeper-client/conf - } + accumulo: [ +{ + conf_dir: /etc/accumulo/conf, + current_dir: /usr/hdp/current/accumulo-client/conf +} + ], + falcon: [ +{ + conf_dir: /etc/falcon/conf, + current_dir: /usr/hdp/current/falcon-client/conf +} + ], + hadoop: [ +{ + conf_dir: /etc/hadoop/conf, + current_dir: /usr/hdp/current/hadoop-client/conf +} + ], + hbase: [ +{ + conf_dir: /etc/hbase/conf, + current_dir: /usr/hdp/current/hbase-client/conf +} + ], + hive: [ +{ + conf_dir: /etc/hive/conf, + current_dir: /usr/hdp/current/hive-client/conf +} + ], + kafka: [ +{ + conf_dir: /etc/kafka/conf, + current_dir: /usr/hdp/current/kafka-broker/conf +} + ], + knox: [ +{ + conf_dir: /etc/knox/conf, + current_dir: /usr/hdp/current/knox-server/conf +} + ], + mahout: [ +{ + conf_dir:
ambari git commit: AMBARI-12312. Different file size when downloading zip file on HDFS File View (Erik Bergenholtz via rlevas)
Repository: ambari Updated Branches: refs/heads/trunk aee137f1c - 85f7a3f9f AMBARI-12312. Different file size when downloading zip file on HDFS File View (Erik Bergenholtz via rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/85f7a3f9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/85f7a3f9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/85f7a3f9 Branch: refs/heads/trunk Commit: 85f7a3f9f47c5c49d87d2d700218377a47b30dff Parents: aee137f Author: Erik Bergenholtz ebergenho...@hortonworks.com Authored: Wed Jul 8 15:55:44 2015 -0400 Committer: Robert Levas rle...@hortonworks.com Committed: Wed Jul 8 15:55:44 2015 -0400 -- .../org/apache/ambari/view/filebrowser/DownloadService.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/85f7a3f9/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java -- diff --git a/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java b/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java index 7395f8f..4d45a76 100644 --- a/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java +++ b/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java @@ -106,8 +106,11 @@ public class DownloadService extends HdfsService { FSDataInputStream in = getApi(context).open(path); zip.putNextEntry(new ZipEntry(path.substring(1))); byte[] chunk = new byte[1024]; - while (in.read(chunk) != -1) { -zip.write(chunk); + + int readLen = 0; + while(readLen != -1) { +zip.write(chunk, 0, readLen); +readLen = in.read(chunk); } } catch (IOException ex) { logger.error(Error zipping file + path.substring(1) + (file ignored):
ambari git commit: AMBARI-12340. Hosts page is showing up empty (keeps spinning). (yusaku)
Repository: ambari Updated Branches: refs/heads/trunk cd782f9d8 - eb323fa80 AMBARI-12340. Hosts page is showing up empty (keeps spinning). (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eb323fa8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eb323fa8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eb323fa8 Branch: refs/heads/trunk Commit: eb323fa80c509cda8d27dd7ea098084aa3b480d4 Parents: cd782f9 Author: Yusaku Sako yus...@hortonworks.com Authored: Wed Jul 8 13:26:22 2015 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Wed Jul 8 14:19:35 2015 -0700 -- ambari-web/app/controllers/main/host.js | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eb323fa8/ambari-web/app/controllers/main/host.js -- diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js index 81711ef..a798f0b 100644 --- a/ambari-web/app/controllers/main/host.js +++ b/ambari-web/app/controllers/main/host.js @@ -61,7 +61,10 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, { }.observes('dataSource.@each.isRequested'), setContentOnce: function() { -this.set('content', this.get('dataSource').filterProperty('isRequested')); +var self = this; +Em.run.next(function() { + self.set('content', self.get('dataSource').filterProperty('isRequested')); +}); }, allHostStackVersions: App.HostStackVersion.find(),
ambari git commit: AMBARI-12312. Different file size when downloading zip file on HDFS File View (Erik Bergenholtz via rlevas)
Repository: ambari Updated Branches: refs/heads/branch-2.1 a0ed51883 - 98d2d9d1c AMBARI-12312. Different file size when downloading zip file on HDFS File View (Erik Bergenholtz via rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98d2d9d1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98d2d9d1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98d2d9d1 Branch: refs/heads/branch-2.1 Commit: 98d2d9d1c173ec4a068caaeafcfd8cbc7aadc434 Parents: a0ed518 Author: Erik Bergenholtz ebergenho...@hortonworks.com Authored: Wed Jul 8 15:58:26 2015 -0400 Committer: Robert Levas rle...@hortonworks.com Committed: Wed Jul 8 15:58:26 2015 -0400 -- .../org/apache/ambari/view/filebrowser/DownloadService.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/98d2d9d1/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java -- diff --git a/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java b/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java index 7395f8f..4d45a76 100644 --- a/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java +++ b/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java @@ -106,8 +106,11 @@ public class DownloadService extends HdfsService { FSDataInputStream in = getApi(context).open(path); zip.putNextEntry(new ZipEntry(path.substring(1))); byte[] chunk = new byte[1024]; - while (in.read(chunk) != -1) { -zip.write(chunk); + + int readLen = 0; + while(readLen != -1) { +zip.write(chunk, 0, readLen); +readLen = in.read(chunk); } } catch (IOException ex) { logger.error(Error zipping file + path.substring(1) + (file ignored):
ambari git commit: AMBARI-12224. Ambari should not configure hbase.regionserver.global.memstore.upperLimit in HDP-2.3 (Dmytro Grinenko via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk 85f7a3f9f - a50573bc6 AMBARI-12224. Ambari should not configure hbase.regionserver.global.memstore.upperLimit in HDP-2.3 (Dmytro Grinenko via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a50573bc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a50573bc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a50573bc Branch: refs/heads/trunk Commit: a50573bc6c04c91c95700040eb842a59f5067537 Parents: 85f7a3f Author: Sumit Mohanty smoha...@hortonworks.com Authored: Wed Jul 8 13:04:06 2015 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Wed Jul 8 13:04:06 2015 -0700 -- .../upgrades/HBaseConfigCalculation.java| 99 .../HDP/2.2/services/HBASE/themes/theme.json| 4 +- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 7 ++ .../services/HBASE/configuration/hbase-site.xml | 12 ++- .../stacks/HDP/2.3/services/HBASE/metainfo.xml | 7 ++ .../HDP/2.3/services/HBASE/themes/theme.json| 33 +++ .../HDPWIN/2.2/services/HBASE/themes/theme.json | 4 +- .../services/HBASE/configuration/hbase-site.xml | 12 ++- .../HDPWIN/2.3/services/HBASE/metainfo.xml | 7 ++ .../HDPWIN/2.3/services/HBASE/themes/theme.json | 33 +++ 10 files changed, 212 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a50573bc/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HBaseConfigCalculation.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HBaseConfigCalculation.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HBaseConfigCalculation.java new file mode 100644 index 000..7f6d4b1 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HBaseConfigCalculation.java @@ -0,0 +1,99 @@ +/* + * 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.serveraction.upgrades; + +import com.google.inject.Inject; +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.actionmanager.HostRoleStatus; +import org.apache.ambari.server.agent.CommandReport; +import org.apache.ambari.server.serveraction.AbstractServerAction; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.Clusters; +import org.apache.ambari.server.state.Config; + +import java.math.BigDecimal; +import java.util.Map; +import java.util.concurrent.ConcurrentMap; + +/** + * Computes HBase properties. This class is only used when moving from + * HDP-2.2 to HDP-2.3 in that upgrade pack. + */ +public class HBaseConfigCalculation extends AbstractServerAction { + private static final String SOURCE_CONFIG_TYPE = hbase-site; + private static final String OLD_UPPER_LIMIT_PROPERTY_NAME = hbase.regionserver.global.memstore.upperLimit; + private static final String OLD_LOWER_LIMIT_PROPERTY_NAME = hbase.regionserver.global.memstore.lowerLimit; + private static final String NEW_LOWER_LIMIT_PROPERTY_NAME = hbase.regionserver.global.memstore.size.lower.limit; + + @Inject + private Clusters clusters; + + @Override + public CommandReport execute(ConcurrentMapString, Object requestSharedDataContext) +throws AmbariException, InterruptedException { + +String clusterName = getExecutionCommand().getClusterName(); + +Cluster cluster = clusters.getCluster(clusterName); + +Config config = cluster.getDesiredConfigByType(SOURCE_CONFIG_TYPE); + +if (config == null) { + return createCommandReport(0, HostRoleStatus.FAILED,{}, + String.format(Source type %s not found, SOURCE_CONFIG_TYPE), ); +} + +MapString, String properties = config.getProperties(); +String upperLimitStr = properties.get(OLD_UPPER_LIMIT_PROPERTY_NAME); +String lowerLimitStr = properties.get(OLD_LOWER_LIMIT_PROPERTY_NAME); + +
ambari git commit: AMBARI-12340. Hosts page is showing up empty (keeps spinning). (yusaku)
Repository: ambari Updated Branches: refs/heads/branch-2.1 b597313ca - 3344bb805 AMBARI-12340. Hosts page is showing up empty (keeps spinning). (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3344bb80 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3344bb80 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3344bb80 Branch: refs/heads/branch-2.1 Commit: 3344bb805e7db7410837b8ccd84f39ece0f51f61 Parents: b597313 Author: Yusaku Sako yus...@hortonworks.com Authored: Wed Jul 8 13:26:22 2015 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Wed Jul 8 14:20:07 2015 -0700 -- ambari-web/app/controllers/main/host.js | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3344bb80/ambari-web/app/controllers/main/host.js -- diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js index 81711ef..a798f0b 100644 --- a/ambari-web/app/controllers/main/host.js +++ b/ambari-web/app/controllers/main/host.js @@ -61,7 +61,10 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, { }.observes('dataSource.@each.isRequested'), setContentOnce: function() { -this.set('content', this.get('dataSource').filterProperty('isRequested')); +var self = this; +Em.run.next(function() { + self.set('content', self.get('dataSource').filterProperty('isRequested')); +}); }, allHostStackVersions: App.HostStackVersion.find(),
ambari git commit: AMBARI-12342 - Rack Awareness : topology_script.py is not available on HMaster machine (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk eb323fa80 - fb0ee419c AMBARI-12342 - Rack Awareness : topology_script.py is not available on HMaster machine (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fb0ee419 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fb0ee419 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fb0ee419 Branch: refs/heads/trunk Commit: fb0ee419cfc11b4347d0a9ec43cca306ae8abafc Parents: eb323fa Author: tbeerbower tbeerbo...@hortonworks.com Authored: Wed Jul 8 17:22:42 2015 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Wed Jul 8 17:22:59 2015 -0400 -- .../stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py | 3 +-- .../src/test/python/stacks/2.0.6/configs/secured.json | 10 +- .../stacks/2.0.6/hooks/before-START/test_before_start.py | 9 + 3 files changed, 19 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fb0ee419/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py index a3fdef9..f21e4b1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py @@ -33,8 +33,7 @@ class BeforeStartHook(Hook): setup_hadoop() setup_configs() create_javahome_symlink() -if params.refresh_topology : - create_topology_script_and_mapping() +create_topology_script_and_mapping() if __name__ == __main__: BeforeStartHook().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/fb0ee419/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json index 5da1679..c9e20e2 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json @@ -944,7 +944,15 @@ all_hosts: [ c6401.ambari.apache.org, c6402.ambari.apache.org -], +], +all_racks: [ +/default/rack_01, +/default/rack_02 +], +all_ipv4_ips: [ +127.0.0.1, +127.0.0.1 +], storm_ui_server_hosts: [ c6401.ambari.apache.org ], http://git-wip-us.apache.org/repos/asf/ambari/blob/fb0ee419/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py index 0895b7e..df39d2f 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py @@ -158,6 +158,15 @@ class TestHookBeforeStart(RMFTestCase): owner = 'hdfs', group = 'hadoop', ) +self.assertResourceCalled('File', '/etc/hadoop/conf/topology_mappings.data', + owner = 'hdfs', + content = Template('topology_mappings.data.j2'), + group = 'hadoop', + ) +self.assertResourceCalled('File', '/etc/hadoop/conf/topology_script.py', + content = StaticFile('topology_script.py'), + mode = 0755, + ) self.assertNoMoreResources() def test_hook_default_hdfs(self):
ambari git commit: AMBARI-12344 - Various Configs in webcat-site.xml Are Using Paths With 'current' Rather Than Version (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-2.1 c267b45bc - 49c88a723 AMBARI-12344 - Various Configs in webcat-site.xml Are Using Paths With 'current' Rather Than Version (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/49c88a72 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/49c88a72 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/49c88a72 Branch: refs/heads/branch-2.1 Commit: 49c88a723964ea2d7d7aa601aef9c404045803c4 Parents: c267b45 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Jul 8 17:46:04 2015 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Thu Jul 9 00:33:50 2015 -0400 -- .../2.2/services/HIVE/configuration/webhcat-site.xml | 10 +- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 15 ++- .../2.3/services/HIVE/configuration/webhcat-site.xml | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/49c88a72/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml index d95be55..f3a9ec0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml @@ -25,19 +25,19 @@ limitations under the License. property nametempleton.jar/name - value/usr/hdp/current/hive-webhcat/share/webhcat/svr/lib/hive-webhcat-*.jar/value + value/usr/hdp/${hdp.version}/hive/share/webhcat/svr/lib/hive-webhcat-*.jar/value descriptionThe path to the Templeton jar file./description /property property nametempleton.libjars/name -value/usr/hdp/current/zookeeper-client/zookeeper.jar/value +value/usr/hdp/${hdp.version}/zookeeper/zookeeper.jar/value descriptionJars to add the the classpath./description /property property nametempleton.hadoop/name -value/usr/hdp/current/hadoop-client/bin/hadoop/value +value/usr/hdp/${hdp.version}/hadoop/bin/hadoop/value descriptionThe path to the Hadoop executable./description /property @@ -55,7 +55,7 @@ limitations under the License. property nametempleton.hcat/name -value/usr/hdp/current/hive-client/bin/hcat/value +value/usr/hdp/${hdp.version}/hive/bin/hcat/value descriptionThe path to the hcatalog executable./description /property @@ -111,7 +111,7 @@ limitations under the License. property nametempleton.hive.extra.files/name - value/etc/tez/conf/tez-site.xml,/usr/hdp/current/tez-client,/usr/hdp/current/tez-client/lib/value + value/usr/hdp/${hdp.version}/tez/conf/tez-site.xml,/usr/hdp/${hdp.version}/tez,/usr/hdp/${hdp.version}/tez/lib/value descriptionThe resources in this list will be localized to the node running LaunchMapper and added to HADOOP_CLASSPTH before launching 'hive' command. If the path /foo/bar is a directory, the contents of the the entire dir will be localized and ./foo/* will be added to HADOOP_CLASSPATH. Note that since classpath path processing does not recurse into subdirectories, http://git-wip-us.apache.org/repos/asf/ambari/blob/49c88a72/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml index 178630e..22d9854 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml @@ -694,7 +694,7 @@ replace key=hbase.coprocessor.master.classes find=com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor replace-with=org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor / replace key=hbase.coprocessor.region.classes find=com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor replace-with=org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor / /task - + task xsi:type=configure summary=Transitioning Ranger HBase Policy typeranger-hbase-policymgr-ssl/type transfer operation=copy from-type=ranger-hbase-plugin-properties from-key=SSL_KEYSTORE_FILE_PATH to-key=xasecure.policymgr.clientssl.keystore
ambari git commit: AMBARI-12344 - Various Configs in webcat-site.xml Are Using Paths With 'current' Rather Than Version (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk 126114a96 - 4e2ef1e0d AMBARI-12344 - Various Configs in webcat-site.xml Are Using Paths With 'current' Rather Than Version (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4e2ef1e0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4e2ef1e0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4e2ef1e0 Branch: refs/heads/trunk Commit: 4e2ef1e0d54043f0c4e6089d312a63c31b2b948a Parents: 126114a Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Jul 8 17:46:04 2015 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Thu Jul 9 00:30:36 2015 -0400 -- .../2.2/services/HIVE/configuration/webhcat-site.xml | 10 +- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 15 ++- .../2.3/services/HIVE/configuration/webhcat-site.xml | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4e2ef1e0/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml index d95be55..f3a9ec0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/webhcat-site.xml @@ -25,19 +25,19 @@ limitations under the License. property nametempleton.jar/name - value/usr/hdp/current/hive-webhcat/share/webhcat/svr/lib/hive-webhcat-*.jar/value + value/usr/hdp/${hdp.version}/hive/share/webhcat/svr/lib/hive-webhcat-*.jar/value descriptionThe path to the Templeton jar file./description /property property nametempleton.libjars/name -value/usr/hdp/current/zookeeper-client/zookeeper.jar/value +value/usr/hdp/${hdp.version}/zookeeper/zookeeper.jar/value descriptionJars to add the the classpath./description /property property nametempleton.hadoop/name -value/usr/hdp/current/hadoop-client/bin/hadoop/value +value/usr/hdp/${hdp.version}/hadoop/bin/hadoop/value descriptionThe path to the Hadoop executable./description /property @@ -55,7 +55,7 @@ limitations under the License. property nametempleton.hcat/name -value/usr/hdp/current/hive-client/bin/hcat/value +value/usr/hdp/${hdp.version}/hive/bin/hcat/value descriptionThe path to the hcatalog executable./description /property @@ -111,7 +111,7 @@ limitations under the License. property nametempleton.hive.extra.files/name - value/etc/tez/conf/tez-site.xml,/usr/hdp/current/tez-client,/usr/hdp/current/tez-client/lib/value + value/usr/hdp/${hdp.version}/tez/conf/tez-site.xml,/usr/hdp/${hdp.version}/tez,/usr/hdp/${hdp.version}/tez/lib/value descriptionThe resources in this list will be localized to the node running LaunchMapper and added to HADOOP_CLASSPTH before launching 'hive' command. If the path /foo/bar is a directory, the contents of the the entire dir will be localized and ./foo/* will be added to HADOOP_CLASSPATH. Note that since classpath path processing does not recurse into subdirectories, http://git-wip-us.apache.org/repos/asf/ambari/blob/4e2ef1e0/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml index 178630e..22d9854 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml @@ -694,7 +694,7 @@ replace key=hbase.coprocessor.master.classes find=com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor replace-with=org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor / replace key=hbase.coprocessor.region.classes find=com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor replace-with=org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor / /task - + task xsi:type=configure summary=Transitioning Ranger HBase Policy typeranger-hbase-policymgr-ssl/type transfer operation=copy from-type=ranger-hbase-plugin-properties from-key=SSL_KEYSTORE_FILE_PATH to-key=xasecure.policymgr.clientssl.keystore
ambari git commit: AMBARI-12304. Summary:500 error when attempting to add service (Extra fix for refreshing issue) (rzang)
Repository: ambari Updated Branches: refs/heads/trunk ffa9f75bd - 67ce8a385 AMBARI-12304. Summary:500 error when attempting to add service (Extra fix for refreshing issue) (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/67ce8a38 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/67ce8a38 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/67ce8a38 Branch: refs/heads/trunk Commit: 67ce8a385ac4e3b54698cd75f51d94005993171c Parents: ffa9f75 Author: Richard Zang rz...@apache.org Authored: Wed Jul 8 15:36:31 2015 -0700 Committer: Richard Zang rz...@apache.org Committed: Wed Jul 8 15:36:31 2015 -0700 -- ambari-web/app/routes/installer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/67ce8a38/ambari-web/app/routes/installer.js -- diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js index 97fbca0..6f36939 100644 --- a/ambari-web/app/routes/installer.js +++ b/ambari-web/app/routes/installer.js @@ -285,8 +285,6 @@ module.exports = Em.Route.extend(App.RouterRedirections, { controller.setDBProperty('serviceConfigGroups', null); controller.setDBProperty('recommendationsHostGroups', wizardStep6Controller.get('content.recommendationsHostGroups')); controller.setDBProperty('recommendationsConfigs', null); -controller.loadAdvancedConfigs(wizardStep7Controller); -wizardStep7Controller.set('isAdvancedConfigLoaded', false); router.transitionTo('step7'); } }); @@ -306,6 +304,8 @@ module.exports = Em.Route.extend(App.RouterRedirections, { controller.loadAllPriorSteps().done(function () { var wizardStep7Controller = router.get('wizardStep7Controller'); +controller.loadAdvancedConfigs(wizardStep7Controller); +wizardStep7Controller.set('isAdvancedConfigLoaded', false); wizardStep7Controller.set('wizardController', controller); controller.connectOutlet('wizardStep7', controller.get('content')); });
ambari git commit: AMBARI-12345. Warn the user to not assign Ranger Admin on host where load balancer is located when enabling Ranger Admin HA. (yusaku)
Repository: ambari Updated Branches: refs/heads/branch-2.1 fc0569be6 - 05a4358ea AMBARI-12345. Warn the user to not assign Ranger Admin on host where load balancer is located when enabling Ranger Admin HA. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05a4358e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05a4358e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05a4358e Branch: refs/heads/branch-2.1 Commit: 05a4358eadb477f507e92b6ca64d5b14e7328faf Parents: fc0569b Author: Yusaku Sako yus...@hortonworks.com Authored: Wed Jul 8 15:30:20 2015 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Wed Jul 8 15:58:40 2015 -0700 -- .../main/admin/highAvailability/rangerAdmin/step2_controller.js | 4 +++- ambari-web/app/messages.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/05a4358e/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js index 1922a98..adecda7 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js @@ -33,7 +33,9 @@ App.RAHighAvailabilityWizardStep2Controller = Em.Controller.extend(App.Blueprint mastersAddableInHA: ['RANGER_ADMIN'], - showInstalledMastersFirst: true + showInstalledMastersFirst: true, + + generalWarningMessages: [Em.I18n.t('admin.ra_highAvailability.wizard.step2.warning')] }); http://git-wip-us.apache.org/repos/asf/ambari/blob/05a4358e/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 8c667b0..2799156 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1272,11 +1272,13 @@ Em.I18n.translations = { 'Once enabled, you will be running a Standby Ranger Admin in addition to your Active Ranger Admin.br/' + 'This allows for an Active-Standby Ranger Admin configuration that automatically performs failover.br/br/' + 'bYou should plan a cluster maintenance window and prepare for cluster downtime when enabling Ranger Admin HA./bbr/br/' + - 'Please setup the load balancer and provide the URL to be used. Make sure that the load balancer is setup properly before proceeding.', + 'Please setup the load balancer and provide the URL to be used. Make sure that the load balancer is setup properly before proceeding.' + + 'br/br/div class=alertBe sure that Ranger Admin and load balancer are located on separate hosts./div', 'admin.ra_highAvailability.wizard.step1.load_balancer_url': 'URL to load balancer', 'admin.ra_highAvailability.wizard.step1.invalid_url': 'Must be valid URL', 'admin.ra_highAvailability.wizard.step2.header': 'Select Hosts', 'admin.ra_highAvailability.wizard.step2.body': 'Select a host or hosts that will be running the additional Ranger Admin components', + 'admin.ra_highAvailability.wizard.step2.warning': 'Be sure that load balancer located separately from Ranger Admin components.', 'admin.ra_highAvailability.wizard.step3.header': 'Review', 'admin.ra_highAvailability.wizard.step3.alert_message': 'bConfirm your host selections./b', 'admin.ra_highAvailability.wizard.step3.currentRA': 'Current Ranger Admin',
ambari git commit: AMBARI-12345. Warn the user to not assign Ranger Admin on host where load balancer is located when enabling Ranger Admin HA. (yusaku)
Repository: ambari Updated Branches: refs/heads/trunk 67ce8a385 - 15168d296 AMBARI-12345. Warn the user to not assign Ranger Admin on host where load balancer is located when enabling Ranger Admin HA. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/15168d29 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/15168d29 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/15168d29 Branch: refs/heads/trunk Commit: 15168d296d97229b24bb0f3b32a339f4986fbed2 Parents: 67ce8a3 Author: Yusaku Sako yus...@hortonworks.com Authored: Wed Jul 8 15:30:20 2015 -0700 Committer: Yusaku Sako yus...@hortonworks.com Committed: Wed Jul 8 15:58:19 2015 -0700 -- .../main/admin/highAvailability/rangerAdmin/step2_controller.js | 4 +++- ambari-web/app/messages.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/15168d29/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js index 1922a98..adecda7 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js @@ -33,7 +33,9 @@ App.RAHighAvailabilityWizardStep2Controller = Em.Controller.extend(App.Blueprint mastersAddableInHA: ['RANGER_ADMIN'], - showInstalledMastersFirst: true + showInstalledMastersFirst: true, + + generalWarningMessages: [Em.I18n.t('admin.ra_highAvailability.wizard.step2.warning')] }); http://git-wip-us.apache.org/repos/asf/ambari/blob/15168d29/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 88dbcaf..78222cc 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1273,11 +1273,13 @@ Em.I18n.translations = { 'Once enabled, you will be running a Standby Ranger Admin in addition to your Active Ranger Admin.br/' + 'This allows for an Active-Standby Ranger Admin configuration that automatically performs failover.br/br/' + 'bYou should plan a cluster maintenance window and prepare for cluster downtime when enabling Ranger Admin HA./bbr/br/' + - 'Please setup the load balancer and provide the URL to be used. Make sure that the load balancer is setup properly before proceeding.', + 'Please setup the load balancer and provide the URL to be used. Make sure that the load balancer is setup properly before proceeding.' + + 'br/br/div class=alertBe sure that Ranger Admin and load balancer are located on separate hosts./div', 'admin.ra_highAvailability.wizard.step1.load_balancer_url': 'URL to load balancer', 'admin.ra_highAvailability.wizard.step1.invalid_url': 'Must be valid URL', 'admin.ra_highAvailability.wizard.step2.header': 'Select Hosts', 'admin.ra_highAvailability.wizard.step2.body': 'Select a host or hosts that will be running the additional Ranger Admin components', + 'admin.ra_highAvailability.wizard.step2.warning': 'Be sure that load balancer located separately from Ranger Admin components.', 'admin.ra_highAvailability.wizard.step3.header': 'Review', 'admin.ra_highAvailability.wizard.step3.alert_message': 'bConfirm your host selections./b', 'admin.ra_highAvailability.wizard.step3.currentRA': 'Current Ranger Admin',
ambari git commit: AMBARI-12337. Kerberos: LDAP error updating and removing service principals in AD (rlevas)
Repository: ambari Updated Branches: refs/heads/branch-2.1 05a4358ea - c267b45bc AMBARI-12337. Kerberos: LDAP error updating and removing service principals in AD (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c267b45b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c267b45b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c267b45b Branch: refs/heads/branch-2.1 Commit: c267b45bc6ffadce7c3b49d06f3ea0bc50634ce6 Parents: 05a4358 Author: Robert Levas rle...@hortonworks.com Authored: Wed Jul 8 21:00:33 2015 -0400 Committer: Robert Levas rle...@hortonworks.com Committed: Wed Jul 8 21:00:33 2015 -0400 -- .../kerberos/ADKerberosOperationHandler.java| 22 +++- 1 file changed, 17 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c267b45b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java index 7f82cfd..33350c0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java @@ -33,6 +33,7 @@ import org.apache.velocity.exception.ResourceNotFoundException; import javax.naming.AuthenticationException; import javax.naming.CommunicationException; import javax.naming.Context; +import javax.naming.InvalidNameException; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.Attribute; @@ -71,11 +72,16 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { private String ldapUrl = null; /** - * A String containing the DN of the container to create new account in + * A String containing the DN of the container for managing Active Directory accounts */ private String principalContainerDn = null; /** + * The LdapName of the container for managing Active Directory accounts + */ + private LdapName principalContainerLdapName = null; + + /** * A String containing the Velocity template to use to generate the JSON structure declaring the * attributes to use to create new Active Directory accounts. * p/ @@ -147,6 +153,12 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { throw new KerberosLDAPContainerException(principalContainerDn not provided); } +try { + this.principalContainerLdapName = new LdapName(principalContainerDn); +} catch (InvalidNameException e) { + throw new KerberosLDAPContainerException(principalContainerDn is not a valid LDAP name, e); +} + setAdministratorCredentials(administratorCredentials); setDefaultRealm(realm); setKeyEncryptionTypes(translateEncryptionTypes(kerberosConfiguration.get(KERBEROS_ENV_ENCRYPTION_TYPES), \\s+)); @@ -302,7 +314,7 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { try { Rdn rdn = new Rdn(cn, cn); - LdapName name = new LdapName(principalContainerDn); + LdapName name = new LdapName(principalContainerLdapName.getRdns()); name.add(name.size(), rdn); ldapContext.createSubcontext(name, attributes); } catch (NamingException ne) { @@ -340,7 +352,7 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { if (dn != null) { ldapContext.modifyAttributes( -dn, +new LdapName(dn), new ModificationItem[]{ new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(unicodePwd, String.format(\%s\, password).getBytes(UTF-16LE))) } @@ -381,7 +393,7 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { String dn = findPrincipalDN(deconstructPrincipal.getNormalizedPrincipal()); if (dn != null) { -ldapContext.destroySubcontext(dn); +ldapContext.destroySubcontext(new LdapName(dn)); } } catch (NamingException e) { throw new KerberosOperationException(String.format(Can not remove principal %s: %s, principal, e.getMessage()), e); @@ -545,7 +557,7 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { try { results = ldapContext.search( -principalContainerDn, +principalContainerLdapName, String.format((userPrincipalName=%s), normalizedPrincipal),
ambari git commit: AMBARI-12337. Kerberos: LDAP error updating and removing service principals in AD (rlevas)
Repository: ambari Updated Branches: refs/heads/trunk 15168d296 - 126114a96 AMBARI-12337. Kerberos: LDAP error updating and removing service principals in AD (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/126114a9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/126114a9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/126114a9 Branch: refs/heads/trunk Commit: 126114a96ff5b29a169c73ea2541ba3259b4a965 Parents: 15168d2 Author: Robert Levas rle...@hortonworks.com Authored: Wed Jul 8 20:59:35 2015 -0400 Committer: Robert Levas rle...@hortonworks.com Committed: Wed Jul 8 20:59:35 2015 -0400 -- .../kerberos/ADKerberosOperationHandler.java| 22 +++- 1 file changed, 17 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/126114a9/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java index 7f82cfd..33350c0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java @@ -33,6 +33,7 @@ import org.apache.velocity.exception.ResourceNotFoundException; import javax.naming.AuthenticationException; import javax.naming.CommunicationException; import javax.naming.Context; +import javax.naming.InvalidNameException; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.Attribute; @@ -71,11 +72,16 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { private String ldapUrl = null; /** - * A String containing the DN of the container to create new account in + * A String containing the DN of the container for managing Active Directory accounts */ private String principalContainerDn = null; /** + * The LdapName of the container for managing Active Directory accounts + */ + private LdapName principalContainerLdapName = null; + + /** * A String containing the Velocity template to use to generate the JSON structure declaring the * attributes to use to create new Active Directory accounts. * p/ @@ -147,6 +153,12 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { throw new KerberosLDAPContainerException(principalContainerDn not provided); } +try { + this.principalContainerLdapName = new LdapName(principalContainerDn); +} catch (InvalidNameException e) { + throw new KerberosLDAPContainerException(principalContainerDn is not a valid LDAP name, e); +} + setAdministratorCredentials(administratorCredentials); setDefaultRealm(realm); setKeyEncryptionTypes(translateEncryptionTypes(kerberosConfiguration.get(KERBEROS_ENV_ENCRYPTION_TYPES), \\s+)); @@ -302,7 +314,7 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { try { Rdn rdn = new Rdn(cn, cn); - LdapName name = new LdapName(principalContainerDn); + LdapName name = new LdapName(principalContainerLdapName.getRdns()); name.add(name.size(), rdn); ldapContext.createSubcontext(name, attributes); } catch (NamingException ne) { @@ -340,7 +352,7 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { if (dn != null) { ldapContext.modifyAttributes( -dn, +new LdapName(dn), new ModificationItem[]{ new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(unicodePwd, String.format(\%s\, password).getBytes(UTF-16LE))) } @@ -381,7 +393,7 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { String dn = findPrincipalDN(deconstructPrincipal.getNormalizedPrincipal()); if (dn != null) { -ldapContext.destroySubcontext(dn); +ldapContext.destroySubcontext(new LdapName(dn)); } } catch (NamingException e) { throw new KerberosOperationException(String.format(Can not remove principal %s: %s, principal, e.getMessage()), e); @@ -545,7 +557,7 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler { try { results = ldapContext.search( -principalContainerDn, +principalContainerLdapName, String.format((userPrincipalName=%s), normalizedPrincipal),
ambari git commit: AMBARI-10743. Falcon process submission fails due to expression language missing function called currentWeek (alejandro)
Repository: ambari Updated Branches: refs/heads/branch-2.1 6b40fdccf - b597313ca AMBARI-10743. Falcon process submission fails due to expression language missing function called currentWeek (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b597313c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b597313c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b597313c Branch: refs/heads/branch-2.1 Commit: b597313ca4cb50fe71c7de0bf35cf794b51b1ea8 Parents: 6b40fdc Author: Alejandro Fernandez afernan...@hortonworks.com Authored: Wed Jul 8 13:56:00 2015 -0700 Committer: Alejandro Fernandez afernan...@hortonworks.com Committed: Wed Jul 8 13:56:00 2015 -0700 -- .../FALCON/configuration/oozie-site.xml | 176 +++ .../FALCON/configuration/oozie-site.xml | 173 ++ 2 files changed, 349 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b597313c/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml new file mode 100644 index 000..c6962f3 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml @@ -0,0 +1,176 @@ +?xml version=1.0? +!-- + 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. +-- + +configuration supports_final=true + property + nameoozie.service.ELService.ext.functions.coord-job-submit-instances/name +value + now=org.apache.oozie.extensions.OozieELExtensions#ph1_now_echo, + today=org.apache.oozie.extensions.OozieELExtensions#ph1_today_echo, + yesterday=org.apache.oozie.extensions.OozieELExtensions#ph1_yesterday_echo, + currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_currentMonth_echo, + lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_lastMonth_echo, + currentYear=org.apache.oozie.extensions.OozieELExtensions#ph1_currentYear_echo, + lastYear=org.apache.oozie.extensions.OozieELExtensions#ph1_lastYear_echo, + formatTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_formatTime_echo, + latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo, + future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo +/value +description + EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD. + This property is a convenience property to add extensions to the built in executors without having to + include all the built in ones. +/description + /property + + property +nameoozie.service.ELService.ext.functions.coord-action-create-inst/name +value + now=org.apache.oozie.extensions.OozieELExtensions#ph2_now_inst, + today=org.apache.oozie.extensions.OozieELExtensions#ph2_today_inst, + yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday_inst, + currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth_inst, + lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth_inst, + currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear_inst, + lastYear=org.apache.oozie.extensions.OozieELExtensions#ph2_lastYear_inst, + latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo, + future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo, + formatTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_formatTime, + user=org.apache.oozie.coord.CoordELFunctions#coord_user +/value +description + EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD. + This property is a convenience property to add extensions to the built in executors without having to + include all
ambari git commit: AMBARI-12342 - Rack Awareness : topology_script.py is not available on HMaster machine (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 3344bb805 - 494f954d6 AMBARI-12342 - Rack Awareness : topology_script.py is not available on HMaster machine (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/494f954d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/494f954d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/494f954d Branch: refs/heads/branch-2.1 Commit: 494f954d6e9ab9d58167926d448460a4bded2cfe Parents: 3344bb8 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Wed Jul 8 17:22:42 2015 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Wed Jul 8 17:24:24 2015 -0400 -- .../stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py | 3 +-- .../src/test/python/stacks/2.0.6/configs/secured.json | 10 +- .../stacks/2.0.6/hooks/before-START/test_before_start.py | 9 + 3 files changed, 19 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/494f954d/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py index a3fdef9..f21e4b1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py @@ -33,8 +33,7 @@ class BeforeStartHook(Hook): setup_hadoop() setup_configs() create_javahome_symlink() -if params.refresh_topology : - create_topology_script_and_mapping() +create_topology_script_and_mapping() if __name__ == __main__: BeforeStartHook().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/494f954d/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json index 5da1679..c9e20e2 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json @@ -944,7 +944,15 @@ all_hosts: [ c6401.ambari.apache.org, c6402.ambari.apache.org -], +], +all_racks: [ +/default/rack_01, +/default/rack_02 +], +all_ipv4_ips: [ +127.0.0.1, +127.0.0.1 +], storm_ui_server_hosts: [ c6401.ambari.apache.org ], http://git-wip-us.apache.org/repos/asf/ambari/blob/494f954d/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py index 0895b7e..df39d2f 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py @@ -158,6 +158,15 @@ class TestHookBeforeStart(RMFTestCase): owner = 'hdfs', group = 'hadoop', ) +self.assertResourceCalled('File', '/etc/hadoop/conf/topology_mappings.data', + owner = 'hdfs', + content = Template('topology_mappings.data.j2'), + group = 'hadoop', + ) +self.assertResourceCalled('File', '/etc/hadoop/conf/topology_script.py', + content = StaticFile('topology_script.py'), + mode = 0755, + ) self.assertNoMoreResources() def test_hook_default_hdfs(self):