[ambari] branch branch-2.7 updated: AMBARI-25395. Update help text in Hive install provide a clearly formatted example

2019-10-16 Thread alexantonenko
This is an automated email from the ASF dual-hosted git repository.

alexantonenko pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
 new 88b774a  AMBARI-25395. Update help text in Hive install provide a 
clearly formatted example
 new f115e11  Merge pull request #3100 from hiveww/AMBARI-25395-branch-2.7
88b774a is described below

commit 88b774aabca9abdfe847fce39fcd05b689011df5
Author: Alex Antonenko 
AuthorDate: Wed Oct 16 13:20:40 2019 +0300

AMBARI-25395. Update help text in Hive install provide a clearly formatted 
example
---
 ambari-web/app/data/db_properties_info.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ambari-web/app/data/db_properties_info.js 
b/ambari-web/app/data/db_properties_info.js
index 02753af..29589f3 100644
--- a/ambari-web/app/data/db_properties_info.js
+++ b/ambari-web/app/data/db_properties_info.js
@@ -66,7 +66,7 @@ module.exports = {
   'HIVE': {
 'connection_url': 'jdbc:mysql://{0}/{1}?createDatabaseIfNotExist=true'
   },
-  'driver': 'com.mysql.jdbc.Driver',
+  'driver': 'mysql-connector-java.jar',
   'sql_jar_connector': '/usr/share/java/mysql-connector-java.jar',
   'db_type': 'mysql',
   'db_name': 'MySQL',



[ambari] branch branch-2.7 updated (49827cc -> ad99d91)

2019-10-16 Thread akovalenko
This is an automated email from the ASF dual-hosted git repository.

akovalenko pushed a change to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git.


from 49827cc  AMBARI-25156. /var/log/messages gets filled with unhandled 
Python exception for client modules in ambari-agent  (aonishuk)
 add ad99d91  AMBARI-25396 cross-site scripting vulnerability on Ambari 
hosts

No new revisions were added by this update.

Summary of changes:
 ambari-web/app/views/wizard/step2_view.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[ambari] branch branch-2.7 updated (ee5a90c -> 49827cc)

2019-10-16 Thread aonishuk
This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a change to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git.


from ee5a90c  AMBARI-25327 : Prevent NPE for bindNotificationDispatchers 
and getServiceConfigVersionRequest(backport to branch-2.7) (#3038)
 add 49827cc  AMBARI-25156. /var/log/messages gets filled with unhandled 
Python exception for client modules in ambari-agent  (aonishuk)

No new revisions were added by this update.

Summary of changes:
 .../src/main/python/resource_management/libraries/script/script.py| 4 
 1 file changed, 4 insertions(+)



[ambari] branch trunk updated: AMBARI-25327 : Prevent NPE for bindNotificationDispatchers and getServiceConfigVersionRequest (#3037)

2019-10-16 Thread asnaik
This is an automated email from the ASF dual-hosted git repository.

asnaik pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new f6aec32  AMBARI-25327 : Prevent NPE for bindNotificationDispatchers 
and getServiceConfigVersionRequest (#3037)
f6aec32 is described below

commit f6aec3286da30d42c7faef2e84e88b968bcdf040
Author: Viraj Jasani 
AuthorDate: Wed Oct 16 13:05:11 2019 +0530

AMBARI-25327 : Prevent NPE for bindNotificationDispatchers and 
getServiceConfigVersionRequest (#3037)

* AMBARI-25327 : Prevent NPE for bindNotificationDispatchers and 
getServiceConfigVersionRequest

* minor change

* logging null classname instance
---
 .../ambari/server/controller/ControllerModule.java | 41 --
 .../internal/ClusterResourceProvider.java  | 24 +
 2 files changed, 40 insertions(+), 25 deletions(-)

diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
index 114d671..f587c47 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
@@ -666,25 +666,30 @@ public class ControllerModule extends AbstractModule {
 // the dispatch factory
 for (BeanDefinition beanDefinition : beanDefinitions) {
   String className = beanDefinition.getBeanClassName();
-  Class clazz = ClassUtils.resolveClassName(className,
-  ClassUtils.getDefaultClassLoader());
-
-  try {
-NotificationDispatcher dispatcher;
-if (clazz.equals(AmbariSNMPDispatcher.class)) {
-  dispatcher = (NotificationDispatcher) 
clazz.getConstructor(Integer.class).newInstance(configuration.getAmbariSNMPUdpBindPort());
-} else if (clazz.equals(SNMPDispatcher.class)) {
-  dispatcher = (NotificationDispatcher) 
clazz.getConstructor(Integer.class).newInstance(configuration.getSNMPUdpBindPort());
-} else {
-  dispatcher = (NotificationDispatcher) clazz.newInstance();
+  if (className != null) {
+Class clazz = ClassUtils.resolveClassName(className,
+ClassUtils.getDefaultClassLoader());
+try {
+  NotificationDispatcher dispatcher;
+  if (clazz.equals(AmbariSNMPDispatcher.class)) {
+dispatcher = (NotificationDispatcher) 
clazz.getConstructor(Integer.class)
+.newInstance(configuration.getAmbariSNMPUdpBindPort());
+  } else if (clazz.equals(SNMPDispatcher.class)) {
+dispatcher = (NotificationDispatcher) 
clazz.getConstructor(Integer.class)
+.newInstance(configuration.getSNMPUdpBindPort());
+  } else {
+dispatcher = (NotificationDispatcher) clazz.newInstance();
+  }
+  dispatchFactory.register(dispatcher.getType(), dispatcher);
+  bind((Class) clazz).toInstance(dispatcher);
+  LOG.info("Binding and registering notification dispatcher {}", 
clazz);
+} catch (Exception exception) {
+  LOG.error("Unable to bind and register notification dispatcher {}",
+  clazz, exception);
 }
-dispatchFactory.register(dispatcher.getType(), dispatcher);
-bind((Class) clazz).toInstance(dispatcher);
-
-LOG.info("Binding and registering notification dispatcher {}", clazz);
-  } catch (Exception exception) {
-LOG.error("Unable to bind and register notification dispatcher {}",
-clazz, exception);
+  } else {
+LOG.error("Binding and registering notification dispatcher is not 
possible for" +
+" beanDefinition: {} in the absence of className", beanDefinition);
   }
 }
 
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
index 18ed30a..1c62f9c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
@@ -466,16 +466,26 @@ public class ClusterResourceProvider extends 
AbstractControllerResourceProvider
   String absCategory = PropertyHelper.getPropertyCategory(entry.getKey());
   String propName = PropertyHelper.getPropertyName(entry.getKey());
 
-  if (absCategory.startsWith(parentCategory + 
"/desired_service_config_version")) {
+  if (absCategory != null &&
+  absCategory.startsWith(parentCategory + 
"/desired_service_config_version")) {
 serviceConfigVersionRequest =
 (serviceConfigVersionRequest ==null