[44/50] [abbrv] ambari git commit: AMBARI-22445. Warn the user appropriately for default MySQL server install for Hive (vsubramanian)

2017-11-16 Thread amagyar
AMBARI-22445. Warn the user appropriately for default MySQL server install for 
Hive (vsubramanian)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7c6ca645
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7c6ca645
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7c6ca645

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 7c6ca645bc594319f2393dd48c5a5a315ca46d3a
Parents: e9155b3
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 15 14:28:22 2017 -0800
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:31 2017 +0100

--
 ambari-web/app/views/common/controls_view.js   | 9 +++--
 ambari-web/test/views/common/controls_view_test.js | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7c6ca645/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index 530b60a..63d08ce 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -543,8 +543,8 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
 if ((App.get('isHadoopWindowsStack') && this.get('inMSSQLWithIA')) || 
this.get('serviceConfig.name') === 'DB_FLAVOR') {
   this.onOptionsChange();
 }
-this.handleDBConnectionProperty();
   }
+  this.handleDBConnectionProperty();
 }
   },
 
@@ -748,6 +748,11 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
   // check for all db types when installing Ranger - not only for existing 
ones
   checkDatabase = true;
 }
+// Hive specific
+if (this.get('serviceConfig.serviceName') === 'HIVE') {
+  // check for all db types when installing Hive - not only for existing 
ones
+  checkDatabase = true;
+}
 if (propertyAppendTo1) {
   propertyAppendTo1.set('additionalView', null);
 }
@@ -757,7 +762,7 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
 var shouldAdditionalViewsBeSet = currentDB && checkDatabase && 
handledProperties.contains(this.get('serviceConfig.name')),
   driver = this.getDefaultPropertyValue('sql_jar_connector') ? 
this.getDefaultPropertyValue('sql_jar_connector').split("/").pop() : 
'driver.jar',
   dbType = this.getDefaultPropertyValue('db_type'),
-  additionalView1 = shouldAdditionalViewsBeSet ? 
App.CheckDBConnectionView.extend({databaseName: dbType}) : null,
+  additionalView1 = shouldAdditionalViewsBeSet && !this.get('isNewDb') ? 
App.CheckDBConnectionView.extend({databaseName: dbType}) : null,
   additionalView2 = shouldAdditionalViewsBeSet ? Ember.View.extend({
 template: Ember.Handlebars.compile('{{{view.message}}}'),
 message: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7c6ca645/ambari-web/test/views/common/controls_view_test.js
--
diff --git a/ambari-web/test/views/common/controls_view_test.js 
b/ambari-web/test/views/common/controls_view_test.js
index 17dd6e1..76742fa 100644
--- a/ambari-web/test/views/common/controls_view_test.js
+++ b/ambari-web/test/views/common/controls_view_test.js
@@ -59,7 +59,7 @@ describe('App.ServiceConfigRadioButtons', function () {
   propertyAppendTo1: 'javax.jdo.option.ConnectionURL',
   propertyAppendTo2: 'hive_database',
   isAdditionalView1Null: true,
-  isAdditionalView2Null: true,
+  isAdditionalView2Null: false,
   title: 'Hive, embedded database'
 },
 {



[31/50] [abbrv] ambari git commit: AMBARI-22347. Simplify Ambari configuration tables from AMBARI-21307 (rlevas)

2017-11-16 Thread amagyar
AMBARI-22347.  Simplify Ambari configuration tables from AMBARI-21307 (rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a631d0ed
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a631d0ed
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a631d0ed

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: a631d0edb35522f0b638e7acfc1ae8fd86d1db60
Parents: c6f796c
Author: Robert Levas 
Authored: Mon Nov 13 13:11:42 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:29 2017 +0100

--
 .../AmbariConfigurationRequestSwagger.java  |  14 +-
 .../services/AmbariConfigurationService.java|  46 +-
 .../api/services/ldap/AmbariConfiguration.java  |  51 +--
 .../services/ldap/LdapConfigurationService.java |   4 +-
 .../AmbariConfigurationResourceProvider.java| 370 +++-
 .../events/AmbariConfigurationChangedEvent.java |  36 ++
 .../ambari/server/events/AmbariEvent.java   |   4 +-
 .../events/AmbariLdapConfigChangedEvent.java|  37 --
 .../ldap/domain/AmbariLdapConfiguration.java|  20 +-
 .../AmbariLdapConfigurationProvider.java|  57 ++-
 .../ads/LdapConnectionTemplateFactory.java  |   4 +-
 .../server/orm/dao/AmbariConfigurationDAO.java  | 146 --
 .../orm/entities/AmbariConfigurationEntity.java |  94 ++--
 .../entities/AmbariConfigurationEntityPK.java   |  88 
 .../orm/entities/ConfigurationBaseEntity.java   | 159 ---
 .../server/upgrade/SchemaUpgradeHelper.java |   3 +-
 .../server/upgrade/UpgradeCatalog300.java   |  21 +-
 .../main/resources/Ambari-DDL-Derby-CREATE.sql  |  21 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |  20 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |  20 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql|  19 +-
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |  20 +-
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |  19 +-
 .../src/main/resources/META-INF/persistence.xml |   1 -
 ...AmbariConfigurationResourceProviderTest.java | 444 ---
 .../orm/dao/AmbariConfigurationDAOTest.java | 298 +
 .../server/upgrade/UpgradeCatalog300Test.java   |  43 ++
 27 files changed, 1223 insertions(+), 836 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a631d0ed/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
index 5e8094e..2dca9f5 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
@@ -29,19 +29,9 @@ public interface AmbariConfigurationRequestSwagger extends 
ApiModel {
 
   interface AmbariConfigurationRequestInfo {
 @ApiModelProperty
-Long getId();
+String getCategoryName();
 
 @ApiModelProperty
-Map getData();
-
-@ApiModelProperty
-String getType();
-
-@ApiModelProperty
-Long getVersion();
-
-@ApiModelProperty(name = "version_tag")
-String getVersionTag();
+Map getProperties();
   }
-
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a631d0ed/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
index 38ae766..86ed666 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
@@ -46,21 +46,21 @@ import io.swagger.annotations.ApiResponses;
  * Ambari configuration resources may be shared with components and services 
in the cluster
  * (by recommending them as default values)
  *
- * Eg. LDAP configuration is stored as ambariconfiguration.
+ * Eg. LDAP configuration is stored as AmbariConfiguration.
  * The request payload has the form:
  *
  * 
  *  {
  *"AmbariConfiguration": {
- *"type": "ldap-configuration",
- *"data": [
- *{
- * "authentication.ldap.primaryUrl": "localhost:33389"
- * 

[29/50] [abbrv] ambari git commit: AMBARI-22390. Implement many-to-many relation between keytabs and principals (echekanskiy)

2017-11-16 Thread amagyar
AMBARI-22390. Implement many-to-many relation between keytabs and principals 
(echekanskiy)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c6f796cd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c6f796cd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c6f796cd

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: c6f796cd50531cbd16e1c1eff896b463d5133482
Parents: 55915e8
Author: Eugene Chekanskiy 
Authored: Mon Nov 13 17:01:16 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:29 2017 +0100

--
 .../server/controller/KerberosHelperImpl.java   | 59 ++--
 .../AbstractPrepareKerberosServerAction.java| 23 +++-
 .../kerberos/CreatePrincipalsServerAction.java  |  6 +-
 .../kerberos/KerberosServerAction.java  | 21 +++
 .../stageutils/ResolvedKerberosKeytab.java  | 16 +++---
 5 files changed, 82 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c6f796cd/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index f913831..474c335 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -1546,19 +1546,21 @@ public class KerberosHelperImpl implements 
KerberosHelper {
 keytabFileOwnerAccess,
 keytabFileGroupName,
 keytabFileGroupAccess,
-Sets.newHashSet(Pair.of(hostId, evaluatedPrincipal)),
+Sets.newHashSet(Pair.of(hostId, Pair.of(evaluatedPrincipal, 
principalType))),
 serviceName.equalsIgnoreCase("AMBARI"),
 componentName.equalsIgnoreCase("AMBARI_SERVER_SELF")
 );
 if (resolvedKeytabs.containsKey(keytabFilePath)) {
   ResolvedKerberosKeytab sameKeytab = 
resolvedKeytabs.get(keytabFilePath);
   // validating owner and group
-  String warnTemplate = "Keytab '{}' on host '{}' have different 
{}, originally set to '{}' and '{}:{}' has '{}', using '{}'";
+  boolean differentOwners = false;
+  String warnTemplate = "Keytab '{}' on host '{}' has different 
{}, originally set to '{}' and '{}:{}' has '{}', using '{}'";
   if 
(!resolvedKeytab.getOwnerName().equals(sameKeytab.getOwnerName())) {
 LOG.warn(warnTemplate,
 keytabFilePath, hostname, "owners", 
sameKeytab.getOwnerName(),
 serviceName, componentName, resolvedKeytab.getOwnerName(),
 sameKeytab.getOwnerName());
+differentOwners = true;
   }
   if 
(!resolvedKeytab.getOwnerAccess().equals(sameKeytab.getOwnerAccess())) {
 LOG.warn(warnTemplate,
@@ -1570,16 +1572,39 @@ public class KerberosHelperImpl implements 
KerberosHelper {
   // TODO with different owners, so make sure that keytabs are 
accessible through group acls
   // TODO this includes same group name and group 'r' mode
   if 
(!resolvedKeytab.getGroupName().equals(sameKeytab.getGroupName())) {
-LOG.warn(warnTemplate,
-keytabFilePath, hostname, "groups", 
sameKeytab.getGroupName(),
-serviceName, componentName, resolvedKeytab.getGroupName(),
-sameKeytab.getGroupName());
+if(differentOwners) {
+  LOG.error(warnTemplate,
+  keytabFilePath, hostname, "groups", 
sameKeytab.getGroupName(),
+  serviceName, componentName, 
resolvedKeytab.getGroupName(),
+  sameKeytab.getGroupName());
+} else {
+  LOG.warn(warnTemplate,
+  keytabFilePath, hostname, "groups", 
sameKeytab.getGroupName(),
+  serviceName, componentName, 
resolvedKeytab.getGroupName(),
+  sameKeytab.getGroupName());
+}
   }
   if 
(!resolvedKeytab.getGroupAccess().equals(sameKeytab.getGroupAccess())) {
-LOG.warn(warnTemplate,
-keytabFilePath, hostname, "group access", 
sameKeytab.getGroupAccess(),
-serviceName, componentName, 
resolvedKeytab.getGroupAccess(),
-sameKeytab.getGroupAccess());
+

[40/50] [abbrv] ambari git commit: AMBARI-22448. Oozie Jobs on Hive Fail With Missing Tarball (ncole)

2017-11-16 Thread amagyar
AMBARI-22448. Oozie Jobs on Hive Fail With Missing Tarball (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f122ab73
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f122ab73
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f122ab73

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: f122ab735d184b5954cfee1462ddd1985cbddae6
Parents: ae3b727
Author: Nate Cole 
Authored: Wed Nov 15 12:52:50 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:31 2017 +0100

--
 .../resources/stacks/HDP/2.0.6/properties/stack_packages.json  | 3 ++-
 .../resources/stacks/HDP/3.0/properties/stack_packages.json| 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f122ab73/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
index 68e6bf8..245449c 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
@@ -1278,7 +1278,8 @@
 },
 "upgrade-dependencies" : {
   "HIVE": ["TEZ"],
-  "MAHOUT": ["MAPREDUCE2"]
+  "MAHOUT": ["MAPREDUCE2"],
+  "OOZIE": ["MAPREDUCE2"]
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f122ab73/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
 
b/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
index d8cd015..5603c0c 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
@@ -1154,9 +1154,9 @@
   }
 },
 "upgrade-dependencies" : {
-  "YARN": ["TEZ"],
-  "TEZ": ["YARN"],
-  "MAHOUT": ["MAPREDUCE2"]
+  "HIVE": ["TEZ"],
+  "MAHOUT": ["MAPREDUCE2"],
+  "OOZIE": ["MAPREDUCE2"]
 }
   }
 }



[45/50] [abbrv] ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (jonathanhurley)

2017-11-16 Thread amagyar
AMBARI-22444 - Add Native Libraries To Tez Tarball (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e9155b30
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e9155b30
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e9155b30

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: e9155b309c4ff165987926f3d186ce84c0fcd19a
Parents: f122ab7
Author: Jonathan Hurley 
Authored: Tue Nov 14 16:19:30 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:31 2017 +0100

--
 .../libraries/functions/copy_tarball.py | 82 +---
 .../libraries/functions/tar_archive.py  |  6 +-
 .../stacks/2.1/FALCON/test_falcon_server.py |  6 +-
 3 files changed, 80 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e9155b30/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 219430a..f62aa3d 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -23,18 +23,74 @@ __all__ = ["copy_to_hdfs", 
"get_sysprep_skip_copy_tarballs_hdfs"]
 import os
 import tempfile
 import re
+import tarfile
+from contextlib import closing
 
 from resource_management.libraries.script.script import Script
 from resource_management.libraries.resources.hdfs_resource import HdfsResource
 from resource_management.libraries.functions.default import default
 from resource_management.core import shell
+from resource_management.core import sudo
 from resource_management.core.logger import Logger
+from resource_management.core.exceptions import Fail
+from resource_management.core.resources.system import Execute
 from resource_management.libraries.functions import stack_tools, 
stack_features, stack_select
+from resource_management.libraries.functions import tar_archive
 
 STACK_NAME_PATTERN = "{{ stack_name }}"
 STACK_ROOT_PATTERN = "{{ stack_root }}"
 STACK_VERSION_PATTERN = "{{ stack_version }}"
 
+def _prepare_tez_tarball():
+  """
+  Prepares the Tez tarball by adding the Hadoop native libraries found in the 
mapreduce tarball.
+  :return:  the full path of the newly created tez tarball to use
+  """
+  import tempfile
+
+  Logger.info("Preparing the Tez tarball...")
+
+  # get the mapreduce tarball which matches the version of tez
+  # tez installs the mapreduce tar, so it should always be present
+  _, mapreduce_source_file, _, _ = get_tarball_paths("mapreduce")
+  _, tez_source_file, _, _ = get_tarball_paths("tez")
+
+  temp_dir = Script.get_tmp_dir()
+
+  mapreduce_temp_dir = tempfile.mkdtemp(prefix="mapreduce-tarball-", 
dir=temp_dir)
+  tez_temp_dir = tempfile.mkdtemp(prefix="tez-tarball-", dir=temp_dir)
+
+  Logger.info("Extracting {0} to {1}".format(mapreduce_source_file, 
mapreduce_temp_dir))
+  tar_archive.extract_archive(mapreduce_source_file, mapreduce_temp_dir)
+
+  Logger.info("Extracting {0} to {1}".format(tez_source_file, tez_temp_dir))
+  tar_archive.untar_archive(tez_source_file, tez_temp_dir)
+
+  hadoop_lib_native_dir = os.path.join(mapreduce_temp_dir, "hadoop", "lib", 
"native")
+  tez_lib_dir = os.path.join(tez_temp_dir, "lib")
+
+  if not os.path.exists(hadoop_lib_native_dir):
+raise Fail("Unable to seed the Tez tarball with native libraries since the 
source Hadoop native lib directory {0} does not 
exist".format(hadoop_lib_native_dir))
+
+  if not os.path.exists(tez_lib_dir):
+raise Fail("Unable to seed the Tez tarball with native libraries since the 
target Tez lib directory {0} does not exist".format(tez_lib_dir))
+
+  Execute(("cp", "-a", hadoop_lib_native_dir, tez_lib_dir), sudo = True)
+
+  tez_tarball_with_native_lib = os.path.join(os.path.dirname(tez_source_file), 
"tez-native.tar.gz")
+  Logger.info("Creating a new Tez tarball at 
{0}".format(tez_tarball_with_native_lib))
+
+  # tar up Tez, making sure to specify nothing for the arcname so that it does 
not include an absolute path
+  with closing(tarfile.open(tez_tarball_with_native_lib, "w:gz")) as 
new_tez_tarball:
+new_tez_tarball.add(tez_temp_dir, arcname=os.path.sep)
+
+  # cleanup
+  sudo.rmtree(mapreduce_temp_dir)
+  sudo.rmtree(tez_temp_dir)
+
+  return tez_tarball_with_native_lib
+
+
 # TODO, in the future, each stack can define its own mapping of tarballs
 # inside the stack definition directory in some sort of xml file.
 # PLEASE DO NOT put this in cluster-env 

[43/50] [abbrv] ambari git commit: AMBARI-22418. Make Ambari configuration API consistent with existing API. (rlevas)

2017-11-16 Thread amagyar
AMBARI-22418.  Make Ambari configuration API consistent with existing API. 
(rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae3b727a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae3b727a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae3b727a

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: ae3b727a7aebd00eeacd687f7f7a6df9ab8203af
Parents: d987aee
Author: Robert Levas 
Authored: Wed Nov 15 12:11:34 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:31 2017 +0100

--
 .../resources/ResourceInstanceFactoryImpl.java  |   9 +-
 .../RootServiceComponentResourceDefinition.java |   9 +-
 .../AmbariConfigurationRequestSwagger.java  |  37 --
 .../AmbariConfigurationResponseSwagger.java |  40 --
 .../services/AmbariConfigurationService.java| 193 
 .../server/api/services/AmbariMetaInfo.java |   4 +-
 ...iceComponentConfigurationRequestSwagger.java |  43 ++
 ...ceComponentConfigurationResponseSwagger.java |  43 ++
 ...ootServiceComponentConfigurationService.java | 226 +
 .../server/api/services/RootServiceService.java |   7 +
 .../api/services/ldap/AmbariConfiguration.java  |   6 +-
 .../services/ldap/LdapConfigurationRequest.java |   2 +-
 .../services/ldap/LdapConfigurationService.java |   6 +-
 .../commands/StackAdvisorCommand.java   |  62 ++-
 .../server/controller/ControllerModule.java |   4 +-
 .../controller/MaintenanceStateHelper.java  |   3 +-
 .../controller/ResourceProviderFactory.java |   4 +-
 .../ambari/server/controller/RootComponent.java |  27 ++
 .../ambari/server/controller/RootService.java   |  36 ++
 .../controller/RootServiceResponseFactory.java  |  44 +-
 .../AbstractControllerResourceProvider.java |   4 +-
 .../AmbariConfigurationResourceProvider.java| 302 
 ...eComponentConfigurationResourceProvider.java | 476 +++
 .../RootServiceComponentPropertyProvider.java   |   4 +-
 .../RootServiceComponentResourceProvider.java   |   4 +-
 .../ambari/server/controller/spi/Resource.java  |   6 +-
 .../listeners/alerts/AlertReceivedListener.java |  10 +-
 .../alerts/AlertStateChangedListener.java   |   6 +-
 .../ldap/domain/AmbariLdapConfiguration.java|   6 +-
 .../domain/AmbariLdapConfigurationFactory.java  |   2 +-
 .../AmbariLdapConfigurationProvider.java|   6 +-
 .../metadata/AmbariServiceAlertDefinitions.java |  20 +-
 .../server/orm/dao/AlertDefinitionDAO.java  |   7 +-
 .../ambari/server/orm/dao/AlertDispatchDAO.java |   4 +-
 .../server/state/alert/AlertDefinitionHash.java |   8 +-
 .../server/state/cluster/ClusterImpl.java   |   4 +-
 .../services/AmbariServerAlertService.java  |   4 +-
 .../commands/StackAdvisorCommandTest.java   |   8 +-
 .../AmbariManagementControllerTest.java |  16 +-
 .../RootServiceResponseFactoryTest.java |  27 +-
 ...AmbariConfigurationResourceProviderTest.java | 377 ---
 ...ponentConfigurationResourceProviderTest.java | 393 +++
 ...ootServiceComponentPropertyProviderTest.java |  15 +-
 ...ootServiceComponentResourceProviderTest.java |   9 +-
 .../server/ldap/LdapModuleFunctionalTest.java   |   4 +-
 .../TestAmbariLdapConfigurationFactory.java |   2 +-
 .../ldap/service/AmbariLdapFacadeTest.java  |   4 +-
 ...efaultLdapAttributeDetectionServiceTest.java |   8 +-
 .../DefaultLdapConfigurationServiceTest.java|  12 +-
 .../metadata/AgentAlertDefinitionsTest.java |   6 +-
 .../server/orm/dao/AlertDefinitionDAOTest.java  |   7 +-
 .../state/alerts/AlertReceivedListenerTest.java |  16 +-
 .../alerts/AlertStateChangedEventTest.java  |   4 +-
 53 files changed, 1444 insertions(+), 1142 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ae3b727a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
index f5fb6e9..fecaedc 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
@@ -237,6 +237,11 @@ public class ResourceInstanceFactoryImpl implements 
ResourceInstanceFactory {
 resourceDefinition = new RootServiceComponentResourceDefinition();
 break;
 
+  case RootServiceComponentConfiguration:
+resourceDefinition = new 

[23/50] [abbrv] ambari git commit: AMBARI-22416 Log Search UI: fixes for filtering form. (ababiichuk)

2017-11-16 Thread amagyar
http://git-wip-us.apache.org/repos/asf/ambari/blob/ebc627a2/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
deleted file mode 100644
index 2b3e326..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
+++ /dev/null
@@ -1,97 +0,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.
- */
-
-import {TestBed, inject} from '@angular/core/testing';
-import {StoreModule} from '@ngrx/store';
-import {AppSettingsService, appSettings} from 
'@app/services/storage/app-settings.service';
-import {AppStateService, appState} from 
'@app/services/storage/app-state.service';
-import {ClustersService, clusters} from 
'@app/services/storage/clusters.service';
-import {ComponentsService, components} from 
'@app/services/storage/components.service';
-import {HostsService, hosts} from '@app/services/storage/hosts.service';
-import {UtilsService} from '@app/services/utils.service';
-import {HttpClientService} from '@app/services/http-client.service';
-import {ListItem} from '@app/classes/list-item';
-import {Node} from '@app/classes/models/node';
-
-import {FilteringService} from './filtering.service';
-
-describe('FilteringService', () => {
-  beforeEach(() => {
-const httpClient = {
-  get: () => {
-return {
-  subscribe: () => {
-  }
-}
-  }
-};
-TestBed.configureTestingModule({
-  imports: [
-StoreModule.provideStore({
-  appSettings,
-  appState,
-  clusters,
-  components,
-  hosts
-})
-  ],
-  providers: [
-FilteringService,
-AppSettingsService,
-AppStateService,
-ClustersService,
-ComponentsService,
-HostsService,
-UtilsService,
-{
-  provide: HttpClientService,
-  useValue: httpClient
-}
-  ]
-});
-  });
-
-  it('should create service', inject([FilteringService], (service: 
FilteringService) => {
-expect(service).toBeTruthy();
-  }));
-
-  describe('#getListItemFromString()', () => {
-it('should convert string to ListItem', inject([FilteringService], 
(service: FilteringService) => {
-  const getListItemFromString: (name: string) => ListItem = 
service['getListItemFromString'];
-  expect(getListItemFromString('customName')).toEqual({
-label: 'customName',
-value: 'customName'
-  });
-}));
-  });
-
-  describe('#getListItemFromNode()', () => {
-it('should convert Node to ListItem', inject([FilteringService], (service: 
FilteringService) => {
-  const getListItemFromNode: (node: Node) => ListItem = 
service['getListItemFromNode'];
-  expect(getListItemFromNode({
-name: 'customName',
-value: '1',
-isParent: true,
-isRoot: true
-  })).toEqual({
-label: 'customName (1)',
-value: 'customName'
-  });
-}));
-  });
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/ebc627a2/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
deleted file mode 100644
index 85dc408..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
+++ /dev/null
@@ -1,253 +0,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
- 

[47/50] [abbrv] ambari git commit: AMBARI-22450. Log Search: reference Log Feeder IDE/maven dev setup in README.md (oleewere)

2017-11-16 Thread amagyar
AMBARI-22450. Log Search: reference Log Feeder IDE/maven dev setup in README.md 
(oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/28cf09d3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/28cf09d3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/28cf09d3

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 28cf09d38513384a19b7c3e7f0092bda71836d71
Parents: 5e0700b
Author: Oliver Szabo 
Authored: Wed Nov 15 12:54:25 2017 +0100
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:31 2017 +0100

--
 ambari-logsearch/README.md | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/28cf09d3/ambari-logsearch/README.md
--
diff --git a/ambari-logsearch/README.md b/ambari-logsearch/README.md
index 33952a2..2a124d1 100644
--- a/ambari-logsearch/README.md
+++ b/ambari-logsearch/README.md
@@ -34,6 +34,7 @@ In case if you started the containers separately and if you 
would like to access
 ### Run applications from IDE / maven
 
 - [Start Log Search locally](ambari-logsearch-server/README.md)
+- [Start Log Feeder locally](ambari-logsearch-logfeeder/README.md)
 
 ## Package build process
 



[06/50] [abbrv] ambari git commit: AMBARI-22361. Fix bug in base_alert when matching hostnames (stephanesan via dlysnichenko)

2017-11-16 Thread amagyar
AMBARI-22361. Fix bug in base_alert when matching hostnames (stephanesan via 
dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ca0e601a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ca0e601a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ca0e601a

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: ca0e601a9b9e930d01121ac580d2ecb2b6871676
Parents: 56033c9
Author: Lisnichenko Dmitro 
Authored: Wed Nov 8 13:28:03 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:25 2017 +0100

--
 ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ca0e601a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py 
b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py
index 05f8023..5c0305e 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py
@@ -463,7 +463,7 @@ class BaseAlert(object):
   # get the host for dfs.namenode.http-address.c1ha.nn1 and see if it's
   # this host
   value = self._get_configuration_value(key)
-  if value is not None and (self.host_name in value or 
self.public_host_name in value):
+  if value is not None and (self.host_name.lower() in value.lower() or 
self.public_host_name.lower() in value.lower()):
 return AlertUri(uri=value, is_ssl_enabled=is_ssl_enabled)
 
 return None



[22/50] [abbrv] ambari git commit: AMBARI-22415. Blueprint deploys failing with missing smoke user keytab file (echekanskiy)

2017-11-16 Thread amagyar
AMBARI-22415. Blueprint deploys failing with missing smoke user keytab file 
(echekanskiy)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/91daf317
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/91daf317
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/91daf317

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 91daf317dcb39b4e22ed83ad0378808fe5f24c65
Parents: 774fc44
Author: Eugene Chekanskiy 
Authored: Fri Nov 10 17:17:34 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:28 2017 +0100

--
 .../kerberos/CreateKeytabFilesServerAction.java | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/91daf317/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
index aa65e61..5ec4c10 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
@@ -218,17 +218,18 @@ public class CreateKeytabFilesServerAction extends 
KerberosServerAction {
 }
 
 boolean regenerateKeytabs = 
getOperationType(getCommandParameters()) == OperationType.RECREATE_ALL;
+
+KerberosPrincipalEntity principalEntity = 
kerberosPrincipalDAO.find(evaluatedPrincipal);
+String cachedKeytabPath = (principalEntity == null) ? null : 
principalEntity.getCachedKeytabPath();
+
 if (password == null) {
   if (!regenerateKeytabs && 
(hostName.equalsIgnoreCase(KerberosHelper.AMBARI_SERVER_HOST_NAME) || 
kerberosPrincipalHostDAO
-  .exists(evaluatedPrincipal, hostEntity.getHostId(), 
keytabFilePath))) {
+  .exists(evaluatedPrincipal, hostEntity.getHostId(), 
keytabFilePath)) && cachedKeytabPath == null) {
 // There is nothing to do for this since it must already 
exist and we don't want to
 // regenerate the keytab
 message = String.format("Skipping keytab file for %s, 
missing password indicates nothing to do", evaluatedPrincipal);
 LOG.debug(message);
   } else {
-KerberosPrincipalEntity principalEntity = 
kerberosPrincipalDAO.find(evaluatedPrincipal);
-String cachedKeytabPath = (principalEntity == null) ? null 
: principalEntity.getCachedKeytabPath();
-
 if (cachedKeytabPath == null) {
   message = String.format("Failed to create keytab for %s, 
missing cached file", evaluatedPrincipal);
   actionLog.writeStdErr(message);



[14/50] [abbrv] ambari git commit: AMBARI-22303. Spark history server is stopped (with umask 027 and custom spark log/pid dir) (aonishuk)

2017-11-16 Thread amagyar
AMBARI-22303. Spark history server is stopped (with umask 027 and custom spark 
log/pid dir) (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b49dcad5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b49dcad5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b49dcad5

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: b49dcad59936fe9c60e31a8d1d5eb9bb8ba12547
Parents: 1b9a4ef
Author: Andrew Onishuk 
Authored: Fri Nov 10 12:53:06 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:27 2017 +0100

--
 .../SPARK/1.2.1/package/scripts/setup_spark.py  |  3 ++-
 .../SPARK2/2.0.0/package/scripts/setup_spark.py |  3 ++-
 .../python/stacks/2.2/SPARK/test_job_history_server.py  | 12 
 .../test/python/stacks/2.2/SPARK/test_spark_client.py   | 12 
 .../python/stacks/2.3/SPARK/test_spark_thrift_server.py |  6 --
 5 files changed, 24 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b49dcad5/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_spark.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_spark.py
 
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_spark.py
index 53c8f9e..6a29efb 100644
--- 
a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_spark.py
+++ 
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_spark.py
@@ -52,7 +52,8 @@ def setup_spark(env, type, upgrade_type=None, action=None, 
config_dir=None):
 owner=params.spark_user,
 group=params.user_group,
 mode=0775,
-create_parents = True
+create_parents = True,
+cd_access = 'a',
   )
   if type == 'server' and action == 'config':
 params.HdfsResource(params.spark_hdfs_user_dir,

http://git-wip-us.apache.org/repos/asf/ambari/blob/b49dcad5/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_spark.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_spark.py
 
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_spark.py
index a7b8459..792b2a1 100755
--- 
a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_spark.py
+++ 
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_spark.py
@@ -42,7 +42,8 @@ def setup_spark(env, type, upgrade_type = None, action = 
None):
 owner=params.spark_user,
 group=params.user_group,
 mode=0775,
-create_parents = True
+create_parents = True,
+cd_access = 'a',
   )
   if type == 'server' and action == 'config':
 params.HdfsResource(params.spark_hdfs_user_dir,

http://git-wip-us.apache.org/repos/asf/ambari/blob/b49dcad5/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py 
b/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py
index 922ace2..8801746 100644
--- a/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py
+++ b/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py
@@ -165,13 +165,15 @@ class TestJobHistoryServer(RMFTestCase):
 owner = 'spark',
 group = 'hadoop',
 create_parents = True,
-mode = 0775
+mode = 0775,
+cd_access = 'a',
 )
 self.assertResourceCalled('Directory', '/var/log/spark',
 owner = 'spark',
 group = 'hadoop',
 create_parents = True,
-mode = 0775
+mode = 0775,
+cd_access = 'a',
 )
 self.assertResourceCalled('HdfsResource', '/user/spark',
 immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
@@ -246,13 +248,15 @@ class TestJobHistoryServer(RMFTestCase):
 owner = 'spark',
 group = 'hadoop',
 create_parents = True,
-mode = 0775
+mode = 0775,
+cd_access = 'a',
 )
 self.assertResourceCalled('Directory', '/var/log/spark',
 owner = 'spark',
 group = 'hadoop',
 create_parents = True,
-mode = 0775
+mode = 0775,
+cd_access = 'a',
 )
 self.assertResourceCalled('HdfsResource', '/user/spark',
 immutable_paths = 

[48/50] [abbrv] ambari git commit: AMBARI-22260. Update Spark2 log4j default settings to latest. (sai.sai.shao via sshridhar).

2017-11-16 Thread amagyar
AMBARI-22260. Update Spark2 log4j default settings to latest. (sai.sai.shao via 
sshridhar).


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/579bf1c6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/579bf1c6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/579bf1c6

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 579bf1c65c857898455d209da3778d94ec72cbf0
Parents: 69bb45f
Author: Swapan Shridhar 
Authored: Wed Nov 15 16:21:31 2017 -0800
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:32 2017 +0100

--
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml  | 23 
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml | 23 +---
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml | 45 +---
 .../configuration/spark2-log4j-properties.xml   | 56 
 4 files changed, 122 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/579bf1c6/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index b1e5f91..8c2c860 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -104,14 +104,37 @@
 
 
 
+  
+
+  
+spark2-log4j-properties
+
+
+  
+
+  
   
 
+  
+spark2-log4j-properties
+
+
+  
   
 spark2-defaults
 
   
 
   
+  
+
+  
+spark2-log4j-properties
+
+
+  
+
+  
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/579bf1c6/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
index ace9542..9caa850 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
@@ -77,7 +77,7 @@
   
 FLUME_HANDLER
   
-  
+
   
 ACCUMULO_TRACER
 ACCUMULO_GC
@@ -355,7 +355,7 @@
 
   Validate Root Queue Ordering Policy
 
-   
+  
 
   
   
@@ -679,6 +679,15 @@
   Add queue customization property
 
   
+  
+
+  
+  
+
+  
+  
+
+  
 
 
 
 
   false
@@ -1083,7 +1092,7 @@
 FLUME_HANDLER
   
 
-
+
 
   false
   true
@@ -1112,7 +1121,7 @@
 
 
   UPGRADE
-  
+
   
 
   
@@ -1192,7 +1201,7 @@
 setup_ranger_java_patches
   
 
-
+
 
 
 
@@ -1215,7 +1224,7 @@
 configure_atlas_user_for_tagsync
   
 
-
+
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/579bf1c6/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
index df11ae1..4fc9b42 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
@@ -183,7 +183,7 @@
 HBASE_MASTER
   
 
-
+
 
   UPGRADE
   true
@@ -199,7 +199,7 @@
 LOGSEARCH
   
 
-
+
 
   false
   true
@@ -207,7 +207,7 @@
 DATANODE
 NFS_GATEWAY
   
-  
+
   
 HBASE_REGIONSERVER
 PHOENIX_QUERY_SERVER
@@ -223,7 +223,7 @@
 The initial batch of {{components}} hosts have been 
{{direction.past}}. You are advised to check the hosts and perform 
cluster/workload-specific tests against your cluster to ensure proper operation 
before proceeding with {{direction.text}} of the remaining services.
   
 
-
+
 
   UPGRADE
   true
@@ -458,7 +458,7 @@
 
 
   UPGRADE
-  
+
   
 
   
@@ -467,7 

[26/50] [abbrv] ambari git commit: AMBARI-22387. Create a Pre-Upgrade Check Warning About LZO (dlysnichenko)

2017-11-16 Thread amagyar
AMBARI-22387. Create a Pre-Upgrade Check Warning About LZO (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/650d8fde
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/650d8fde
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/650d8fde

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 650d8fde2f021bc9030df5f92f673ac8a4cfac1b
Parents: e32a3a4
Author: Lisnichenko Dmitro 
Authored: Mon Nov 13 13:29:52 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:28 2017 +0100

--
 .../ambari/server/checks/CheckDescription.java  |   9 ++
 .../apache/ambari/server/checks/LZOCheck.java   |  77 ++
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml |   1 +
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml |   1 +
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml |   1 +
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml |   1 +
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |   1 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml |   1 +
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   1 +
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |   1 +
 .../ambari/server/checks/LZOCheckTest.java  | 145 +++
 11 files changed, 239 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/650d8fde/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
index 3caac14..20bb1b0 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
@@ -327,6 +327,15 @@ public class CheckDescription {
 "As Ranger is SSL enabled, Ranger SSL configurations will need to be 
changed from default value of /etc/ranger/*/conf folder to 
/etc/ranger/security. " +
 "Since the certificates/keystores/truststores in this path may affect 
the upgrade/downgrade process, it is recommended to manually move the 
certificates/keystores/truststores out of the conf folders and change the 
appropriate config values before proceeding.").build());
 
+  public static CheckDescription LZO_CONFIG_CHECK = new 
CheckDescription("LZO_CONFIG_CHECK",
+  PrereqCheckType.CLUSTER,
+  "LZO Codec Check",
+  new ImmutableMap.Builder()
+  .put(AbstractCheckDescriptor.DEFAULT,
+  "You have LZO codec enabled in the core-site config of your 
cluster. LZO is no longer installed automatically. " +
+  "If any hosts require LZO, it should be installed before 
starting the upgrade. " +
+  "Consult Ambari documentation for instructions on how to do 
this.").build());
+
   public static CheckDescription JAVA_VERSION = new 
CheckDescription("JAVA_VERSION",
   PrereqCheckType.CLUSTER,
   "Verify Java version requirement",

http://git-wip-us.apache.org/repos/asf/ambari/blob/650d8fde/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
new file mode 100644
index 000..3000b79
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
@@ -0,0 +1,77 @@
+/*
+ * 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.checks;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.controller.PrereqCheckRequest;
+import org.apache.ambari.server.state.stack.PrereqCheckStatus;
+import 

[34/50] [abbrv] ambari git commit: AMBARI-22426. Push down Logger instances (adoroszlai)

2017-11-16 Thread amagyar
AMBARI-22426. Push down Logger instances (adoroszlai)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5b9803d8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5b9803d8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5b9803d8

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 5b9803d8c731e06480de6497ed8ce6c29bf3ca03
Parents: 77fc954
Author: Attila Doroszlai 
Authored: Mon Nov 13 14:01:15 2017 +0100
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:30 2017 +0100

--
 .../ambari/server/api/handlers/BaseManagementHandler.java| 8 
 .../org/apache/ambari/server/api/handlers/CreateHandler.java | 4 
 .../org/apache/ambari/server/api/services/BaseService.java   | 5 +
 .../apache/ambari/server/api/services/LoggingService.java| 4 
 .../services/stackadvisor/commands/StackAdvisorCommand.java  | 2 +-
 .../ambari/server/checks/DatabaseConsistencyCheckHelper.java | 2 +-
 .../apache/ambari/server/controller/AmbariHandlerList.java   | 5 +
 .../server/controller/internal/AbstractPropertyProvider.java | 4 
 .../server/controller/internal/AbstractProviderModule.java   | 2 +-
 .../server/controller/internal/AbstractResourceProvider.java | 2 +-
 .../server/controller/internal/ActionResourceProvider.java   | 4 
 .../controller/internal/AlertDefinitionResourceProvider.java | 4 
 .../controller/internal/AlertGroupResourceProvider.java  | 4 
 .../server/controller/internal/AlertResourceProvider.java| 4 
 .../controller/internal/AlertTargetResourceProvider.java | 4 
 .../server/controller/internal/ArtifactResourceProvider.java | 4 
 .../ambari/server/controller/internal/BaseProvider.java  | 6 +-
 .../controller/internal/BlueprintConfigurationProcessor.java | 2 +-
 .../controller/internal/BlueprintResourceProvider.java   | 4 
 .../server/controller/internal/ClusterResourceProvider.java  | 4 
 .../internal/ClusterStackVersionResourceProvider.java| 4 
 .../CompatibleRepositoryVersionResourceProvider.java | 4 
 .../controller/internal/ComponentResourceProvider.java   | 4 
 .../controller/internal/CredentialResourceProvider.java  | 4 
 .../server/controller/internal/GroupResourceProvider.java| 4 
 .../controller/internal/HostComponentResourceProvider.java   | 4 
 .../server/controller/internal/HostResourceProvider.java | 2 ++
 .../internal/HostStackVersionResourceProvider.java   | 4 
 .../ambari/server/controller/internal/HostStatusHelper.java  | 2 +-
 .../server/controller/internal/HttpPropertyProvider.java | 2 +-
 .../server/controller/internal/JsonHttpPropertyRequest.java  | 2 +-
 .../controller/internal/LdapSyncEventResourceProvider.java   | 2 +-
 .../server/controller/internal/MemberResourceProvider.java   | 4 
 .../internal/QuickLinkArtifactResourceProvider.java  | 4 
 .../controller/internal/RecommendationResourceProvider.java  | 4 
 .../server/controller/internal/RequestResourceProvider.java  | 4 
 .../internal/RoleAuthorizationResourceProvider.java  | 4 
 .../server/controller/internal/ServiceResourceProvider.java  | 5 +
 .../controller/internal/StackAdvisorResourceProvider.java| 4 
 .../controller/internal/StackArtifactResourceProvider.java   | 5 +
 .../server/controller/internal/StageResourceProvider.java| 4 
 .../server/controller/internal/TaskResourceProvider.java | 4 
 .../controller/internal/ThemeArtifactResourceProvider.java   | 4 
 .../controller/internal/UpgradeItemResourceProvider.java | 4 
 .../server/controller/internal/UserResourceProvider.java | 4 
 .../controller/internal/ValidationResourceProvider.java  | 4 
 .../internal/VersionDefinitionResourceProvider.java  | 4 
 .../ambari/server/controller/jdbc/JDBCResourceProvider.java  | 2 +-
 .../ambari/server/controller/jmx/JMXPropertyProvider.java| 2 +-
 .../controller/metrics/MetricsCollectorHAClusterState.java   | 2 +-
 .../server/controller/metrics/MetricsCollectorHAManager.java | 2 +-
 .../server/controller/metrics/MetricsDownsamplingMethod.java | 2 +-
 .../server/controller/metrics/MetricsPropertyProvider.java   | 2 +-
 .../controller/metrics/MetricsReportPropertyProvider.java| 2 +-
 .../controller/metrics/RestMetricsPropertyProvider.java  | 2 +-
 .../metrics/ThreadPoolEnabledPropertyProvider.java   | 4 
 .../controller/metrics/ganglia/GangliaPropertyProvider.java  | 2 +-
 .../metrics/ganglia/GangliaReportPropertyProvider.java   | 2 +-
 .../controller/metrics/timeline/AMSPropertyProvider.java | 3 +++
 .../metrics/timeline/AMSReportPropertyProvider.java  | 3 +++
 .../ambari/server/controller/utilities/DatabaseChecker.java  | 2 +-
 

[05/50] [abbrv] ambari git commit: AMBARI-22372. DLM install failed on an unsecure upgraded cluster, due to missing configs. (Jaimin via Ishan)

2017-11-16 Thread amagyar
AMBARI-22372. DLM install failed on an unsecure upgraded cluster, due to 
missing configs. (Jaimin via Ishan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/28509fdc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/28509fdc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/28509fdc

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 28509fdc621bed6a4faf071625f7d908c5d1e4a8
Parents: b2d7b80
Author: Ishan Bhatt 
Authored: Tue Nov 7 10:56:05 2017 -0800
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:25 2017 +0100

--
 .../HIVE/0.12.0.2.0/configuration/hive-site.xml | 38 
 1 file changed, 38 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/28509fdc/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml
index 762530b..5520c10 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml
@@ -480,6 +480,12 @@ limitations under the License.
 
   true
 
+
+  
+beacon-env
+set_hive_configs
+  
+
 
   
   
@@ -489,6 +495,12 @@ limitations under the License.
 
   true
 
+
+  
+beacon-env
+set_hive_configs
+  
+
 
   
   
@@ -498,6 +510,12 @@ limitations under the License.
 
   true
 
+
+  
+beacon-env
+set_hive_configs
+  
+
 
   
   
@@ -507,6 +525,16 @@ limitations under the License.
 
   true
 
+
+  
+beacon-env
+set_hive_configs
+  
+  
+hive-site
+hive.metastore.warehouse.dir
+  
+
 
   
   
@@ -516,6 +544,16 @@ limitations under the License.
 
   true
 
+
+  
+beacon-env
+set_hive_configs
+  
+  
+hive-site
+hive.metastore.warehouse.dir
+  
+
 
   
 



[33/50] [abbrv] ambari git commit: AMBARI-22426. Push down Logger instances (adoroszlai)

2017-11-16 Thread amagyar
http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9803d8/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/FlumeServiceCalculatedState.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/FlumeServiceCalculatedState.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/FlumeServiceCalculatedState.java
index ca4fe6e..0162928 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/FlumeServiceCalculatedState.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/FlumeServiceCalculatedState.java
@@ -27,6 +27,8 @@ import 
org.apache.ambari.server.controller.ServiceComponentHostRequest;
 import org.apache.ambari.server.controller.ServiceComponentHostResponse;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.State;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Determines the service status for Flume.  Generically, this means that
@@ -40,6 +42,8 @@ import org.apache.ambari.server.state.State;
 public final class FlumeServiceCalculatedState extends 
DefaultServiceCalculatedState
   implements ServiceCalculatedState {
 
+  private static final Logger LOG = 
LoggerFactory.getLogger(FlumeServiceCalculatedState.class);
+
   @Override
   public State getState(String clusterName, String serviceName) {
 try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9803d8/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HBaseServiceCalculatedState.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HBaseServiceCalculatedState.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HBaseServiceCalculatedState.java
index eac0dce..58d1687 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HBaseServiceCalculatedState.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HBaseServiceCalculatedState.java
@@ -32,6 +32,8 @@ import org.apache.ambari.server.state.ComponentInfo;
 import org.apache.ambari.server.state.Service;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.State;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Calculator of HBase service state.
@@ -40,6 +42,8 @@ import org.apache.ambari.server.state.State;
 public final class HBaseServiceCalculatedState extends 
DefaultServiceCalculatedState
   implements ServiceCalculatedState {
 
+  private static final Logger LOG = 
LoggerFactory.getLogger(HBaseServiceCalculatedState.class);
+
   @Override
   public State getState(String clusterName, String serviceName) {
 try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9803d8/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HDFSServiceCalculatedState.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HDFSServiceCalculatedState.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HDFSServiceCalculatedState.java
index 7bbad2a..68cb4f1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HDFSServiceCalculatedState.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HDFSServiceCalculatedState.java
@@ -32,6 +32,8 @@ import org.apache.ambari.server.state.ComponentInfo;
 import org.apache.ambari.server.state.Service;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.State;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Calculator of HDFS service state.
@@ -40,6 +42,8 @@ import org.apache.ambari.server.state.State;
 public final class HDFSServiceCalculatedState extends 
DefaultServiceCalculatedState
   implements ServiceCalculatedState {
 
+  private static final Logger LOG = 
LoggerFactory.getLogger(HDFSServiceCalculatedState.class);
+
   @Override
   public State getState(String clusterName, String serviceName) {
 try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9803d8/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HiveServiceCalculatedState.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HiveServiceCalculatedState.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HiveServiceCalculatedState.java
index 77e44a5..353cf5f 100644
--- 

[32/50] [abbrv] ambari git commit: AMBARI-22429 Log Search UI: implement logout. (Istvan Tobias via ababiichuk)

2017-11-16 Thread amagyar
AMBARI-22429 Log Search UI: implement logout. (Istvan Tobias via ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08a83fa9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08a83fa9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08a83fa9

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 08a83fa9803bee4da29d0c86b246c3508d914229
Parents: a631d0e
Author: Istvan Tobias 
Authored: Tue Nov 14 00:31:01 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:29 2017 +0100

--
 .../ambari-logsearch-web/src/app/app.module.ts  |   4 +-
 .../src/app/components/app.component.spec.ts|   4 +-
 .../dropdown-button.component.spec.ts   |   4 +-
 .../dropdown-list.component.spec.ts |   4 +-
 .../filter-button.component.spec.ts |   4 +-
 .../filter-dropdown.component.spec.ts   |   4 +-
 .../login-form/login-form.component.spec.ts |   7 +-
 .../login-form/login-form.component.ts  |  34 +++--
 .../menu-button/menu-button.component.spec.ts   |   4 +-
 .../timezone-picker.component.spec.ts   |   4 +-
 .../components/top-menu/top-menu.component.ts   |   3 +-
 .../ambari-logsearch-web/src/app/mock-data.ts   |   3 +-
 .../src/app/services/auth.service.spec.ts   | 132 +++
 .../src/app/services/auth.service.ts| 123 +
 .../services/component-actions.service.spec.ts  |   4 +-
 .../app/services/component-actions.service.ts   |  20 ++-
 .../src/assets/i18n/en.json |   1 +
 17 files changed, 328 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/08a83fa9/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
--
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
index 37f3a49..805f8e2 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
@@ -53,6 +53,7 @@ import {ComponentsService} from 
'@app/services/storage/components.service';
 import {ServiceLogsFieldsService} from 
'@app/services/storage/service-logs-fields.service';
 import {AuditLogsFieldsService} from 
'@app/services/storage/audit-logs-fields.service';
 import {TabsService} from '@app/services/storage/tabs.service';
+import {AuthService} from '@app/services/auth.service';
 import {reducer} from '@app/services/storage/reducers.service';
 
 import {AppComponent} from '@app/components/app.component';
@@ -185,7 +186,8 @@ export function getXHRBackend(injector: Injector, browser: 
BrowserXhr, xsrf: XSR
   provide: XHRBackend,
   useFactory: getXHRBackend,
   deps: [Injector, BrowserXhr, XSRFStrategy, ResponseOptions]
-}
+},
+AuthService
   ],
   bootstrap: [AppComponent],
   entryComponents: [NodeBarComponent],

http://git-wip-us.apache.org/repos/asf/ambari/blob/08a83fa9/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
index 490e058..bae05ce 100644
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
@@ -53,9 +53,9 @@ describe('AppComponent', () => {
 }).compileComponents();
   }));
 
-  it('should create the app', async(() => {
+  it('should create the app', () => {
 const fixture = TestBed.createComponent(AppComponent);
 const app = fixture.debugElement.componentInstance;
 expect(app).toBeTruthy();
-  }));
+  });
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/08a83fa9/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
index bd41c04..fc42e3c 100644
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
@@ -36,6 +36,7 @@ import {UtilsService} from '@app/services/utils.service';
 import {ComponentActionsService} from 

[27/50] [abbrv] ambari git commit: AMBARI-22425 Ambari 3.0: Implement new design for Admin View: fix checkboxes. (atkach)

2017-11-16 Thread amagyar
AMBARI-22425 Ambari 3.0: Implement new design for Admin View: fix checkboxes. 
(atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2a2fdaae
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2a2fdaae
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2a2fdaae

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 2a2fdaaee7f522732ba3f22f0fc499f001c28a7d
Parents: 08a83fa
Author: Andrii Tkach 
Authored: Mon Nov 13 13:55:43 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:29 2017 +0100

--
 .../resources/ui/admin-web/app/styles/main.css  | 15 
 .../ui/admin-web/app/styles/top-nav.css |  3 ++
 .../admin-web/app/views/ambariViews/create.html | 20 +--
 .../admin-web/app/views/ambariViews/edit.html   | 37 +---
 .../app/views/authentication/main.html  |  8 ++---
 .../app/views/modals/AddVersionModal.html   | 14 
 .../admin-web/app/views/stackVersions/list.html | 11 --
 .../views/stackVersions/stackVersionPage.html   | 27 +++---
 8 files changed, 65 insertions(+), 70 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2a2fdaae/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css 
b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index 4224f62..9838227 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -459,6 +459,11 @@ table.no-border tr td{
   vertical-align: top;
 }
 
+.table td > .checkbox {
+  margin-bottom: 0;
+  margin-top: 0;
+}
+
 .groups-pane table ul{
   list-style-type: none;
   margin: 0;
@@ -821,15 +826,6 @@ accordion .panel-group .panel{
   padding-left: 19px;
 }
 
-.repo-version-inline {
-  left: 11%;
-}
-
-.repo-version-inline .repo-version-label {
-  text-align: left;
-
-}
-
 .repo-version-inline .dot {
   padding-right: 15px;
 }
@@ -1164,6 +1160,7 @@ thead.view-permission-header > tr > th {
 }
 
 .register-version-form .details-panel .control-label {
+  line-height: 20px;
   text-align: left;
   padding: 7px 2px;
   font-weight: normal;

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a2fdaae/ambari-admin/src/main/resources/ui/admin-web/app/styles/top-nav.css
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/styles/top-nav.css 
b/ambari-admin/src/main/resources/ui/admin-web/app/styles/top-nav.css
index f93b2e6..327dc7f 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/top-nav.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/top-nav.css
@@ -37,6 +37,9 @@
   font-size: 16px;
 }
 
+#top-nav .container {
+  background: #fff;
+}
 
 /** Override bootstrap styles **/
 @media (min-width: 0) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a2fdaae/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
index 25f1487..81171c1 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
@@ -80,9 +80,8 @@
   
 
   
-
-   {{'views.visible' | translate}}
-
+
+{{'views.visible' | 
translate}}
   
 
   
@@ -122,9 +121,8 @@
 
 
   
-
-   {{'views.localCluster' | translate}}
-
+
+{{'views.localCluster' | translate}}
   
 
   
@@ -143,9 +141,8 @@
 
 
   
-
-   {{'views.remoteCluster' | translate}}
-
+
+{{'views.remoteCluster' | 
translate}}
   
 
   
@@ -164,9 +161,8 @@
 
 
   
-
-   {{'views.custom' | translate}}
-
+
+{{'views.custom' | translate}}
   
   
 {{form.instanceCreateForm.generalValidationError}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a2fdaae/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
index 

[13/50] [abbrv] ambari git commit: AMBARI-22373.Disable auto config of interpreter.json at the time of installation(Prabhjyot Singh via Venkata Sairam)

2017-11-16 Thread amagyar
AMBARI-22373.Disable auto config of interpreter.json at the time of 
installation(Prabhjyot Singh via Venkata Sairam)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8d20fe12
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8d20fe12
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8d20fe12

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 8d20fe12adb3d005d3eaa606eec63965a8905fb0
Parents: 8db7e75
Author: Venkata Sairam 
Authored: Thu Nov 9 11:50:06 2017 +0530
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:26 2017 +0100

--
 .../ZEPPELIN/0.7.0/package/scripts/master.py | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8d20fe12/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
index 6ccdfba..5efc277 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
@@ -257,7 +257,6 @@ class Master(Script):
 if not glob.glob(params.conf_dir + "/interpreter.json") and \
   not os.path.exists(params.conf_dir + "/interpreter.json"):
   self.create_interpreter_json()
-  self.update_zeppelin_interpreter()
 
 if params.zeppelin_interpreter_config_upgrade == True:
   self.reset_interpreter_settings()
@@ -599,6 +598,16 @@ class Master(Script):
  group=params.zeppelin_group,
  mode=0664)
 
+if params.conf_stored_in_hdfs:
+  params.HdfsResource(self.get_zeppelin_conf_FS(params),
+  type="file",
+  action="create_on_execute",
+  source=format("{params.conf_dir}/interpreter.json"),
+  owner=params.zeppelin_user,
+  recursive_chown=True,
+  recursive_chmod=True,
+  replace_existing_files=True)
+
   def get_zeppelin_spark_dependencies(self):
 import params
 return glob.glob(params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies*.jar')



[37/50] [abbrv] ambari git commit: AMBARI-22321 : Changed ambari version from 2.6.0.0 to 2.6.3.0. Addendum patch (mradhakrishnan on behalf of ydavis)

2017-11-16 Thread amagyar
AMBARI-22321 : Changed ambari version from 2.6.0.0 to 2.6.3.0. Addendum patch 
(mradhakrishnan on behalf of ydavis)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f0f6d4e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f0f6d4e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f0f6d4e

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 0f0f6d4e8ed5e713f41190cfa3c1329ce79c3852
Parents: cd52154
Author: Madhuvanthi Radhakrishnan 
Authored: Tue Nov 14 11:57:05 2017 -0800
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:30 2017 +0100

--
 .../HDP/2.0.6/properties/stack_features.json   | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f0f6d4e/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
index 702fb13..f79cfe0 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
@@ -429,9 +429,24 @@
 "min_version": "2.6.0.0"
   },
   {
+"name": "registry_remove_rootpath",
+"description": "Registry remove root path setting",
+"min_version": "2.6.3.0"
+  },
+  {
+"name": "registry_allowed_resources_support",
+"description": "Registry allowed resources",
+"min_version": "2.6.3.0"
+  },
+  {
+"name": "registry_rewriteuri_filter_support",
+"description": "Registry RewriteUri servlet filter",
+"min_version": "2.6.3.0"
+  },
+  {
 "name": "sam_storage_core_in_registry",
 "description": "Storage core module moved to registry",
-"min_version": "2.6.0.0"
+"min_version": "2.6.3.0"
   }
 ]
   }



[12/50] [abbrv] ambari git commit: AMBARI-22384. Disable HDP 2.3 stack. (swagle)

2017-11-16 Thread amagyar
AMBARI-22384. Disable HDP 2.3 stack. (swagle)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8db7e752
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8db7e752
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8db7e752

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 8db7e75263d9d841aa1d06e28eccdfdb438e7dbd
Parents: 5e39bc5
Author: Siddharth Wagle 
Authored: Wed Nov 8 13:07:11 2017 -0800
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:26 2017 +0100

--
 ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8db7e752/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml
--
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml
index f98b24b..9fa9b90 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml
@@ -17,7 +17,7 @@
 -->
 
 
- true
+ false
 
 2.2
 1.7



[50/50] [abbrv] ambari git commit: AMBARI-22460. NFSGateway start failed (aonishuk)

2017-11-16 Thread amagyar
AMBARI-22460. NFSGateway start failed (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8f2ccf94
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8f2ccf94
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8f2ccf94

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 8f2ccf94958daf323df258fe2b153e83da5f2627
Parents: 579bf1c
Author: Andrew Onishuk 
Authored: Thu Nov 16 12:26:56 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:32 2017 +0100

--
 .../src/main/resources/stacks/HDP/2.0.6/role_command_order.json | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8f2ccf94/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
index 78a31f1..3f576bf 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
@@ -14,6 +14,7 @@
 "HIVE_SERVER-RESTART": ["NODEMANAGER-RESTART", "MYSQL_SERVER-RESTART", 
"ZOOKEEPER_SERVER-RESTART"],
 "HUE_SERVER-START": ["HIVE_SERVER-START", "HCAT-START", 
"OOZIE_SERVER-START"],
 "FLUME_HANDLER-START": ["OOZIE_SERVER-START"],
+"NFS_GATEWAY-START": ["NAMENODE-START"],
 "MAPREDUCE_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", 
"RESOURCEMANAGER-START"],
 "OOZIE_SERVICE_CHECK-SERVICE_CHECK": ["OOZIE_SERVER-START", 
"MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK"],
 "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],



[38/50] [abbrv] ambari git commit: Revert "AMBARI-22383. Remove Auto-Installation of LZO Libraries (ncole)"

2017-11-16 Thread amagyar
Revert "AMBARI-22383. Remove Auto-Installation of LZO Libraries (ncole)"

This reverts commit 5adcea78792cf227f15e7c08f5bb3fe2c48883d3.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8e975062
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8e975062
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8e975062

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 8e975062709aa722efd5e9b0cba011b376f76bf8
Parents: 0f0f6d4
Author: Nate Cole 
Authored: Tue Nov 14 18:39:14 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:30 2017 +0100

--
 .../libraries/functions/__init__.py |  1 +
 .../libraries/functions/get_lzo_packages.py | 50 
 .../libraries/functions/package_conditions.py   |  8 +++-
 .../DRUID/0.10.1/package/scripts/druid.py   |  3 +-
 .../DRUID/0.10.1/package/scripts/params.py  |  3 +-
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml | 30 
 .../HDFS/2.1.0.2.0/package/scripts/datanode.py  |  1 +
 .../HDFS/2.1.0.2.0/package/scripts/hdfs.py  |  7 +++
 .../2.1.0.2.0/package/scripts/hdfs_client.py|  1 +
 .../2.1.0.2.0/package/scripts/install_params.py |  1 -
 .../2.1.0.2.0/package/scripts/journalnode.py|  1 +
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  |  1 +
 .../common-services/HDFS/3.0.0.3.0/metainfo.xml | 30 
 .../HDFS/3.0.0.3.0/package/scripts/hdfs.py  |  7 +++
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py|  6 ++-
 .../package/scripts/oozie_server_upgrade.py |  7 +--
 .../4.0.0.2.0/package/scripts/params_linux.py   |  1 -
 .../OOZIE/4.2.0.3.0/package/scripts/oozie.py|  4 ++
 .../package/scripts/oozie_server_upgrade.py |  5 --
 .../TEZ/0.4.0.2.1/package/scripts/tez_client.py | 32 +
 .../TEZ/0.9.0.3.0/package/scripts/tez_client.py | 26 ++
 .../custom_actions/scripts/remove_bits.py   |  2 +-
 .../BIGTOP/0.8/services/HDFS/metainfo.xml   | 16 +++
 .../0.8/services/HDFS/package/scripts/params.py |  6 ++-
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   | 35 ++
 .../2.3.GlusterFS/services/HDFS/metainfo.xml| 10 
 .../stacks/HDP/2.3/services/HDFS/metainfo.xml   | 30 
 .../stacks/HDP/3.0/services/HDFS/metainfo.xml   | 30 
 .../python/custom_actions/TestRemoveBits.py |  5 +-
 29 files changed, 339 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8e975062/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
index 1e388ac..f144b2d 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
@@ -39,6 +39,7 @@ from resource_management.libraries.functions.version import *
 from resource_management.libraries.functions.format_jvm_option import *
 from resource_management.libraries.functions.constants import *
 from resource_management.libraries.functions.get_stack_version import *
+from resource_management.libraries.functions.get_lzo_packages import *
 from resource_management.libraries.functions.setup_ranger_plugin import *
 from resource_management.libraries.functions.curl_krb_request import *
 from resource_management.libraries.functions.get_bare_principal import *

http://git-wip-us.apache.org/repos/asf/ambari/blob/8e975062/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
new file mode 100644
index 000..cfbb7d8
--- /dev/null
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the 

[36/50] [abbrv] ambari git commit: AMBARI-22438 Disable plugins for yum on yum list command (dgrinenko)

2017-11-16 Thread amagyar
AMBARI-22438 Disable plugins for yum on yum list command (dgrinenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd52154c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd52154c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd52154c

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: cd52154c21c5356dff85d33387a55247a0b4af04
Parents: 5b9803d
Author: Dmytro Grinenko 
Authored: Tue Nov 14 20:12:47 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:30 2017 +0100

--
 .../python/resource_management/core/providers/package/yumrpm.py  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cd52154c/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
 
b/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
index 9117510..8426479 100644
--- 
a/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
+++ 
b/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
@@ -46,8 +46,8 @@ REMOVE_WITHOUT_DEPENDENCIES_CMD = ['rpm', '-e', '--nodeps']
 
 YUM_REPO_LOCATION = "/etc/yum.repos.d"
 REPO_UPDATE_CMD = ['/usr/bin/yum', 'clean', 'metadata']
-ALL_INSTALLED_PACKAGES_CMD = [AMBARI_SUDO_BINARY, "yum", "list", "installed"]
-ALL_AVAILABLE_PACKAGES_CMD = [AMBARI_SUDO_BINARY, "yum", "list", "available"]
+ALL_INSTALLED_PACKAGES_CMD = [AMBARI_SUDO_BINARY, "yum", "list", "installed", 
"--noplugins"]
+ALL_AVAILABLE_PACKAGES_CMD = [AMBARI_SUDO_BINARY, "yum", "list", "available", 
"--noplugins"]
 VERIFY_DEPENDENCY_CMD = ['/usr/bin/yum', '-d', '0', '-e', '0', 'check', 
'dependencies']
 
 # base command output sample:



[30/50] [abbrv] ambari git commit: AMBARI-22347. Simplify Ambari configuration tables from AMBARI-21307 (rlevas)

2017-11-16 Thread amagyar
http://git-wip-us.apache.org/repos/asf/ambari/blob/a631d0ed/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProviderTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProviderTest.java
index c2a1421..a2ecb27 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProviderTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProviderTest.java
@@ -14,238 +14,364 @@
 
 package org.apache.ambari.server.controller.internal;
 
+import static 
org.apache.ambari.server.controller.internal.AmbariConfigurationResourceProvider.AMBARI_CONFIGURATION_CATEGORY_PROPERTY_ID;
+import static 
org.apache.ambari.server.controller.internal.AmbariConfigurationResourceProvider.AMBARI_CONFIGURATION_PROPERTIES_PROPERTY_ID;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.newCapture;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeMap;
+
+import javax.persistence.EntityManager;
 
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Request;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.spi.ResourceProvider;
 import org.apache.ambari.server.controller.utilities.PredicateBuilder;
-import org.apache.ambari.server.events.AmbariLdapConfigChangedEvent;
+import org.apache.ambari.server.events.AmbariConfigurationChangedEvent;
 import org.apache.ambari.server.events.publishers.AmbariEventPublisher;
 import org.apache.ambari.server.orm.dao.AmbariConfigurationDAO;
 import org.apache.ambari.server.orm.entities.AmbariConfigurationEntity;
-import org.apache.ambari.server.orm.entities.ConfigurationBaseEntity;
+import org.apache.ambari.server.security.TestAuthenticationFactory;
+import org.apache.ambari.server.security.authorization.AuthorizationException;
 import org.easymock.Capture;
-import org.easymock.EasyMock;
-import org.easymock.EasyMockRule;
 import org.easymock.EasyMockSupport;
-import org.easymock.Mock;
-import org.easymock.TestSubject;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
+import org.junit.After;
 import org.junit.Test;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
 
 public class AmbariConfigurationResourceProviderTest extends EasyMockSupport {
 
-  @Rule
-  public EasyMockRule mocks = new EasyMockRule(this);
+  private static final String CATEGORY_NAME_1 = "test-category-1";
+  private static final String CATEGORY_NAME_2 = "test-category-2";
 
-  @Mock
-  private Request requestMock;
+  @After
+  public void clearAuthentication() {
+SecurityContextHolder.getContext().setAuthentication(null);
+  }
 
-  @Mock
-  private AmbariConfigurationDAO ambariConfigurationDAO;
+  @Test
+  public void testCreateResources_Administrator() throws Exception {
+testCreateResources(TestAuthenticationFactory.createAdministrator());
+  }
 
-  @Mock
-  private AmbariEventPublisher publisher;
+  @Test(expected = AuthorizationException.class)
+  public void testCreateResources_ClusterAdministrator() throws Exception {
+
testCreateResources(TestAuthenticationFactory.createClusterAdministrator());
+  }
 
-  private Capture ambariConfigurationEntityCapture;
+  @Test(expected = AuthorizationException.class)
+  public void testCreateResources_ClusterOperator() throws Exception {
+testCreateResources(TestAuthenticationFactory.createClusterOperator());
+  }
 
-  private Gson gson;
+  @Test(expected = AuthorizationException.class)
+  public void testCreateResources_ServiceAdministrator() throws Exception {
+
testCreateResources(TestAuthenticationFactory.createServiceAdministrator());
+  }
 
-  private static final String DATA_MOCK_STR = "[\n" +
-"  {\n" +
-"\"authentication.ldap.baseDn\" : 
\"dc=ambari,dc=apache,dc=org\",\n" +
-"\"authentication.ldap.primaryUrl\" : \"localhost:33389\",\n" +
-"

[28/50] [abbrv] ambari git commit: AMBARI-22439 Host check operation is being performed on all hosts during host add should not get stuck. (atkach)

2017-11-16 Thread amagyar
AMBARI-22439 Host check operation is being performed on all hosts during host 
add should not get stuck. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/77fc9544
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/77fc9544
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/77fc9544

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 77fc95442456f6c1e5e451af541d29d1a8f51f2d
Parents: 2a2fdaa
Author: Andrii Tkach 
Authored: Tue Nov 14 18:11:56 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:29 2017 +0100

--
 ambari-web/app/mixins/main/host/details/actions/check_host.js | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/77fc9544/ambari-web/app/mixins/main/host/details/actions/check_host.js
--
diff --git a/ambari-web/app/mixins/main/host/details/actions/check_host.js 
b/ambari-web/app/mixins/main/host/details/actions/check_host.js
index 2e2e021..66baf5a 100644
--- a/ambari-web/app/mixins/main/host/details/actions/check_host.js
+++ b/ambari-web/app/mixins/main/host/details/actions/check_host.js
@@ -111,6 +111,8 @@ App.CheckHostMixin = Em.Mixin.create({
*/
   warningsTimeInterval: 6,
 
+  finishStates: ["FAILED", "COMPLETED", "TIMEDOUT", "ABORTED"],
+
   /**
* disables host check on Add host wizard as per the experimental flag
*/
@@ -206,7 +208,7 @@ App.CheckHostMixin = Em.Mixin.create({
   //if resolution host check has corrupted data then skip it
   return this.getGeneralHostCheck();
 }
-if (["FAILED", "COMPLETED", 
"TIMEDOUT"].contains(data.Requests.request_status)) {
+if (this.get('finishStates').contains(data.Requests.request_status)) {
   if (data.Requests.inputs.indexOf("last_agent_env_check") != -1) {
 this.set('stopChecking', true);
 this.set('hostsPackagesData', data.tasks.map(function (task) {
@@ -369,7 +371,7 @@ App.CheckHostMixin = Em.Mixin.create({
 data.tasks.forEach(function (task) {
   var name = 
Em.I18n.t('installer.step3.hostWarningsPopup.resolution.validation.error');
   var hostInfo = this.get("hostCheckWarnings").findProperty('name', name);
-  if (["FAILED", "COMPLETED", "TIMEDOUT"].contains(task.Tasks.status)) {
+  if (this.get('finishStates').contains(task.Tasks.status)) {
 if (task.Tasks.status === "COMPLETED" && !!Em.get(task, 
"Tasks.structured_out.host_resolution_check.failed_count")) {
   var targetHostName = Em.get(task, "Tasks.host_name");
   var relatedHostNames = Em.get(task, 
"Tasks.structured_out.host_resolution_check.hosts_with_failures") || [];



[25/50] [abbrv] ambari git commit: AMBARI-22417. Ambari checks fail with FIPS mode is activated on the OS (rlevas)

2017-11-16 Thread amagyar
AMBARI-22417. Ambari checks fail with FIPS mode is activated on the OS (rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e32a3a47
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e32a3a47
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e32a3a47

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: e32a3a47da10731994aec9474f02736d4c784b8f
Parents: ebc627a
Author: Robert Levas 
Authored: Mon Nov 13 05:20:25 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:28 2017 +0100

--
 .../libraries/functions/curl_krb_request.py | 22 +++-
 1 file changed, 7 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e32a3a47/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py
index 95e8625..55395ce 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py
@@ -21,28 +21,20 @@ Ambari Agent
 """
 
 __all__ = ["curl_krb_request"]
+import hashlib
 import logging
 import os
+
 import time
 
+from get_kinit_path import get_kinit_path
+from get_klist_path import get_klist_path
 from resource_management.core import global_lock
 from resource_management.core import shell
 from resource_management.core.exceptions import Fail
-from get_kinit_path import get_kinit_path
-from get_klist_path import get_klist_path
 from resource_management.libraries.functions.get_user_call_output import 
get_user_call_output
 
-# hashlib is supplied as of Python 2.5 as the replacement interface for md5
-# and other secure hashes.  In 2.6, md5 is deprecated.  Import hashlib if
-# available, avoiding a deprecation warning under 2.6.  Import md5 otherwise,
-# preserving 2.4 compatibility.
-try:
-  import hashlib
-  _md5 = hashlib.md5
-except ImportError:
-  import md5
-  _md5 = md5.new
-
+HASH_ALGORITHM = hashlib.sha224
 CONNECTION_TIMEOUT_DEFAULT = 10
 MAX_TIMEOUT_DEFAULT = CONNECTION_TIMEOUT_DEFAULT + 2
 
@@ -103,10 +95,10 @@ def curl_krb_request(tmp_dir, keytab, principal, url, 
cache_file_prefix,
   is_kinit_required = False
 
   # Create the kerberos credentials cache (ccache) file and set it in the 
environment to use
-  # when executing curl. Use the md5 hash of the combination of the principal 
and keytab file
+  # when executing curl. Use a hash of the combination of the principal and 
keytab file
   # to generate a (relatively) unique cache filename so that we can use it as 
needed. Scope
   # this file by user in order to prevent sharing of cache files by multiple 
users.
-  ccache_file_name = _md5("{0}|{1}".format(principal, keytab)).hexdigest()
+  ccache_file_name = HASH_ALGORITHM("{0}|{1}".format(principal, 
keytab)).hexdigest()
 
   curl_krb_cache_path = os.path.join(tmp_dir, "curl_krb_cache")
   if not os.path.exists(curl_krb_cache_path):



[35/50] [abbrv] ambari git commit: AMBARI-22443. Log Feeder: do not try to connect AMS, when it is disabled (oleewere)

2017-11-16 Thread amagyar
AMBARI-22443. Log Feeder: do not try to connect AMS, when it is disabled 
(oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/38f441d7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/38f441d7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/38f441d7

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 38f441d78fe89bfdc429f8cfc1a01e7729e31084
Parents: 8e97506
Author: Oliver Szabo 
Authored: Tue Nov 14 19:15:57 2017 +0100
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:30 2017 +0100

--
 .../ambari/logfeeder/metrics/LogFeederAMSClient.java  |  3 +++
 .../apache/ambari/logfeeder/metrics/MetricsManager.java   |  8 +++-
 .../ambari/logfeeder/metrics/MetricsManagerTest.java  | 10 ++
 3 files changed, 16 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/38f441d7/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
index f446446..c832358 100644
--- 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
+++ 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
@@ -64,6 +64,9 @@ public class LogFeederAMSClient extends 
AbstractTimelineMetricsSink {
 
   @Override
   public String getCollectorUri(String host) {
+if (collectorProtocol == null || host == null || collectorPort == null || 
collectorPath == null) {
+  return null;
+}
 return String.format("%s://%s:%s%s", collectorProtocol, host, 
collectorPort, collectorPath);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/38f441d7/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
index 1094852..6e8ac04 100644
--- 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
+++ 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
@@ -45,7 +45,9 @@ public class MetricsManager {
 
   public void init() {
 LOG.info("Initializing MetricsManager()");
-amsClient = new LogFeederAMSClient();
+if (amsClient == null) {
+  amsClient = new LogFeederAMSClient();
+}
 
 if (amsClient.getCollectorUri(null) != null) {
   if (LogFeederUtil.hostName == null) {
@@ -144,4 +146,8 @@ public class MetricsManager {
   (currMS - lastPublishTimeMS) / 1000 + " seconds ago, 
intervalConfigured=" + publishIntervalMS / 1000);
 }
   }
+
+  public void setAmsClient(LogFeederAMSClient amsClient) {
+this.amsClient = amsClient;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/38f441d7/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
index 24042a7..f74a80e 100644
--- 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
+++ 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
@@ -50,18 +50,20 @@ public class MetricsManagerTest {
   @Before
   public void init() throws Exception {
 manager = new MetricsManager();
-manager.init();
-
+
 mockClient = strictMock(LogFeederAMSClient.class);
 Field f = MetricsManager.class.getDeclaredField("amsClient");
 f.setAccessible(true);
 f.set(manager, mockClient);
-
+
+
EasyMock.expect(mockClient.getCollectorUri(null)).andReturn("null://null:null/null").anyTimes();
 capture = EasyMock.newCapture(CaptureType.FIRST);
 mockClient.emitMetrics(EasyMock.capture(capture));
 

[46/50] [abbrv] ambari git commit: AMBARI-22455 Ambari Logsearch Web unit tests are sometimes failing. (ababiichuk)

2017-11-16 Thread amagyar
AMBARI-22455 Ambari Logsearch Web unit tests are sometimes failing. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d987aeec
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d987aeec
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d987aeec

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: d987aeecf52328732afd5aa2445294a733a3236c
Parents: 28cf09d
Author: ababiichuk 
Authored: Wed Nov 15 17:37:19 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:31 2017 +0100

--
 .../src/app/services/auth.service.spec.ts   | 123 ++-
 1 file changed, 62 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d987aeec/ambari-logsearch/ambari-logsearch-web/src/app/services/auth.service.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/auth.service.spec.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/services/auth.service.spec.ts
index a465c10..fd5a83e 100644
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/auth.service.spec.ts
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/services/auth.service.spec.ts
@@ -16,9 +16,12 @@
  * limitations under the License.
  */
 
-import {TestBed, inject} from '@angular/core/testing';
+import {TestBed, inject, async} from '@angular/core/testing';
 import {HttpModule} from '@angular/http';
 import {Observable} from 'rxjs/Observable';
+import 'rxjs/add/operator/first';
+import 'rxjs/add/operator/last';
+import 'rxjs/add/operator/take';
 import {StoreModule} from '@ngrx/store';
 import {AppStateService, appState} from 
'@app/services/storage/app-state.service';
 import {AuthService} from '@app/services/auth.service';
@@ -26,49 +29,37 @@ import {HttpClientService} from 
'@app/services/http-client.service';
 
 describe('AuthService', () => {
 
-  let successResponse = {
-type: 'default',
-ok: true,
-url: '/',
-status: 200,
-statusText: 'OK',
-bytesLoaded: 100,
-totalBytes: 100,
-headers: null
-  };
-  let errorResponse = {
-type: 'error',
-ok: false,
-url: '/',
-status: 401,
-statusText: 'ERROR',
-bytesLoaded: 100,
-totalBytes: 100,
-headers: null
+  const successResponse = {
+  type: 'default',
+  ok: true,
+  url: '/',
+  status: 200,
+  statusText: 'OK',
+  bytesLoaded: 100,
+  totalBytes: 100,
+  headers: null
+},
+errorResponse = {
+  type: 'error',
+  ok: false,
+  url: '/',
+  status: 401,
+  statusText: 'ERROR',
+  bytesLoaded: 100,
+  totalBytes: 100,
+  headers: null
+};
+
+  // Note: We add delay to help the isLoginInProgress test case.
+  let httpServiceStub = {
+isError: false,
+postFormData: function () {
+  const isError = this.isError;
+  return Observable.create(observer => observer.next(isError ? 
errorResponse : successResponse)).delay(1000);
+}
   };
-  let currentResponse = successResponse;
-  let httpServiceStub;
-  let authService: AuthService;
 
   beforeEach(() => {
-// Note: We add delay to help the isLoginInProgress test case.
-httpServiceStub = {
-  postFormData: function () {
-return Observable.create(observer => {
-  observer.next(currentResponse);
-}).delay(1000);
-  },
-  post: function () {
-return Observable.create(observer => {
-  observer.next(currentResponse);
-}).delay(1000);
-  },
-  get: function () {
-return Observable.create(observer => {
-  observer.next(currentResponse);
-}).delay(1000);
-  }
-};
 TestBed.configureTestingModule({
   imports: [
 HttpModule,
@@ -82,51 +73,61 @@ describe('AuthService', () => {
 {provide: HttpClientService, useValue: httpServiceStub}
   ]
 });
-authService = TestBed.get(AuthService);
   });
 
   it('should create service', inject([AuthService], (service: AuthService) => {
 expect(service).toBeTruthy();
   }));
 
-  it('should set the isAuthorized state to true in appState when the login is 
success', inject(
-[AppStateService],
-(appStateService: AppStateService) => {
-  currentResponse = successResponse;
+  it('should set the isAuthorized state to true in appState when the login is 
success', async(inject(
+[AuthService, AppStateService, HttpClientService],
+(authService: AuthService, appStateService: AppStateService, 
httpClientService) => {
+  httpClientService.isError = false;
   authService.login('test', 'test')
 .subscribe(() => {
-  appStateService.getParameter('isAuthorized').subscribe((value) 

[42/50] [abbrv] ambari git commit: AMBARI-22418. Make Ambari configuration API consistent with existing API. (rlevas)

2017-11-16 Thread amagyar
http://git-wip-us.apache.org/repos/asf/ambari/blob/ae3b727a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProvider.java
new file mode 100644
index 000..ea9cf4f
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProvider.java
@@ -0,0 +1,476 @@
+/*
+ * 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.controller.internal;
+
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.controller.RootComponent;
+import org.apache.ambari.server.controller.RootService;
+import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
+import org.apache.ambari.server.controller.spi.NoSuchResourceException;
+import org.apache.ambari.server.controller.spi.Predicate;
+import org.apache.ambari.server.controller.spi.Request;
+import org.apache.ambari.server.controller.spi.RequestStatus;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException;
+import org.apache.ambari.server.controller.spi.SystemException;
+import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
+import org.apache.ambari.server.controller.utilities.PredicateHelper;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
+import org.apache.ambari.server.events.AmbariConfigurationChangedEvent;
+import org.apache.ambari.server.events.publishers.AmbariEventPublisher;
+import org.apache.ambari.server.orm.dao.AmbariConfigurationDAO;
+import org.apache.ambari.server.orm.entities.AmbariConfigurationEntity;
+import org.apache.ambari.server.security.authorization.RoleAuthorization;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.Inject;
+
+public class RootServiceComponentConfigurationResourceProvider extends 
AbstractAuthorizedResourceProvider {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(RootServiceComponentConfigurationResourceProvider.class);
+
+  static final String RESOURCE_KEY = "Configuration";
+
+  static final String CONFIGURATION_CATEGORY_PROPERTY_ID = 
PropertyHelper.getPropertyId(RESOURCE_KEY, "category");
+  static final String CONFIGURATION_PROPERTIES_PROPERTY_ID = 
PropertyHelper.getPropertyId(RESOURCE_KEY, "properties");
+  static final String CONFIGURATION_COMPONENT_NAME_PROPERTY_ID = 
PropertyHelper.getPropertyId(RESOURCE_KEY, "component_name");
+  static final String CONFIGURATION_SERVICE_NAME_PROPERTY_ID = 
PropertyHelper.getPropertyId(RESOURCE_KEY, "service_name");
+
+  private static final Set PROPERTIES;
+
+  private static final Map PK_PROPERTY_MAP;
+
+  private static final Set PK_PROPERTY_IDS;
+
+  static {
+Set set = new HashSet<>();
+set.add(CONFIGURATION_SERVICE_NAME_PROPERTY_ID);
+set.add(CONFIGURATION_COMPONENT_NAME_PROPERTY_ID);
+set.add(CONFIGURATION_CATEGORY_PROPERTY_ID);
+set.add(CONFIGURATION_PROPERTIES_PROPERTY_ID);
+
+PROPERTIES = Collections.unmodifiableSet(set);
+
+Map map = new HashMap<>();
+map.put(Resource.Type.RootService, CONFIGURATION_SERVICE_NAME_PROPERTY_ID);
+map.put(Resource.Type.RootServiceComponent, 
CONFIGURATION_COMPONENT_NAME_PROPERTY_ID);
+map.put(Resource.Type.RootServiceComponentConfiguration, 
CONFIGURATION_CATEGORY_PROPERTY_ID);
+
+PK_PROPERTY_MAP = Collections.unmodifiableMap(map);
+PK_PROPERTY_IDS = 

[41/50] [abbrv] ambari git commit: AMBARI-22418. Make Ambari configuration API consistent with existing API. (rlevas)

2017-11-16 Thread amagyar
http://git-wip-us.apache.org/repos/asf/ambari/blob/ae3b727a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProviderTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProviderTest.java
new file mode 100644
index 000..5016160
--- /dev/null
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProviderTest.java
@@ -0,0 +1,393 @@
+/*
+ * Licensed 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.controller.internal;
+
+import static 
org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider.CONFIGURATION_CATEGORY_PROPERTY_ID;
+import static 
org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider.CONFIGURATION_COMPONENT_NAME_PROPERTY_ID;
+import static 
org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider.CONFIGURATION_PROPERTIES_PROPERTY_ID;
+import static 
org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider.CONFIGURATION_SERVICE_NAME_PROPERTY_ID;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.newCapture;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+import javax.persistence.EntityManager;
+
+import org.apache.ambari.server.controller.RootComponent;
+import org.apache.ambari.server.controller.RootService;
+import org.apache.ambari.server.controller.predicate.AndPredicate;
+import org.apache.ambari.server.controller.spi.Predicate;
+import org.apache.ambari.server.controller.spi.Request;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.spi.ResourceProvider;
+import org.apache.ambari.server.controller.utilities.PredicateBuilder;
+import org.apache.ambari.server.events.AmbariConfigurationChangedEvent;
+import org.apache.ambari.server.events.publishers.AmbariEventPublisher;
+import org.apache.ambari.server.orm.dao.AmbariConfigurationDAO;
+import org.apache.ambari.server.orm.entities.AmbariConfigurationEntity;
+import org.apache.ambari.server.security.TestAuthenticationFactory;
+import org.apache.ambari.server.security.authorization.AuthorizationException;
+import org.easymock.Capture;
+import org.easymock.EasyMockSupport;
+import org.junit.After;
+import org.junit.Test;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import junit.framework.Assert;
+
+public class RootServiceComponentConfigurationResourceProviderTest extends 
EasyMockSupport {
+
+  private static final String CATEGORY_NAME_1 = "test-category-1";
+  private static final String CATEGORY_NAME_2 = "test-category-2";
+
+  @After
+  public void clearAuthentication() {
+SecurityContextHolder.getContext().setAuthentication(null);
+  }
+
+  @Test
+  public void testCreateResources_Administrator() throws Exception {
+testCreateResources(TestAuthenticationFactory.createAdministrator());
+  }
+
+  @Test(expected = AuthorizationException.class)
+  public void testCreateResources_ClusterAdministrator() throws Exception {
+
testCreateResources(TestAuthenticationFactory.createClusterAdministrator());
+  }
+
+  @Test(expected = AuthorizationException.class)
+  public void testCreateResources_ClusterOperator() throws Exception {
+testCreateResources(TestAuthenticationFactory.createClusterOperator());
+  }
+
+  @Test(expected = AuthorizationException.class)
+  public void testCreateResources_ServiceAdministrator() throws Exception {
+
testCreateResources(TestAuthenticationFactory.createServiceAdministrator());
+  }
+
+  

[49/50] [abbrv] ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (part2) (jonathanhurley)

2017-11-16 Thread amagyar
AMBARI-22444 - Add Native Libraries To Tez Tarball (part2) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69bb45f7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69bb45f7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69bb45f7

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 69bb45f7586c41479d90d286c70a3f54a87d53eb
Parents: 7c6ca64
Author: Jonathan Hurley 
Authored: Wed Nov 15 17:37:57 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:32 2017 +0100

--
 .../libraries/functions/copy_tarball.py   | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/69bb45f7/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index f62aa3d..7bca967 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -33,6 +33,7 @@ from resource_management.core import shell
 from resource_management.core import sudo
 from resource_management.core.logger import Logger
 from resource_management.core.exceptions import Fail
+from resource_management.core.resources.system import Directory
 from resource_management.core.resources.system import Execute
 from resource_management.libraries.functions import stack_tools, 
stack_features, stack_select
 from resource_management.libraries.functions import tar_archive
@@ -77,7 +78,14 @@ def _prepare_tez_tarball():
 
   Execute(("cp", "-a", hadoop_lib_native_dir, tez_lib_dir), sudo = True)
 
-  tez_tarball_with_native_lib = os.path.join(os.path.dirname(tez_source_file), 
"tez-native.tar.gz")
+  tez_native_tarball_staging_dir = os.path.join(temp_dir, 
"tez-native-tarball-staging")
+  if not os.path.exists(tez_native_tarball_staging_dir):
+Directory(tez_native_tarball_staging_dir,
+  cd_access='a',
+  create_parents = True,
+  recursive_ownership = True)
+
+  tez_tarball_with_native_lib = os.path.join(tez_native_tarball_staging_dir, 
"tez-native.tar.gz")
   Logger.info("Creating a new Tez tarball at 
{0}".format(tez_tarball_with_native_lib))
 
   # tar up Tez, making sure to specify nothing for the arcname so that it does 
not include an absolute path



[21/50] [abbrv] ambari git commit: AMBARI-22411. Restart all required services failed when running cluster with several patch upgrades applied (ncole)

2017-11-16 Thread amagyar
AMBARI-22411. Restart all required services failed when running cluster with 
several patch upgrades applied (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3ad469d6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3ad469d6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3ad469d6

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 3ad469d66261a44db5a13988dc134055447e7af6
Parents: 91daf31
Author: Nate Cole 
Authored: Fri Nov 10 11:23:13 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:28 2017 +0100

--
 .../AmbariCustomCommandExecutionHelper.java | 23 
 .../AmbariManagementControllerImpl.java | 60 +++-
 .../internal/UpgradeResourceProvider.java   |  8 +--
 .../HDP/2.0.6/properties/stack_packages.json|  3 +-
 .../AmbariManagementControllerImplTest.java |  2 +-
 5 files changed, 25 insertions(+), 71 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3ad469d6/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index e8febbb..dc6bbb7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@ -1425,27 +1425,23 @@ public class AmbariCustomCommandExecutionHelper {
*
* @param actionExecContext  the context
* @param clusterthe cluster for the command
+   * @param stackIdthe stack id used to load service metainfo.
*
* @return a wrapper of the important JSON structures to add to a stage
*/
   public ExecuteCommandJson getCommandJson(ActionExecutionContext 
actionExecContext,
-  Cluster cluster, RepositoryVersionEntity repositoryVersion, String 
requestContext) throws AmbariException {
+  Cluster cluster, StackId stackId, String requestContext) throws 
AmbariException {
 
 Map commandParamsStage = 
StageUtils.getCommandParamsStage(actionExecContext, requestContext);
 Map hostParamsStage = new HashMap<>();
 Map clusterHostInfo;
 String clusterHostInfoJson = "{}";
 
-StackId stackId = null;
-if (null != repositoryVersion) {
-  stackId = repositoryVersion.getStackId();
-}
-
 if (null != cluster) {
   clusterHostInfo = StageUtils.getClusterHostInfo(cluster);
 
   // Important, because this runs during Stack Uprade, it needs to use the 
effective Stack Id.
-  hostParamsStage = createDefaultHostParams(cluster, repositoryVersion);
+  hostParamsStage = createDefaultHostParams(cluster, stackId);
 
   String componentName = null;
   String serviceName = null;
@@ -1454,7 +1450,7 @@ public class AmbariCustomCommandExecutionHelper {
 serviceName = actionExecContext.getOperationLevel().getServiceName();
   }
 
-  if (serviceName != null && componentName != null && null != stackId) {
+  if (serviceName != null && componentName != null) {
 Service service = cluster.getService(serviceName);
 ServiceComponent component = 
service.getServiceComponent(componentName);
 stackId = component.getDesiredStackId();
@@ -1473,6 +1469,10 @@ public class AmbariCustomCommandExecutionHelper {
 
   clusterHostInfoJson = StageUtils.getGson().toJson(clusterHostInfo);
 
+  if (null == stackId && null != cluster) {
+stackId = cluster.getDesiredStackVersion();
+  }
+
   //Propogate HCFS service type info to command params
   if (null != stackId) {
 Map serviceInfos = 
ambariMetaInfo.getServices(stackId.getStackName(),
@@ -1497,11 +1497,10 @@ public class AmbariCustomCommandExecutionHelper {
 hostParamsStageJson);
   }
 
-  Map createDefaultHostParams(Cluster cluster, 
RepositoryVersionEntity repositoryVersion) throws AmbariException {
-return createDefaultHostParams(cluster, repositoryVersion.getStackId());
-  }
-
   Map createDefaultHostParams(Cluster cluster, StackId 
stackId) throws AmbariException {
+if (null == stackId) {
+  stackId = cluster.getDesiredStackVersion();
+}
 
 TreeMap hostLevelParams = new TreeMap<>();
 StageUtils.useStackJdkIfExists(hostLevelParams, configs);


[15/50] [abbrv] ambari git commit: AMBARI-22386 - Patch Upgrades Broken For Clients Due To Versioned LD Library (jonathanhurley)

2017-11-16 Thread amagyar
AMBARI-22386 - Patch Upgrades Broken For Clients Due To Versioned LD Library 
(jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1b9a4ef9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1b9a4ef9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1b9a4ef9

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 1b9a4ef90819ddef6cfedce84e63e235105dbf5b
Parents: 0d0c9e2
Author: Jonathan Hurley 
Authored: Wed Nov 8 16:20:30 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:27 2017 +0100

--
 .../TEZ/0.9.0.3.0/configuration/tez-site.xml|  2 +-
 .../configuration-mapred/mapred-site.xml|  2 +-
 .../configuration-mapred/mapred-site.xml|  2 +-
 .../2.2/services/TEZ/configuration/tez-site.xml |  4 ++--
 .../YARN/configuration-mapred/mapred-site.xml   |  2 +-
 .../resources/stacks/HDP/2.6/repos/repoinfo.xml |  2 +-
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  | 23 
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |  9 
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |  4 
 .../YARN/configuration-mapred/mapred-site.xml   |  2 +-
 10 files changed, 44 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1b9a4ef9/ambari-server/src/main/resources/common-services/TEZ/0.9.0.3.0/configuration/tez-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/TEZ/0.9.0.3.0/configuration/tez-site.xml
 
b/ambari-server/src/main/resources/common-services/TEZ/0.9.0.3.0/configuration/tez-site.xml
index 5c17044..58558af 100644
--- 
a/ambari-server/src/main/resources/common-services/TEZ/0.9.0.3.0/configuration/tez-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/TEZ/0.9.0.3.0/configuration/tez-site.xml
@@ -78,7 +78,7 @@
   
   
 tez.am.launch.env
-
LD_LIBRARY_PATH=/usr/hdp/${hdp.version}/hadoop/lib/native:/usr/hdp/${hdp.version}/hadoop/lib/native/Linux-{{architecture}}-64
+
LD_LIBRARY_PATH=./tezlib/lib/native:/usr/hdp/${hdp.version}/hadoop/lib/native:/usr/hdp/${hdp.version}/hadoop/lib/native/Linux-{{architecture}}-64
 
 Additional execution environment entries for tez. This is not an 
additive property. You must preserve the original value if
 you want to have access to native libraries.

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b9a4ef9/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
index a7d8cd6..3438c45 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
@@ -438,7 +438,7 @@
   
   
 mapreduce.admin.user.env
-
LD_LIBRARY_PATH={{hadoop_lib_home}}/native/Linux-{{architecture}}-64
+
LD_LIBRARY_PATH=./mr-framework/hadoop/lib/native:{{hadoop_lib_home}}/native/Linux-{{architecture}}-64
 
   Additional execution environment entries for map and reduce task 
processes.
   This is not an additive property. You must preserve the original value if

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b9a4ef9/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration-mapred/mapred-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration-mapred/mapred-site.xml
 
b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration-mapred/mapred-site.xml
index 705763f..882cf83 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration-mapred/mapred-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration-mapred/mapred-site.xml
@@ -438,7 +438,7 @@
   
   
 mapreduce.admin.user.env
-
LD_LIBRARY_PATH=/usr/lib/hadoop/lib/native:/usr/lib/hadoop/lib/native/Linux-amd64-64
+
LD_LIBRARY_PATH=./mr-framework/hadoop/lib/native:/usr/lib/hadoop/lib/native:/usr/lib/hadoop/lib/native/Linux-amd64-64
 
   Additional execution environment entries for map and reduce task 
processes.
   This is not an additive property. You must preserve the original value if


[24/50] [abbrv] ambari git commit: AMBARI-22416 Log Search UI: fixes for filtering form. (ababiichuk)

2017-11-16 Thread amagyar
AMBARI-22416 Log Search UI: fixes for filtering form. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ebc627a2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ebc627a2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ebc627a2

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: ebc627a2b70a7ddd9f890c0b4f54bde09ec0054d
Parents: 3ad469d
Author: ababiichuk 
Authored: Fri Nov 10 18:16:45 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:28 2017 +0100

--
 .../ambari-logsearch-web/src/app/app.module.ts  |   2 -
 .../src/app/classes/filtering.ts| 355 +-
 .../src/app/classes/models/app-state.ts |   6 +-
 .../src/app/classes/models/node-item.ts |  30 +
 .../src/app/classes/models/node.ts  |  30 -
 .../src/app/classes/models/store.ts |   6 +-
 .../src/app/classes/models/tab.ts   |  12 +-
 .../src/app/components/app.component.ts |   6 +-
 .../dropdown-button.component.html  |   4 +-
 .../dropdown-button.component.spec.ts   |   2 -
 .../dropdown-button.component.ts|  55 +-
 .../dropdown-list/dropdown-list.component.html  |   2 +-
 .../dropdown-list.component.spec.ts |   6 +-
 .../filter-button.component.spec.ts |   2 -
 .../filter-button/filter-button.component.ts|  35 +-
 .../filter-dropdown.component.spec.ts   |  14 +-
 .../filter-dropdown.component.ts|  22 +-
 .../filters-panel/filters-panel.component.html  |   6 +-
 .../filters-panel.component.spec.ts |   6 +-
 .../filters-panel/filters-panel.component.ts|  18 +-
 .../log-context/log-context.component.spec.ts   |   4 +-
 .../logs-container.component.spec.ts|   2 -
 .../logs-container/logs-container.component.ts  |  26 +-
 .../logs-list/logs-list.component.html  |   3 +-
 .../logs-list/logs-list.component.spec.ts   |  21 +-
 .../components/logs-list/logs-list.component.ts |  10 +-
 .../menu-button/menu-button.component.spec.ts   |   2 -
 .../menu-button/menu-button.component.ts|   4 +-
 .../pagination-controls.component.ts|   7 +-
 .../pagination/pagination.component.html|   2 +-
 .../pagination/pagination.component.spec.ts |   9 +-
 .../pagination/pagination.component.ts  |  10 +-
 .../search-box/search-box.component.ts  |  12 +-
 .../time-range-picker.component.html|   3 +-
 .../time-range-picker.component.spec.ts |  29 +-
 .../time-range-picker.component.ts  |  47 +-
 .../timezone-picker.component.spec.ts   |   2 -
 .../services/component-actions.service.spec.ts  |   2 -
 .../app/services/component-actions.service.ts   |  24 +-
 .../component-generator.service.spec.ts |   2 -
 .../src/app/services/filtering.service.spec.ts  |  97 ---
 .../src/app/services/filtering.service.ts   | 253 ---
 .../app/services/logs-container.service.spec.ts |  31 +-
 .../src/app/services/logs-container.service.ts  | 678 ++-
 .../src/app/services/utils.service.spec.ts  | 285 +++-
 .../src/app/services/utils.service.ts   |  65 +-
 46 files changed, 1257 insertions(+), 992 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ebc627a2/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
--
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
index 56562df..37f3a49 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
@@ -34,7 +34,6 @@ import {environment} from '@envs/environment';
 import {mockApiDataService} from '@app/services/mock-api-data.service'
 import {HttpClientService} from '@app/services/http-client.service';
 import {ComponentActionsService} from 
'@app/services/component-actions.service';
-import {FilteringService} from '@app/services/filtering.service';
 import {UtilsService} from '@app/services/utils.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {ComponentGeneratorService} from 
'@app/services/component-generator.service';
@@ -164,7 +163,6 @@ export function getXHRBackend(injector: Injector, browser: 
BrowserXhr, xsrf: XSR
   providers: [
 HttpClientService,
 ComponentActionsService,
-FilteringService,
 UtilsService,
 LogsContainerService,
 ComponentGeneratorService,

http://git-wip-us.apache.org/repos/asf/ambari/blob/ebc627a2/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts

[04/50] [abbrv] ambari git commit: AMBARI-22293. Improve KDC integration [addendum - fix unit tests] (rlevas)

2017-11-16 Thread amagyar
AMBARI-22293.  Improve KDC integration [addendum - fix unit tests] (rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/61d45897
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/61d45897
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/61d45897

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 61d45897f39db90b9bdda2ae702f4e8a3d12033d
Parents: ca0e601
Author: Robert Levas 
Authored: Wed Nov 8 12:26:00 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:25 2017 +0100

--
 .../KDCKerberosOperationHandlerTest.java| 22 +---
 .../MITKerberosOperationHandlerTest.java|  6 +++---
 2 files changed, 22 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/61d45897/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
index 271c787..095b92a 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
@@ -19,7 +19,9 @@
 package org.apache.ambari.server.serveraction.kerberos;
 
 import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.anyString;
 import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.getCurrentArguments;
 
 import java.lang.reflect.Method;
 import java.util.Map;
@@ -27,6 +29,7 @@ import java.util.Map;
 import org.apache.ambari.server.utils.ShellCommandUtil;
 import org.apache.commons.lang.StringUtils;
 import org.easymock.EasyMock;
+import org.easymock.IAnswer;
 import org.easymock.IArgumentMatcher;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -37,9 +40,12 @@ abstract public class KDCKerberosOperationHandlerTest 
extends KerberosOperationH
 
   static Method methodExecuteCommand;
 
+  static Method methodGetExecutable;
+
   @BeforeClass
   public static void beforeKDCKerberosOperationHandlerTest() throws Exception {
 methodExecuteCommand = 
KDCKerberosOperationHandler.class.getDeclaredMethod("executeCommand", 
String[].class, Map.class, ShellCommandUtil.InteractiveHandler.class);
+methodGetExecutable = 
KerberosOperationHandler.class.getDeclaredMethod("getExecutable", String.class);
   }
 
   @Test
@@ -66,7 +72,17 @@ abstract public class KDCKerberosOperationHandlerTest 
extends KerberosOperationH
 
   @Override
   protected KerberosOperationHandler createMockedHandler() throws 
KerberosOperationException {
-return createMockedHandler(methodExecuteCommand);
+KDCKerberosOperationHandler handler = 
createMockedHandler(methodExecuteCommand, methodGetExecutable);
+
+expect(handler.getExecutable(anyString()))
+.andAnswer(new IAnswer() {
+  @Override
+  public String answer() throws Throwable {
+Object[] args = getCurrentArguments();
+return args[0].toString();
+  }
+}).anyTimes();
+return handler;
   }
 
   @Override
@@ -74,7 +90,7 @@ abstract public class KDCKerberosOperationHandlerTest extends 
KerberosOperationH
 ShellCommandUtil.Result result = createMock(ShellCommandUtil.Result.class);
 expect(result.isSuccessful()).andReturn(true);
 
-expect(handler.executeCommand(arrayContains("/usr/bin/kinit"), 
anyObject(Map.class), 
anyObject(KDCKerberosOperationHandler.InteractivePasswordHandler.class)))
+expect(handler.executeCommand(arrayContains("kinit"), 
anyObject(Map.class), 
anyObject(KDCKerberosOperationHandler.InteractivePasswordHandler.class)))
 .andReturn(result)
 .anyTimes();
   }
@@ -87,7 +103,7 @@ abstract public class KDCKerberosOperationHandlerTest 
extends KerberosOperationH
 expect(result.getStdout()).andReturn("STDOUT data").once();
 expect(result.getStderr()).andReturn("STDERR data").once();
 
-expect(handler.executeCommand(arrayContains("/usr/bin/kinit"), 
anyObject(Map.class), 
anyObject(KDCKerberosOperationHandler.InteractivePasswordHandler.class)))
+expect(handler.executeCommand(arrayContains("kinit"), 
anyObject(Map.class), 
anyObject(KDCKerberosOperationHandler.InteractivePasswordHandler.class)))
 .andReturn(result)
 .anyTimes();
   }


[07/50] [abbrv] ambari git commit: AMBARI-22266. Log Search server does not handle proxies properly (oleewere)

2017-11-16 Thread amagyar
AMBARI-22266. Log Search server does not handle proxies properly (oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/56033c95
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/56033c95
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/56033c95

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 56033c957b84828d0c2835d43db6b437a91ab7ef
Parents: 28509fd
Author: Oliver Szabo 
Authored: Wed Nov 8 11:54:46 2017 +0100
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:25 2017 +0100

--
 .../ambari/logsearch/conf/AuthPropsConfig.java| 18 ++
 .../ambari/logsearch/conf/SecurityConfig.java |  6 --
 .../LogsearchAuthenticationEntryPoint.java|  2 +-
 3 files changed, 23 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/56033c95/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java
 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java
index 2bcdebc..06673b3 100644
--- 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java
+++ 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java
@@ -167,6 +167,16 @@ public class AuthPropsConfig {
   )
   private List allowedRoles;
 
+  @Value("${logsearch.auth.redirect.forward:false}")
+  @LogSearchPropertyDescription(
+name = "logsearch.auth.redirect.forward",
+description = "Forward redirects for HTTP calls. (useful in case of 
proxies)",
+examples = {"true"},
+defaultValue = "false",
+sources = {LOGSEARCH_PROPERTIES_FILE}
+  )
+  private boolean redirectForward;
+
   public boolean isAuthFileEnabled() {
 return authFileEnabled;
   }
@@ -278,4 +288,12 @@ public class AuthPropsConfig {
   public void setAllowedRoles(List allowedRoles) {
 this.allowedRoles = allowedRoles;
   }
+
+  public boolean isRedirectForward() {
+return redirectForward;
+  }
+
+  public void setRedirectForward(boolean redirectForward) {
+this.redirectForward = redirectForward;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/56033c95/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
index cb8124e..6f8d7ba 100644
--- 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
+++ 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
@@ -44,6 +44,7 @@ import 
org.springframework.security.config.annotation.web.configuration.WebSecur
 import org.springframework.security.config.http.SessionCreationPolicy;
 import 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor;
 import 
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+import 
org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
 import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
 import org.springframework.security.web.util.matcher.OrRequestMatcher;
 import org.springframework.security.web.util.matcher.RequestMatcher;
@@ -105,8 +106,8 @@ public class SecurityConfig extends 
WebSecurityConfigurerAdapter {
   .httpBasic()
 .authenticationEntryPoint(logsearchAuthenticationEntryPoint())
   .and()
-  .addFilterBefore(logsearchUsernamePasswordAuthenticationFilter(), 
UsernamePasswordAuthenticationFilter.class)
-  .addFilterBefore(logsearchKRBAuthenticationFilter(), 
UsernamePasswordAuthenticationFilter.class)
+  .addFilterBefore(logsearchKRBAuthenticationFilter(), 
BasicAuthenticationFilter.class)
+  .addFilterBefore(logsearchUsernamePasswordAuthenticationFilter(), 
LogsearchKRBAuthenticationFilter.class)
   .addFilterAfter(securityContextFormationFilter(), 
FilterSecurityInterceptor.class)
   .addFilterAfter(logsearchEventHistoryFilter(), 
LogsearchSecurityContextFormationFilter.class)
   .addFilterAfter(logsearchAuditLogFilter(), 
LogsearchSecurityContextFormationFilter.class)
@@ -153,6 +154,7 @@ public class SecurityConfig extends 

[09/50] [abbrv] ambari git commit: AMBARI-22370 - Remove HADOOP_HOME From Environment For Daemons (jonathanhurley)

2017-11-16 Thread amagyar
AMBARI-22370 - Remove HADOOP_HOME From Environment For Daemons (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/50335d92
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/50335d92
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/50335d92

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 50335d9217f1029f1ae63872105e415c8be84cc0
Parents: fd9b723
Author: Jonathan Hurley 
Authored: Mon Nov 6 16:05:56 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:26 2017 +0100

--
 .../libraries/functions/stack_select.py  |  3 ++-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py|  2 +-
 .../ATLAS/0.7.0.3.0/package/scripts/params.py|  2 +-
 .../FALCON/0.5.0.2.1/package/scripts/falcon.py   | 11 +--
 .../package/scripts/hive_service_interactive.py  |  5 ++---
 .../package/scripts/webhcat_service.py   | 19 ---
 .../package/scripts/hive_service_interactive.py  |  5 ++---
 .../2.1.0.3.0/package/scripts/params_linux.py|  7 +++
 .../2.1.0.3.0/package/scripts/webhcat_service.py | 19 ---
 .../1.0.0.2.3/package/scripts/service_check.py   |  3 +--
 .../1.4.4.2.0/package/scripts/params_linux.py|  4 ++--
 .../1.4.4.3.0/package/scripts/params_linux.py|  4 ++--
 .../0.4.0.2.1/package/scripts/params_linux.py|  2 +-
 .../0.9.0.3.0/package/scripts/params_linux.py|  2 +-
 .../2.1.0.2.0/package/scripts/params_linux.py|  2 +-
 .../3.0.0.3.0/package/scripts/params_linux.py|  2 +-
 .../stacks/2.0.6/HIVE/test_webhcat_server.py |  4 
 .../stacks/2.1/FALCON/test_falcon_server.py  | 10 ++
 .../python/stacks/2.1/TEZ/test_tez_client.py |  2 +-
 .../2.3/MAHOUT/test_mahout_service_check.py  |  4 +---
 .../stacks/2.5/HIVE/test_hive_server_int.py  | 15 +--
 21 files changed, 38 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/50335d92/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
index 9b7d0eb..b741a33 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
@@ -71,7 +71,8 @@ HADOOP_DIR_DEFAULTS = {
   "libexec": "/usr/lib/hadoop/libexec",
   "sbin": "/usr/lib/hadoop/sbin",
   "bin": "/usr/bin",
-  "lib": "/usr/lib/hadoop/lib"
+  "lib": "/usr/lib/hadoop/lib",
+  "conf": "/etc/hadoop/conf"
 }
 
 PACKAGE_SCOPE_INSTALL = "INSTALL"

http://git-wip-us.apache.org/repos/asf/ambari/blob/50335d92/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index 968ceed..31a866e 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -118,7 +118,7 @@ metadata_stop_script = 
format("{metadata_bin}/atlas_stop.py")
 log_dir = config['configurations']['atlas-env']['metadata_log_dir']
 
 # service locations
-hadoop_conf_dir = os.path.join(os.environ["HADOOP_HOME"], "conf") if 
'HADOOP_HOME' in os.environ else '/etc/hadoop/conf'
+hadoop_conf_dir = os.path.join(os.environ["HADOOP_HOME"], "conf") if 
'HADOOP_HOME' in os.environ else 
format('{stack_root}/current/hadoop-client/conf')
 
 # some commands may need to supply the JAAS location when running as atlas
 atlas_jaas_file = format("{conf_dir}/atlas_jaas.conf")

http://git-wip-us.apache.org/repos/asf/ambari/blob/50335d92/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
index b01884c..7c1249a 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
@@ -116,7 +116,7 @@ metadata_stop_script = 

[16/50] [abbrv] ambari git commit: AMBARI-22338 : Review Request for new HDP StackFeatures entry(mradhakrishnan on behalf of ydavis)

2017-11-16 Thread amagyar
AMBARI-22338 : Review Request for new HDP StackFeatures entry(mradhakrishnan on 
behalf of ydavis)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d0c9e27
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d0c9e27
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d0c9e27

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 0d0c9e27c4b488c178d6506818fcc9a67fbc7522
Parents: 8250f6b
Author: Madhuvanthi Radhakrishnan 
Authored: Thu Nov 9 11:09:32 2017 -0800
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:27 2017 +0100

--
 .../resources/stacks/HDP/2.0.6/properties/stack_features.json   | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0d0c9e27/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
index 86de20d..702fb13 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
@@ -427,6 +427,11 @@
 "name": "hadoop_custom_extensions",
 "description": "Support hadoop custom extensions",
 "min_version": "2.6.0.0"
+  },
+  {
+"name": "sam_storage_core_in_registry",
+"description": "Storage core module moved to registry",
+"min_version": "2.6.0.0"
   }
 ]
   }



[39/50] [abbrv] ambari git commit: AMBARI-22398. Upstart is not able to stop the ambari-agent - fix unit test

2017-11-16 Thread amagyar
AMBARI-22398. Upstart is not able to stop the ambari-agent - fix unit test


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5e0700b5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5e0700b5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5e0700b5

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 5e0700b51d89fc3ed5fee44013b40b336d78f995
Parents: 38f441d
Author: Attila Doroszlai 
Authored: Wed Nov 15 12:56:23 2017 +0100
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:30 2017 +0100

--
 ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5e0700b5/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
--
diff --git a/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py 
b/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
index 8ff192a..56a73fc 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
@@ -35,8 +35,7 @@ class TestAmbariAgent(unittest.TestCase):
   @patch("os.path.isfile")
   @patch("os.remove")
   @patch("os.killpg")
-  @patch("os.setpgrp")
-  def test_main(self, os_setpgrp_mock, os_killpg_mock, os_remove_mock,
+  def test_main(self, os_killpg_mock, os_remove_mock,
 os_path_isfile_mock, subprocess_popen_mock):
 facter1 = MagicMock()
 facter2 = MagicMock()
@@ -49,7 +48,6 @@ class TestAmbariAgent(unittest.TestCase):
 sys.argv[0] = "test data"
 AmbariAgent.main()
 
-self.assertTrue(os_setpgrp_mock.called)
 self.assertTrue(subprocess_popen_mock.called)
 self.assertTrue(subprocess_popen_mock.call_count == 2)
 self.assertTrue(facter1.communicate.called)



[19/50] [abbrv] ambari git commit: AMBARI-22400 Ambari 3.0: Implement new design for Admin View: Cluster Information page. (atkach)

2017-11-16 Thread amagyar
AMBARI-22400 Ambari 3.0: Implement new design for Admin View: Cluster 
Information page. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8250f6be
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8250f6be
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8250f6be

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 8250f6be9c93409d5b1c23804c80b3584e113a1d
Parents: 4b7c90b
Author: Andrii Tkach 
Authored: Thu Nov 9 16:13:29 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:27 2017 +0100

--
 .../main/resources/ui/admin-web/app/index.html  |   3 +-
 .../app/scripts/controllers/AppCtrl.js  |   2 +-
 .../controllers/ClusterInformationCtrl.js   |  65 +++
 .../controllers/clusters/ExportBlueprintCtrl.js |  58 --
 .../app/scripts/controllers/mainCtrl.js |  27 -
 .../ui/admin-web/app/scripts/i18n.config.js |  13 +--
 .../ui/admin-web/app/scripts/routes.js  |  59 +-
 .../app/styles/cluster-information.css  |  59 ++
 .../resources/ui/admin-web/app/styles/main.css  |  98 -
 .../admin-web/app/views/clusterInformation.html |  66 
 .../app/views/clusters/exportBlueprint.html |  40 ---
 .../ui/admin-web/app/views/groups/list.html |   3 +-
 .../resources/ui/admin-web/app/views/main.html  | 107 ---
 .../app/views/remoteClusters/list.html  |   3 +-
 .../ui/admin-web/app/views/sideNav.html |  19 ++--
 .../admin-web/app/views/stackVersions/list.html |   3 +-
 .../ui/admin-web/app/views/users/list.html  |   3 +-
 .../test/unit/services/Utility_test.js  |   2 +-
 18 files changed, 240 insertions(+), 390 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8250f6be/ambari-admin/src/main/resources/ui/admin-web/app/index.html
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/index.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
index 41cc60f..2b350f0 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/index.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
@@ -121,7 +121,7 @@
 
 
 
-
+
 
 
 
@@ -142,7 +142,6 @@
 
 
 
-
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8250f6be/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
index 4ac5b38..eb9a9b0 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
@@ -31,7 +31,7 @@ angular.module('ambariAdminConsole')
 return $route.current;
   }, function (value) {
 var breadcrumbs = [$t('common.admin')];
-if (value && value.$$route.label) {
+if (value && value.$$route && value.$$route.label) {
   breadcrumbs.push(value.$$route.label);
 }
 $scope.breadcrumbs = breadcrumbs;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8250f6be/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
new file mode 100644
index 000..60a610c
--- /dev/null
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
@@ -0,0 +1,65 @@
+/**
+ * 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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')

[11/50] [abbrv] ambari git commit: AMBARI-22388 Log Search UI: restyle logs list. (Istvan Tobias via ababiichuk)

2017-11-16 Thread amagyar
AMBARI-22388 Log Search UI: restyle logs list. (Istvan Tobias via ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21645350
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21645350
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21645350

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 216453500fda2dc050af6afdc117ec027ba44e65
Parents: 8d20fe1
Author: Istvan Tobias 
Authored: Thu Nov 9 13:24:16 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:26 2017 +0100

--
 .../ambari-logsearch-web/src/app/app.module.ts  |   4 +
 .../log-level/log-level.component.html  |  18 +++
 .../log-level/log-level.component.spec.ts   |  73 +++
 .../components/log-level/log-level.component.ts |  52 
 .../log-message/log-message.component.html  |  24 
 .../log-message/log-message.component.less  |  69 ++
 .../log-message/log-message.component.spec.ts   |  64 +
 .../log-message/log-message.component.ts| 129 ++
 .../logs-list/logs-list.component.html  |  92 +++--
 .../logs-list/logs-list.component.less  | 130 +--
 .../ambari-logsearch-web/webpack.config.js  |  15 ++-
 11 files changed, 550 insertions(+), 120 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/21645350/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
--
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
index 488437e..56562df 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
@@ -68,6 +68,8 @@ import {FilterButtonComponent} from 
'@app/components/filter-button/filter-button
 import {AccordionPanelComponent} from 
'@app/components/accordion-panel/accordion-panel.component';
 import {CollapsiblePanelComponent} from 
'@app/components/collapsible-panel/collapsible-panel.component';
 import {LogsListComponent} from 
'@app/components/logs-list/logs-list.component';
+import {LogMessageComponent} from 
'@app/components/log-message/log-message.component';
+import {LogLevelComponent} from 
'@app/components/log-level/log-level.component';
 import {DropdownButtonComponent} from 
'@app/components/dropdown-button/dropdown-button.component';
 import {PaginationComponent} from 
'@app/components/pagination/pagination.component';
 import {PaginationControlsComponent} from 
'@app/components/pagination-controls/pagination-controls.component';
@@ -121,6 +123,8 @@ export function getXHRBackend(injector: Injector, browser: 
BrowserXhr, xsrf: XSR
 AccordionPanelComponent,
 CollapsiblePanelComponent,
 LogsListComponent,
+LogLevelComponent,
+LogMessageComponent,
 DropdownButtonComponent,
 PaginationComponent,
 PaginationControlsComponent,

http://git-wip-us.apache.org/repos/asf/ambari/blob/21645350/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.html
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.html
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.html
new file mode 100644
index 000..d72c9d33
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.html
@@ -0,0 +1,18 @@
+
+
+{{logEntry.level}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/21645350/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.spec.ts
new file mode 100644
index 000..c13d373
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.spec.ts
@@ -0,0 +1,73 @@
+/**
+ * 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 

[10/50] [abbrv] ambari git commit: AMBARI-22389. Exclude test scope jars from Log Search / Log Feeder rpm/deb packages (oleewere)

2017-11-16 Thread amagyar
AMBARI-22389. Exclude test scope jars from Log Search / Log Feeder rpm/deb 
packages (oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fd9b7236
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fd9b7236
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fd9b7236

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: fd9b7236c51f7dd0c213f8f7f8eb876a25c36ed6
Parents: 2164535
Author: Oliver Szabo 
Authored: Thu Nov 9 14:18:46 2017 +0100
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:26 2017 +0100

--
 ambari-logsearch/ambari-logsearch-logfeeder/pom.xml | 2 +-
 ambari-logsearch/ambari-logsearch-server/pom.xml| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fd9b7236/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml
--
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml 
b/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml
index 6b7d94f..01710bf 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml
@@ -240,12 +240,12 @@
 
 
 
-  *
   
true
   ${basedir}/target/libs
   false
   false
   true
+  compile
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fd9b7236/ambari-logsearch/ambari-logsearch-server/pom.xml
--
diff --git a/ambari-logsearch/ambari-logsearch-server/pom.xml 
b/ambari-logsearch/ambari-logsearch-server/pom.xml
index 2ad35f5..5444b00 100755
--- a/ambari-logsearch/ambari-logsearch-server/pom.xml
+++ b/ambari-logsearch/ambari-logsearch-server/pom.xml
@@ -118,13 +118,13 @@
   copy-dependencies
 
 
-  *
   ambari-logsearch-web
   
true
   ${basedir}/target/libs
   false
   false
   true
+  compile
 
   
 



[20/50] [abbrv] ambari git commit: AMBARI-22387. Create a Pre-Upgrade Check Warning About LZO. Fix import (dlysnichenko)

2017-11-16 Thread amagyar
AMBARI-22387. Create a Pre-Upgrade Check Warning About LZO. Fix import 
(dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/55915e8f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/55915e8f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/55915e8f

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 55915e8f66b8caef950334814ed56e0c27ef354c
Parents: 650d8fd
Author: Lisnichenko Dmitro 
Authored: Mon Nov 13 16:35:23 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:28 2017 +0100

--
 .../src/main/java/org/apache/ambari/server/checks/LZOCheck.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/55915e8f/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
index 3000b79..9c0286b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
@@ -19,7 +19,6 @@ package org.apache.ambari.server.checks;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Set;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.controller.PrereqCheckRequest;



[18/50] [abbrv] ambari git commit: AMBARI-22412. Remove IPA integration from experimental status (rlevas)

2017-11-16 Thread amagyar
AMBARI-22412. Remove IPA integration from experimental status (rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/774fc443
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/774fc443
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/774fc443

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 774fc443b4fdbf5bae8b116b1689303e557bea5f
Parents: f19cc62
Author: Robert Levas 
Authored: Fri Nov 10 10:46:01 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:27 2017 +0100

--
 ambari-web/app/config.js|  1 -
 .../main/admin/kerberos/step1_controller.js | 52 +---
 ambari-web/app/messages.js  |  2 +-
 .../admin/kerberos/step1_controller_test.js | 17 ---
 4 files changed, 23 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/774fc443/ambari-web/app/config.js
--
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 0963f70..8dbbde3 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -82,7 +82,6 @@ App.supports = {
   serviceAutoStart: true,
   logSearch: true,
   redhatSatellite: false,
-  enableIpa: false,
   addingNewRepository: false,
   kerberosStackAdvisor: true,
   logCountVizualization: false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/774fc443/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
index 2e41e3d..9c864a8 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
@@ -25,29 +25,6 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({
 
   isSubmitDisabled: Em.computed.someBy('selectedOption.preConditions', 
'checked', false),
 
-  ipaOption: Em.Object.create({
-displayName: Em.I18n.t('admin.kerberos.wizard.step1.option.ipa'),
-value: Em.I18n.t('admin.kerberos.wizard.step1.option.ipa'),
-preConditions: [
-  Em.Object.create({
-displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.1'),
-checked: false
-  }),
-  Em.Object.create({
-displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.2'),
-checked: false
-  }),
-  Em.Object.create({
-displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.3'),
-checked: false
-  }),
-  Em.Object.create({
-displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.4'),
-checked: false
-  })
-]
-  }),
-
   options: Em.A([
 Em.Object.create({
   displayName: Em.I18n.t('admin.kerberos.wizard.step1.option.kdc'),
@@ -94,6 +71,28 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({
   ]
 }),
 Em.Object.create({
+  displayName: Em.I18n.t('admin.kerberos.wizard.step1.option.ipa'),
+  value: Em.I18n.t('admin.kerberos.wizard.step1.option.ipa'),
+  preConditions: [
+Em.Object.create({
+  displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.1'),
+  checked: false
+}),
+Em.Object.create({
+  displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.2'),
+  checked: false
+}),
+Em.Object.create({
+  displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.3'),
+  checked: false
+}),
+Em.Object.create({
+  displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.4'),
+  checked: false
+})
+  ]
+}),
+Em.Object.create({
   displayName: Em.I18n.t('admin.kerberos.wizard.step1.option.manual'),
   value: Em.I18n.t('admin.kerberos.wizard.step1.option.manual'),
   preConditions: [
@@ -135,13 +134,6 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({
 
 
   loadStep: function () {
-if (App.get('supports.enableIpa')) {
-  var ipaOption = this.get('ipaOption');
-  var options = this.get('options');
-  if (options.indexOf(ipaOption) === -1){
-options.pushObject(ipaOption);
-  }
-}
   },
 
   submit: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/774fc443/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 52643f3..9ca51de 100644
--- 

[02/50] [abbrv] ambari git commit: AMBARI-22383. Remove Auto-Installation of LZO Libraries (ncole)

2017-11-16 Thread amagyar
AMBARI-22383. Remove Auto-Installation of LZO Libraries (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5e39bc56
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5e39bc56
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5e39bc56

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 5e39bc56293d1d84caaf15ed5ae4afc1db5dcfc0
Parents: 74e4d21
Author: Nate Cole 
Authored: Wed Nov 8 14:28:59 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:25 2017 +0100

--
 .../libraries/functions/__init__.py |  1 -
 .../libraries/functions/get_lzo_packages.py | 50 
 .../libraries/functions/package_conditions.py   |  8 +---
 .../DRUID/0.10.1/package/scripts/druid.py   |  3 +-
 .../DRUID/0.10.1/package/scripts/params.py  |  3 +-
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml | 30 
 .../HDFS/2.1.0.2.0/package/scripts/datanode.py  |  1 -
 .../HDFS/2.1.0.2.0/package/scripts/hdfs.py  |  7 ---
 .../2.1.0.2.0/package/scripts/hdfs_client.py|  1 -
 .../2.1.0.2.0/package/scripts/install_params.py |  1 +
 .../2.1.0.2.0/package/scripts/journalnode.py|  1 -
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  |  1 -
 .../common-services/HDFS/3.0.0.3.0/metainfo.xml | 30 
 .../HDFS/3.0.0.3.0/package/scripts/hdfs.py  |  7 ---
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py|  6 +--
 .../package/scripts/oozie_server_upgrade.py |  7 ++-
 .../4.0.0.2.0/package/scripts/params_linux.py   |  1 +
 .../OOZIE/4.2.0.3.0/package/scripts/oozie.py|  4 --
 .../package/scripts/oozie_server_upgrade.py |  5 ++
 .../TEZ/0.4.0.2.1/package/scripts/tez_client.py | 32 -
 .../TEZ/0.9.0.3.0/package/scripts/tez_client.py | 26 --
 .../custom_actions/scripts/remove_bits.py   |  2 +-
 .../BIGTOP/0.8/services/HDFS/metainfo.xml   | 16 ---
 .../0.8/services/HDFS/package/scripts/params.py |  6 +--
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   | 35 --
 .../2.3.GlusterFS/services/HDFS/metainfo.xml| 10 
 .../stacks/HDP/2.3/services/HDFS/metainfo.xml   | 30 
 .../stacks/HDP/3.0/services/HDFS/metainfo.xml   | 30 
 .../python/custom_actions/TestRemoveBits.py |  5 +-
 29 files changed, 20 insertions(+), 339 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5e39bc56/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
index f144b2d..1e388ac 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
@@ -39,7 +39,6 @@ from resource_management.libraries.functions.version import *
 from resource_management.libraries.functions.format_jvm_option import *
 from resource_management.libraries.functions.constants import *
 from resource_management.libraries.functions.get_stack_version import *
-from resource_management.libraries.functions.get_lzo_packages import *
 from resource_management.libraries.functions.setup_ranger_plugin import *
 from resource_management.libraries.functions.curl_krb_request import *
 from resource_management.libraries.functions.get_bare_principal import *

http://git-wip-us.apache.org/repos/asf/ambari/blob/5e39bc56/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
deleted file mode 100644
index cfbb7d8..000
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR 

[03/50] [abbrv] ambari git commit: AMBARI-22379 : get_phoenix_query_server_hosts is undefined in hbase service_advisor. (Ted Yu via avijayan)

2017-11-16 Thread amagyar
AMBARI-22379 : get_phoenix_query_server_hosts is undefined in hbase 
service_advisor. (Ted Yu via avijayan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/74e4d213
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/74e4d213
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/74e4d213

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 74e4d2131f22fe635adb61b045da99303d4582f6
Parents: 61d4589
Author: Aravindan Vijayan 
Authored: Wed Nov 8 11:14:54 2017 -0800
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:25 2017 +0100

--
 .../common-services/HBASE/2.0.0.3.0/service_advisor.py  | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/74e4d213/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
index f9d1a59..9dc5708 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
@@ -461,6 +461,16 @@ class HBASERecommender(service_advisor.ServiceAdvisor):
 else:
   putHbaseSiteProperty('hbase.master.ui.readonly', 'false')
 
+  """
+  Returns the list of Phoenix Query Server host names, or None.
+  """
+  def get_phoenix_query_server_hosts(self, services, hosts):
+if len(hosts['items']) > 0:
+  phoenix_query_server_hosts = self.getHostsWithComponent("HBASE", 
"PHOENIX_QUERY_SERVER", services, hosts)
+  if phoenix_query_server_hosts is None:
+return []
+  return [host['Hosts']['host_name'] for host in 
phoenix_query_server_hosts]
+
 
   def recommendHBASEConfigurationsFromHDP26(self, configurations, clusterData, 
services, hosts):
 if 'hbase-env' in services['configurations'] and 'hbase_user' in 
services['configurations']['hbase-env']['properties']:
@@ -672,4 +682,4 @@ class HBASEValidator(service_advisor.ServiceAdvisor):
   " {0} needs to contain {1} instead of 
{2}".format(prop_name,prop_val,exclude_val))})
 
 validationProblems = 
self.toConfigurationValidationProblems(validationItems, "hbase-site")
-return validationProblems
\ No newline at end of file
+return validationProblems



[01/50] [abbrv] ambari git commit: AMBARI-22337 each service should be able to implement server actions, package them add a jar to be loaded during EU (dili)

2017-11-16 Thread amagyar
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-22008 df7ac8cc9 -> 8f2ccf949


AMBARI-22337 each service should be able to implement server actions, package 
them add a jar to be loaded during EU (dili)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2622da97
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2622da97
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2622da97

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 2622da97c619fe3fea286fcdb2f4d09f5a3b0832
Parents: 81fdb84
Author: Di Li 
Authored: Tue Nov 7 10:51:48 2017 -0500
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:24 2017 +0100

--
 ambari-server/pom.xml   |  12 ++
 .../serveraction/ServerActionExecutor.java  | 147 +--
 .../ambari/server/stack/ServiceDirectory.java   |  29 
 .../ambari/server/stack/ServiceModule.java  |   8 +
 .../apache/ambari/server/state/ServiceInfo.java |  14 ++
 .../ambari/server/stack/ServiceModuleTest.java  |  30 
 .../server/stack/StackManagerExtensionTest.java |   6 +
 7 files changed, 232 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2622da97/ambari-server/pom.xml
--
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index a86acf5..2ecf435 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -198,6 +198,18 @@
   
 
   
+  
+generate-test-oozie2-server-actions-dir
+process-test-classes
+
+  run
+
+
+  
+
+  
+
+  
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/2622da97/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerActionExecutor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerActionExecutor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerActionExecutor.java
index 50e3cfe..e219dc3 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerActionExecutor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerActionExecutor.java
@@ -18,10 +18,17 @@
 
 package org.apache.ambari.server.serveraction;
 
+import java.io.File;
+import java.io.FilenameFilter;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.StringTokenizer;
 import java.util.Timer;
 import java.util.TimerTask;
 import java.util.concurrent.ConcurrentHashMap;
@@ -38,11 +45,17 @@ import 
org.apache.ambari.server.actionmanager.HostRoleStatus;
 import org.apache.ambari.server.actionmanager.Stage;
 import org.apache.ambari.server.agent.CommandReport;
 import org.apache.ambari.server.agent.ExecutionCommand;
+import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.AmbariManagementController;
 import 
org.apache.ambari.server.security.authorization.internal.InternalAuthenticationToken;
+import org.apache.ambari.server.state.ServiceInfo;
+import org.apache.ambari.server.state.UpgradeContext.UpgradeServiceSummary;
+import org.apache.ambari.server.state.UpgradeContext.UpgradeSummary;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.util.ClassUtils;
 
 import com.google.inject.Inject;
 import com.google.inject.Injector;
@@ -495,7 +508,6 @@ public class ServerActionExecutor {
 throw new AmbariException("Missing ExecutionCommand data");
   } else {
 Map roleParams = executionCommand.getRoleParams();
-
 if (roleParams == null) {
   throw new AmbariException("Missing RoleParams data");
 } else {
@@ -504,8 +516,30 @@ public class ServerActionExecutor {
   if (actionClassname == null) {
 throw new AmbariException("Missing action classname for server 
action");
   } else {
-ServerAction action = createServerAction(actionClassname);
-
+Map services = new HashMap();
+UpgradeSummary upgradeSummary = 
executionCommand.getUpgradeSummary();
+if (upgradeSummary != null) {
+  Map

[08/50] [abbrv] ambari git commit: AMBARI-22398. Upstart is not able to stop the ambari-agent (aonishuk)

2017-11-16 Thread amagyar
AMBARI-22398. Upstart is not able to stop the ambari-agent (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4b7c90bb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4b7c90bb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4b7c90bb

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 4b7c90bb06e8689b34c6959afa6ab3c008784f68
Parents: 50335d9
Author: Andrew Onishuk 
Authored: Thu Nov 9 16:37:58 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:26 2017 +0100

--
 ambari-agent/src/main/python/ambari_agent/AmbariAgent.py | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4b7c90bb/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py 
b/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py
index 28b9528..aeb200c 100644
--- a/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py
+++ b/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py
@@ -49,9 +49,6 @@ def main():
 
   mergedArgs = [PYTHON, AGENT_SCRIPT] + args
 
-  # Become a parent for all subprocesses
-  os.setpgrp()
-
   try:
 while status == AGENT_AUTO_RESTART_EXIT_CODE:
   mainProcess = subprocess.Popen(mergedArgs)



[17/50] [abbrv] ambari git commit: AMBARI-22346. Beeline connection hangs for longer time when connection to HS2 with metastore DB down (aonishuk)

2017-11-16 Thread amagyar
AMBARI-22346. Beeline connection hangs for longer time when connection to HS2 
with metastore DB down (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f19cc626
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f19cc626
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f19cc626

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: f19cc6260978aa8bcec4a063dc1e36ce3080af87
Parents: b49dcad
Author: Andrew Onishuk 
Authored: Fri Nov 10 13:28:27 2017 +0200
Committer: Attila Magyar 
Committed: Thu Nov 16 16:35:27 2017 +0100

--
 .../HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py | 3 ++-
 .../1.2.1/package/scripts/alerts/alert_spark_thrift_port.py  | 8 +++-
 .../2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py | 8 +++-
 3 files changed, 16 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f19cc626/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
index 3560bf8..6db92b0 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
@@ -28,6 +28,7 @@ from resource_management.libraries.functions import format
 from resource_management.libraries.functions import get_kinit_path
 from ambari_commons.os_check import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+from resource_management.core.signal_utils import TerminateStrategy
 
 OK_MESSAGE = "TCP OK - {0:.3f}s response on port {1}"
 CRITICAL_MESSAGE = "Connection failed on host {0}:{1} ({2})"
@@ -271,7 +272,7 @@ def execute(configurations={}, parameters={}, 
host_name=None):
 
 start_time = time.time()
 try:
-  Execute(cmd, user=hiveuser, timeout=30)
+  Execute(cmd, user=hiveuser, timeout=30, 
timeout_kill_strategy=TerminateStrategy.KILL_PROCESS_TREE)
   total_time = time.time() - start_time
   result_code = 'OK'
   label = OK_MESSAGE.format(total_time, port)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f19cc626/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
 
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
index 3f80fd9..6874cb4 100644
--- 
a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
+++ 
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
@@ -27,6 +27,7 @@ from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions import get_kinit_path
 from resource_management.core.resources import Execute
 from resource_management.core import global_lock
+from resource_management.core.signal_utils import TerminateStrategy
 
 stack_root = Script.get_stack_root()
 
@@ -140,7 +141,12 @@ def execute(configurations={}, parameters={}, 
host_name=None):
 
 start_time = time.time()
 try:
-Execute(cmd, user=hiveruser, path=[beeline_cmd], 
timeout=CHECK_COMMAND_TIMEOUT_DEFAULT)
+Execute(cmd,
+user=hiveruser,
+path=[beeline_cmd],
+timeout=CHECK_COMMAND_TIMEOUT_DEFAULT,
+timeout_kill_strategy=TerminateStrategy.KILL_PROCESS_TREE,
+)
 total_time = time.time() - start_time
 result_code = 'OK'
 label = OK_MESSAGE.format(total_time, port)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f19cc626/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
 
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
index 9e1afea..d3660de 100644
--- 

ambari git commit: AMBARI-22453. ambari-server setup should surface GPL software agreement (aonishuk)

2017-11-16 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-22457 81439af03 -> 46237fe37


AMBARI-22453. ambari-server setup should surface GPL software agreement 
(aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/46237fe3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/46237fe3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/46237fe3

Branch: refs/heads/branch-feature-AMBARI-22457
Commit: 46237fe37b518a4eb0f3094d8c91867877b68094
Parents: 81439af
Author: Andrew Onishuk 
Authored: Thu Nov 16 18:00:09 2017 +0200
Committer: Andrew Onishuk 
Committed: Thu Nov 16 18:00:09 2017 +0200

--
 .../ambari/server/configuration/Configuration.java   | 11 +--
 ambari-server/src/main/python/ambari-server.py   |  4 ++--
 .../controller/AmbariManagementControllerImplTest.java   |  3 ++-
 .../internal/ClientConfigResourceProviderTest.java   |  2 ++
 4 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/46237fe3/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 085f420..2590a83 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -726,13 +726,12 @@ public class Configuration {
   "server.version.file", null);
 
   /**
-   * The full path to the file which contains the Ambari Server version.
+   * Whether user accepted GPL license
*/
   @Markdown(
-  description = "Whether user accepted GPL license.",
-  examples = { "true", "false" })
-  public static final ConfigurationProperty GPL_LICENSE_ACCEPTED = new 
ConfigurationProperty<>(
-  "gpl.license.accepted", null);
+  description = "Whether user accepted GPL license.")
+  public static final ConfigurationProperty GPL_LICENSE_ACCEPTED = 
new ConfigurationProperty<>(
+  "gpl.license.accepted", false);
 
   /**
* The location of the JDK on the Ambari Agent hosts.
@@ -5329,7 +5328,7 @@ public class Configuration {
   }
 
   public Boolean getGplLicenseAccepted(){
-return getProperty(GPL_LICENSE_ACCEPTED).toLowerCase().equals("true");
+return Boolean.valueOf(getProperty(GPL_LICENSE_ACCEPTED));
   }
 
   public String getAgentStackRetryOnInstallCount(){

http://git-wip-us.apache.org/repos/asf/ambari/blob/46237fe3/ambari-server/src/main/python/ambari-server.py
--
diff --git a/ambari-server/src/main/python/ambari-server.py 
b/ambari-server/src/main/python/ambari-server.py
index 6d242a3..3a67532 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -409,7 +409,7 @@ def init_parser_options(parser):
   parser.add_option('--skip-database-check', action="store_true", 
default=False, help="Skip database consistency check", 
dest="skip_database_check")
   parser.add_option('--skip-view-extraction', action="store_true", 
default=False, help="Skip extraction of system views", 
dest="skip_view_extraction")
   parser.add_option('--auto-fix-database', action="store_true", default=False, 
help="Automatically fix database consistency issues", 
dest="fix_database_consistency")
-  parser.add_option('--accept-gpl', action="store_true", default=False, 
help="Automatically accepts GPL license", dest="accept_gpl")
+  parser.add_option('--enable-lzo-under-gpl-license', action="store_true", 
default=False, help="Automatically accepts GPL license", dest="accept_gpl")
   add_parser_options('--mpack',
   default=None,
   help="Specify the path for management pack to be installed/upgraded",
@@ -513,7 +513,7 @@ def init_parser_options(parser):
   parser.add_option('--skip-database-check', action="store_true", 
default=False, help="Skip database consistency check", 
dest="skip_database_check")
   parser.add_option('--skip-view-extraction', action="store_true", 
default=False, help="Skip extraction of system views", 
dest="skip_view_extraction")
   parser.add_option('--auto-fix-database', action="store_true", default=False, 
help="Automatically fix database consistency issues", 
dest="fix_database_consistency")
-  parser.add_option('--accept-gpl', action="store_true", default=False, 
help="Automatically accepts GPL license", dest="accept_gpl")
+  parser.add_option('--enable-lzo-under-gpl-license', action="store_true", 

ambari git commit: AMBARI-22431 Able to add config type if EU/RU of the same stack (minor version upgrade) (dili)

2017-11-16 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 3279bef52 -> 295125730


AMBARI-22431 Able to add config type if EU/RU of the same stack (minor version 
upgrade) (dili)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/29512573
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/29512573
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/29512573

Branch: refs/heads/branch-2.6
Commit: 29512573090948e29d38bb0d259f72b0a5e42e99
Parents: 3279bef
Author: Di Li 
Authored: Thu Nov 16 12:22:35 2017 -0500
Committer: Di Li 
Committed: Thu Nov 16 12:22:35 2017 -0500

--
 .../internal/UpgradeResourceProvider.java   |  36 ++
 .../upgrades/CreateAndConfigureAction.java  | 164 +
 .../ambari/server/state/stack/UpgradePack.java  |   3 +
 .../state/stack/upgrade/ClusterGrouping.java|   2 +
 .../stack/upgrade/CreateAndConfigureTask.java   |  57 +++
 .../ambari/server/state/stack/upgrade/Task.java |   6 +-
 .../src/main/resources/upgrade-pack.xsd |   9 +-
 .../upgrades/CreateAndConfigureActionTest.java  | 357 +++
 8 files changed, 632 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/29512573/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 66f5bf9..b6846f7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -92,6 +92,7 @@ import 
org.apache.ambari.server.state.UpgradeHelper.UpgradeGroupHolder;
 import org.apache.ambari.server.state.stack.ConfigUpgradePack;
 import org.apache.ambari.server.state.stack.UpgradePack;
 import org.apache.ambari.server.state.stack.upgrade.ConfigureTask;
+import org.apache.ambari.server.state.stack.upgrade.CreateAndConfigureTask;
 import org.apache.ambari.server.state.stack.upgrade.Direction;
 import org.apache.ambari.server.state.stack.upgrade.ManualTask;
 import org.apache.ambari.server.state.stack.upgrade.ServerSideActionTask;
@@ -1336,6 +1337,41 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 
 break;
   }
+  case CREATE_AND_CONFIGURE: {
+CreateAndConfigureTask ct = (CreateAndConfigureTask) task;
+
+// !!! would prefer to do this in the sequence generator, but there's 
too many
+// places to miss
+if (context.getOrchestrationType().isRevertable() && 
!ct.supportsPatch) {
+  process = false;
+}
+
+Map configurationChanges =
+ct.getConfigurationChanges(cluster, configUpgradePack);
+
+// add all configuration changes to the command params
+commandParams.putAll(configurationChanges);
+
+// extract the config type to build the summary
+String configType = 
configurationChanges.get(CreateAndConfigureTask.PARAMETER_CONFIG_TYPE);
+if (null != configType) {
+  itemDetail = String.format("Updating configuration %s", configType);
+} else {
+  itemDetail = "Skipping Configuration Task "
+  + StringUtils.defaultString(ct.id, "(missing id)");
+}
+
+entity.setText(itemDetail);
+
+String configureTaskSummary = ct.getSummary(configUpgradePack);
+if (null != configureTaskSummary) {
+  stageText = configureTaskSummary;
+} else {
+  stageText = itemDetail;
+}
+
+break;
+  }
   default:
 break;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/29512573/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/CreateAndConfigureAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/CreateAndConfigureAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/CreateAndConfigureAction.java
new file mode 100644
index 000..e60938a
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/CreateAndConfigureAction.java
@@ -0,0 +1,164 @@
+/*
+ * 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 

ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (part3) (jonathanhurley)

2017-11-16 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 658e76e89 -> 3279bef52


AMBARI-22444 - Add Native Libraries To Tez Tarball (part3) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3279bef5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3279bef5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3279bef5

Branch: refs/heads/branch-2.6
Commit: 3279bef5288cc84f89cbd1a170b78f5af276eae3
Parents: 658e76e
Author: Jonathan Hurley 
Authored: Thu Nov 16 09:43:24 2017 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 16 11:44:18 2017 -0500

--
 .../resource_management/libraries/functions/copy_tarball.py | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3279bef5/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 1dbf1a4..dfe7c62 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -58,8 +58,11 @@ def _prepare_tez_tarball():
 
   temp_dir = Script.get_tmp_dir()
 
+  # create the temp staging directories ensuring that non-root agents using 
tarfile can work with them
   mapreduce_temp_dir = tempfile.mkdtemp(prefix="mapreduce-tarball-", 
dir=temp_dir)
   tez_temp_dir = tempfile.mkdtemp(prefix="tez-tarball-", dir=temp_dir)
+  sudo.chmod(mapreduce_temp_dir, 0777)
+  sudo.chmod(tez_temp_dir, 0777)
 
   Logger.info("Extracting {0} to {1}".format(mapreduce_source_file, 
mapreduce_temp_dir))
   tar_archive.extract_archive(mapreduce_source_file, mapreduce_temp_dir)
@@ -76,11 +79,17 @@ def _prepare_tez_tarball():
   if not os.path.exists(tez_lib_dir):
 raise Fail("Unable to seed the Tez tarball with native libraries since the 
target Tez lib directory {0} does not exist".format(tez_lib_dir))
 
+  # ensure that the tez/lib directory is readable by non-root (which it 
typically is not)
+  sudo.chmod(tez_lib_dir, 0755)
+
+  # copy native libraries from hadoop to tez
   Execute(("cp", "-a", hadoop_lib_native_dir, tez_lib_dir), sudo = True)
 
+  # create the staging directory so that non-root agents can write to it
   tez_native_tarball_staging_dir = os.path.join(temp_dir, 
"tez-native-tarball-staging")
   if not os.path.exists(tez_native_tarball_staging_dir):
 Directory(tez_native_tarball_staging_dir,
+  mode = 0777,
   cd_access='a',
   create_parents = True,
   recursive_ownership = True)



ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (part3) (jonathanhurley)

2017-11-16 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk f087874e7 -> a393926c5


AMBARI-22444 - Add Native Libraries To Tez Tarball (part3) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a393926c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a393926c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a393926c

Branch: refs/heads/trunk
Commit: a393926c5cdae85b567349c89098712d21a5e1ec
Parents: f087874
Author: Jonathan Hurley 
Authored: Thu Nov 16 09:43:24 2017 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 16 11:46:27 2017 -0500

--
 .../resource_management/libraries/functions/copy_tarball.py | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a393926c/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 7bca967..9b6fb98 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -58,8 +58,11 @@ def _prepare_tez_tarball():
 
   temp_dir = Script.get_tmp_dir()
 
+  # create the temp staging directories ensuring that non-root agents using 
tarfile can work with them
   mapreduce_temp_dir = tempfile.mkdtemp(prefix="mapreduce-tarball-", 
dir=temp_dir)
   tez_temp_dir = tempfile.mkdtemp(prefix="tez-tarball-", dir=temp_dir)
+  sudo.chmod(mapreduce_temp_dir, 0777)
+  sudo.chmod(tez_temp_dir, 0777)
 
   Logger.info("Extracting {0} to {1}".format(mapreduce_source_file, 
mapreduce_temp_dir))
   tar_archive.extract_archive(mapreduce_source_file, mapreduce_temp_dir)
@@ -76,11 +79,17 @@ def _prepare_tez_tarball():
   if not os.path.exists(tez_lib_dir):
 raise Fail("Unable to seed the Tez tarball with native libraries since the 
target Tez lib directory {0} does not exist".format(tez_lib_dir))
 
+  # ensure that the tez/lib directory is readable by non-root (which it 
typically is not)
+  sudo.chmod(tez_lib_dir, 0755)
+
+  # copy native libraries from hadoop to tez
   Execute(("cp", "-a", hadoop_lib_native_dir, tez_lib_dir), sudo = True)
 
+  # create the staging directory so that non-root agents can write to it
   tez_native_tarball_staging_dir = os.path.join(temp_dir, 
"tez-native-tarball-staging")
   if not os.path.exists(tez_native_tarball_staging_dir):
 Directory(tez_native_tarball_staging_dir,
+  mode = 0777,
   cd_access='a',
   create_parents = True,
   recursive_ownership = True)



[1/2] ambari git commit: AMBARI-22449. Improved service/component dependency support (amagyar)

2017-11-16 Thread amagyar
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-22008 0f40a4da6 -> df7ac8cc9


AMBARI-22449. Improved service/component dependency support (amagyar)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c128577b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c128577b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c128577b

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: c128577b6c5f6f2b9694a026fd85346a95bc7ef2
Parents: 0f40a4d
Author: Attila Magyar 
Authored: Thu Nov 16 12:27:13 2017 +0100
Committer: Attila Magyar 
Committed: Thu Nov 16 12:27:13 2017 +0100

--
 .../app/controllers/wizard/step4_controller.js  | 115 ++-
 ambari-web/app/messages.js  |   3 +-
 ambari-web/app/models/stack_service.js  |  82 +
 .../test/controllers/wizard/step4_test.js   |  16 +--
 4 files changed, 155 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c128577b/ambari-web/app/controllers/wizard/step4_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step4_controller.js 
b/ambari-web/app/controllers/wizard/step4_controller.js
index d82bf34..d39164b 100644
--- a/ambari-web/app/controllers/wizard/step4_controller.js
+++ b/ambari-web/app/controllers/wizard/step4_controller.js
@@ -386,61 +386,29 @@ App.WizardStep4Controller = Em.ArrayController.extend({
*/
   serviceDependencyValidation: function(callback) {
 var selectedServices = this.filterProperty('isSelected', true);
+var availableServices = this.get('content');
 var missingDependencies = [];
-var missingDependenciesDisplayName = [];
 selectedServices.forEach(function(service) {
-  var requiredServices = service.get('requiredServices');
-  if (!!requiredServices && requiredServices.length) {
-requiredServices.forEach(function(_requiredService){
-  var requiredService = this.findProperty('serviceName', 
_requiredService);
-  if (requiredService) {
-if(requiredService.get('isSelected') === false) {
-   if(missingDependencies.indexOf(_requiredService) === -1) {
- missingDependencies.push(_requiredService);
- 
missingDependenciesDisplayName.push(requiredService.get('displayNameOnSelectServicePage'));
-   }
-}
-else {
-   //required service is selected, remove the service error from 
errorObject array
-   var serviceName = requiredService.get('serviceName');
-   var serviceError = 
this.get('errorStack').filterProperty('id',"serviceCheck_"+serviceName);
-   if(serviceError) {
-  this.get('errorStack').removeObject(serviceError[0]);
-   }
-}
-  }
-},this);
-  }
-},this);
+  service.collectMissingDependencies(selectedServices, availableServices, 
missingDependencies);
+});
+this.cleanExistingServiceCheckErrors();
+this.addServiceCheckErrors(missingDependencies, callback);
+  },
 
-//create a copy of the errorStack, reset it
-//and add the dependencies in the correct order
-var errorStackCopy = this.get('errorStack');
-this.set('errorStack', []);
+  cleanExistingServiceCheckErrors() {
+var existingServiceCheckErrors = this.get('errorStack').filter(function 
(error) {
+  return error.id.startsWith('serviceCheck_');
+});
+this.get('errorStack').removeObjects(existingServiceCheckErrors);
+  },
 
-if (missingDependencies.length > 0) {
-  for(var i = 0; i < missingDependencies.length; i++) {
-this.addValidationError({
-  id: 'serviceCheck_' + missingDependencies[i],
-  callback: this.needToAddServicePopup,
-  callbackParams: [{serviceName: missingDependencies[i], selected: 
true}, 'serviceCheck', missingDependenciesDisplayName[i], callback]
-});
-  }
-}
-
-//iterate through the errorStackCopy array and add to errorStack array, 
the error objects that have no matching entry in the errorStack 
-//and that are not related to serviceChecks since serviceCheck errors have 
already been added when iterating through the missing dependencies list
-//Only add Ranger, Ambari Metrics, Spark and file system service 
validation errors if they exist in the errorStackCopy array
-var ctr = 0;
-while(ctr < errorStackCopy.length) {
-  //no matching entry in errorStack array
-  if (!this.get('errorStack').someProperty('id', errorStackCopy[ctr].id)) {
-//not serviceCheck error
-if(!errorStackCopy[ctr].id.startsWith('serviceCheck_')) {
-  

[2/2] ambari git commit: AMBARI-22449. Improved service/component dependency support (amagyar)

2017-11-16 Thread amagyar
AMBARI-22449. Improved service/component dependency support (amagyar)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/df7ac8cc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/df7ac8cc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/df7ac8cc

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: df7ac8cc9b0cc218cccbeef91a2e7883b35f6d4d
Parents: c128577
Author: Attila Magyar 
Authored: Thu Nov 16 15:35:41 2017 +0100
Committer: Attila Magyar 
Committed: Thu Nov 16 15:35:41 2017 +0100

--
 .../app/controllers/wizard/step4_controller.js  |  4 +--
 ambari-web/app/messages.js  |  3 +-
 ambari-web/app/models/stack_service.js  | 30 +++-
 3 files changed, 21 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/df7ac8cc/ambari-web/app/controllers/wizard/step4_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step4_controller.js 
b/ambari-web/app/controllers/wizard/step4_controller.js
index d39164b..8a62f3b 100644
--- a/ambari-web/app/controllers/wizard/step4_controller.js
+++ b/ambari-web/app/controllers/wizard/step4_controller.js
@@ -480,11 +480,11 @@ App.WizardStep4Controller = Em.ArrayController.extend({
   needToAddMissingDependency: function (missingDependency, i18nSuffix, 
callback, id) {
 var self = this;
 var displayName = missingDependency.get('displayName');
-if (missingDependency.hasMultipleOptions()) {
+if (missingDependency.get('hasMultipleOptions')) {
   return this.showDependencyPopup(
 id,
 Em.I18n.t('installer.step4.' + i18nSuffix + 
'.popup.header').format(displayName),
-Em.I18n.t('installer.step4.' + i18nSuffix + 
'.popup.body2').format(displayName, missingDependency.displayOptions()),
+Em.I18n.t('installer.step4.' + i18nSuffix + 
'.popup.body.multiOptions').format(displayName, 
missingDependency.get('displayOptions')),
 callback
   );
 } else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/df7ac8cc/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index f2151a3..6896469 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -879,7 +879,8 @@ Em.I18n.translations = {
   'installer.step4.multipleDFS.popup.body':'You selected more than one file 
system. We will automatically select only {0}. Is this OK?',
   'installer.step4.serviceCheck.popup.header':'{0} Needed',
   'installer.step4.serviceCheck.popup.body':'You did not select {0}, but it is 
needed by other services you selected. We will automatically add {1}. Is this 
OK?',
-  'installer.step4.serviceCheck.popup.body2':'You did not select {0}, but it 
is needed by other services you selected. Select a compatible service from the 
following list: {1}',
+  'installer.step4.serviceCheck.popup.body.multiOptions':'You did not select 
{0}, but it is needed by other services you selected. Select a compatible 
service from the following list: {1}',
+  'installer.step4.hcfs.displayName':'a Hadoop Compatible File System',
   'installer.step4.limitedFunctionality.popup.header':'Limited Functionality 
Warning',
   'installer.step4.ambariMetricsCheck.popup.body':'Ambari Metrics collects 
metrics from the cluster and makes them available to Ambari.  If you do not 
install Ambari Metrics service, metrics will not be accessible from Ambari.  
Are you sure you want to proceed without Ambari Metrics?',
   'installer.step4.ambariInfraCheck.popup.body':'Since Ambari Infra is not 
selected, you must supply your own Solr to make Atlas work. Are you sure you 
want to proceed?',

http://git-wip-us.apache.org/repos/asf/ambari/blob/df7ac8cc/ambari-web/app/models/stack_service.js
--
diff --git a/ambari-web/app/models/stack_service.js 
b/ambari-web/app/models/stack_service.js
index 46dfee5..a84816e 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -23,11 +23,11 @@ require('models/configs/objects/service_config_category');
 
 var Dependency = Ember.Object.extend({
   name: Ember.computed('service', function() {
-return this.get('service').get('serviceName');
+return this.get('service.serviceName');
   }),
 
   displayName: Ember.computed('service', function() {
-return this.get('service').get('displayNameOnSelectServicePage');
+return this.get('service.displayNameOnSelectServicePage');
   }),
 
   compatibleServices: function(services) {
@@ -40,8 +40,8 @@ var Dependency = Ember.Object.extend({
 });
 
 

ambari git commit: AMBARI-22459 IOP/HDP migration NN HA restart post Ambari upgrade fails (dili)

2017-11-16 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 72785da88 -> 946356a9c


AMBARI-22459 IOP/HDP migration NN HA restart post Ambari upgrade fails (dili)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/946356a9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/946356a9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/946356a9

Branch: refs/heads/branch-2.6
Commit: 946356a9cc9cd1999c05888b1799b8e1ac703491
Parents: 72785da
Author: Di Li 
Authored: Thu Nov 16 14:51:53 2017 -0500
Committer: Di Li 
Committed: Thu Nov 16 14:51:53 2017 -0500

--
 .../BigInsights/4.0/properties/stack_packages.json  | 12 
 1 file changed, 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/946356a9/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_packages.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_packages.json
 
b/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_packages.json
index f890d66..7a12011 100644
--- 
a/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_packages.json
+++ 
b/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_packages.json
@@ -178,18 +178,6 @@
   "STANDARD": [
 "hadoop-hdfs-secondarynamenode"
   ]
-},
-"ZKFC": {
-  "STACK-SELECT-PACKAGE": "hadoop-hdfs-zkfc",
-  "INSTALL": [
-"hadoop-hdfs-zkfc"
-  ],
-  "PATCH": [
-"hadoop-hdfs-zkfc"
-  ],
-  "STANDARD": [
-"hadoop-hdfs-zkfc"
-  ]
 }
   },
   "HIVE": {



[1/3] ambari git commit: AMBARI-22244. Use service type instead of service name - addendum (adoroszlai)

2017-11-16 Thread adoroszlai
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-14714-blueprintv2 f7d4d7322 -> 35834d5f9


AMBARI-22244. Use service type instead of service name - addendum (adoroszlai)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/384595a6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/384595a6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/384595a6

Branch: refs/heads/branch-feature-AMBARI-14714-blueprintv2
Commit: 384595a64abb248f1d051c0760ff9a156062f9f2
Parents: f7d4d73
Author: Attila Doroszlai 
Authored: Thu Nov 16 19:00:42 2017 +0100
Committer: Attila Doroszlai 
Committed: Thu Nov 16 19:00:42 2017 +0100

--
 .../checks/ServiceCheckValidityCheck.java   |  7 ---
 .../internal/ServiceResourceProvider.java   |  9 
 .../serveraction/upgrades/ConfigureAction.java  |  5 +++--
 .../ambari/server/state/ConfigHelper.java   | 14 ++---
 .../ambari/server/state/ConfigMergeHelper.java  |  4 ++--
 .../ambari/server/state/UpgradeHelper.java  | 22 ++--
 6 files changed, 31 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/384595a6/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java
index 2582c71..1126424 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java
@@ -101,11 +101,12 @@ public class ServiceCheckValidityCheck extends 
AbstractCheckDescriptor {
 continue;
   }
   StackId stackId = service.getDesiredStackId();
-  boolean isServiceWitNoConfigs = 
ambariMetaInfo.get().isServiceWithNoConfigs(stackId.getStackName(), 
stackId.getStackVersion(), service.getName());
+  String serviceType = service.getServiceType();
+  boolean isServiceWitNoConfigs = 
ambariMetaInfo.get().isServiceWithNoConfigs(stackId.getStackName(), 
stackId.getStackVersion(), serviceType);
   if (isServiceWitNoConfigs){
-LOG.info(String.format("%s in %s version %s does not have customizable 
configurations. Skip checking service configuration history.", 
service.getName(), stackId.getStackName(), stackId.getStackVersion()));
+LOG.info("{} in {} version {} does not have customizable 
configurations. Skip checking service configuration history.", serviceType, 
stackId.getStackName(), stackId.getStackVersion());
   } else {
-LOG.info(String.format("%s in %s version %s has customizable 
configurations. Check service configuration history.", service.getName(), 
stackId.getStackName(), stackId.getStackVersion()));
+LOG.info("{} in {} version {} has customizable configurations. Check 
service configuration history.", serviceType, stackId.getStackName(), 
stackId.getStackVersion());
 ServiceConfigEntity lastServiceConfig = 
serviceConfigDAO.getLastServiceConfig(clusterId, service.getServiceId());
 lastServiceConfigUpdates.put(service.getName(), 
lastServiceConfig.getCreateTimestamp());
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/384595a6/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
index 931035d..e353b3c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
@@ -276,8 +276,7 @@ public class ServiceResourceProvider extends 
AbstractControllerResourceProvider
   setResourceProperty(resource, SERVICE_SERVICE_TYPE_PROPERTY_ID,
 response.getServiceType(), requestedIds);
   setResourceProperty(resource, SERVICE_SERVICE_STATE_PROPERTY_ID,
-  calculateServiceState(response.getClusterName(), 
response.getServiceName()),
-  requestedIds);
+  calculateServiceState(response.getClusterName(), 
response.getServiceType(), response.getServiceName()), requestedIds);
   setResourceProperty(resource, SERVICE_MAINTENANCE_STATE_PROPERTY_ID,
   response.getMaintenanceState(), 

[3/3] ambari git commit: AMBARI-22297. componentInfos should be keyed by component name, not service name (adoroszlai)

2017-11-16 Thread adoroszlai
AMBARI-22297. componentInfos should be keyed by component name, not service 
name (adoroszlai)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/35834d5f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/35834d5f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/35834d5f

Branch: refs/heads/branch-feature-AMBARI-14714-blueprintv2
Commit: 35834d5f91967eaebac099e134c4b5b9b11e900c
Parents: 1a05827
Author: Attila Doroszlai 
Authored: Thu Nov 16 20:36:28 2017 +0100
Committer: Attila Doroszlai 
Committed: Thu Nov 16 20:36:28 2017 +0100

--
 .../server/controller/StackV2Factory.java   | 21 
 1 file changed, 8 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/35834d5f/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
index 5d3bcfd..201fcb1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2Factory.java
@@ -18,16 +18,12 @@
 
 package org.apache.ambari.server.controller;
 
-import static java.util.AbstractMap.SimpleImmutableEntry;
-
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.stream.Collectors;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
@@ -97,19 +93,18 @@ public class StackV2Factory {
   }
 
   private void getComponentInfos(StackData stackData) {
-List> componentServices = 
stackData.serviceComponents.entrySet().stream().
-  flatMap(e -> e.getValue().stream().map( v -> new 
SimpleImmutableEntry<>(e.getKey(), v))).
-  collect(Collectors.toList());
-componentServices.forEach( componentService -> {
+stackData.componentService.forEach( (componentName, serviceName) -> {
   try {
-ComponentInfo componentInfo = 
controller.getAmbariMetaInfo().getComponent(stackData.stackName,
-  stackData.stackVersion, componentService.getKey(), 
componentService.getValue());
+ComponentInfo componentInfo = 
controller.getAmbariMetaInfo().getComponent(stackData.stackName, 
stackData.stackVersion, serviceName, componentName);
 if (null != componentInfo) {
-  stackData.componentInfos.put(componentService.getKey(), 
componentInfo);
+  stackData.componentInfos.put(componentName, componentInfo);
+} else {
+  LOG.debug("No component info for service: {}, component: {}, stack 
name: {}, stack version: {}",
+serviceName, componentName, stackData.stackName, 
stackData.stackVersion);
 }
   } catch (AmbariException e) {
-LOG.debug("No component info for service: {}, component: {}, stack 
name: {}, stack version: {}, Exception: {}",
-  componentService.getKey(), componentService.getValue(), 
stackData.stackName, stackData.stackVersion, e);
+LOG.debug("No component info for service: {}, component: {}, stack 
name: {}, stack version: {}",
+  serviceName, componentName, stackData.stackName, 
stackData.stackVersion, e);
   }
 });
   }



[2/3] ambari git commit: AMBARI-22253. Fix order of arguments in ServiceRequest call (adoroszlai)

2017-11-16 Thread adoroszlai
AMBARI-22253. Fix order of arguments in ServiceRequest call (adoroszlai)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1a05827c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1a05827c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1a05827c

Branch: refs/heads/branch-feature-AMBARI-14714-blueprintv2
Commit: 1a05827c870f68a90d15f54236bb6ad2a025c98e
Parents: 384595a
Author: Attila Doroszlai 
Authored: Thu Nov 16 20:33:38 2017 +0100
Committer: Attila Doroszlai 
Committed: Thu Nov 16 20:33:38 2017 +0100

--
 .../main/java/org/apache/ambari/server/topology/AmbariContext.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1a05827c/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
index 8a32265..4c23e2f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
@@ -265,7 +265,7 @@ public class AmbariContext {
 repoVersion));
 }
 
-serviceRequests.add(new ServiceRequest(clusterName, 
serviceGroup.getName(), service.getType(), service.getName(),
+serviceRequests.add(new ServiceRequest(clusterName, 
serviceGroup.getName(), service.getName(), service.getType(),
   repoVersion.getId(), null, credentialStoreEnabled, null));
 
 for (ComponentV2 component : 
topology.getBlueprint().getComponents(service)) {



ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (part4) (jonathanhurley)

2017-11-16 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk f51b1ccab -> 365c91e92


AMBARI-22444 - Add Native Libraries To Tez Tarball (part4) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/365c91e9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/365c91e9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/365c91e9

Branch: refs/heads/trunk
Commit: 365c91e92698f6a566b8503486f80c736af79e70
Parents: f51b1cc
Author: Jonathan Hurley 
Authored: Thu Nov 16 14:11:28 2017 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 16 14:12:32 2017 -0500

--
 .../resource_management/libraries/functions/copy_tarball.py   | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/365c91e9/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 9b6fb98..dda1a18 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -101,6 +101,9 @@ def _prepare_tez_tarball():
   with closing(tarfile.open(tez_tarball_with_native_lib, "w:gz")) as 
new_tez_tarball:
 new_tez_tarball.add(tez_temp_dir, arcname=os.path.sep)
 
+  # ensure that the tarball can be read and uploaded
+  sudo.chmod(tez_tarball_with_native_lib, 0744)
+  
   # cleanup
   sudo.rmtree(mapreduce_temp_dir)
   sudo.rmtree(tez_temp_dir)



ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (part4) (jonathanhurley)

2017-11-16 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 295125730 -> 72785da88


AMBARI-22444 - Add Native Libraries To Tez Tarball (part4) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/72785da8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/72785da8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/72785da8

Branch: refs/heads/branch-2.6
Commit: 72785da88a1c93a12d45f4fdad815e144a1beb5f
Parents: 2951257
Author: Jonathan Hurley 
Authored: Thu Nov 16 14:11:28 2017 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 16 14:11:37 2017 -0500

--
 .../resource_management/libraries/functions/copy_tarball.py   | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/72785da8/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index dfe7c62..b05c97c 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -101,6 +101,9 @@ def _prepare_tez_tarball():
   with closing(tarfile.open(tez_tarball_with_native_lib, "w:gz")) as 
new_tez_tarball:
 new_tez_tarball.add(tez_temp_dir, arcname=os.path.sep)
 
+  # ensure that the tarball can be read and uploaded
+  sudo.chmod(tez_tarball_with_native_lib, 0744)
+  
   # cleanup
   sudo.rmtree(mapreduce_temp_dir)
   sudo.rmtree(tez_temp_dir)



[40/50] [abbrv] ambari git commit: AMBARI-22418. Make Ambari configuration API consistent with existing API. (rlevas)

2017-11-16 Thread rlevas
AMBARI-22418.  Make Ambari configuration API consistent with existing API. 
(rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3f2743b5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3f2743b5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3f2743b5

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 3f2743b58ba65c4bdc7d37df5348d17124bf305a
Parents: 2d81d49
Author: Robert Levas 
Authored: Wed Nov 15 12:11:34 2017 -0500
Committer: Robert Levas 
Committed: Wed Nov 15 12:11:34 2017 -0500

--
 .../resources/ResourceInstanceFactoryImpl.java  |   9 +-
 .../RootServiceComponentResourceDefinition.java |   9 +-
 .../AmbariConfigurationRequestSwagger.java  |  37 --
 .../AmbariConfigurationResponseSwagger.java |  40 --
 .../services/AmbariConfigurationService.java| 193 
 .../server/api/services/AmbariMetaInfo.java |   4 +-
 ...iceComponentConfigurationRequestSwagger.java |  43 ++
 ...ceComponentConfigurationResponseSwagger.java |  43 ++
 ...ootServiceComponentConfigurationService.java | 226 +
 .../server/api/services/RootServiceService.java |   7 +
 .../api/services/ldap/AmbariConfiguration.java  |   6 +-
 .../services/ldap/LdapConfigurationRequest.java |   2 +-
 .../services/ldap/LdapConfigurationService.java |   6 +-
 .../commands/StackAdvisorCommand.java   |  62 ++-
 .../server/controller/ControllerModule.java |   4 +-
 .../controller/MaintenanceStateHelper.java  |   3 +-
 .../controller/ResourceProviderFactory.java |   4 +-
 .../ambari/server/controller/RootComponent.java |  27 ++
 .../ambari/server/controller/RootService.java   |  36 ++
 .../controller/RootServiceResponseFactory.java  |  44 +-
 .../AbstractControllerResourceProvider.java |   4 +-
 .../AmbariConfigurationResourceProvider.java| 302 
 ...eComponentConfigurationResourceProvider.java | 476 +++
 .../RootServiceComponentPropertyProvider.java   |   4 +-
 .../RootServiceComponentResourceProvider.java   |   4 +-
 .../ambari/server/controller/spi/Resource.java  |   6 +-
 .../listeners/alerts/AlertReceivedListener.java |  10 +-
 .../alerts/AlertStateChangedListener.java   |   6 +-
 .../ldap/domain/AmbariLdapConfiguration.java|   6 +-
 .../domain/AmbariLdapConfigurationFactory.java  |   2 +-
 .../AmbariLdapConfigurationProvider.java|   6 +-
 .../metadata/AmbariServiceAlertDefinitions.java |  20 +-
 .../server/orm/dao/AlertDefinitionDAO.java  |   7 +-
 .../ambari/server/orm/dao/AlertDispatchDAO.java |   4 +-
 .../server/state/alert/AlertDefinitionHash.java |   8 +-
 .../server/state/cluster/ClusterImpl.java   |   4 +-
 .../services/AmbariServerAlertService.java  |   4 +-
 .../commands/StackAdvisorCommandTest.java   |   8 +-
 .../AmbariManagementControllerTest.java |  16 +-
 .../RootServiceResponseFactoryTest.java |  27 +-
 ...AmbariConfigurationResourceProviderTest.java | 377 ---
 ...ponentConfigurationResourceProviderTest.java | 393 +++
 ...ootServiceComponentPropertyProviderTest.java |  15 +-
 ...ootServiceComponentResourceProviderTest.java |   9 +-
 .../server/ldap/LdapModuleFunctionalTest.java   |   4 +-
 .../TestAmbariLdapConfigurationFactory.java |   2 +-
 .../ldap/service/AmbariLdapFacadeTest.java  |   4 +-
 ...efaultLdapAttributeDetectionServiceTest.java |   8 +-
 .../DefaultLdapConfigurationServiceTest.java|  12 +-
 .../metadata/AgentAlertDefinitionsTest.java |   6 +-
 .../server/orm/dao/AlertDefinitionDAOTest.java  |   7 +-
 .../state/alerts/AlertReceivedListenerTest.java |  16 +-
 .../alerts/AlertStateChangedEventTest.java  |   4 +-
 53 files changed, 1444 insertions(+), 1142 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f2743b5/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
index f5fb6e9..fecaedc 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
@@ -237,6 +237,11 @@ public class ResourceInstanceFactoryImpl implements 
ResourceInstanceFactory {
 resourceDefinition = new RootServiceComponentResourceDefinition();
 break;
 
+  case RootServiceComponentConfiguration:
+resourceDefinition = new 

[46/50] [abbrv] ambari git commit: AMBARI-22460. NFSGateway start failed (aonishuk)

2017-11-16 Thread rlevas
AMBARI-22460. NFSGateway start failed (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f087874e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f087874e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f087874e

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: f087874e7b0bc1e5b5a2398c7571264aaec15fa5
Parents: 4042f9f
Author: Andrew Onishuk 
Authored: Thu Nov 16 12:26:56 2017 +0200
Committer: Andrew Onishuk 
Committed: Thu Nov 16 12:26:56 2017 +0200

--
 .../src/main/resources/stacks/HDP/2.0.6/role_command_order.json | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f087874e/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
index 78a31f1..3f576bf 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
@@ -14,6 +14,7 @@
 "HIVE_SERVER-RESTART": ["NODEMANAGER-RESTART", "MYSQL_SERVER-RESTART", 
"ZOOKEEPER_SERVER-RESTART"],
 "HUE_SERVER-START": ["HIVE_SERVER-START", "HCAT-START", 
"OOZIE_SERVER-START"],
 "FLUME_HANDLER-START": ["OOZIE_SERVER-START"],
+"NFS_GATEWAY-START": ["NAMENODE-START"],
 "MAPREDUCE_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", 
"RESOURCEMANAGER-START"],
 "OOZIE_SERVICE_CHECK-SERVICE_CHECK": ["OOZIE_SERVER-START", 
"MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK"],
 "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],



[35/50] [abbrv] ambari git commit: AMBARI-22398. Upstart is not able to stop the ambari-agent - fix unit test

2017-11-16 Thread rlevas
AMBARI-22398. Upstart is not able to stop the ambari-agent - fix unit test


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a4e7bf37
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a4e7bf37
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a4e7bf37

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: a4e7bf379dc2392253bd9bad3ab42ab9c2d9552e
Parents: 2b917f4
Author: Attila Doroszlai 
Authored: Wed Nov 15 12:56:23 2017 +0100
Committer: Attila Doroszlai 
Committed: Wed Nov 15 12:56:23 2017 +0100

--
 ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a4e7bf37/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
--
diff --git a/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py 
b/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
index 8ff192a..56a73fc 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
@@ -35,8 +35,7 @@ class TestAmbariAgent(unittest.TestCase):
   @patch("os.path.isfile")
   @patch("os.remove")
   @patch("os.killpg")
-  @patch("os.setpgrp")
-  def test_main(self, os_setpgrp_mock, os_killpg_mock, os_remove_mock,
+  def test_main(self, os_killpg_mock, os_remove_mock,
 os_path_isfile_mock, subprocess_popen_mock):
 facter1 = MagicMock()
 facter2 = MagicMock()
@@ -49,7 +48,6 @@ class TestAmbariAgent(unittest.TestCase):
 sys.argv[0] = "test data"
 AmbariAgent.main()
 
-self.assertTrue(os_setpgrp_mock.called)
 self.assertTrue(subprocess_popen_mock.called)
 self.assertTrue(subprocess_popen_mock.call_count == 2)
 self.assertTrue(facter1.communicate.called)



[15/50] [abbrv] ambari git commit: AMBARI-22412. Remove IPA integration from experimental status (rlevas)

2017-11-16 Thread rlevas
AMBARI-22412. Remove IPA integration from experimental status (rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/22b2d55f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/22b2d55f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/22b2d55f

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 22b2d55f646ebd965834e43536056c5f229e236e
Parents: 98915a1
Author: Robert Levas 
Authored: Fri Nov 10 10:46:01 2017 -0500
Committer: Robert Levas 
Committed: Fri Nov 10 10:46:01 2017 -0500

--
 ambari-web/app/config.js|  1 -
 .../main/admin/kerberos/step1_controller.js | 52 +---
 ambari-web/app/messages.js  |  2 +-
 .../admin/kerberos/step1_controller_test.js | 17 ---
 4 files changed, 23 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/22b2d55f/ambari-web/app/config.js
--
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 0963f70..8dbbde3 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -82,7 +82,6 @@ App.supports = {
   serviceAutoStart: true,
   logSearch: true,
   redhatSatellite: false,
-  enableIpa: false,
   addingNewRepository: false,
   kerberosStackAdvisor: true,
   logCountVizualization: false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/22b2d55f/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
index 2e41e3d..9c864a8 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
@@ -25,29 +25,6 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({
 
   isSubmitDisabled: Em.computed.someBy('selectedOption.preConditions', 
'checked', false),
 
-  ipaOption: Em.Object.create({
-displayName: Em.I18n.t('admin.kerberos.wizard.step1.option.ipa'),
-value: Em.I18n.t('admin.kerberos.wizard.step1.option.ipa'),
-preConditions: [
-  Em.Object.create({
-displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.1'),
-checked: false
-  }),
-  Em.Object.create({
-displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.2'),
-checked: false
-  }),
-  Em.Object.create({
-displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.3'),
-checked: false
-  }),
-  Em.Object.create({
-displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.4'),
-checked: false
-  })
-]
-  }),
-
   options: Em.A([
 Em.Object.create({
   displayName: Em.I18n.t('admin.kerberos.wizard.step1.option.kdc'),
@@ -94,6 +71,28 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({
   ]
 }),
 Em.Object.create({
+  displayName: Em.I18n.t('admin.kerberos.wizard.step1.option.ipa'),
+  value: Em.I18n.t('admin.kerberos.wizard.step1.option.ipa'),
+  preConditions: [
+Em.Object.create({
+  displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.1'),
+  checked: false
+}),
+Em.Object.create({
+  displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.2'),
+  checked: false
+}),
+Em.Object.create({
+  displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.3'),
+  checked: false
+}),
+Em.Object.create({
+  displayText: 
Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.4'),
+  checked: false
+})
+  ]
+}),
+Em.Object.create({
   displayName: Em.I18n.t('admin.kerberos.wizard.step1.option.manual'),
   value: Em.I18n.t('admin.kerberos.wizard.step1.option.manual'),
   preConditions: [
@@ -135,13 +134,6 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({
 
 
   loadStep: function () {
-if (App.get('supports.enableIpa')) {
-  var ipaOption = this.get('ipaOption');
-  var options = this.get('options');
-  if (options.indexOf(ipaOption) === -1){
-options.pushObject(ipaOption);
-  }
-}
   },
 
   submit: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/22b2d55f/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index bee581a..390f803 100644
--- 

[26/50] [abbrv] ambari git commit: AMBARI-22429 Log Search UI: implement logout. (Istvan Tobias via ababiichuk)

2017-11-16 Thread rlevas
AMBARI-22429 Log Search UI: implement logout. (Istvan Tobias via ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7428e51d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7428e51d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7428e51d

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 7428e51d8e3759edf5248762f0a257a46cc053a5
Parents: 4fa9ac5
Author: Istvan Tobias 
Authored: Tue Nov 14 00:31:01 2017 +0200
Committer: ababiichuk 
Committed: Tue Nov 14 00:31:01 2017 +0200

--
 .../ambari-logsearch-web/src/app/app.module.ts  |   4 +-
 .../src/app/components/app.component.spec.ts|   4 +-
 .../dropdown-button.component.spec.ts   |   4 +-
 .../dropdown-list.component.spec.ts |   4 +-
 .../filter-button.component.spec.ts |   4 +-
 .../filter-dropdown.component.spec.ts   |   4 +-
 .../login-form/login-form.component.spec.ts |   7 +-
 .../login-form/login-form.component.ts  |  34 +++--
 .../menu-button/menu-button.component.spec.ts   |   4 +-
 .../timezone-picker.component.spec.ts   |   4 +-
 .../components/top-menu/top-menu.component.ts   |   3 +-
 .../ambari-logsearch-web/src/app/mock-data.ts   |   3 +-
 .../src/app/services/auth.service.spec.ts   | 132 +++
 .../src/app/services/auth.service.ts| 123 +
 .../services/component-actions.service.spec.ts  |   4 +-
 .../app/services/component-actions.service.ts   |  20 ++-
 .../src/assets/i18n/en.json |   1 +
 17 files changed, 328 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7428e51d/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
--
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
index 37f3a49..805f8e2 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
@@ -53,6 +53,7 @@ import {ComponentsService} from 
'@app/services/storage/components.service';
 import {ServiceLogsFieldsService} from 
'@app/services/storage/service-logs-fields.service';
 import {AuditLogsFieldsService} from 
'@app/services/storage/audit-logs-fields.service';
 import {TabsService} from '@app/services/storage/tabs.service';
+import {AuthService} from '@app/services/auth.service';
 import {reducer} from '@app/services/storage/reducers.service';
 
 import {AppComponent} from '@app/components/app.component';
@@ -185,7 +186,8 @@ export function getXHRBackend(injector: Injector, browser: 
BrowserXhr, xsrf: XSR
   provide: XHRBackend,
   useFactory: getXHRBackend,
   deps: [Injector, BrowserXhr, XSRFStrategy, ResponseOptions]
-}
+},
+AuthService
   ],
   bootstrap: [AppComponent],
   entryComponents: [NodeBarComponent],

http://git-wip-us.apache.org/repos/asf/ambari/blob/7428e51d/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
index 490e058..bae05ce 100644
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
@@ -53,9 +53,9 @@ describe('AppComponent', () => {
 }).compileComponents();
   }));
 
-  it('should create the app', async(() => {
+  it('should create the app', () => {
 const fixture = TestBed.createComponent(AppComponent);
 const app = fixture.debugElement.componentInstance;
 expect(app).toBeTruthy();
-  }));
+  });
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/7428e51d/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
index bd41c04..fc42e3c 100644
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/dropdown-button/dropdown-button.component.spec.ts
@@ -36,6 +36,7 @@ import {UtilsService} from '@app/services/utils.service';
 import {ComponentActionsService} from 

[34/50] [abbrv] ambari git commit: AMBARI-22443. Log Feeder: do not try to connect AMS, when it is disabled (oleewere)

2017-11-16 Thread rlevas
AMBARI-22443. Log Feeder: do not try to connect AMS, when it is disabled 
(oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2b917f49
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2b917f49
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2b917f49

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 2b917f491f5577a85ec88380d7f3f93397cececf
Parents: ba00ed9
Author: Oliver Szabo 
Authored: Tue Nov 14 19:15:57 2017 +0100
Committer: Oliver Szabo 
Committed: Wed Nov 15 11:43:00 2017 +0100

--
 .../ambari/logfeeder/metrics/LogFeederAMSClient.java  |  3 +++
 .../apache/ambari/logfeeder/metrics/MetricsManager.java   |  8 +++-
 .../ambari/logfeeder/metrics/MetricsManagerTest.java  | 10 ++
 3 files changed, 16 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2b917f49/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
index f446446..c832358 100644
--- 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
+++ 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/LogFeederAMSClient.java
@@ -64,6 +64,9 @@ public class LogFeederAMSClient extends 
AbstractTimelineMetricsSink {
 
   @Override
   public String getCollectorUri(String host) {
+if (collectorProtocol == null || host == null || collectorPort == null || 
collectorPath == null) {
+  return null;
+}
 return String.format("%s://%s:%s%s", collectorProtocol, host, 
collectorPort, collectorPath);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2b917f49/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
index 1094852..6e8ac04 100644
--- 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
+++ 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/metrics/MetricsManager.java
@@ -45,7 +45,9 @@ public class MetricsManager {
 
   public void init() {
 LOG.info("Initializing MetricsManager()");
-amsClient = new LogFeederAMSClient();
+if (amsClient == null) {
+  amsClient = new LogFeederAMSClient();
+}
 
 if (amsClient.getCollectorUri(null) != null) {
   if (LogFeederUtil.hostName == null) {
@@ -144,4 +146,8 @@ public class MetricsManager {
   (currMS - lastPublishTimeMS) / 1000 + " seconds ago, 
intervalConfigured=" + publishIntervalMS / 1000);
 }
   }
+
+  public void setAmsClient(LogFeederAMSClient amsClient) {
+this.amsClient = amsClient;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/2b917f49/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
index 24042a7..f74a80e 100644
--- 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
+++ 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/metrics/MetricsManagerTest.java
@@ -50,18 +50,20 @@ public class MetricsManagerTest {
   @Before
   public void init() throws Exception {
 manager = new MetricsManager();
-manager.init();
-
+
 mockClient = strictMock(LogFeederAMSClient.class);
 Field f = MetricsManager.class.getDeclaredField("amsClient");
 f.setAccessible(true);
 f.set(manager, mockClient);
-
+
+
EasyMock.expect(mockClient.getCollectorUri(null)).andReturn("null://null:null/null").anyTimes();
 capture = EasyMock.newCapture(CaptureType.FIRST);
 mockClient.emitMetrics(EasyMock.capture(capture));
 

[08/50] [abbrv] ambari git commit: AMBARI-22370 - Remove HADOOP_HOME From Environment For Daemons (jonathanhurley)

2017-11-16 Thread rlevas
AMBARI-22370 - Remove HADOOP_HOME From Environment For Daemons (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/780e91e6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/780e91e6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/780e91e6

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 780e91e6124f39fcd67e58369ed2a42da2a6f247
Parents: 444718a
Author: Jonathan Hurley 
Authored: Mon Nov 6 16:05:56 2017 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 9 08:23:15 2017 -0500

--
 .../libraries/functions/stack_select.py  |  3 ++-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py|  2 +-
 .../ATLAS/0.7.0.3.0/package/scripts/params.py|  2 +-
 .../FALCON/0.5.0.2.1/package/scripts/falcon.py   | 11 +--
 .../package/scripts/hive_service_interactive.py  |  5 ++---
 .../package/scripts/webhcat_service.py   | 19 ---
 .../package/scripts/hive_service_interactive.py  |  5 ++---
 .../2.1.0.3.0/package/scripts/params_linux.py|  7 +++
 .../2.1.0.3.0/package/scripts/webhcat_service.py | 19 ---
 .../1.0.0.2.3/package/scripts/service_check.py   |  3 +--
 .../1.4.4.2.0/package/scripts/params_linux.py|  4 ++--
 .../1.4.4.3.0/package/scripts/params_linux.py|  4 ++--
 .../0.4.0.2.1/package/scripts/params_linux.py|  2 +-
 .../0.9.0.3.0/package/scripts/params_linux.py|  2 +-
 .../2.1.0.2.0/package/scripts/params_linux.py|  2 +-
 .../3.0.0.3.0/package/scripts/params_linux.py|  2 +-
 .../stacks/2.0.6/HIVE/test_webhcat_server.py |  4 
 .../stacks/2.1/FALCON/test_falcon_server.py  | 10 ++
 .../python/stacks/2.1/TEZ/test_tez_client.py |  2 +-
 .../2.3/MAHOUT/test_mahout_service_check.py  |  4 +---
 .../stacks/2.5/HIVE/test_hive_server_int.py  | 15 +--
 21 files changed, 38 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/780e91e6/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
index 9b7d0eb..b741a33 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
@@ -71,7 +71,8 @@ HADOOP_DIR_DEFAULTS = {
   "libexec": "/usr/lib/hadoop/libexec",
   "sbin": "/usr/lib/hadoop/sbin",
   "bin": "/usr/bin",
-  "lib": "/usr/lib/hadoop/lib"
+  "lib": "/usr/lib/hadoop/lib",
+  "conf": "/etc/hadoop/conf"
 }
 
 PACKAGE_SCOPE_INSTALL = "INSTALL"

http://git-wip-us.apache.org/repos/asf/ambari/blob/780e91e6/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index 968ceed..31a866e 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -118,7 +118,7 @@ metadata_stop_script = 
format("{metadata_bin}/atlas_stop.py")
 log_dir = config['configurations']['atlas-env']['metadata_log_dir']
 
 # service locations
-hadoop_conf_dir = os.path.join(os.environ["HADOOP_HOME"], "conf") if 
'HADOOP_HOME' in os.environ else '/etc/hadoop/conf'
+hadoop_conf_dir = os.path.join(os.environ["HADOOP_HOME"], "conf") if 
'HADOOP_HOME' in os.environ else 
format('{stack_root}/current/hadoop-client/conf')
 
 # some commands may need to supply the JAAS location when running as atlas
 atlas_jaas_file = format("{conf_dir}/atlas_jaas.conf")

http://git-wip-us.apache.org/repos/asf/ambari/blob/780e91e6/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
index b01884c..7c1249a 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
@@ -116,7 +116,7 @@ metadata_stop_script = 

[04/50] [abbrv] ambari git commit: AMBARI-22384. Disable HDP 2.3 stack. (swagle)

2017-11-16 Thread rlevas
AMBARI-22384. Disable HDP 2.3 stack. (swagle)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7074e6e8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7074e6e8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7074e6e8

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 7074e6e8a736fbdc1bb3afb86480c6cd349611b0
Parents: 5adcea7
Author: Siddharth Wagle 
Authored: Wed Nov 8 13:07:11 2017 -0800
Committer: Siddharth Wagle 
Committed: Wed Nov 8 13:07:11 2017 -0800

--
 ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7074e6e8/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml
--
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml
index f98b24b..9fa9b90 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml
@@ -17,7 +17,7 @@
 -->
 
 
- true
+ false
 
 2.2
 1.7



[21/50] [abbrv] ambari git commit: AMBARI-22387. Create a Pre-Upgrade Check Warning About LZO (dlysnichenko)

2017-11-16 Thread rlevas
AMBARI-22387. Create a Pre-Upgrade Check Warning About LZO (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76349ac2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76349ac2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76349ac2

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 76349ac20d8955b3f25383b6f4f209a690b38bef
Parents: 5122671
Author: Lisnichenko Dmitro 
Authored: Mon Nov 13 13:29:52 2017 +0200
Committer: Lisnichenko Dmitro 
Committed: Mon Nov 13 13:30:26 2017 +0200

--
 .../ambari/server/checks/CheckDescription.java  |   9 ++
 .../apache/ambari/server/checks/LZOCheck.java   |  77 ++
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml |   1 +
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml |   1 +
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml |   1 +
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml |   1 +
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |   1 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml |   1 +
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   1 +
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |   1 +
 .../ambari/server/checks/LZOCheckTest.java  | 145 +++
 11 files changed, 239 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/76349ac2/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
index 3caac14..20bb1b0 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
@@ -327,6 +327,15 @@ public class CheckDescription {
 "As Ranger is SSL enabled, Ranger SSL configurations will need to be 
changed from default value of /etc/ranger/*/conf folder to 
/etc/ranger/security. " +
 "Since the certificates/keystores/truststores in this path may affect 
the upgrade/downgrade process, it is recommended to manually move the 
certificates/keystores/truststores out of the conf folders and change the 
appropriate config values before proceeding.").build());
 
+  public static CheckDescription LZO_CONFIG_CHECK = new 
CheckDescription("LZO_CONFIG_CHECK",
+  PrereqCheckType.CLUSTER,
+  "LZO Codec Check",
+  new ImmutableMap.Builder()
+  .put(AbstractCheckDescriptor.DEFAULT,
+  "You have LZO codec enabled in the core-site config of your 
cluster. LZO is no longer installed automatically. " +
+  "If any hosts require LZO, it should be installed before 
starting the upgrade. " +
+  "Consult Ambari documentation for instructions on how to do 
this.").build());
+
   public static CheckDescription JAVA_VERSION = new 
CheckDescription("JAVA_VERSION",
   PrereqCheckType.CLUSTER,
   "Verify Java version requirement",

http://git-wip-us.apache.org/repos/asf/ambari/blob/76349ac2/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
new file mode 100644
index 000..3000b79
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
@@ -0,0 +1,77 @@
+/*
+ * 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.checks;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.controller.PrereqCheckRequest;
+import org.apache.ambari.server.state.stack.PrereqCheckStatus;

[50/50] [abbrv] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-20859

2017-11-16 Thread rlevas
 Merge branch 'trunk' into branch-feature-AMBARI-20859


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d173011c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d173011c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d173011c

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: d173011c8b52d99708c842a6d6263b09695b128c
Parents: ceead22 365c91e
Author: Robert Levas 
Authored: Thu Nov 16 14:44:35 2017 -0500
Committer: Robert Levas 
Committed: Thu Nov 16 14:45:02 2017 -0500

--
 .gitignore  | 3 +
 ambari-admin/pom.xml| 2 +-
 .../app/assets/fonts/Roboto-Regular-webfont.eot |   Bin 0 -> 79547 bytes
 .../app/assets/fonts/Roboto-Regular-webfont.svg |  7606 ++
 .../app/assets/fonts/Roboto-Regular-webfont.ttf |   Bin 0 -> 234464 bytes
 .../assets/fonts/Roboto-Regular-webfont.woff|   Bin 0 -> 105700 bytes
 .../main/resources/ui/admin-web/app/index.html  |82 +-
 .../app/scripts/controllers/AppCtrl.js  |   177 +
 .../controllers/ClusterInformationCtrl.js   |65 +
 .../app/scripts/controllers/NavbarCtrl.js   |   106 -
 .../app/scripts/controllers/SideNavCtrl.js  |68 +
 .../ambariViews/CloneViewInstanceCtrl.js|   274 +
 .../ambariViews/CreateViewInstanceCtrl.js   |   353 +-
 .../controllers/ambariViews/ViewsListCtrl.js|   360 +-
 .../controllers/clusters/ExportBlueprintCtrl.js |58 -
 .../app/scripts/controllers/mainCtrl.js |   183 -
 .../ui/admin-web/app/scripts/i18n.config.js |38 +-
 .../ui/admin-web/app/scripts/routes.js  |   134 +-
 .../ui/admin-web/app/scripts/services/View.js   |32 +-
 .../app/scripts/theme/bootstrap-ambari.js   |   269 +
 .../app/styles/cluster-information.css  |59 +
 .../resources/ui/admin-web/app/styles/main.css  |   581 +-
 .../app/styles/theme/bootstrap-ambari.css   |  1518 ++
 .../ui/admin-web/app/styles/top-nav.css |   200 +
 .../resources/ui/admin-web/app/styles/views.css |49 +
 .../admin-web/app/views/ambariViews/create.html |20 +-
 .../admin-web/app/views/ambariViews/edit.html   |37 +-
 .../app/views/ambariViews/listTable.html|   110 -
 .../app/views/ambariViews/listUrls.html |   117 -
 .../app/views/ambariViews/modals/create.html|   238 +-
 .../app/views/ambariViews/modals/edit.html  |   138 -
 .../app/views/ambariViews/viewsList.html|   134 +
 .../app/views/authentication/main.html  | 8 +-
 .../admin-web/app/views/clusterInformation.html |66 +
 .../app/views/clusters/exportBlueprint.html |40 -
 .../ui/admin-web/app/views/groups/list.html | 7 +-
 .../ui/admin-web/app/views/leftNavbar.html  |   126 -
 .../resources/ui/admin-web/app/views/main.html  |96 -
 .../app/views/modals/AddVersionModal.html   |14 +-
 .../app/views/remoteClusters/list.html  | 6 +-
 .../ui/admin-web/app/views/sideNav.html |   113 +
 .../admin-web/app/views/stackVersions/list.html |19 +-
 .../views/stackVersions/stackVersionPage.html   |27 +-
 .../ui/admin-web/app/views/urls/create.html | 4 +-
 .../ui/admin-web/app/views/urls/edit.html   | 4 +-
 .../ui/admin-web/app/views/users/list.html  | 7 +-
 .../src/main/resources/ui/admin-web/bower.json  | 2 +-
 .../src/main/resources/ui/admin-web/gulpfile.js |10 +-
 .../main/resources/ui/admin-web/package.json| 6 +-
 .../test/unit/controllers/AppCtrl_test.js   |   211 +
 .../unit/controllers/CloneViewInstanceCtrl.js   |   135 +
 .../unit/controllers/CreateViewInstanceCtrl.js  |   135 -
 .../test/unit/controllers/mainCtrl_test.js  |   215 -
 .../test/unit/services/Utility_test.js  | 3 +-
 .../src/main/python/ambari_agent/ActionQueue.py | 5 +-
 .../src/main/python/ambari_agent/AmbariAgent.py | 3 -
 .../python/ambari_agent/alerts/base_alert.py| 2 +-
 .../test/python/ambari_agent/TestAmbariAgent.py | 4 +-
 .../core/providers/package/__init__.py  | 2 +-
 .../core/providers/package/apt.py   |23 +-
 .../core/providers/package/yumrpm.py|83 +-
 .../core/providers/package/zypper.py|37 +-
 .../libraries/functions/conf_select.py  |58 +
 .../libraries/functions/copy_tarball.py |   102 +-
 .../libraries/functions/curl_krb_request.py |22 +-
 .../libraries/functions/package_conditions.py   | 6 +-
 .../libraries/functions/repository_util.py  |79 +-
 .../libraries/functions/stack_select.py | 3 +-
 .../libraries/functions/tar_archive.py  | 6 +-
 .../libraries/script/script.py  | 4 +-
 ambari-funtest/pom.xml  |67 -
 

[25/50] [abbrv] ambari git commit: AMBARI-22347. Simplify Ambari configuration tables from AMBARI-21307 (rlevas)

2017-11-16 Thread rlevas
AMBARI-22347.  Simplify Ambari configuration tables from AMBARI-21307 (rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fa9ac55
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fa9ac55
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fa9ac55

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 4fa9ac5505d6604f1d74def8fc1ea6eeb3ea3fda
Parents: 18e5490
Author: Robert Levas 
Authored: Mon Nov 13 13:11:42 2017 -0500
Committer: Robert Levas 
Committed: Mon Nov 13 13:12:11 2017 -0500

--
 .../AmbariConfigurationRequestSwagger.java  |  14 +-
 .../services/AmbariConfigurationService.java|  46 +-
 .../api/services/ldap/AmbariConfiguration.java  |  51 +--
 .../services/ldap/LdapConfigurationService.java |   4 +-
 .../AmbariConfigurationResourceProvider.java| 370 +++-
 .../events/AmbariConfigurationChangedEvent.java |  36 ++
 .../ambari/server/events/AmbariEvent.java   |   4 +-
 .../events/AmbariLdapConfigChangedEvent.java|  37 --
 .../ldap/domain/AmbariLdapConfiguration.java|  20 +-
 .../AmbariLdapConfigurationProvider.java|  57 ++-
 .../ads/LdapConnectionTemplateFactory.java  |   4 +-
 .../server/orm/dao/AmbariConfigurationDAO.java  | 146 --
 .../orm/entities/AmbariConfigurationEntity.java |  94 ++--
 .../entities/AmbariConfigurationEntityPK.java   |  88 
 .../orm/entities/ConfigurationBaseEntity.java   | 159 ---
 .../server/upgrade/SchemaUpgradeHelper.java |   3 +-
 .../server/upgrade/UpgradeCatalog300.java   |  21 +-
 .../main/resources/Ambari-DDL-Derby-CREATE.sql  |  21 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |  20 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |  20 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql|  19 +-
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |  20 +-
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |  19 +-
 .../src/main/resources/META-INF/persistence.xml |   1 -
 ...AmbariConfigurationResourceProviderTest.java | 444 ---
 .../orm/dao/AmbariConfigurationDAOTest.java | 298 +
 .../server/upgrade/UpgradeCatalog300Test.java   |  43 ++
 27 files changed, 1223 insertions(+), 836 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4fa9ac55/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
index 5e8094e..2dca9f5 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
@@ -29,19 +29,9 @@ public interface AmbariConfigurationRequestSwagger extends 
ApiModel {
 
   interface AmbariConfigurationRequestInfo {
 @ApiModelProperty
-Long getId();
+String getCategoryName();
 
 @ApiModelProperty
-Map getData();
-
-@ApiModelProperty
-String getType();
-
-@ApiModelProperty
-Long getVersion();
-
-@ApiModelProperty(name = "version_tag")
-String getVersionTag();
+Map getProperties();
   }
-
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/4fa9ac55/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
index 38ae766..86ed666 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
@@ -46,21 +46,21 @@ import io.swagger.annotations.ApiResponses;
  * Ambari configuration resources may be shared with components and services 
in the cluster
  * (by recommending them as default values)
  *
- * Eg. LDAP configuration is stored as ambariconfiguration.
+ * Eg. LDAP configuration is stored as AmbariConfiguration.
  * The request payload has the form:
  *
  * 
  *  {
  *"AmbariConfiguration": {
- *"type": "ldap-configuration",
- *"data": [
- *{
- * "authentication.ldap.primaryUrl": "localhost:33389"
- * "authentication.ldap.secondaryUrl": 

[32/50] [abbrv] ambari git commit: AMBARI-22321 : Changed ambari version from 2.6.0.0 to 2.6.3.0. Addendum patch (mradhakrishnan on behalf of ydavis)

2017-11-16 Thread rlevas
AMBARI-22321 : Changed ambari version from 2.6.0.0 to 2.6.3.0. Addendum patch 
(mradhakrishnan on behalf of ydavis)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/869e1aae
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/869e1aae
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/869e1aae

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 869e1aaeaaf8a03a374bfe8d7fd992e1a048aaad
Parents: 3297dfa
Author: Madhuvanthi Radhakrishnan 
Authored: Tue Nov 14 11:57:05 2017 -0800
Committer: Madhuvanthi Radhakrishnan 
Committed: Tue Nov 14 11:57:05 2017 -0800

--
 .../HDP/2.0.6/properties/stack_features.json   | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/869e1aae/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
index 702fb13..f79cfe0 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
@@ -429,9 +429,24 @@
 "min_version": "2.6.0.0"
   },
   {
+"name": "registry_remove_rootpath",
+"description": "Registry remove root path setting",
+"min_version": "2.6.3.0"
+  },
+  {
+"name": "registry_allowed_resources_support",
+"description": "Registry allowed resources",
+"min_version": "2.6.3.0"
+  },
+  {
+"name": "registry_rewriteuri_filter_support",
+"description": "Registry RewriteUri servlet filter",
+"min_version": "2.6.3.0"
+  },
+  {
 "name": "sam_storage_core_in_registry",
 "description": "Storage core module moved to registry",
-"min_version": "2.6.0.0"
+"min_version": "2.6.3.0"
   }
 ]
   }



[28/50] [abbrv] ambari git commit: AMBARI-22439 Host check operation is being performed on all hosts during host add should not get stuck. (atkach)

2017-11-16 Thread rlevas
AMBARI-22439 Host check operation is being performed on all hosts during host 
add should not get stuck. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d0ef1449
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d0ef1449
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d0ef1449

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: d0ef1449af23e22ee6b95726ce4ca0b1f3544cc4
Parents: d11faab
Author: Andrii Tkach 
Authored: Tue Nov 14 18:11:56 2017 +0200
Committer: Andrii Tkach 
Committed: Tue Nov 14 18:11:56 2017 +0200

--
 ambari-web/app/mixins/main/host/details/actions/check_host.js | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0ef1449/ambari-web/app/mixins/main/host/details/actions/check_host.js
--
diff --git a/ambari-web/app/mixins/main/host/details/actions/check_host.js 
b/ambari-web/app/mixins/main/host/details/actions/check_host.js
index 2e2e021..66baf5a 100644
--- a/ambari-web/app/mixins/main/host/details/actions/check_host.js
+++ b/ambari-web/app/mixins/main/host/details/actions/check_host.js
@@ -111,6 +111,8 @@ App.CheckHostMixin = Em.Mixin.create({
*/
   warningsTimeInterval: 6,
 
+  finishStates: ["FAILED", "COMPLETED", "TIMEDOUT", "ABORTED"],
+
   /**
* disables host check on Add host wizard as per the experimental flag
*/
@@ -206,7 +208,7 @@ App.CheckHostMixin = Em.Mixin.create({
   //if resolution host check has corrupted data then skip it
   return this.getGeneralHostCheck();
 }
-if (["FAILED", "COMPLETED", 
"TIMEDOUT"].contains(data.Requests.request_status)) {
+if (this.get('finishStates').contains(data.Requests.request_status)) {
   if (data.Requests.inputs.indexOf("last_agent_env_check") != -1) {
 this.set('stopChecking', true);
 this.set('hostsPackagesData', data.tasks.map(function (task) {
@@ -369,7 +371,7 @@ App.CheckHostMixin = Em.Mixin.create({
 data.tasks.forEach(function (task) {
   var name = 
Em.I18n.t('installer.step3.hostWarningsPopup.resolution.validation.error');
   var hostInfo = this.get("hostCheckWarnings").findProperty('name', name);
-  if (["FAILED", "COMPLETED", "TIMEDOUT"].contains(task.Tasks.status)) {
+  if (this.get('finishStates').contains(task.Tasks.status)) {
 if (task.Tasks.status === "COMPLETED" && !!Em.get(task, 
"Tasks.structured_out.host_resolution_check.failed_count")) {
   var targetHostName = Em.get(task, "Tasks.host_name");
   var relatedHostNames = Em.get(task, 
"Tasks.structured_out.host_resolution_check.hosts_with_failures") || [];



[49/50] [abbrv] ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (part4) (jonathanhurley)

2017-11-16 Thread rlevas
AMBARI-22444 - Add Native Libraries To Tez Tarball (part4) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/365c91e9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/365c91e9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/365c91e9

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 365c91e92698f6a566b8503486f80c736af79e70
Parents: f51b1cc
Author: Jonathan Hurley 
Authored: Thu Nov 16 14:11:28 2017 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 16 14:12:32 2017 -0500

--
 .../resource_management/libraries/functions/copy_tarball.py   | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/365c91e9/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 9b6fb98..dda1a18 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -101,6 +101,9 @@ def _prepare_tez_tarball():
   with closing(tarfile.open(tez_tarball_with_native_lib, "w:gz")) as 
new_tez_tarball:
 new_tez_tarball.add(tez_temp_dir, arcname=os.path.sep)
 
+  # ensure that the tarball can be read and uploaded
+  sudo.chmod(tez_tarball_with_native_lib, 0744)
+  
   # cleanup
   sudo.rmtree(mapreduce_temp_dir)
   sudo.rmtree(tez_temp_dir)



[41/50] [abbrv] ambari git commit: AMBARI-22448. Oozie Jobs on Hive Fail With Missing Tarball (ncole)

2017-11-16 Thread rlevas
AMBARI-22448. Oozie Jobs on Hive Fail With Missing Tarball (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/99152d32
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/99152d32
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/99152d32

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 99152d3257a0eb4180283fa882f8283a3eaba196
Parents: 3f2743b
Author: Nate Cole 
Authored: Wed Nov 15 12:52:50 2017 -0500
Committer: Nate Cole 
Committed: Wed Nov 15 12:52:50 2017 -0500

--
 .../resources/stacks/HDP/2.0.6/properties/stack_packages.json  | 3 ++-
 .../resources/stacks/HDP/3.0/properties/stack_packages.json| 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/99152d32/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
index 68e6bf8..245449c 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_packages.json
@@ -1278,7 +1278,8 @@
 },
 "upgrade-dependencies" : {
   "HIVE": ["TEZ"],
-  "MAHOUT": ["MAPREDUCE2"]
+  "MAHOUT": ["MAPREDUCE2"],
+  "OOZIE": ["MAPREDUCE2"]
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/99152d32/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
 
b/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
index d8cd015..5603c0c 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/3.0/properties/stack_packages.json
@@ -1154,9 +1154,9 @@
   }
 },
 "upgrade-dependencies" : {
-  "YARN": ["TEZ"],
-  "TEZ": ["YARN"],
-  "MAHOUT": ["MAPREDUCE2"]
+  "HIVE": ["TEZ"],
+  "MAHOUT": ["MAPREDUCE2"],
+  "OOZIE": ["MAPREDUCE2"]
 }
   }
 }



[01/50] [abbrv] ambari git commit: AMBARI-22293. Improve KDC integration [addendum - fix unit tests] (rlevas)

2017-11-16 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-20859 ceead2241 -> d173011c8


AMBARI-22293.  Improve KDC integration [addendum - fix unit tests] (rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08d38265
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08d38265
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08d38265

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 08d382652052172aeb15082a919a18666de93eb7
Parents: 0f67d1c
Author: Robert Levas 
Authored: Wed Nov 8 12:26:00 2017 -0500
Committer: Robert Levas 
Committed: Wed Nov 8 12:26:00 2017 -0500

--
 .../KDCKerberosOperationHandlerTest.java| 22 +---
 .../MITKerberosOperationHandlerTest.java|  6 +++---
 2 files changed, 22 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/08d38265/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
index 271c787..095b92a 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandlerTest.java
@@ -19,7 +19,9 @@
 package org.apache.ambari.server.serveraction.kerberos;
 
 import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.anyString;
 import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.getCurrentArguments;
 
 import java.lang.reflect.Method;
 import java.util.Map;
@@ -27,6 +29,7 @@ import java.util.Map;
 import org.apache.ambari.server.utils.ShellCommandUtil;
 import org.apache.commons.lang.StringUtils;
 import org.easymock.EasyMock;
+import org.easymock.IAnswer;
 import org.easymock.IArgumentMatcher;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -37,9 +40,12 @@ abstract public class KDCKerberosOperationHandlerTest 
extends KerberosOperationH
 
   static Method methodExecuteCommand;
 
+  static Method methodGetExecutable;
+
   @BeforeClass
   public static void beforeKDCKerberosOperationHandlerTest() throws Exception {
 methodExecuteCommand = 
KDCKerberosOperationHandler.class.getDeclaredMethod("executeCommand", 
String[].class, Map.class, ShellCommandUtil.InteractiveHandler.class);
+methodGetExecutable = 
KerberosOperationHandler.class.getDeclaredMethod("getExecutable", String.class);
   }
 
   @Test
@@ -66,7 +72,17 @@ abstract public class KDCKerberosOperationHandlerTest 
extends KerberosOperationH
 
   @Override
   protected KerberosOperationHandler createMockedHandler() throws 
KerberosOperationException {
-return createMockedHandler(methodExecuteCommand);
+KDCKerberosOperationHandler handler = 
createMockedHandler(methodExecuteCommand, methodGetExecutable);
+
+expect(handler.getExecutable(anyString()))
+.andAnswer(new IAnswer() {
+  @Override
+  public String answer() throws Throwable {
+Object[] args = getCurrentArguments();
+return args[0].toString();
+  }
+}).anyTimes();
+return handler;
   }
 
   @Override
@@ -74,7 +90,7 @@ abstract public class KDCKerberosOperationHandlerTest extends 
KerberosOperationH
 ShellCommandUtil.Result result = createMock(ShellCommandUtil.Result.class);
 expect(result.isSuccessful()).andReturn(true);
 
-expect(handler.executeCommand(arrayContains("/usr/bin/kinit"), 
anyObject(Map.class), 
anyObject(KDCKerberosOperationHandler.InteractivePasswordHandler.class)))
+expect(handler.executeCommand(arrayContains("kinit"), 
anyObject(Map.class), 
anyObject(KDCKerberosOperationHandler.InteractivePasswordHandler.class)))
 .andReturn(result)
 .anyTimes();
   }
@@ -87,7 +103,7 @@ abstract public class KDCKerberosOperationHandlerTest 
extends KerberosOperationH
 expect(result.getStdout()).andReturn("STDOUT data").once();
 expect(result.getStderr()).andReturn("STDERR data").once();
 
-expect(handler.executeCommand(arrayContains("/usr/bin/kinit"), 
anyObject(Map.class), 
anyObject(KDCKerberosOperationHandler.InteractivePasswordHandler.class)))
+expect(handler.executeCommand(arrayContains("kinit"), 
anyObject(Map.class), 
anyObject(KDCKerberosOperationHandler.InteractivePasswordHandler.class)))
 .andReturn(result)
 .anyTimes();
   }


[31/50] [abbrv] ambari git commit: AMBARI-22438 Disable plugins for yum on yum list command (dgrinenko)

2017-11-16 Thread rlevas
AMBARI-22438 Disable plugins for yum on yum list command (dgrinenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3297dfa6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3297dfa6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3297dfa6

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 3297dfa6542f9cffef2ae36ef0e777fe4c3e829c
Parents: ed7e121
Author: Dmytro Grinenko 
Authored: Tue Nov 14 20:12:47 2017 +0200
Committer: Dmytro Grinenko 
Committed: Tue Nov 14 20:12:47 2017 +0200

--
 .../python/resource_management/core/providers/package/yumrpm.py  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3297dfa6/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
 
b/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
index 9117510..8426479 100644
--- 
a/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
+++ 
b/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
@@ -46,8 +46,8 @@ REMOVE_WITHOUT_DEPENDENCIES_CMD = ['rpm', '-e', '--nodeps']
 
 YUM_REPO_LOCATION = "/etc/yum.repos.d"
 REPO_UPDATE_CMD = ['/usr/bin/yum', 'clean', 'metadata']
-ALL_INSTALLED_PACKAGES_CMD = [AMBARI_SUDO_BINARY, "yum", "list", "installed"]
-ALL_AVAILABLE_PACKAGES_CMD = [AMBARI_SUDO_BINARY, "yum", "list", "available"]
+ALL_INSTALLED_PACKAGES_CMD = [AMBARI_SUDO_BINARY, "yum", "list", "installed", 
"--noplugins"]
+ALL_AVAILABLE_PACKAGES_CMD = [AMBARI_SUDO_BINARY, "yum", "list", "available", 
"--noplugins"]
 VERIFY_DEPENDENCY_CMD = ['/usr/bin/yum', '-d', '0', '-e', '0', 'check', 
'dependencies']
 
 # base command output sample:



[19/50] [abbrv] ambari git commit: AMBARI-22416 Log Search UI: fixes for filtering form. (ababiichuk)

2017-11-16 Thread rlevas
AMBARI-22416 Log Search UI: fixes for filtering form. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7c4a7e4c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7c4a7e4c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7c4a7e4c

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 7c4a7e4c52e00282e5b8b901cef14c143fd3da2b
Parents: 068d82f
Author: ababiichuk 
Authored: Fri Nov 10 18:16:45 2017 +0200
Committer: ababiichuk 
Committed: Fri Nov 10 23:53:24 2017 +0200

--
 .../ambari-logsearch-web/src/app/app.module.ts  |   2 -
 .../src/app/classes/filtering.ts| 355 +-
 .../src/app/classes/models/app-state.ts |   6 +-
 .../src/app/classes/models/node-item.ts |  30 +
 .../src/app/classes/models/node.ts  |  30 -
 .../src/app/classes/models/store.ts |   6 +-
 .../src/app/classes/models/tab.ts   |  12 +-
 .../src/app/components/app.component.ts |   6 +-
 .../dropdown-button.component.html  |   4 +-
 .../dropdown-button.component.spec.ts   |   2 -
 .../dropdown-button.component.ts|  55 +-
 .../dropdown-list/dropdown-list.component.html  |   2 +-
 .../dropdown-list.component.spec.ts |   6 +-
 .../filter-button.component.spec.ts |   2 -
 .../filter-button/filter-button.component.ts|  35 +-
 .../filter-dropdown.component.spec.ts   |  14 +-
 .../filter-dropdown.component.ts|  22 +-
 .../filters-panel/filters-panel.component.html  |   6 +-
 .../filters-panel.component.spec.ts |   6 +-
 .../filters-panel/filters-panel.component.ts|  18 +-
 .../log-context/log-context.component.spec.ts   |   4 +-
 .../logs-container.component.spec.ts|   2 -
 .../logs-container/logs-container.component.ts  |  26 +-
 .../logs-list/logs-list.component.html  |   3 +-
 .../logs-list/logs-list.component.spec.ts   |  21 +-
 .../components/logs-list/logs-list.component.ts |  10 +-
 .../menu-button/menu-button.component.spec.ts   |   2 -
 .../menu-button/menu-button.component.ts|   4 +-
 .../pagination-controls.component.ts|   7 +-
 .../pagination/pagination.component.html|   2 +-
 .../pagination/pagination.component.spec.ts |   9 +-
 .../pagination/pagination.component.ts  |  10 +-
 .../search-box/search-box.component.ts  |  12 +-
 .../time-range-picker.component.html|   3 +-
 .../time-range-picker.component.spec.ts |  29 +-
 .../time-range-picker.component.ts  |  47 +-
 .../timezone-picker.component.spec.ts   |   2 -
 .../services/component-actions.service.spec.ts  |   2 -
 .../app/services/component-actions.service.ts   |  24 +-
 .../component-generator.service.spec.ts |   2 -
 .../src/app/services/filtering.service.spec.ts  |  97 ---
 .../src/app/services/filtering.service.ts   | 253 ---
 .../app/services/logs-container.service.spec.ts |  31 +-
 .../src/app/services/logs-container.service.ts  | 678 ++-
 .../src/app/services/utils.service.spec.ts  | 285 +++-
 .../src/app/services/utils.service.ts   |  65 +-
 46 files changed, 1257 insertions(+), 992 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7c4a7e4c/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
--
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
index 56562df..37f3a49 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
@@ -34,7 +34,6 @@ import {environment} from '@envs/environment';
 import {mockApiDataService} from '@app/services/mock-api-data.service'
 import {HttpClientService} from '@app/services/http-client.service';
 import {ComponentActionsService} from 
'@app/services/component-actions.service';
-import {FilteringService} from '@app/services/filtering.service';
 import {UtilsService} from '@app/services/utils.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
 import {ComponentGeneratorService} from 
'@app/services/component-generator.service';
@@ -164,7 +163,6 @@ export function getXHRBackend(injector: Injector, browser: 
BrowserXhr, xsrf: XSR
   providers: [
 HttpClientService,
 ComponentActionsService,
-FilteringService,
 UtilsService,
 LogsContainerService,
 ComponentGeneratorService,

http://git-wip-us.apache.org/repos/asf/ambari/blob/7c4a7e4c/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts

[03/50] [abbrv] ambari git commit: AMBARI-22383. Remove Auto-Installation of LZO Libraries (ncole)

2017-11-16 Thread rlevas
AMBARI-22383. Remove Auto-Installation of LZO Libraries (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5adcea78
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5adcea78
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5adcea78

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 5adcea78792cf227f15e7c08f5bb3fe2c48883d3
Parents: b04e142
Author: Nate Cole 
Authored: Wed Nov 8 14:28:59 2017 -0500
Committer: Nate Cole 
Committed: Wed Nov 8 14:51:48 2017 -0500

--
 .../libraries/functions/__init__.py |  1 -
 .../libraries/functions/get_lzo_packages.py | 50 
 .../libraries/functions/package_conditions.py   |  8 +---
 .../DRUID/0.10.1/package/scripts/druid.py   |  3 +-
 .../DRUID/0.10.1/package/scripts/params.py  |  3 +-
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml | 30 
 .../HDFS/2.1.0.2.0/package/scripts/datanode.py  |  1 -
 .../HDFS/2.1.0.2.0/package/scripts/hdfs.py  |  7 ---
 .../2.1.0.2.0/package/scripts/hdfs_client.py|  1 -
 .../2.1.0.2.0/package/scripts/install_params.py |  1 +
 .../2.1.0.2.0/package/scripts/journalnode.py|  1 -
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  |  1 -
 .../common-services/HDFS/3.0.0.3.0/metainfo.xml | 30 
 .../HDFS/3.0.0.3.0/package/scripts/hdfs.py  |  7 ---
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py|  6 +--
 .../package/scripts/oozie_server_upgrade.py |  7 ++-
 .../4.0.0.2.0/package/scripts/params_linux.py   |  1 +
 .../OOZIE/4.2.0.3.0/package/scripts/oozie.py|  4 --
 .../package/scripts/oozie_server_upgrade.py |  5 ++
 .../TEZ/0.4.0.2.1/package/scripts/tez_client.py | 32 -
 .../TEZ/0.9.0.3.0/package/scripts/tez_client.py | 26 --
 .../custom_actions/scripts/remove_bits.py   |  2 +-
 .../BIGTOP/0.8/services/HDFS/metainfo.xml   | 16 ---
 .../0.8/services/HDFS/package/scripts/params.py |  6 +--
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   | 35 --
 .../2.3.GlusterFS/services/HDFS/metainfo.xml| 10 
 .../stacks/HDP/2.3/services/HDFS/metainfo.xml   | 30 
 .../stacks/HDP/3.0/services/HDFS/metainfo.xml   | 30 
 .../python/custom_actions/TestRemoveBits.py |  5 +-
 29 files changed, 20 insertions(+), 339 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5adcea78/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
index f144b2d..1e388ac 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
@@ -39,7 +39,6 @@ from resource_management.libraries.functions.version import *
 from resource_management.libraries.functions.format_jvm_option import *
 from resource_management.libraries.functions.constants import *
 from resource_management.libraries.functions.get_stack_version import *
-from resource_management.libraries.functions.get_lzo_packages import *
 from resource_management.libraries.functions.setup_ranger_plugin import *
 from resource_management.libraries.functions.curl_krb_request import *
 from resource_management.libraries.functions.get_bare_principal import *

http://git-wip-us.apache.org/repos/asf/ambari/blob/5adcea78/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
deleted file mode 100644
index cfbb7d8..000
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS 

[23/50] [abbrv] ambari git commit: AMBARI-22390. Implement many-to-many relation between keytabs and principals (echekanskiy)

2017-11-16 Thread rlevas
AMBARI-22390. Implement many-to-many relation between keytabs and principals 
(echekanskiy)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/18e54903
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/18e54903
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/18e54903

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 18e549034e893aac4ade80e49bda70604d5147f3
Parents: 6e706d4
Author: Eugene Chekanskiy 
Authored: Mon Nov 13 17:01:16 2017 +0200
Committer: Eugene Chekanskiy 
Committed: Mon Nov 13 17:01:29 2017 +0200

--
 .../server/controller/KerberosHelperImpl.java   | 59 ++--
 .../AbstractPrepareKerberosServerAction.java| 23 +++-
 .../kerberos/CreatePrincipalsServerAction.java  |  6 +-
 .../kerberos/KerberosServerAction.java  | 21 +++
 .../stageutils/ResolvedKerberosKeytab.java  | 16 +++---
 5 files changed, 82 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/18e54903/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index f913831..474c335 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -1546,19 +1546,21 @@ public class KerberosHelperImpl implements 
KerberosHelper {
 keytabFileOwnerAccess,
 keytabFileGroupName,
 keytabFileGroupAccess,
-Sets.newHashSet(Pair.of(hostId, evaluatedPrincipal)),
+Sets.newHashSet(Pair.of(hostId, Pair.of(evaluatedPrincipal, 
principalType))),
 serviceName.equalsIgnoreCase("AMBARI"),
 componentName.equalsIgnoreCase("AMBARI_SERVER_SELF")
 );
 if (resolvedKeytabs.containsKey(keytabFilePath)) {
   ResolvedKerberosKeytab sameKeytab = 
resolvedKeytabs.get(keytabFilePath);
   // validating owner and group
-  String warnTemplate = "Keytab '{}' on host '{}' have different 
{}, originally set to '{}' and '{}:{}' has '{}', using '{}'";
+  boolean differentOwners = false;
+  String warnTemplate = "Keytab '{}' on host '{}' has different 
{}, originally set to '{}' and '{}:{}' has '{}', using '{}'";
   if 
(!resolvedKeytab.getOwnerName().equals(sameKeytab.getOwnerName())) {
 LOG.warn(warnTemplate,
 keytabFilePath, hostname, "owners", 
sameKeytab.getOwnerName(),
 serviceName, componentName, resolvedKeytab.getOwnerName(),
 sameKeytab.getOwnerName());
+differentOwners = true;
   }
   if 
(!resolvedKeytab.getOwnerAccess().equals(sameKeytab.getOwnerAccess())) {
 LOG.warn(warnTemplate,
@@ -1570,16 +1572,39 @@ public class KerberosHelperImpl implements 
KerberosHelper {
   // TODO with different owners, so make sure that keytabs are 
accessible through group acls
   // TODO this includes same group name and group 'r' mode
   if 
(!resolvedKeytab.getGroupName().equals(sameKeytab.getGroupName())) {
-LOG.warn(warnTemplate,
-keytabFilePath, hostname, "groups", 
sameKeytab.getGroupName(),
-serviceName, componentName, resolvedKeytab.getGroupName(),
-sameKeytab.getGroupName());
+if(differentOwners) {
+  LOG.error(warnTemplate,
+  keytabFilePath, hostname, "groups", 
sameKeytab.getGroupName(),
+  serviceName, componentName, 
resolvedKeytab.getGroupName(),
+  sameKeytab.getGroupName());
+} else {
+  LOG.warn(warnTemplate,
+  keytabFilePath, hostname, "groups", 
sameKeytab.getGroupName(),
+  serviceName, componentName, 
resolvedKeytab.getGroupName(),
+  sameKeytab.getGroupName());
+}
   }
   if 
(!resolvedKeytab.getGroupAccess().equals(sameKeytab.getGroupAccess())) {
-LOG.warn(warnTemplate,
-keytabFilePath, hostname, "group access", 
sameKeytab.getGroupAccess(),
-serviceName, componentName, 
resolvedKeytab.getGroupAccess(),
-sameKeytab.getGroupAccess());
+

[17/50] [abbrv] ambari git commit: AMBARI-22411. Restart all required services failed when running cluster with several patch upgrades applied (ncole)

2017-11-16 Thread rlevas
AMBARI-22411. Restart all required services failed when running cluster with 
several patch upgrades applied (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/068d82f7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/068d82f7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/068d82f7

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 068d82f700432cf5cfa75d20924443e998d8fe87
Parents: ec02a14
Author: Nate Cole 
Authored: Fri Nov 10 11:23:13 2017 -0500
Committer: Nate Cole 
Committed: Fri Nov 10 12:00:14 2017 -0500

--
 .../AmbariCustomCommandExecutionHelper.java | 23 
 .../AmbariManagementControllerImpl.java | 60 +++-
 .../internal/UpgradeResourceProvider.java   |  8 +--
 .../HDP/2.0.6/properties/stack_packages.json|  3 +-
 .../AmbariManagementControllerImplTest.java |  2 +-
 5 files changed, 25 insertions(+), 71 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/068d82f7/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index e8febbb..dc6bbb7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@ -1425,27 +1425,23 @@ public class AmbariCustomCommandExecutionHelper {
*
* @param actionExecContext  the context
* @param clusterthe cluster for the command
+   * @param stackIdthe stack id used to load service metainfo.
*
* @return a wrapper of the important JSON structures to add to a stage
*/
   public ExecuteCommandJson getCommandJson(ActionExecutionContext 
actionExecContext,
-  Cluster cluster, RepositoryVersionEntity repositoryVersion, String 
requestContext) throws AmbariException {
+  Cluster cluster, StackId stackId, String requestContext) throws 
AmbariException {
 
 Map commandParamsStage = 
StageUtils.getCommandParamsStage(actionExecContext, requestContext);
 Map hostParamsStage = new HashMap<>();
 Map clusterHostInfo;
 String clusterHostInfoJson = "{}";
 
-StackId stackId = null;
-if (null != repositoryVersion) {
-  stackId = repositoryVersion.getStackId();
-}
-
 if (null != cluster) {
   clusterHostInfo = StageUtils.getClusterHostInfo(cluster);
 
   // Important, because this runs during Stack Uprade, it needs to use the 
effective Stack Id.
-  hostParamsStage = createDefaultHostParams(cluster, repositoryVersion);
+  hostParamsStage = createDefaultHostParams(cluster, stackId);
 
   String componentName = null;
   String serviceName = null;
@@ -1454,7 +1450,7 @@ public class AmbariCustomCommandExecutionHelper {
 serviceName = actionExecContext.getOperationLevel().getServiceName();
   }
 
-  if (serviceName != null && componentName != null && null != stackId) {
+  if (serviceName != null && componentName != null) {
 Service service = cluster.getService(serviceName);
 ServiceComponent component = 
service.getServiceComponent(componentName);
 stackId = component.getDesiredStackId();
@@ -1473,6 +1469,10 @@ public class AmbariCustomCommandExecutionHelper {
 
   clusterHostInfoJson = StageUtils.getGson().toJson(clusterHostInfo);
 
+  if (null == stackId && null != cluster) {
+stackId = cluster.getDesiredStackVersion();
+  }
+
   //Propogate HCFS service type info to command params
   if (null != stackId) {
 Map serviceInfos = 
ambariMetaInfo.getServices(stackId.getStackName(),
@@ -1497,11 +1497,10 @@ public class AmbariCustomCommandExecutionHelper {
 hostParamsStageJson);
   }
 
-  Map createDefaultHostParams(Cluster cluster, 
RepositoryVersionEntity repositoryVersion) throws AmbariException {
-return createDefaultHostParams(cluster, repositoryVersion.getStackId());
-  }
-
   Map createDefaultHostParams(Cluster cluster, StackId 
stackId) throws AmbariException {
+if (null == stackId) {
+  stackId = cluster.getDesiredStackVersion();
+}
 
 TreeMap hostLevelParams = new TreeMap<>();
 StageUtils.useStackJdkIfExists(hostLevelParams, configs);


[16/50] [abbrv] ambari git commit: AMBARI-22415. Blueprint deploys failing with missing smoke user keytab file (echekanskiy)

2017-11-16 Thread rlevas
AMBARI-22415. Blueprint deploys failing with missing smoke user keytab file 
(echekanskiy)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ec02a14c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ec02a14c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ec02a14c

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: ec02a14c02529ec7fec647e6fed7c8c401f10e6d
Parents: 22b2d55
Author: Eugene Chekanskiy 
Authored: Fri Nov 10 17:17:34 2017 +0200
Committer: Eugene Chekanskiy 
Committed: Fri Nov 10 18:29:43 2017 +0200

--
 .../kerberos/CreateKeytabFilesServerAction.java | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ec02a14c/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
index aa65e61..5ec4c10 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
@@ -218,17 +218,18 @@ public class CreateKeytabFilesServerAction extends 
KerberosServerAction {
 }
 
 boolean regenerateKeytabs = 
getOperationType(getCommandParameters()) == OperationType.RECREATE_ALL;
+
+KerberosPrincipalEntity principalEntity = 
kerberosPrincipalDAO.find(evaluatedPrincipal);
+String cachedKeytabPath = (principalEntity == null) ? null : 
principalEntity.getCachedKeytabPath();
+
 if (password == null) {
   if (!regenerateKeytabs && 
(hostName.equalsIgnoreCase(KerberosHelper.AMBARI_SERVER_HOST_NAME) || 
kerberosPrincipalHostDAO
-  .exists(evaluatedPrincipal, hostEntity.getHostId(), 
keytabFilePath))) {
+  .exists(evaluatedPrincipal, hostEntity.getHostId(), 
keytabFilePath)) && cachedKeytabPath == null) {
 // There is nothing to do for this since it must already 
exist and we don't want to
 // regenerate the keytab
 message = String.format("Skipping keytab file for %s, 
missing password indicates nothing to do", evaluatedPrincipal);
 LOG.debug(message);
   } else {
-KerberosPrincipalEntity principalEntity = 
kerberosPrincipalDAO.find(evaluatedPrincipal);
-String cachedKeytabPath = (principalEntity == null) ? null 
: principalEntity.getCachedKeytabPath();
-
 if (cachedKeytabPath == null) {
   message = String.format("Failed to create keytab for %s, 
missing cached file", evaluatedPrincipal);
   actionLog.writeStdErr(message);



[10/50] [abbrv] ambari git commit: AMBARI-22400 Ambari 3.0: Implement new design for Admin View: Cluster Information page. (atkach)

2017-11-16 Thread rlevas
AMBARI-22400 Ambari 3.0: Implement new design for Admin View: Cluster 
Information page. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/430dcbf1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/430dcbf1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/430dcbf1

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 430dcbf1224996c76276a8c40fb58eb54addd10a
Parents: e968b12
Author: Andrii Tkach 
Authored: Thu Nov 9 16:13:29 2017 +0200
Committer: Andrii Tkach 
Committed: Thu Nov 9 16:53:02 2017 +0200

--
 .../main/resources/ui/admin-web/app/index.html  |   3 +-
 .../app/scripts/controllers/AppCtrl.js  |   2 +-
 .../controllers/ClusterInformationCtrl.js   |  65 +++
 .../controllers/clusters/ExportBlueprintCtrl.js |  58 --
 .../app/scripts/controllers/mainCtrl.js |  27 -
 .../ui/admin-web/app/scripts/i18n.config.js |  13 +--
 .../ui/admin-web/app/scripts/routes.js  |  59 +-
 .../app/styles/cluster-information.css  |  59 ++
 .../resources/ui/admin-web/app/styles/main.css  |  98 -
 .../admin-web/app/views/clusterInformation.html |  66 
 .../app/views/clusters/exportBlueprint.html |  40 ---
 .../ui/admin-web/app/views/groups/list.html |   3 +-
 .../resources/ui/admin-web/app/views/main.html  | 107 ---
 .../app/views/remoteClusters/list.html  |   3 +-
 .../ui/admin-web/app/views/sideNav.html |  19 ++--
 .../admin-web/app/views/stackVersions/list.html |   3 +-
 .../ui/admin-web/app/views/users/list.html  |   3 +-
 .../test/unit/services/Utility_test.js  |   2 +-
 18 files changed, 240 insertions(+), 390 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/index.html
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/index.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
index 41cc60f..2b350f0 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/index.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
@@ -121,7 +121,7 @@
 
 
 
-
+
 
 
 
@@ -142,7 +142,6 @@
 
 
 
-
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
index 4ac5b38..eb9a9b0 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/AppCtrl.js
@@ -31,7 +31,7 @@ angular.module('ambariAdminConsole')
 return $route.current;
   }, function (value) {
 var breadcrumbs = [$t('common.admin')];
-if (value && value.$$route.label) {
+if (value && value.$$route && value.$$route.label) {
   breadcrumbs.push(value.$$route.label);
 }
 $scope.breadcrumbs = breadcrumbs;

http://git-wip-us.apache.org/repos/asf/ambari/blob/430dcbf1/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
new file mode 100644
index 000..60a610c
--- /dev/null
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ClusterInformationCtrl.js
@@ -0,0 +1,65 @@
+/**
+ * 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.
+ */
+'use strict';
+
+angular.module('ambariAdminConsole')
+.controller('ClusterInformationCtrl', 

[05/50] [abbrv] ambari git commit: AMBARI-22373.Disable auto config of interpreter.json at the time of installation(Prabhjyot Singh via Venkata Sairam)

2017-11-16 Thread rlevas
AMBARI-22373.Disable auto config of interpreter.json at the time of 
installation(Prabhjyot Singh via Venkata Sairam)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5f714cee
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5f714cee
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5f714cee

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 5f714cee399a1671f73abd8d405049a45d4c743c
Parents: 7074e6e
Author: Venkata Sairam 
Authored: Thu Nov 9 11:50:06 2017 +0530
Committer: Venkata Sairam 
Committed: Thu Nov 9 11:50:06 2017 +0530

--
 .../ZEPPELIN/0.7.0/package/scripts/master.py | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5f714cee/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
index 6ccdfba..5efc277 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
@@ -257,7 +257,6 @@ class Master(Script):
 if not glob.glob(params.conf_dir + "/interpreter.json") and \
   not os.path.exists(params.conf_dir + "/interpreter.json"):
   self.create_interpreter_json()
-  self.update_zeppelin_interpreter()
 
 if params.zeppelin_interpreter_config_upgrade == True:
   self.reset_interpreter_settings()
@@ -599,6 +598,16 @@ class Master(Script):
  group=params.zeppelin_group,
  mode=0664)
 
+if params.conf_stored_in_hdfs:
+  params.HdfsResource(self.get_zeppelin_conf_FS(params),
+  type="file",
+  action="create_on_execute",
+  source=format("{params.conf_dir}/interpreter.json"),
+  owner=params.zeppelin_user,
+  recursive_chown=True,
+  recursive_chmod=True,
+  replace_existing_files=True)
+
   def get_zeppelin_spark_dependencies(self):
 import params
 return glob.glob(params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies*.jar')



[39/50] [abbrv] ambari git commit: AMBARI-22418. Make Ambari configuration API consistent with existing API. (rlevas)

2017-11-16 Thread rlevas
http://git-wip-us.apache.org/repos/asf/ambari/blob/3f2743b5/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProvider.java
new file mode 100644
index 000..ea9cf4f
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProvider.java
@@ -0,0 +1,476 @@
+/*
+ * 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.controller.internal;
+
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.controller.RootComponent;
+import org.apache.ambari.server.controller.RootService;
+import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
+import org.apache.ambari.server.controller.spi.NoSuchResourceException;
+import org.apache.ambari.server.controller.spi.Predicate;
+import org.apache.ambari.server.controller.spi.Request;
+import org.apache.ambari.server.controller.spi.RequestStatus;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException;
+import org.apache.ambari.server.controller.spi.SystemException;
+import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
+import org.apache.ambari.server.controller.utilities.PredicateHelper;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
+import org.apache.ambari.server.events.AmbariConfigurationChangedEvent;
+import org.apache.ambari.server.events.publishers.AmbariEventPublisher;
+import org.apache.ambari.server.orm.dao.AmbariConfigurationDAO;
+import org.apache.ambari.server.orm.entities.AmbariConfigurationEntity;
+import org.apache.ambari.server.security.authorization.RoleAuthorization;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.Inject;
+
+public class RootServiceComponentConfigurationResourceProvider extends 
AbstractAuthorizedResourceProvider {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(RootServiceComponentConfigurationResourceProvider.class);
+
+  static final String RESOURCE_KEY = "Configuration";
+
+  static final String CONFIGURATION_CATEGORY_PROPERTY_ID = 
PropertyHelper.getPropertyId(RESOURCE_KEY, "category");
+  static final String CONFIGURATION_PROPERTIES_PROPERTY_ID = 
PropertyHelper.getPropertyId(RESOURCE_KEY, "properties");
+  static final String CONFIGURATION_COMPONENT_NAME_PROPERTY_ID = 
PropertyHelper.getPropertyId(RESOURCE_KEY, "component_name");
+  static final String CONFIGURATION_SERVICE_NAME_PROPERTY_ID = 
PropertyHelper.getPropertyId(RESOURCE_KEY, "service_name");
+
+  private static final Set PROPERTIES;
+
+  private static final Map PK_PROPERTY_MAP;
+
+  private static final Set PK_PROPERTY_IDS;
+
+  static {
+Set set = new HashSet<>();
+set.add(CONFIGURATION_SERVICE_NAME_PROPERTY_ID);
+set.add(CONFIGURATION_COMPONENT_NAME_PROPERTY_ID);
+set.add(CONFIGURATION_CATEGORY_PROPERTY_ID);
+set.add(CONFIGURATION_PROPERTIES_PROPERTY_ID);
+
+PROPERTIES = Collections.unmodifiableSet(set);
+
+Map map = new HashMap<>();
+map.put(Resource.Type.RootService, CONFIGURATION_SERVICE_NAME_PROPERTY_ID);
+map.put(Resource.Type.RootServiceComponent, 
CONFIGURATION_COMPONENT_NAME_PROPERTY_ID);
+map.put(Resource.Type.RootServiceComponentConfiguration, 
CONFIGURATION_CATEGORY_PROPERTY_ID);
+
+PK_PROPERTY_MAP = Collections.unmodifiableMap(map);
+PK_PROPERTY_IDS = 

[18/50] [abbrv] ambari git commit: AMBARI-22416 Log Search UI: fixes for filtering form. (ababiichuk)

2017-11-16 Thread rlevas
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c4a7e4c/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
deleted file mode 100644
index 2b3e326..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.spec.ts
+++ /dev/null
@@ -1,97 +0,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.
- */
-
-import {TestBed, inject} from '@angular/core/testing';
-import {StoreModule} from '@ngrx/store';
-import {AppSettingsService, appSettings} from 
'@app/services/storage/app-settings.service';
-import {AppStateService, appState} from 
'@app/services/storage/app-state.service';
-import {ClustersService, clusters} from 
'@app/services/storage/clusters.service';
-import {ComponentsService, components} from 
'@app/services/storage/components.service';
-import {HostsService, hosts} from '@app/services/storage/hosts.service';
-import {UtilsService} from '@app/services/utils.service';
-import {HttpClientService} from '@app/services/http-client.service';
-import {ListItem} from '@app/classes/list-item';
-import {Node} from '@app/classes/models/node';
-
-import {FilteringService} from './filtering.service';
-
-describe('FilteringService', () => {
-  beforeEach(() => {
-const httpClient = {
-  get: () => {
-return {
-  subscribe: () => {
-  }
-}
-  }
-};
-TestBed.configureTestingModule({
-  imports: [
-StoreModule.provideStore({
-  appSettings,
-  appState,
-  clusters,
-  components,
-  hosts
-})
-  ],
-  providers: [
-FilteringService,
-AppSettingsService,
-AppStateService,
-ClustersService,
-ComponentsService,
-HostsService,
-UtilsService,
-{
-  provide: HttpClientService,
-  useValue: httpClient
-}
-  ]
-});
-  });
-
-  it('should create service', inject([FilteringService], (service: 
FilteringService) => {
-expect(service).toBeTruthy();
-  }));
-
-  describe('#getListItemFromString()', () => {
-it('should convert string to ListItem', inject([FilteringService], 
(service: FilteringService) => {
-  const getListItemFromString: (name: string) => ListItem = 
service['getListItemFromString'];
-  expect(getListItemFromString('customName')).toEqual({
-label: 'customName',
-value: 'customName'
-  });
-}));
-  });
-
-  describe('#getListItemFromNode()', () => {
-it('should convert Node to ListItem', inject([FilteringService], (service: 
FilteringService) => {
-  const getListItemFromNode: (node: Node) => ListItem = 
service['getListItemFromNode'];
-  expect(getListItemFromNode({
-name: 'customName',
-value: '1',
-isParent: true,
-isRoot: true
-  })).toEqual({
-label: 'customName (1)',
-value: 'customName'
-  });
-}));
-  });
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7c4a7e4c/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
deleted file mode 100644
index 85dc408..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/filtering.service.ts
+++ /dev/null
@@ -1,253 +0,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
- 

[11/50] [abbrv] ambari git commit: AMBARI-22338 : Review Request for new HDP StackFeatures entry(mradhakrishnan on behalf of ydavis)

2017-11-16 Thread rlevas
AMBARI-22338 : Review Request for new HDP StackFeatures entry(mradhakrishnan on 
behalf of ydavis)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c693de36
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c693de36
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c693de36

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: c693de3650d9b115a3da7639dbd97931c6ebb61b
Parents: 430dcbf
Author: Madhuvanthi Radhakrishnan 
Authored: Thu Nov 9 11:09:32 2017 -0800
Committer: Madhuvanthi Radhakrishnan 
Committed: Thu Nov 9 11:09:32 2017 -0800

--
 .../resources/stacks/HDP/2.0.6/properties/stack_features.json   | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c693de36/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
index 86de20d..702fb13 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
@@ -427,6 +427,11 @@
 "name": "hadoop_custom_extensions",
 "description": "Support hadoop custom extensions",
 "min_version": "2.6.0.0"
+  },
+  {
+"name": "sam_storage_core_in_registry",
+"description": "Storage core module moved to registry",
+"min_version": "2.6.0.0"
   }
 ]
   }



[44/50] [abbrv] ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (part2) (jonathanhurley)

2017-11-16 Thread rlevas
AMBARI-22444 - Add Native Libraries To Tez Tarball (part2) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0936f463
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0936f463
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0936f463

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 0936f463042cf5ba195b0461479d8c29c88330dd
Parents: 8fe6ac4
Author: Jonathan Hurley 
Authored: Wed Nov 15 17:37:57 2017 -0500
Committer: Jonathan Hurley 
Committed: Wed Nov 15 17:40:29 2017 -0500

--
 .../libraries/functions/copy_tarball.py   | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0936f463/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index f62aa3d..7bca967 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -33,6 +33,7 @@ from resource_management.core import shell
 from resource_management.core import sudo
 from resource_management.core.logger import Logger
 from resource_management.core.exceptions import Fail
+from resource_management.core.resources.system import Directory
 from resource_management.core.resources.system import Execute
 from resource_management.libraries.functions import stack_tools, 
stack_features, stack_select
 from resource_management.libraries.functions import tar_archive
@@ -77,7 +78,14 @@ def _prepare_tez_tarball():
 
   Execute(("cp", "-a", hadoop_lib_native_dir, tez_lib_dir), sudo = True)
 
-  tez_tarball_with_native_lib = os.path.join(os.path.dirname(tez_source_file), 
"tez-native.tar.gz")
+  tez_native_tarball_staging_dir = os.path.join(temp_dir, 
"tez-native-tarball-staging")
+  if not os.path.exists(tez_native_tarball_staging_dir):
+Directory(tez_native_tarball_staging_dir,
+  cd_access='a',
+  create_parents = True,
+  recursive_ownership = True)
+
+  tez_tarball_with_native_lib = os.path.join(tez_native_tarball_staging_dir, 
"tez-native.tar.gz")
   Logger.info("Creating a new Tez tarball at 
{0}".format(tez_tarball_with_native_lib))
 
   # tar up Tez, making sure to specify nothing for the arcname so that it does 
not include an absolute path



[06/50] [abbrv] ambari git commit: AMBARI-22388 Log Search UI: restyle logs list. (Istvan Tobias via ababiichuk)

2017-11-16 Thread rlevas
AMBARI-22388 Log Search UI: restyle logs list. (Istvan Tobias via ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/38476f7a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/38476f7a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/38476f7a

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 38476f7a1a7a371fd0f57af2f931427f1e276d27
Parents: 5f714ce
Author: Istvan Tobias 
Authored: Thu Nov 9 13:24:16 2017 +0200
Committer: ababiichuk 
Committed: Thu Nov 9 13:24:16 2017 +0200

--
 .../ambari-logsearch-web/src/app/app.module.ts  |   4 +
 .../log-level/log-level.component.html  |  18 +++
 .../log-level/log-level.component.spec.ts   |  73 +++
 .../components/log-level/log-level.component.ts |  52 
 .../log-message/log-message.component.html  |  24 
 .../log-message/log-message.component.less  |  69 ++
 .../log-message/log-message.component.spec.ts   |  64 +
 .../log-message/log-message.component.ts| 129 ++
 .../logs-list/logs-list.component.html  |  92 +++--
 .../logs-list/logs-list.component.less  | 130 +--
 .../ambari-logsearch-web/webpack.config.js  |  15 ++-
 11 files changed, 550 insertions(+), 120 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/38476f7a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
--
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
index 488437e..56562df 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts
@@ -68,6 +68,8 @@ import {FilterButtonComponent} from 
'@app/components/filter-button/filter-button
 import {AccordionPanelComponent} from 
'@app/components/accordion-panel/accordion-panel.component';
 import {CollapsiblePanelComponent} from 
'@app/components/collapsible-panel/collapsible-panel.component';
 import {LogsListComponent} from 
'@app/components/logs-list/logs-list.component';
+import {LogMessageComponent} from 
'@app/components/log-message/log-message.component';
+import {LogLevelComponent} from 
'@app/components/log-level/log-level.component';
 import {DropdownButtonComponent} from 
'@app/components/dropdown-button/dropdown-button.component';
 import {PaginationComponent} from 
'@app/components/pagination/pagination.component';
 import {PaginationControlsComponent} from 
'@app/components/pagination-controls/pagination-controls.component';
@@ -121,6 +123,8 @@ export function getXHRBackend(injector: Injector, browser: 
BrowserXhr, xsrf: XSR
 AccordionPanelComponent,
 CollapsiblePanelComponent,
 LogsListComponent,
+LogLevelComponent,
+LogMessageComponent,
 DropdownButtonComponent,
 PaginationComponent,
 PaginationControlsComponent,

http://git-wip-us.apache.org/repos/asf/ambari/blob/38476f7a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.html
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.html
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.html
new file mode 100644
index 000..d72c9d33
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.html
@@ -0,0 +1,18 @@
+
+
+{{logEntry.level}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/38476f7a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.spec.ts
new file mode 100644
index 000..c13d373
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/log-level/log-level.component.spec.ts
@@ -0,0 +1,73 @@
+/**
+ * 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 

[22/50] [abbrv] ambari git commit: AMBARI-22387. Create a Pre-Upgrade Check Warning About LZO. Fix import (dlysnichenko)

2017-11-16 Thread rlevas
AMBARI-22387. Create a Pre-Upgrade Check Warning About LZO. Fix import 
(dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6e706d42
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6e706d42
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6e706d42

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 6e706d427f1f9bcfc61f986ea1a1d5f5a28d500f
Parents: 76349ac
Author: Lisnichenko Dmitro 
Authored: Mon Nov 13 16:35:23 2017 +0200
Committer: Lisnichenko Dmitro 
Committed: Mon Nov 13 16:35:23 2017 +0200

--
 .../src/main/java/org/apache/ambari/server/checks/LZOCheck.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6e706d42/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
index 3000b79..9c0286b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/LZOCheck.java
@@ -19,7 +19,6 @@ package org.apache.ambari.server.checks;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Set;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.controller.PrereqCheckRequest;



[38/50] [abbrv] ambari git commit: AMBARI-22418. Make Ambari configuration API consistent with existing API. (rlevas)

2017-11-16 Thread rlevas
http://git-wip-us.apache.org/repos/asf/ambari/blob/3f2743b5/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProviderTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProviderTest.java
new file mode 100644
index 000..5016160
--- /dev/null
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProviderTest.java
@@ -0,0 +1,393 @@
+/*
+ * Licensed 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.controller.internal;
+
+import static 
org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider.CONFIGURATION_CATEGORY_PROPERTY_ID;
+import static 
org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider.CONFIGURATION_COMPONENT_NAME_PROPERTY_ID;
+import static 
org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider.CONFIGURATION_PROPERTIES_PROPERTY_ID;
+import static 
org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider.CONFIGURATION_SERVICE_NAME_PROPERTY_ID;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.newCapture;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+import javax.persistence.EntityManager;
+
+import org.apache.ambari.server.controller.RootComponent;
+import org.apache.ambari.server.controller.RootService;
+import org.apache.ambari.server.controller.predicate.AndPredicate;
+import org.apache.ambari.server.controller.spi.Predicate;
+import org.apache.ambari.server.controller.spi.Request;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.spi.ResourceProvider;
+import org.apache.ambari.server.controller.utilities.PredicateBuilder;
+import org.apache.ambari.server.events.AmbariConfigurationChangedEvent;
+import org.apache.ambari.server.events.publishers.AmbariEventPublisher;
+import org.apache.ambari.server.orm.dao.AmbariConfigurationDAO;
+import org.apache.ambari.server.orm.entities.AmbariConfigurationEntity;
+import org.apache.ambari.server.security.TestAuthenticationFactory;
+import org.apache.ambari.server.security.authorization.AuthorizationException;
+import org.easymock.Capture;
+import org.easymock.EasyMockSupport;
+import org.junit.After;
+import org.junit.Test;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import junit.framework.Assert;
+
+public class RootServiceComponentConfigurationResourceProviderTest extends 
EasyMockSupport {
+
+  private static final String CATEGORY_NAME_1 = "test-category-1";
+  private static final String CATEGORY_NAME_2 = "test-category-2";
+
+  @After
+  public void clearAuthentication() {
+SecurityContextHolder.getContext().setAuthentication(null);
+  }
+
+  @Test
+  public void testCreateResources_Administrator() throws Exception {
+testCreateResources(TestAuthenticationFactory.createAdministrator());
+  }
+
+  @Test(expected = AuthorizationException.class)
+  public void testCreateResources_ClusterAdministrator() throws Exception {
+
testCreateResources(TestAuthenticationFactory.createClusterAdministrator());
+  }
+
+  @Test(expected = AuthorizationException.class)
+  public void testCreateResources_ClusterOperator() throws Exception {
+testCreateResources(TestAuthenticationFactory.createClusterOperator());
+  }
+
+  @Test(expected = AuthorizationException.class)
+  public void testCreateResources_ServiceAdministrator() throws Exception {
+
testCreateResources(TestAuthenticationFactory.createServiceAdministrator());
+  }
+
+  

[14/50] [abbrv] ambari git commit: AMBARI-22346. Beeline connection hangs for longer time when connection to HS2 with metastore DB down (aonishuk)

2017-11-16 Thread rlevas
AMBARI-22346. Beeline connection hangs for longer time when connection to HS2 
with metastore DB down (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98915a11
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98915a11
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98915a11

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 98915a114769c7ddd590854ccf0ab33beabddcf3
Parents: 46ad6c6
Author: Andrew Onishuk 
Authored: Fri Nov 10 13:28:27 2017 +0200
Committer: Andrew Onishuk 
Committed: Fri Nov 10 13:28:27 2017 +0200

--
 .../HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py | 3 ++-
 .../1.2.1/package/scripts/alerts/alert_spark_thrift_port.py  | 8 +++-
 .../2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py | 8 +++-
 3 files changed, 16 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/98915a11/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
index 3560bf8..6db92b0 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
@@ -28,6 +28,7 @@ from resource_management.libraries.functions import format
 from resource_management.libraries.functions import get_kinit_path
 from ambari_commons.os_check import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+from resource_management.core.signal_utils import TerminateStrategy
 
 OK_MESSAGE = "TCP OK - {0:.3f}s response on port {1}"
 CRITICAL_MESSAGE = "Connection failed on host {0}:{1} ({2})"
@@ -271,7 +272,7 @@ def execute(configurations={}, parameters={}, 
host_name=None):
 
 start_time = time.time()
 try:
-  Execute(cmd, user=hiveuser, timeout=30)
+  Execute(cmd, user=hiveuser, timeout=30, 
timeout_kill_strategy=TerminateStrategy.KILL_PROCESS_TREE)
   total_time = time.time() - start_time
   result_code = 'OK'
   label = OK_MESSAGE.format(total_time, port)

http://git-wip-us.apache.org/repos/asf/ambari/blob/98915a11/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
 
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
index 3f80fd9..6874cb4 100644
--- 
a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
+++ 
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
@@ -27,6 +27,7 @@ from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions import get_kinit_path
 from resource_management.core.resources import Execute
 from resource_management.core import global_lock
+from resource_management.core.signal_utils import TerminateStrategy
 
 stack_root = Script.get_stack_root()
 
@@ -140,7 +141,12 @@ def execute(configurations={}, parameters={}, 
host_name=None):
 
 start_time = time.time()
 try:
-Execute(cmd, user=hiveruser, path=[beeline_cmd], 
timeout=CHECK_COMMAND_TIMEOUT_DEFAULT)
+Execute(cmd,
+user=hiveruser,
+path=[beeline_cmd],
+timeout=CHECK_COMMAND_TIMEOUT_DEFAULT,
+timeout_kill_strategy=TerminateStrategy.KILL_PROCESS_TREE,
+)
 total_time = time.time() - start_time
 result_code = 'OK'
 label = OK_MESSAGE.format(total_time, port)

http://git-wip-us.apache.org/repos/asf/ambari/blob/98915a11/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
 
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
index 9e1afea..d3660de 100644
--- 

[33/50] [abbrv] ambari git commit: Revert "AMBARI-22383. Remove Auto-Installation of LZO Libraries (ncole)"

2017-11-16 Thread rlevas
Revert "AMBARI-22383. Remove Auto-Installation of LZO Libraries (ncole)"

This reverts commit 5adcea78792cf227f15e7c08f5bb3fe2c48883d3.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ba00ed95
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ba00ed95
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ba00ed95

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: ba00ed956706cc80deff58f22799ed54a8bcadd8
Parents: 869e1aa
Author: Nate Cole 
Authored: Tue Nov 14 18:39:14 2017 -0500
Committer: Nate Cole 
Committed: Tue Nov 14 18:39:14 2017 -0500

--
 .../libraries/functions/__init__.py |  1 +
 .../libraries/functions/get_lzo_packages.py | 50 
 .../libraries/functions/package_conditions.py   |  8 +++-
 .../DRUID/0.10.1/package/scripts/druid.py   |  3 +-
 .../DRUID/0.10.1/package/scripts/params.py  |  3 +-
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml | 30 
 .../HDFS/2.1.0.2.0/package/scripts/datanode.py  |  1 +
 .../HDFS/2.1.0.2.0/package/scripts/hdfs.py  |  7 +++
 .../2.1.0.2.0/package/scripts/hdfs_client.py|  1 +
 .../2.1.0.2.0/package/scripts/install_params.py |  1 -
 .../2.1.0.2.0/package/scripts/journalnode.py|  1 +
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  |  1 +
 .../common-services/HDFS/3.0.0.3.0/metainfo.xml | 30 
 .../HDFS/3.0.0.3.0/package/scripts/hdfs.py  |  7 +++
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py|  6 ++-
 .../package/scripts/oozie_server_upgrade.py |  7 +--
 .../4.0.0.2.0/package/scripts/params_linux.py   |  1 -
 .../OOZIE/4.2.0.3.0/package/scripts/oozie.py|  4 ++
 .../package/scripts/oozie_server_upgrade.py |  5 --
 .../TEZ/0.4.0.2.1/package/scripts/tez_client.py | 32 +
 .../TEZ/0.9.0.3.0/package/scripts/tez_client.py | 26 ++
 .../custom_actions/scripts/remove_bits.py   |  2 +-
 .../BIGTOP/0.8/services/HDFS/metainfo.xml   | 16 +++
 .../0.8/services/HDFS/package/scripts/params.py |  6 ++-
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   | 35 ++
 .../2.3.GlusterFS/services/HDFS/metainfo.xml| 10 
 .../stacks/HDP/2.3/services/HDFS/metainfo.xml   | 30 
 .../stacks/HDP/3.0/services/HDFS/metainfo.xml   | 30 
 .../python/custom_actions/TestRemoveBits.py |  5 +-
 29 files changed, 339 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ba00ed95/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
index 1e388ac..f144b2d 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
@@ -39,6 +39,7 @@ from resource_management.libraries.functions.version import *
 from resource_management.libraries.functions.format_jvm_option import *
 from resource_management.libraries.functions.constants import *
 from resource_management.libraries.functions.get_stack_version import *
+from resource_management.libraries.functions.get_lzo_packages import *
 from resource_management.libraries.functions.setup_ranger_plugin import *
 from resource_management.libraries.functions.curl_krb_request import *
 from resource_management.libraries.functions.get_bare_principal import *

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba00ed95/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
new file mode 100644
index 000..cfbb7d8
--- /dev/null
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License 

[45/50] [abbrv] ambari git commit: AMBARI-22260. Update Spark2 log4j default settings to latest. (sai.sai.shao via sshridhar).

2017-11-16 Thread rlevas
AMBARI-22260. Update Spark2 log4j default settings to latest. (sai.sai.shao via 
sshridhar).


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4042f9fd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4042f9fd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4042f9fd

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 4042f9fde14548be77a5ed5daf45364df307c08a
Parents: 0936f46
Author: Swapan Shridhar 
Authored: Wed Nov 15 16:21:31 2017 -0800
Committer: Swapan Shridhar 
Committed: Wed Nov 15 16:21:31 2017 -0800

--
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml  | 23 
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml | 23 +---
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml | 45 +---
 .../configuration/spark2-log4j-properties.xml   | 56 
 4 files changed, 122 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4042f9fd/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index b1e5f91..8c2c860 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -104,14 +104,37 @@
 
 
 
+  
+
+  
+spark2-log4j-properties
+
+
+  
+
+  
   
 
+  
+spark2-log4j-properties
+
+
+  
   
 spark2-defaults
 
   
 
   
+  
+
+  
+spark2-log4j-properties
+
+
+  
+
+  
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4042f9fd/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
index ace9542..9caa850 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
@@ -77,7 +77,7 @@
   
 FLUME_HANDLER
   
-  
+
   
 ACCUMULO_TRACER
 ACCUMULO_GC
@@ -355,7 +355,7 @@
 
   Validate Root Queue Ordering Policy
 
-   
+  
 
   
   
@@ -679,6 +679,15 @@
   Add queue customization property
 
   
+  
+
+  
+  
+
+  
+  
+
+  
 
 
 
 
   false
@@ -1083,7 +1092,7 @@
 FLUME_HANDLER
   
 
-
+
 
   false
   true
@@ -1112,7 +1121,7 @@
 
 
   UPGRADE
-  
+
   
 
   
@@ -1192,7 +1201,7 @@
 setup_ranger_java_patches
   
 
-
+
 
 
 
@@ -1215,7 +1224,7 @@
 configure_atlas_user_for_tagsync
   
 
-
+
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4042f9fd/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
index df11ae1..4fc9b42 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
@@ -183,7 +183,7 @@
 HBASE_MASTER
   
 
-
+
 
   UPGRADE
   true
@@ -199,7 +199,7 @@
 LOGSEARCH
   
 
-
+
 
   false
   true
@@ -207,7 +207,7 @@
 DATANODE
 NFS_GATEWAY
   
-  
+
   
 HBASE_REGIONSERVER
 PHOENIX_QUERY_SERVER
@@ -223,7 +223,7 @@
 The initial batch of {{components}} hosts have been 
{{direction.past}}. You are advised to check the hosts and perform 
cluster/workload-specific tests against your cluster to ensure proper operation 
before proceeding with {{direction.text}} of the remaining services.
   
 
-
+
 
   UPGRADE
   true
@@ -458,7 +458,7 @@
 
 
   UPGRADE
-  
+
   
 
   
@@ -467,7 

[09/50] [abbrv] ambari git commit: AMBARI-22398. Upstart is not able to stop the ambari-agent (aonishuk)

2017-11-16 Thread rlevas
AMBARI-22398. Upstart is not able to stop the ambari-agent (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e968b121
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e968b121
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e968b121

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: e968b12186848edd7b4e8b7103e8283b61f59c50
Parents: 780e91e
Author: Andrew Onishuk 
Authored: Thu Nov 9 16:37:58 2017 +0200
Committer: Andrew Onishuk 
Committed: Thu Nov 9 16:37:58 2017 +0200

--
 ambari-agent/src/main/python/ambari_agent/AmbariAgent.py | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e968b121/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py 
b/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py
index 28b9528..aeb200c 100644
--- a/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py
+++ b/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py
@@ -49,9 +49,6 @@ def main():
 
   mergedArgs = [PYTHON, AGENT_SCRIPT] + args
 
-  # Become a parent for all subprocesses
-  os.setpgrp()
-
   try:
 while status == AGENT_AUTO_RESTART_EXIT_CODE:
   mainProcess = subprocess.Popen(mergedArgs)



[42/50] [abbrv] ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (jonathanhurley)

2017-11-16 Thread rlevas
AMBARI-22444 - Add Native Libraries To Tez Tarball (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c67a3246
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c67a3246
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c67a3246

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: c67a3246e2121c6977094e10cdb1414f45cf1482
Parents: 99152d3
Author: Jonathan Hurley 
Authored: Tue Nov 14 16:19:30 2017 -0500
Committer: Jonathan Hurley 
Committed: Wed Nov 15 15:30:36 2017 -0500

--
 .../libraries/functions/copy_tarball.py | 82 +---
 .../libraries/functions/tar_archive.py  |  6 +-
 .../stacks/2.1/FALCON/test_falcon_server.py |  6 +-
 3 files changed, 80 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c67a3246/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 219430a..f62aa3d 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -23,18 +23,74 @@ __all__ = ["copy_to_hdfs", 
"get_sysprep_skip_copy_tarballs_hdfs"]
 import os
 import tempfile
 import re
+import tarfile
+from contextlib import closing
 
 from resource_management.libraries.script.script import Script
 from resource_management.libraries.resources.hdfs_resource import HdfsResource
 from resource_management.libraries.functions.default import default
 from resource_management.core import shell
+from resource_management.core import sudo
 from resource_management.core.logger import Logger
+from resource_management.core.exceptions import Fail
+from resource_management.core.resources.system import Execute
 from resource_management.libraries.functions import stack_tools, 
stack_features, stack_select
+from resource_management.libraries.functions import tar_archive
 
 STACK_NAME_PATTERN = "{{ stack_name }}"
 STACK_ROOT_PATTERN = "{{ stack_root }}"
 STACK_VERSION_PATTERN = "{{ stack_version }}"
 
+def _prepare_tez_tarball():
+  """
+  Prepares the Tez tarball by adding the Hadoop native libraries found in the 
mapreduce tarball.
+  :return:  the full path of the newly created tez tarball to use
+  """
+  import tempfile
+
+  Logger.info("Preparing the Tez tarball...")
+
+  # get the mapreduce tarball which matches the version of tez
+  # tez installs the mapreduce tar, so it should always be present
+  _, mapreduce_source_file, _, _ = get_tarball_paths("mapreduce")
+  _, tez_source_file, _, _ = get_tarball_paths("tez")
+
+  temp_dir = Script.get_tmp_dir()
+
+  mapreduce_temp_dir = tempfile.mkdtemp(prefix="mapreduce-tarball-", 
dir=temp_dir)
+  tez_temp_dir = tempfile.mkdtemp(prefix="tez-tarball-", dir=temp_dir)
+
+  Logger.info("Extracting {0} to {1}".format(mapreduce_source_file, 
mapreduce_temp_dir))
+  tar_archive.extract_archive(mapreduce_source_file, mapreduce_temp_dir)
+
+  Logger.info("Extracting {0} to {1}".format(tez_source_file, tez_temp_dir))
+  tar_archive.untar_archive(tez_source_file, tez_temp_dir)
+
+  hadoop_lib_native_dir = os.path.join(mapreduce_temp_dir, "hadoop", "lib", 
"native")
+  tez_lib_dir = os.path.join(tez_temp_dir, "lib")
+
+  if not os.path.exists(hadoop_lib_native_dir):
+raise Fail("Unable to seed the Tez tarball with native libraries since the 
source Hadoop native lib directory {0} does not 
exist".format(hadoop_lib_native_dir))
+
+  if not os.path.exists(tez_lib_dir):
+raise Fail("Unable to seed the Tez tarball with native libraries since the 
target Tez lib directory {0} does not exist".format(tez_lib_dir))
+
+  Execute(("cp", "-a", hadoop_lib_native_dir, tez_lib_dir), sudo = True)
+
+  tez_tarball_with_native_lib = os.path.join(os.path.dirname(tez_source_file), 
"tez-native.tar.gz")
+  Logger.info("Creating a new Tez tarball at 
{0}".format(tez_tarball_with_native_lib))
+
+  # tar up Tez, making sure to specify nothing for the arcname so that it does 
not include an absolute path
+  with closing(tarfile.open(tez_tarball_with_native_lib, "w:gz")) as 
new_tez_tarball:
+new_tez_tarball.add(tez_temp_dir, arcname=os.path.sep)
+
+  # cleanup
+  sudo.rmtree(mapreduce_temp_dir)
+  sudo.rmtree(tez_temp_dir)
+
+  return tez_tarball_with_native_lib
+
+
 # TODO, in the future, each stack can define its own mapping of tarballs
 # inside the stack definition directory in some sort of xml file.
 # PLEASE DO NOT put this in cluster-env 

[02/50] [abbrv] ambari git commit: AMBARI-22379 : get_phoenix_query_server_hosts is undefined in hbase service_advisor. (Ted Yu via avijayan)

2017-11-16 Thread rlevas
AMBARI-22379 : get_phoenix_query_server_hosts is undefined in hbase 
service_advisor. (Ted Yu via avijayan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b04e142b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b04e142b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b04e142b

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: b04e142b3f80d4713ed154e17c0ab877d46500a4
Parents: 08d3826
Author: Aravindan Vijayan 
Authored: Wed Nov 8 11:14:54 2017 -0800
Committer: Aravindan Vijayan 
Committed: Wed Nov 8 11:14:54 2017 -0800

--
 .../common-services/HBASE/2.0.0.3.0/service_advisor.py  | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b04e142b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
index f9d1a59..9dc5708 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
@@ -461,6 +461,16 @@ class HBASERecommender(service_advisor.ServiceAdvisor):
 else:
   putHbaseSiteProperty('hbase.master.ui.readonly', 'false')
 
+  """
+  Returns the list of Phoenix Query Server host names, or None.
+  """
+  def get_phoenix_query_server_hosts(self, services, hosts):
+if len(hosts['items']) > 0:
+  phoenix_query_server_hosts = self.getHostsWithComponent("HBASE", 
"PHOENIX_QUERY_SERVER", services, hosts)
+  if phoenix_query_server_hosts is None:
+return []
+  return [host['Hosts']['host_name'] for host in 
phoenix_query_server_hosts]
+
 
   def recommendHBASEConfigurationsFromHDP26(self, configurations, clusterData, 
services, hosts):
 if 'hbase-env' in services['configurations'] and 'hbase_user' in 
services['configurations']['hbase-env']['properties']:
@@ -672,4 +682,4 @@ class HBASEValidator(service_advisor.ServiceAdvisor):
   " {0} needs to contain {1} instead of 
{2}".format(prop_name,prop_val,exclude_val))})
 
 validationProblems = 
self.toConfigurationValidationProblems(validationItems, "hbase-site")
-return validationProblems
\ No newline at end of file
+return validationProblems



[47/50] [abbrv] ambari git commit: AMBARI-22444 - Add Native Libraries To Tez Tarball (part3) (jonathanhurley)

2017-11-16 Thread rlevas
AMBARI-22444 - Add Native Libraries To Tez Tarball (part3) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a393926c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a393926c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a393926c

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: a393926c5cdae85b567349c89098712d21a5e1ec
Parents: f087874
Author: Jonathan Hurley 
Authored: Thu Nov 16 09:43:24 2017 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 16 11:46:27 2017 -0500

--
 .../resource_management/libraries/functions/copy_tarball.py | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a393926c/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 7bca967..9b6fb98 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -58,8 +58,11 @@ def _prepare_tez_tarball():
 
   temp_dir = Script.get_tmp_dir()
 
+  # create the temp staging directories ensuring that non-root agents using 
tarfile can work with them
   mapreduce_temp_dir = tempfile.mkdtemp(prefix="mapreduce-tarball-", 
dir=temp_dir)
   tez_temp_dir = tempfile.mkdtemp(prefix="tez-tarball-", dir=temp_dir)
+  sudo.chmod(mapreduce_temp_dir, 0777)
+  sudo.chmod(tez_temp_dir, 0777)
 
   Logger.info("Extracting {0} to {1}".format(mapreduce_source_file, 
mapreduce_temp_dir))
   tar_archive.extract_archive(mapreduce_source_file, mapreduce_temp_dir)
@@ -76,11 +79,17 @@ def _prepare_tez_tarball():
   if not os.path.exists(tez_lib_dir):
 raise Fail("Unable to seed the Tez tarball with native libraries since the 
target Tez lib directory {0} does not exist".format(tez_lib_dir))
 
+  # ensure that the tez/lib directory is readable by non-root (which it 
typically is not)
+  sudo.chmod(tez_lib_dir, 0755)
+
+  # copy native libraries from hadoop to tez
   Execute(("cp", "-a", hadoop_lib_native_dir, tez_lib_dir), sudo = True)
 
+  # create the staging directory so that non-root agents can write to it
   tez_native_tarball_staging_dir = os.path.join(temp_dir, 
"tez-native-tarball-staging")
   if not os.path.exists(tez_native_tarball_staging_dir):
 Directory(tez_native_tarball_staging_dir,
+  mode = 0777,
   cd_access='a',
   create_parents = True,
   recursive_ownership = True)



  1   2   >