ambari git commit: AMBARI-22537 : Storm jmxetric config not getting removed during patch upgrade (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 306b9a5ee -> 64cb27fae


AMBARI-22537 : Storm jmxetric config not getting removed during patch upgrade 
(ydavis via mradhakrishnan)


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

Branch: refs/heads/branch-2.6
Commit: 64cb27faeefea4c2570cf83acd1ba8f8bd8bca5d
Parents: 306b9a5
Author: Madhuvanthi Radhakrishnan 
Authored: Thu Nov 30 20:54:49 2017 -0800
Committer: Madhuvanthi Radhakrishnan 
Committed: Thu Nov 30 20:54:49 2017 -0800

--
 .../resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml   | 2 +-
 .../src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/64cb27fa/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
index 2185049..d506f1f 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
@@ -338,7 +338,7 @@
   
 
   
-
+
   
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/64cb27fa/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
index d51706a..17a6394 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
@@ -989,7 +989,7 @@
 
   
   
-  
+  
 
  
 



ambari git commit: AMBARI-22537 : Storm jmxetric config not getting removed during patch upgrade (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
Repository: ambari
Updated Branches:
  refs/heads/trunk 7b6fef189 -> 3a802ae3e


AMBARI-22537 : Storm jmxetric config not getting removed during patch upgrade 
(ydavis via mradhakrishnan)


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

Branch: refs/heads/trunk
Commit: 3a802ae3ee9ee8dd944328344c4cfe19c5aaae02
Parents: 7b6fef1
Author: Madhuvanthi Radhakrishnan 
Authored: Thu Nov 30 20:28:48 2017 -0800
Committer: Madhuvanthi Radhakrishnan 
Committed: Thu Nov 30 20:28:48 2017 -0800

--
 .../resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml   | 2 +-
 .../src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3a802ae3/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
index 2184060..d3b2e56 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
@@ -336,7 +336,7 @@
   
 
   
-
+
   
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/3a802ae3/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
index 70f84ab..4f10ea5 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
@@ -988,7 +988,7 @@
   
 
   
-  
+  
 
  
 



ambari git commit: AMBARI-22568 - Oozie Fails To Restart During Upgrade Because of Missing ExtJS Library (jonathanhurley)

2017-11-30 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 2a731ac96 -> 306b9a5ee


AMBARI-22568 - Oozie Fails To Restart During Upgrade Because of Missing ExtJS 
Library (jonathanhurley)


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

Branch: refs/heads/branch-2.6
Commit: 306b9a5eeb10d683e4f1ce70031e412b28c4a707
Parents: 2a731ac
Author: Jonathan Hurley 
Authored: Thu Nov 30 15:24:24 2017 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 30 23:14:38 2017 -0500

--
 .../libraries/functions/constants.py| 11 +
 .../package/scripts/oozie_server_upgrade.py | 24 
 .../HDP/2.0.6/properties/stack_features.json|  6 +
 .../stacks/2.0.6/OOZIE/test_oozie_server.py | 24 +---
 4 files changed, 52 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/306b9a5e/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index b811861..212827c 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -111,13 +111,14 @@ class StackFeature:
   KAFKA_RANGER_PLUGIN_SUPPORT = "kafka_ranger_plugin_support"
   YARN_RANGER_PLUGIN_SUPPORT = "yarn_ranger_plugin_support"
   RANGER_SOLR_CONFIG_SUPPORT='ranger_solr_config_support'
-  HIVE_INTERACTIVE_ATLAS_HOOK_REQUIRED="hive_interactive_atlas_hook_required"
-  CORE_SITE_FOR_RANGER_PLUGINS_SUPPORT='core_site_for_ranger_plugins'
-  ATLAS_INSTALL_HOOK_PACKAGE_SUPPORT="atlas_install_hook_package_support"
-  ATLAS_HDFS_SITE_ON_NAMENODE_HA='atlas_hdfs_site_on_namenode_ha'
-  HIVE_INTERACTIVE_GA_SUPPORT='hive_interactive_ga'
+  HIVE_INTERACTIVE_ATLAS_HOOK_REQUIRED = "hive_interactive_atlas_hook_required"
+  CORE_SITE_FOR_RANGER_PLUGINS_SUPPORT = 'core_site_for_ranger_plugins'
+  ATLAS_INSTALL_HOOK_PACKAGE_SUPPORT = "atlas_install_hook_package_support"
+  ATLAS_HDFS_SITE_ON_NAMENODE_HA = 'atlas_hdfs_site_on_namenode_ha'
+  HIVE_INTERACTIVE_GA_SUPPORT = 'hive_interactive_ga'
   SECURE_RANGER_SSL_PASSWORD = "secure_ranger_ssl_password"
   RANGER_KMS_SSL = "ranger_kms_ssl"
   KAFKA_ACL_MIGRATION_SUPPORT = "kafka_acl_migration_support"
   ATLAS_CORE_SITE_SUPPORT="atlas_core_site_support"
   KAFKA_EXTENDED_SASL_SUPPORT = "kafka_extended_sasl_support"
+  OOZIE_EXTJS_INCLUDED = "oozie_extjs_included"

http://git-wip-us.apache.org/repos/asf/ambari/blob/306b9a5e/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
index eb57c22..d3cecef 100644
--- 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
+++ 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
@@ -28,6 +28,7 @@ from resource_management.core.resources.system import File
 from resource_management.libraries.functions import Direction
 from resource_management.libraries.functions import format
 from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import lzo_utils
 from resource_management.libraries.functions.oozie_prepare_war import 
prepare_war
 from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions import StackFeature
@@ -52,7 +53,8 @@ class OozieUpgrade(Script):
 import params
 
 # some stack versions don't need the lzo compression libraries
-target_version_needs_compression_libraries = params.version and 
check_stack_feature(StackFeature.LZO, params.version)
+target_version_needs_compression_libraries = 
check_stack_feature(StackFeature.LZO,
+  params.version_for_stack_feature_checks)
 
 # ensure the directory exists
 Directory(params.oozie_libext_dir, mode = 0777)
@@ -66,6 +68,9 @@ class OozieUpgrade(Script):
 # When a version is Installed, it is responsible for downloading the 
hadoop-lzo packages
 # if lzo is enabled.
 if 

ambari git commit: AMBARI-22570. Repository Fields missing when register version is clicked (vsubramanian)

2017-11-30 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/trunk b2655aa66 -> 7b6fef189


AMBARI-22570. Repository Fields missing when register version is clicked 
(vsubramanian)


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

Branch: refs/heads/trunk
Commit: 7b6fef189b7fa3090b7a10efcdf5e2427e2e0eac
Parents: b2655aa
Author: Vivek Ratnavel Subramanian 
Authored: Thu Nov 30 16:32:17 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Thu Nov 30 16:32:17 2017 -0800

--
 .../stackVersions/StackVersionsCreateCtrl.js| 28 +++-
 1 file changed, 27 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b6fef18/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index 8ffb29b..3d93b0d 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -40,6 +40,16 @@ angular.module('ambariAdminConsole')
 display_name: ''
   };
 
+  $scope.isGPLAccepted = false;
+
+  $scope.isGPLRepo = function (repository) {
+return repository.Repositories.tags.indexOf('GPL') >= 0;
+  };
+
+  $scope.showRepo = function (repository) {
+return $scope.isGPLAccepted || !$scope.isGPLRepo(repository);
+  };
+
   $scope.publicOption = {
 index: 1,
 hasError: false
@@ -176,6 +186,15 @@ angular.module('ambariAdminConsole')
   };
 
   /**
+   * Load GPL License Accepted value
+   */
+  $scope.fetchGPLLicenseAccepted = function () {
+Stack.getGPLLicenseAccepted().then(function (data) {
+  $scope.isGPLAccepted = data === 'true';
+})
+  };
+
+  /**
* Load supported OS list
*/
   $scope.afterStackVersionRead = function () {
@@ -350,7 +369,11 @@ angular.module('ambariAdminConsole')
 
   $scope.updateRepoVersions = function () {
 var skip = $scope.skipValidation || $scope.useRedhatSatellite;
-return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+// Filter out repositories that are not shown in the UI
+var osList = Object.assign([], $scope.osList).map(function(os) {
+  return Object.assign({}, os, {repositories: 
os.repositories.filter(function(repo) { return $scope.showRepo(repo); })});
+});
+return Stack.validateBaseUrls(skip, osList, 
$scope.upgradeStack).then(function (invalidUrls) {
   if (invalidUrls.length === 0) {
 Stack.updateRepo($scope.upgradeStack.stack_name, 
$scope.upgradeStack.stack_version, $scope.id, $scope.updateObj).then(function 
() {
   Alert.success($t('versions.alerts.versionEdited', {
@@ -477,6 +500,9 @@ angular.module('ambariAdminConsole')
 
 // load supported os type base on stack version
 $scope.afterStackVersionRead();
+
+// Load GPL license accepted value
+$scope.fetchGPLLicenseAccepted();
   };
 
   $scope.selectRepoInList = function() {



ambari git commit: AMBARI-22570. Repository Fields missing when register version is clicked (vsubramanian)

2017-11-30 Thread vivekratnavel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 4b428571f -> 2a731ac96


AMBARI-22570. Repository Fields missing when register version is clicked 
(vsubramanian)


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

Branch: refs/heads/branch-2.6
Commit: 2a731ac968d3ce19fdd19b94b8340c6cc8f866ef
Parents: 4b42857
Author: Vivek Ratnavel Subramanian 
Authored: Thu Nov 30 16:31:16 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Thu Nov 30 16:31:16 2017 -0800

--
 .../stackVersions/StackVersionsCreateCtrl.js| 28 +++-
 1 file changed, 27 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2a731ac9/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index c5f1a8c..fed9790 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -40,6 +40,16 @@ angular.module('ambariAdminConsole')
 display_name: ''
   };
 
+  $scope.isGPLAccepted = false;
+
+  $scope.isGPLRepo = function (repository) {
+return repository.Repositories.tags.indexOf('GPL') >= 0;
+  };
+
+  $scope.showRepo = function (repository) {
+return $scope.isGPLAccepted || !$scope.isGPLRepo(repository);
+  };
+
   $scope.publicOption = {
 index: 1,
 hasError: false
@@ -176,6 +186,15 @@ angular.module('ambariAdminConsole')
   };
 
   /**
+   * Load GPL License Accepted value
+   */
+  $scope.fetchGPLLicenseAccepted = function () {
+Stack.getGPLLicenseAccepted().then(function (data) {
+  $scope.isGPLAccepted = data === 'true';
+})
+  };
+
+  /**
* Load supported OS list
*/
   $scope.afterStackVersionRead = function () {
@@ -350,7 +369,11 @@ angular.module('ambariAdminConsole')
 
   $scope.updateRepoVersions = function () {
 var skip = $scope.skipValidation || $scope.useRedhatSatellite;
-return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+// Filter out repositories that are not shown in the UI
+var osList = Object.assign([], $scope.osList).map(function(os) {
+  return Object.assign({}, os, {repositories: 
os.repositories.filter(function(repo) { return $scope.showRepo(repo); })});
+});
+return Stack.validateBaseUrls(skip, osList, 
$scope.upgradeStack).then(function (invalidUrls) {
   if (invalidUrls.length === 0) {
 Stack.updateRepo($scope.upgradeStack.stack_name, 
$scope.upgradeStack.stack_version, $scope.id, $scope.updateObj).then(function 
() {
   Alert.success($t('versions.alerts.versionEdited', {
@@ -477,6 +500,9 @@ angular.module('ambariAdminConsole')
 
 // load supported os type base on stack version
 $scope.afterStackVersionRead();
+
+// Load GPL license accepted value
+$scope.fetchGPLLicenseAccepted();
   };
 
   $scope.selectRepoInList = function() {



[2/2] ambari git commit: AMBARI-22567 : Integrate Spark lifecycle management into AMS AD Manager. (avijayan)

2017-11-30 Thread avijayan
AMBARI-22567 : Integrate Spark lifecycle management into AMS AD Manager. 
(avijayan)


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

Branch: refs/heads/branch-3.0-ams
Commit: cb0341e079de0226c1bc3cbfb1df76833abb954b
Parents: ba9be80
Author: Aravindan Vijayan 
Authored: Thu Nov 30 16:07:56 2017 -0800
Committer: Aravindan Vijayan 
Committed: Thu Nov 30 16:07:56 2017 -0800

--
 .../conf/unix/ambari-metrics-admanager  | 227 +++
 .../conf/unix/ambari-metrics-admanager.sh   | 194 
 .../conf/unix/config.yaml   |  45 
 .../pom.xml |  44 +++-
 .../src/main/assemblies/empty.xml   |  21 ++
 .../src/main/resources/config.yml   |  46 
 .../app/AnomalyDetectionAppConfig.scala |  10 +
 .../ambari/metrics/adservice/common/Range.scala |  44 
 .../metrics/adservice/common/Season.scala   | 122 --
 .../metrics/adservice/common/SeasonType.scala   |  24 --
 .../metrics/adservice/common/TimeRange.scala|  39 
 .../MetricDefinitionServiceConfiguration.scala  |   3 -
 .../configuration/SparkConfiguration.scala  |  39 
 .../db/PhoenixAnomalyStoreAccessor.scala|   5 +-
 .../model/PointInTimeAnomalyInstance.scala  |  46 
 .../ambari/metrics/adservice/model/Range.scala  |  44 
 .../ambari/metrics/adservice/model/Season.scala | 122 ++
 .../metrics/adservice/model/SeasonType.scala|  24 ++
 .../metrics/adservice/model/TimeRange.scala |  39 
 .../adservice/model/TrendAnomalyInstance.scala  |  44 
 .../PointInTimeAnomalyInstance.scala|  48 
 .../subsystem/trend/TrendAnomalyInstance.scala  |  46 
 .../src/test/resources/config.yaml  |  35 +++
 .../app/AnomalyDetectionAppConfigTest.scala |  19 +-
 .../app/DefaultADResourceSpecTest.scala |   2 +-
 .../metrics/adservice/common/RangeTest.scala|  37 ---
 .../metrics/adservice/common/SeasonTest.scala   |  91 
 .../metrics/adservice/model/RangeTest.scala |  38 
 .../metrics/adservice/model/SeasonTest.scala|  92 
 ambari-metrics/ambari-metrics-assembly/pom.xml  | 148 
 .../src/main/assembly/anomaly-detection.xml |  60 +
 .../rpm/anomaly-detection/postinstall.sh|  27 +++
 ambari-metrics/pom.xml  |   4 +-
 .../configuration/ams-admanager-config.xml  |   4 +
 .../0.1.0/configuration/ams-admanager-env.xml   |   6 +-
 .../0.1.0/configuration/ams-admanager-log4j.xml |   2 +-
 .../configuration/ams-admanager-spark-env.xml   | 129 +++
 .../AMBARI_METRICS/0.1.0/metainfo.xml   |   1 +
 .../AMBARI_METRICS/0.1.0/package/scripts/ams.py |  14 +-
 .../0.1.0/package/scripts/ams_admanager.py  |   4 +-
 .../0.1.0/package/scripts/params.py |  22 +-
 .../0.1.0/package/scripts/status_params.py  |   2 +-
 42 files changed, 1287 insertions(+), 726 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cb0341e0/ambari-metrics/ambari-metrics-anomaly-detection-service/conf/unix/ambari-metrics-admanager
--
diff --git 
a/ambari-metrics/ambari-metrics-anomaly-detection-service/conf/unix/ambari-metrics-admanager
 
b/ambari-metrics/ambari-metrics-anomaly-detection-service/conf/unix/ambari-metrics-admanager
new file mode 100644
index 000..98b7606
--- /dev/null
+++ 
b/ambari-metrics/ambari-metrics-anomaly-detection-service/conf/unix/ambari-metrics-admanager
@@ -0,0 +1,227 @@
+#!/usr/bin/env bash
+
+# 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
+
+PIDFILE=/var/run/ambari-metrics-anomaly-detection/ambari-metrics-admanager.pid
+OUTFILE=/var/log/ambari-metrics-anomaly-detection/ambari-metrics-admanager.out
+
+CONF_DIR=/etc/ambari-metrics-anomaly-detection/conf
+DAEMON_NAME=ams_admanager

[1/2] ambari git commit: AMBARI-22567 : Integrate Spark lifecycle management into AMS AD Manager. (avijayan)

2017-11-30 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/branch-3.0-ams ba9be8028 -> cb0341e07


http://git-wip-us.apache.org/repos/asf/ambari/blob/cb0341e0/ambari-metrics/ambari-metrics-assembly/pom.xml
--
diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml 
b/ambari-metrics/ambari-metrics-assembly/pom.xml
index d9875ce..0c7b786 100644
--- a/ambari-metrics/ambari-metrics-assembly/pom.xml
+++ b/ambari-metrics/ambari-metrics-assembly/pom.xml
@@ -42,6 +42,7 @@
 
${project.basedir}/../ambari-metrics-storm-sink-legacy
 
${project.basedir}/../ambari-metrics-flume-sink
 
${project.basedir}/../ambari-metrics-kafka-sink
+
${project.basedir}/../ambari-metrics-anomaly-detection-service
 python = 2.6
 python-devel
 Apache
@@ -56,6 +57,7 @@
 
ambari-metrics-storm-sink-legacy-with-common-${project.version}.jar
 
ambari-metrics-flume-sink-with-common-${project.version}.jar
 
ambari-metrics-kafka-sink-with-common-${project.version}.jar
+
ambari-metrics-anomaly-detection-service-${project.version}.jar
   
 
   
@@ -139,6 +141,22 @@
 
   
   
+anomaly-detection
+prepare-package
+
+  single
+
+
+  false
+  
ambari-metrics-anomaly-detection-${project.version}
+  false
+  
+
${assemblydescriptor.anomaly-detection}
+  
+  gnu
+
+  
+  
 hadoop-sink
 prepare-package
 
@@ -637,6 +655,81 @@
 
   
 
+  
+  
+ambari-metrics-anomaly-detection
+package
+
+  rpm
+
+
+ambari-metrics-anomaly-detection
+2012, Apache Software Foundation
+Development
+Maven Recipe: RPM Package.
+false
+
+
+644
+755
+root
+root
+
+
+  
${project.build.directory}/resources/rpm/anomaly-detection/postinstall.sh
+  utf-8
+
+
+
+  
+
+
/usr/lib/ambari-metrics-anomaly-detection/
+
+  
+
+  
${anomaly-detection.dir}/target/ambari-metrics-anomaly-detection-service-${project.version}.jar
+
+  
+
+  
+  
+
/usr/lib/ambari-metrics-anomaly-detection/spark
+
+  
+
+  ${anomaly-detection.dir}/target/embedded/spark
+
+  
+
+  
+  
+/usr/sbin
+755
+root
+root
+false
+
+  
+
${anomaly-detection.dir}/conf/unix/ambari-metrics-admanager
+false
+  
+
+  
+  
+
/etc/ambari-metrics-anomaly-detection/conf
+true
+
+  
+
${anomaly-detection.dir}/conf/unix/config.yaml
+  
+  
+
${anomaly-detection.dir}/conf/unix/log4j.properties
+  
+
+  
+
+
+  
 
 
   
@@ -756,10 +849,13 @@
 /etc/ambari-metrics-collector/conf
 /etc/ambari-metrics-grafana/conf
 /etc/ams-hbase/conf
+/etc/ambari-metrics-anomaly-detection/conf
 /var/run/ams-hbase
 /var/run/ambari-metrics-grafana
 /var/log/ambari-metrics-grafana
 /var/lib/ambari-metrics-collector
+/usr/lib/ambari-metrics-anomaly-detection
+/var/lib/ambari-metrics-anomaly-detection
 /var/lib/ambari-metrics-monitor/lib
 /var/lib/ambari-metrics-grafana
 /usr/lib/ambari-metrics-hadoop-sink
@@ -978,6 +1074,49 @@
   
 
 
+
+
+  
${anomaly-detection.dir}/target/${anomaly.detection.jar}
+  file
+  
+perm
+644
+

ambari git commit: AMBARI-22558. Snapshot HBase task failed during IOP migration with TypeError (dlysnichenko)

2017-11-30 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 41329e3b7 -> 4b428571f


AMBARI-22558. Snapshot HBase task failed during IOP migration with TypeError 
(dlysnichenko)


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

Branch: refs/heads/branch-2.6
Commit: 4b428571f83d3b412b85ed92385525c3f568dfc3
Parents: 41329e3
Author: Lisnichenko Dmitro 
Authored: Thu Nov 30 23:23:55 2017 +0200
Committer: Lisnichenko Dmitro 
Committed: Thu Nov 30 23:23:55 2017 +0200

--
 .../4.2/services/HBASE/package/scripts/params.py| 12 
 1 file changed, 8 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4b428571/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/params.py
index c0c314d..3674362 100755
--- 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/params.py
@@ -20,16 +20,20 @@ limitations under the License.
 import ambari_simplejson as json # simplejson is much faster comparing to 
Python 2.6 json module and has the same functions set.
 from ambari_commons.constants import AMBARI_SUDO_BINARY
 from functions import calc_xmn_from_xms, ensure_unit_for_memory
+import status_params
+from resource_management.libraries.script import Script
+from resource_management.libraries.resources.hdfs_resource import HdfsResource
+from resource_management.libraries import functions
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.libraries.functions import format
 from resource_management.libraries.functions.version import 
format_stack_version, compare_versions
+from resource_management.libraries.functions import StackFeature
 from resource_management.libraries.functions.stack_features import 
check_stack_feature
 from resource_management.libraries.functions.stack_features import 
get_stack_feature_version
 from resource_management.libraries.functions.default import default
-from resource_management import *
+from resource_management.libraries.functions.expect import expect
 from resource_management.libraries.functions import conf_select
 from resource_management.libraries.functions import stack_select
-from resource_management.libraries.functions.expect import expect
-import status_params
-from hbase import *
 
 def treat_value_as_mb(value1):
   value = str(value1)



ambari git commit: AMBARI-22524 : Journal Node start failing when AMS is installed during BP deploy - Addendum patch. (avijayan)

2017-11-30 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/trunk f43277ebb -> b2655aa66


AMBARI-22524 : Journal Node start failing when AMS is installed during BP 
deploy - Addendum patch. (avijayan)


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

Branch: refs/heads/trunk
Commit: b2655aa664bf77c015b9cf320d456c850613a809
Parents: f43277e
Author: Aravindan Vijayan 
Authored: Thu Nov 30 13:15:08 2017 -0800
Committer: Aravindan Vijayan 
Committed: Thu Nov 30 13:15:08 2017 -0800

--
 ambari-metrics/ambari-metrics-hadoop-sink/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b2655aa6/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml
--
diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml 
b/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml
index a9d342f..83a2159 100644
--- a/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml
+++ b/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml
@@ -31,7 +31,7 @@ limitations under the License.
   jar
   
 
${project.artifactId}-with-common-${project.version}.jar
-3.0.0-beta1
+3.0.0-beta1
   
 
 
@@ -142,7 +142,7 @@ limitations under the License.
 
   org.apache.hadoop
   hadoop-common
-  ${hadoop.version}
+  ${hadoopVersion}
   compile
 
 



ambari git commit: AMBARI-22566. Upgrade Angular for Ambari Admin View (alexantonenko)

2017-11-30 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 58868f7f3 -> f43277ebb


AMBARI-22566. Upgrade Angular for Ambari Admin View (alexantonenko)


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

Branch: refs/heads/trunk
Commit: f43277ebbe6e675c842be00ff318c966901d4a6f
Parents: 58868f7
Author: Alex Antonenko 
Authored: Thu Nov 30 23:03:22 2017 +0200
Committer: Alex Antonenko 
Committed: Thu Nov 30 23:03:22 2017 +0200

--
 .../src/main/resources/ui/admin-web/app/scripts/app.js   | 2 +-
 .../controllers/stackVersions/StackVersionsEditCtrl.js   | 2 +-
 ambari-admin/src/main/resources/ui/admin-web/bower.json  | 8 
 ambari-admin/src/main/resources/ui/admin-web/package.json| 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f43277eb/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
index 225eb12..98b0383 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
@@ -63,7 +63,7 @@ angular.module('ambariAdminConsole', [
 };
   }]);
 
-  $httpProvider.responseInterceptors.push(['$rootScope', '$q', function 
(scope, $q) {
+  $httpProvider.interceptors.push(['$rootScope', '$q', function (scope, $q) {
 function success(response) {
   return response;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f43277eb/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
index 542772e..a4b121c 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
@@ -36,7 +36,7 @@ angular.module('ambariAdminConsole')
   $scope.isGPLAccepted = false;
 
   $scope.isGPLRepo = function (repository) {
-return repository.Repositories.tags.indexOf('GPL') >= 0;
+return repository.Repositories.tags && 
repository.Repositories.tags.indexOf('GPL') >= 0;
   };
 
   $scope.showRepo = function (repository) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/f43277eb/ambari-admin/src/main/resources/ui/admin-web/bower.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/bower.json 
b/ambari-admin/src/main/resources/ui/admin-web/bower.json
index c38f464..c9e67f0 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/bower.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/bower.json
@@ -3,18 +3,18 @@
   "private": true,
   "dependencies": {
 "bootstrap": "3.3.7",
-"angular": "1.2.26",
-"angular-route": "1.2.26",
+"angular": "1.5.11",
+"angular-route": "1.5.11",
 "angular-bootstrap": "0.11.0",
 "underscore": "1.7.0",
 "restangular": "1.4.0",
 "angular-bootstrap-toggle-switch": "0.5.1",
-"angular-animate": "1.2.26",
+"angular-animate": "1.5.11",
 "angular-translate": "2.2.0",
 "font-awesome": "4.2.0"
   },
   "devDependencies": {
-"angular-mocks": "1.2.26",
+"angular-mocks": "1.5.11",
 "commonjs": "0.2.0",
 "chai": "1.8.0",
 "mocha": "1.14.0",

http://git-wip-us.apache.org/repos/asf/ambari/blob/f43277eb/ambari-admin/src/main/resources/ui/admin-web/package.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/package.json 
b/ambari-admin/src/main/resources/ui/admin-web/package.json
index b7c514c..ab117ef 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/package.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/package.json
@@ -14,7 +14,7 @@
 "gulp-flatten": "0.0.2",
 "gulp-load-plugins": "0.5.0",
 "gulp-order": "1.1.1",
-"gulp-plumber": "0.6.6",
+"gulp-plumber": "1.1.0",
 "gulp-size": "0.3.0",
 "gulp-uglify": "0.2.1",
 "gulp-useref": "0.4.2",



ambari git commit: AMBARI-22566. Upgrade Angular for Ambari Admin View (alexantonenko)

2017-11-30 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 47ae2f8e0 -> 41329e3b7


AMBARI-22566. Upgrade Angular for Ambari Admin View (alexantonenko)


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

Branch: refs/heads/branch-2.6
Commit: 41329e3b71b49ab9036228a8a9c794bff720cf7a
Parents: 47ae2f8
Author: Alex Antonenko 
Authored: Thu Nov 30 23:02:32 2017 +0200
Committer: Alex Antonenko 
Committed: Thu Nov 30 23:02:32 2017 +0200

--
 .../src/main/resources/ui/admin-web/app/scripts/app.js   | 2 +-
 .../controllers/stackVersions/StackVersionsEditCtrl.js   | 2 +-
 ambari-admin/src/main/resources/ui/admin-web/bower.json  | 8 
 ambari-admin/src/main/resources/ui/admin-web/package.json| 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/41329e3b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
index 78e538d..4a4571a 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
@@ -60,7 +60,7 @@ angular.module('ambariAdminConsole', [
 };
   }]);
 
-  $httpProvider.responseInterceptors.push(['$rootScope', '$q', function 
(scope, $q) {
+  $httpProvider.interceptors.push(['$rootScope', '$q', function (scope, $q) {
 function success(response) {
   return response;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/41329e3b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
index b7fa741..b1c0b54 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
@@ -36,7 +36,7 @@ angular.module('ambariAdminConsole')
   $scope.isGPLAccepted = false;
   
   $scope.isGPLRepo = function (repository) {
-return repository.Repositories.tags.indexOf('GPL') >= 0;
+return repository.Repositories.tags && 
repository.Repositories.tags.indexOf('GPL') >= 0;
   };
 
   $scope.showRepo = function (repository) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/41329e3b/ambari-admin/src/main/resources/ui/admin-web/bower.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/bower.json 
b/ambari-admin/src/main/resources/ui/admin-web/bower.json
index dbdf005..df4c434 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/bower.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/bower.json
@@ -3,18 +3,18 @@
   "private": true,
   "dependencies": {
 "bootstrap": "3.1.1",
-"angular": "1.2.26",
-"angular-route": "1.2.26",
+"angular": "1.5.11",
+"angular-route": "1.5.11",
 "angular-bootstrap": "0.11.0",
 "underscore": "1.7.0",
 "restangular": "1.4.0",
 "angular-bootstrap-toggle-switch": "0.5.1",
-"angular-animate": "1.2.26",
+"angular-animate": "1.5.11",
 "angular-translate": "2.2.0",
 "font-awesome": "4.2.0"
   },
   "devDependencies": {
-"angular-mocks": "1.2.26",
+"angular-mocks": "1.5.11",
 "commonjs": "0.2.0",
 "chai": "1.8.0",
 "mocha": "1.14.0",

http://git-wip-us.apache.org/repos/asf/ambari/blob/41329e3b/ambari-admin/src/main/resources/ui/admin-web/package.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/package.json 
b/ambari-admin/src/main/resources/ui/admin-web/package.json
index efcd9d4..df3c214 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/package.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/package.json
@@ -12,7 +12,7 @@
 "gulp-filter": "0.4.1",
 "gulp-flatten": "0.0.2",
 "gulp-load-plugins": "0.5.0",
-"gulp-plumber": "0.6.6",
+"gulp-plumber": "1.1.0",
 "gulp-size": "0.3.0",
 "gulp-uglify": "0.2.1",
 "gulp-useref": "0.4.2",



[1/2] ambari git commit: AMBARI-22565. Repository validation fails for HDP-GPL. (mpapirkovskyy)

2017-11-30 Thread mpapirkovskyy
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 cc38ee8b7 -> 47ae2f8e0
  refs/heads/trunk 195195fac -> 58868f7f3


AMBARI-22565. Repository validation fails for HDP-GPL. (mpapirkovskyy)


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

Branch: refs/heads/branch-2.6
Commit: 47ae2f8e08c059b26129841931bf5fad90546b1f
Parents: cc38ee8
Author: Myroslav Papirkovskyi 
Authored: Thu Nov 30 17:51:00 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Thu Nov 30 22:32:42 2017 +0200

--
 .../AmbariManagementControllerImpl.java |  6 --
 .../server/controller/RepositoryRequest.java| 22 ++--
 .../internal/RepositoryResourceProvider.java|  3 ++-
 .../AmbariManagementControllerImplTest.java |  7 +--
 .../AmbariManagementControllerTest.java |  7 ---
 5 files changed, 31 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/47ae2f8e/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 48ab1b9..85e0c1c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -4582,8 +4582,10 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 URLStreamProvider usp = new URLStreamProvider(REPO_URL_CONNECT_TIMEOUT, 
REPO_URL_READ_TIMEOUT, null, null, null);
 usp.setSetupTruststoreForHttps(false);
 
-RepositoryInfo repositoryInfo = 
ambariMetaInfo.getRepository(request.getStackName(), request.getStackVersion(), 
request.getOsType(), request.getRepoId());
-String repoName = repositoryInfo.getRepoName();
+String repoName = request.getRepoName();
+if (StringUtils.isEmpty(repoName)) {
+  throw new IllegalArgumentException("repo_name is required to verify 
repository");
+}
 
 String errorMessage = null;
 Exception e = null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/47ae2f8e/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
index 84929bf..d9f3753 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
@@ -24,10 +24,12 @@ public class RepositoryRequest extends 
OperatingSystemRequest {
   private String baseUrl;
   private boolean verify = true;
   private Long clusterVersionId = null;
+  private String repoName = null;
 
-  public RepositoryRequest(String stackName, String stackVersion, String 
osType, String repoId) {
+  public RepositoryRequest(String stackName, String stackVersion, String 
osType, String repoId, String repoName) {
 super(stackName, stackVersion, osType);
 setRepoId(repoId);
+setRepoName(repoName);
   }
 
   public String getRepoId() {
@@ -84,13 +86,29 @@ public class RepositoryRequest extends 
OperatingSystemRequest {
 return clusterVersionId;
   }
 
+  /**
+   * @return name of the repository (without version identifier)
+   */
+  public String getRepoName() {
+return repoName;
+  }
+
+  /**
+   * @param repoName name of the repository (without version identifier)
+   */
+  public void setRepoName(String repoName) {
+this.repoName = repoName;
+  }
+
   @Override
   public String toString() {
 return "RepositoryRequest [repoId=" + repoId + ", baseUrl=" + baseUrl
 + ", verify=" + verify + ", getOsType()=" + getOsType()
 + ", getRepositoryVersionId()=" + getRepositoryVersionId()
 + ", getStackVersion()=" + getStackVersion() + ", getStackName()="
-+ getStackName() + "]";
++ getStackName() + ", getRepoName()=" + getRepoName() + "]";
   }
 
+
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/47ae2f8e/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java

[2/2] ambari git commit: AMBARI-22565. Repository validation fails for HDP-GPL. (mpapirkovskyy)

2017-11-30 Thread mpapirkovskyy
AMBARI-22565. Repository validation fails for HDP-GPL. (mpapirkovskyy)


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

Branch: refs/heads/trunk
Commit: 58868f7f3352b501466c8087c68cfd420bf83abf
Parents: 195195f
Author: Myroslav Papirkovskyi 
Authored: Thu Nov 30 17:51:00 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Thu Nov 30 22:35:35 2017 +0200

--
 .../AmbariManagementControllerImpl.java |  6 --
 .../server/controller/RepositoryRequest.java| 22 ++--
 .../internal/RepositoryResourceProvider.java|  3 ++-
 .../AmbariManagementControllerImplTest.java |  7 +--
 .../AmbariManagementControllerTest.java |  7 ---
 5 files changed, 31 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/58868f7f/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 455814a..da206c6 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -4522,8 +4522,10 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 URLStreamProvider usp = new URLStreamProvider(REPO_URL_CONNECT_TIMEOUT, 
REPO_URL_READ_TIMEOUT, null, null, null);
 usp.setSetupTruststoreForHttps(false);
 
-RepositoryInfo repositoryInfo = 
ambariMetaInfo.getRepository(request.getStackName(), request.getStackVersion(), 
request.getOsType(), request.getRepoId());
-String repoName = repositoryInfo.getRepoName();
+String repoName = request.getRepoName();
+if (StringUtils.isEmpty(repoName)) {
+  throw new IllegalArgumentException("repo_name is required to verify 
repository");
+}
 
 String errorMessage = null;
 Exception e = null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/58868f7f/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
index 30790ab..1f6ab5b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
@@ -25,10 +25,12 @@ public class RepositoryRequest extends 
OperatingSystemRequest {
   private String mirrorsList;
   private boolean verify = true;
   private Long clusterVersionId = null;
+  private String repoName = null;
 
-  public RepositoryRequest(String stackName, String stackVersion, String 
osType, String repoId) {
+  public RepositoryRequest(String stackName, String stackVersion, String 
osType, String repoId, String repoName) {
 super(stackName, stackVersion, osType);
 setRepoId(repoId);
+setRepoName(repoName);
   }
 
   public String getRepoId() {
@@ -85,15 +87,31 @@ public class RepositoryRequest extends 
OperatingSystemRequest {
 return clusterVersionId;
   }
 
+  /**
+   * @return name of the repository (without version identifier)
+   */
+  public String getRepoName() {
+return repoName;
+  }
+
+  /**
+   * @param repoName name of the repository (without version identifier)
+   */
+  public void setRepoName(String repoName) {
+this.repoName = repoName;
+  }
+
   @Override
   public String toString() {
 return "RepositoryRequest [repoId=" + repoId + ", baseUrl=" + baseUrl
 + ", verify=" + verify + ", getOsType()=" + getOsType()
 + ", getRepositoryVersionId()=" + getRepositoryVersionId()
 + ", getStackVersion()=" + getStackVersion() + ", getStackName()="
-+ getStackName() + "]";
++ getStackName() + ", getRepoName()=" + getRepoName() + "]";
   }
 
+
+
   /**
* Gets the mirrors list for the repo.
*

http://git-wip-us.apache.org/repos/asf/ambari/blob/58868f7f/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java
--
diff --git 

ambari git commit: AMBARI-22544. Upgrade from Ambari 2.5.2 to 2.6.0 fails. (mpapirkovskyy)

2017-11-30 Thread mpapirkovskyy
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 1994e4ad1 -> cc38ee8b7


AMBARI-22544. Upgrade from Ambari 2.5.2 to 2.6.0 fails. (mpapirkovskyy)


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

Branch: refs/heads/branch-2.6
Commit: cc38ee8b75631da296a10cca22ff6abc25e9c5e8
Parents: 1994e4a
Author: Myroslav Papirkovskyi 
Authored: Wed Nov 29 22:44:40 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Thu Nov 30 22:11:12 2017 +0200

--
 .../org/apache/ambari/server/upgrade/UpgradeCatalog260.java | 5 -
 .../org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java | 4 
 2 files changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cc38ee8b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
index 35f9f65..6ba1671 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
@@ -47,7 +47,6 @@ import 
org.apache.ambari.server.state.kerberos.KerberosDescriptorFactory;
 import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor;
 import org.apache.ambari.server.state.kerberos.KerberosKeytabDescriptor;
 import org.apache.ambari.server.state.kerberos.KerberosPrincipalDescriptor;
-import org.apache.ambari.server.state.kerberos.KerberosPrincipalType;
 import org.apache.ambari.server.state.kerberos.KerberosServiceDescriptor;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
@@ -105,6 +104,8 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
   public static final String FK_SDS_DESIRED_STACK_ID = 
"FK_sds_desired_stack_id";
   public static final String FK_REPO_VERSION_ID = "FK_repo_version_id";
 
+  public static final String CLUSTERS_TABLE = "clusters";
+
   public static final String UPGRADE_TABLE = "upgrade";
   public static final String UPGRADE_GROUP_TABLE = "upgrade_group";
   public static final String UPGRADE_ITEM_TABLE = "upgrade_item";
@@ -346,6 +347,8 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
* @throws java.sql.SQLException
*/
   private void updateUpgradeTable() throws SQLException {
+dbAccessor.clearTableColumn(CLUSTERS_TABLE, UPGRADE_ID_COLUMN, null);
+
 dbAccessor.clearTable(UPGRADE_ITEM_TABLE);
 dbAccessor.clearTable(UPGRADE_GROUP_TABLE);
 dbAccessor.clearTable(UPGRADE_TABLE);

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc38ee8b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
index c611171..e93cd13 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
@@ -340,6 +340,10 @@ public class UpgradeCatalog260Test {
Capture orchestration, 
Capture revertAllowed)
   throws SQLException {
 
+dbAccessor.clearTableColumn(eq(UpgradeCatalog260.CLUSTERS_TABLE), 
eq(UpgradeCatalog260.UPGRADE_ID_COLUMN),
+eq(null));
+expectLastCall().once();
+
 dbAccessor.clearTable(eq(UpgradeCatalog260.UPGRADE_TABLE));
 expectLastCall().once();
 



ambari git commit: AMBARI-22544. Upgrade from Ambari 2.5.2 to 2.6.0 fails. (mpapirkovskyy)

2017-11-30 Thread mpapirkovskyy
Repository: ambari
Updated Branches:
  refs/heads/trunk f82277808 -> 195195fac


AMBARI-22544. Upgrade from Ambari 2.5.2 to 2.6.0 fails. (mpapirkovskyy)


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

Branch: refs/heads/trunk
Commit: 195195fac3fc625c21e5229af8130a854998f99b
Parents: f822778
Author: Myroslav Papirkovskyi 
Authored: Wed Nov 29 22:44:40 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Thu Nov 30 22:10:32 2017 +0200

--
 .../java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java | 4 
 .../org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java  | 4 
 2 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/195195fa/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
index 4d9a5da..11b765c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
@@ -104,6 +104,8 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
   public static final String FK_SDS_DESIRED_STACK_ID = 
"FK_sds_desired_stack_id";
   public static final String FK_REPO_VERSION_ID = "FK_repo_version_id";
 
+  public static final String CLUSTERS_TABLE = "clusters";
+
   public static final String UPGRADE_TABLE = "upgrade";
   public static final String UPGRADE_GROUP_TABLE = "upgrade_group";
   public static final String UPGRADE_ITEM_TABLE = "upgrade_item";
@@ -346,6 +348,8 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
* @throws java.sql.SQLException
*/
   private void updateUpgradeTable() throws SQLException {
+dbAccessor.clearTableColumn(CLUSTERS_TABLE, UPGRADE_ID_COLUMN, null);
+
 dbAccessor.clearTable(UPGRADE_ITEM_TABLE);
 dbAccessor.clearTable(UPGRADE_GROUP_TABLE);
 dbAccessor.clearTable(UPGRADE_TABLE);

http://git-wip-us.apache.org/repos/asf/ambari/blob/195195fa/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
index 22e8ccc..c88d1a1 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
@@ -341,6 +341,10 @@ public class UpgradeCatalog260Test {
Capture orchestration, 
Capture revertAllowed)
   throws SQLException {
 
+dbAccessor.clearTableColumn(eq(UpgradeCatalog260.CLUSTERS_TABLE), 
eq(UpgradeCatalog260.UPGRADE_ID_COLUMN),
+eq(null));
+expectLastCall().once();
+
 dbAccessor.clearTable(eq(UpgradeCatalog260.UPGRADE_TABLE));
 expectLastCall().once();
 



[4/4] ambari git commit: AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - Addendum, missed the new files (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - 
Addendum, missed the new files (ydavis via mradhakrishnan)


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

Branch: refs/heads/branch-2.6
Commit: 1994e4ad1e715e2d967ff0a65e6aab0bd82950ea
Parents: a06f69d
Author: Madhuvanthi Radhakrishnan 
Authored: Thu Nov 30 11:56:43 2017 -0800
Committer: Madhuvanthi Radhakrishnan 
Committed: Thu Nov 30 11:57:44 2017 -0800

--
 .../KAFKA/0.10.0/configuration/kafka-broker.xml |  39 ++
 .../configuration/kafka_client_jaas_conf.xml|  43 ++
 .../0.10.0/configuration/kafka_jaas_conf.xml| 116 
 .../2.6/KAFKA/test_kafka_broker_other_sasl.py   |  97 +++
 .../2.6/configs/default_kafka_plaintext.json| 631 +++
 .../configs/default_kafka_plaintextsasl.json| 631 +++
 .../configs/default_kafka_sasl_plaintext.json   | 631 +++
 .../2.6/configs/default_kafka_sasl_ssl.json | 631 +++
 8 files changed, 2819 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1994e4ad/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka-broker.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka-broker.xml
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka-broker.xml
new file mode 100644
index 000..da382d5
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka-broker.xml
@@ -0,0 +1,39 @@
+
+
+http://www.w3.org/2001/XInclude; 
supports_final="true">
+
+sasl.enabled.mechanisms
+GSSAPI
+The list of SASL mechanisms enabled in the Kafka server. 
The list may contain any mechanism for which a security provider is available. 
Only GSSAPI is enabled by default.
+
+
+
+security.inter.broker.protocol
+PLAINTEXT
+Security protocol used to communicate between brokers. 
Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL. It is an error to 
set this and inter.broker.listener.name properties at the same 
time.
+
+
+
+sasl.mechanism.inter.broker.protocol
+GSSAPI
+SASL mechanism used for inter-broker communication. 
Default is GSSAPI.
+
+
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/1994e4ad/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_client_jaas_conf.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_client_jaas_conf.xml
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_client_jaas_conf.xml
new file mode 100644
index 000..56ad27f
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_client_jaas_conf.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+content
+kafka_client_jaas template
+Kafka client jaas config
+
+{% if kerberos_security_enabled %}
+KafkaClient {
+com.sun.security.auth.module.Krb5LoginModule required
+useTicketCache=true
+renewTicket=true
+serviceName="{{kafka_bare_jaas_principal}}";
+};
+{% endif %}
+
+
+content
+false
+
+
+
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/1994e4ad/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_jaas_conf.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_jaas_conf.xml
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_jaas_conf.xml
new file mode 100644
index 000..acedf7b
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_jaas_conf.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+content
+kafka_jaas template
+Kafka jaas configuration file
+
+/**
+* Example of SASL/PLAIN Configuration
+*
+* KafkaServer {
+*   org.apache.kafka.common.security.plain.PlainLoginModule required
+*   username="admin"
+*   password="admin-secret"
+*   user_admin="admin-secret"
+*   user_alice="alice-secret";
+*   };
+*
+* Example of SASL/SCRAM
+*
+* KafkaServer {
+*   org.apache.kafka.common.security.scram.ScramLoginModule required

[1/4] ambari git commit: AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - Addendum, missed the new files (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 a06f69dd5 -> 1994e4ad1


http://git-wip-us.apache.org/repos/asf/ambari/blob/1994e4ad/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_ssl.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_ssl.json 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_ssl.json
new file mode 100644
index 000..8f81c71
--- /dev/null
+++ 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_ssl.json
@@ -0,0 +1,631 @@
+{
+  "roleCommand": "SERVICE_CHECK",
+  "clusterName": "c1",
+  "hostname": "c6401.ambari.apache.org",
+  "hostLevelParams": {
+"not_managed_hdfs_path_list": 
"[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+"agent_stack_retry_count": "5",
+"agent_stack_retry_on_unavailability": "false",
+"jdk_location": "http://c6401.ambari.apache.org:8080/resources/;,
+"ambari_db_rca_password": "mapred",
+"ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+"jce_name": "UnlimitedJCEPolicyJDK7.zip",
+"stack_version": "2.6.5.0",
+"stack_name": "HDP",
+"ambari_db_rca_driver": "org.postgresql.Driver",
+"jdk_name": "jdk-7u67-linux-x64.tar.gz",
+"ambari_db_rca_username": "mapred",
+"java_home": "/usr/jdk64/jdk1.7.0_45",
+"db_name": "ambari",
+"custom_mysql_jdbc_name": "mysql-connector-java.jar"
+  },
+  "commandType": "EXECUTION_COMMAND",
+  "roleParams": {},
+  "serviceName": "SLIDER",
+  "role": "SLIDER",
+  "commandParams": {
+"version": "2.6.5.0-1235",
+"command_timeout": "300",
+"service_package_folder": "OOZIE",
+"script_type": "PYTHON",
+"script": "scripts/service_check.py",
+"excluded_hosts": "host1,host2"
+  },
+  "taskId": 152,
+  "public_hostname": "c6401.ambari.apache.org",
+  "configurations": {
+"slider-client": {
+  "slider.yarn.queue": "default"
+},
+"sqoop-site": {
+  "atlas.cluster.name": "c1",
+  "sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook"
+},
+"mahout-env": {
+  "mahout_user": "mahout"
+},
+"hbase-env": {
+  "hbase_user": "hbase"
+},
+"yarn-env": {
+  "yarn_user": "yarn"
+},
+"mahout-log4j": {
+  "content": "\n#\n#\n# Licensed to 
the Apache Software Foundation (ASF) under one\n# or more 
contributor license agreements.  See the NOTICE file\n# distributed 
with this work for additional information\n# regarding copyright 
ownership.  The ASF licenses this file\n# to you under the Apache 
License, Version 2.0 (the\n# \"License\"); you may not use this 
file except in compliance\n# with the License.  You may obtain a 
copy of the License at\n#\n#   
http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless 
required by applicable law or agreed to in writing,\n# software 
distributed under the License is distributed on an\n# \"AS IS\" 
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either 
express or implied.  See the License for the\n# specific language 
governing permissions a
 nd limitations\n# under the License.\n#\n
#\n#\n\n# Set everything to be logged to the console\n  
  log4j.rootCategory=WARN, console\n
log4j.appender.console=org.apache.log4j.ConsoleAppender\n
log4j.appender.console.target=System.err\n
log4j.appender.console.layout=org.apache.log4j.PatternLayout\n
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: 
%m%n\n\n# Settings to quiet third party logs that are too verbose\n 
   log4j.logger.org.eclipse.jetty=WARN\n
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=WARN\n
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=WARN"
+},
+"hadoop-env": {
+  "hdfs_user": "hdfs",
+  "hdfs_tmp_dir": "/tmp"
+},
+"core-site": {
+  "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020"
+},
+"hdfs-site": {
+  "a": "b"
+},
+"yarn-site": {
+  "yarn.application.classpath": 
"/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*",
+  "yarn.resourcemanager.address": "c6401.ambari.apache.org:8050",
+  "yarn.resourcemanager.scheduler.address": "c6401.ambari.apache.org:8030"
+},
+"cluster-env": {
+  "managed_hdfs_resource_property_names": "",
+  "security_enabled": "false",
+  

[3/4] ambari git commit: AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - Addendum, missed the new files (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
http://git-wip-us.apache.org/repos/asf/ambari/blob/1994e4ad/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_plaintextsasl.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_plaintextsasl.json
 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_plaintextsasl.json
new file mode 100644
index 000..1847d4b
--- /dev/null
+++ 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_plaintextsasl.json
@@ -0,0 +1,631 @@
+{
+  "roleCommand": "SERVICE_CHECK",
+  "clusterName": "c1",
+  "hostname": "c6401.ambari.apache.org",
+  "hostLevelParams": {
+"not_managed_hdfs_path_list": 
"[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+"agent_stack_retry_count": "5",
+"agent_stack_retry_on_unavailability": "false",
+"jdk_location": "http://c6401.ambari.apache.org:8080/resources/;,
+"ambari_db_rca_password": "mapred",
+"ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+"jce_name": "UnlimitedJCEPolicyJDK7.zip",
+"stack_version": "2.6.5.0",
+"stack_name": "HDP",
+"ambari_db_rca_driver": "org.postgresql.Driver",
+"jdk_name": "jdk-7u67-linux-x64.tar.gz",
+"ambari_db_rca_username": "mapred",
+"java_home": "/usr/jdk64/jdk1.7.0_45",
+"db_name": "ambari",
+"custom_mysql_jdbc_name": "mysql-connector-java.jar"
+  },
+  "commandType": "EXECUTION_COMMAND",
+  "roleParams": {},
+  "serviceName": "SLIDER",
+  "role": "SLIDER",
+  "commandParams": {
+"version": "2.6.5.0-1235",
+"command_timeout": "300",
+"service_package_folder": "OOZIE",
+"script_type": "PYTHON",
+"script": "scripts/service_check.py",
+"excluded_hosts": "host1,host2"
+  },
+  "taskId": 152,
+  "public_hostname": "c6401.ambari.apache.org",
+  "configurations": {
+"slider-client": {
+  "slider.yarn.queue": "default"
+},
+"sqoop-site": {
+  "atlas.cluster.name": "c1",
+  "sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook"
+},
+"mahout-env": {
+  "mahout_user": "mahout"
+},
+"hbase-env": {
+  "hbase_user": "hbase"
+},
+"yarn-env": {
+  "yarn_user": "yarn"
+},
+"mahout-log4j": {
+  "content": "\n#\n#\n# Licensed to 
the Apache Software Foundation (ASF) under one\n# or more 
contributor license agreements.  See the NOTICE file\n# distributed 
with this work for additional information\n# regarding copyright 
ownership.  The ASF licenses this file\n# to you under the Apache 
License, Version 2.0 (the\n# \"License\"); you may not use this 
file except in compliance\n# with the License.  You may obtain a 
copy of the License at\n#\n#   
http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless 
required by applicable law or agreed to in writing,\n# software 
distributed under the License is distributed on an\n# \"AS IS\" 
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either 
express or implied.  See the License for the\n# specific language 
governing permissions a
 nd limitations\n# under the License.\n#\n
#\n#\n\n# Set everything to be logged to the console\n  
  log4j.rootCategory=WARN, console\n
log4j.appender.console=org.apache.log4j.ConsoleAppender\n
log4j.appender.console.target=System.err\n
log4j.appender.console.layout=org.apache.log4j.PatternLayout\n
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: 
%m%n\n\n# Settings to quiet third party logs that are too verbose\n 
   log4j.logger.org.eclipse.jetty=WARN\n
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=WARN\n
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=WARN"
+},
+"hadoop-env": {
+  "hdfs_user": "hdfs",
+  "hdfs_tmp_dir": "/tmp"
+},
+"core-site": {
+  "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020"
+},
+"hdfs-site": {
+  "a": "b"
+},
+"yarn-site": {
+  "yarn.application.classpath": 
"/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*",
+  "yarn.resourcemanager.address": "c6401.ambari.apache.org:8050",
+  "yarn.resourcemanager.scheduler.address": "c6401.ambari.apache.org:8030"
+},
+"cluster-env": {
+  "managed_hdfs_resource_property_names": "",
+  "security_enabled": "false",
+  "ignore_groupsusers_create": "false",
+  "smokeuser": "ambari-qa",
+  

[2/4] ambari git commit: AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - Addendum, missed the new files (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
http://git-wip-us.apache.org/repos/asf/ambari/blob/1994e4ad/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_plaintext.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_plaintext.json
 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_plaintext.json
new file mode 100644
index 000..40218f1
--- /dev/null
+++ 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_plaintext.json
@@ -0,0 +1,631 @@
+{
+  "roleCommand": "SERVICE_CHECK",
+  "clusterName": "c1",
+  "hostname": "c6401.ambari.apache.org",
+  "hostLevelParams": {
+"not_managed_hdfs_path_list": 
"[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+"agent_stack_retry_count": "5",
+"agent_stack_retry_on_unavailability": "false",
+"jdk_location": "http://c6401.ambari.apache.org:8080/resources/;,
+"ambari_db_rca_password": "mapred",
+"ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+"jce_name": "UnlimitedJCEPolicyJDK7.zip",
+"stack_version": "2.6.5.0",
+"stack_name": "HDP",
+"ambari_db_rca_driver": "org.postgresql.Driver",
+"jdk_name": "jdk-7u67-linux-x64.tar.gz",
+"ambari_db_rca_username": "mapred",
+"java_home": "/usr/jdk64/jdk1.7.0_45",
+"db_name": "ambari",
+"custom_mysql_jdbc_name": "mysql-connector-java.jar"
+  },
+  "commandType": "EXECUTION_COMMAND",
+  "roleParams": {},
+  "serviceName": "SLIDER",
+  "role": "SLIDER",
+  "commandParams": {
+"version": "2.6.5.0-1235",
+"command_timeout": "300",
+"service_package_folder": "OOZIE",
+"script_type": "PYTHON",
+"script": "scripts/service_check.py",
+"excluded_hosts": "host1,host2"
+  },
+  "taskId": 152,
+  "public_hostname": "c6401.ambari.apache.org",
+  "configurations": {
+"slider-client": {
+  "slider.yarn.queue": "default"
+},
+"sqoop-site": {
+  "atlas.cluster.name": "c1",
+  "sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook"
+},
+"mahout-env": {
+  "mahout_user": "mahout"
+},
+"hbase-env": {
+  "hbase_user": "hbase"
+},
+"yarn-env": {
+  "yarn_user": "yarn"
+},
+"mahout-log4j": {
+  "content": "\n#\n#\n# Licensed to 
the Apache Software Foundation (ASF) under one\n# or more 
contributor license agreements.  See the NOTICE file\n# distributed 
with this work for additional information\n# regarding copyright 
ownership.  The ASF licenses this file\n# to you under the Apache 
License, Version 2.0 (the\n# \"License\"); you may not use this 
file except in compliance\n# with the License.  You may obtain a 
copy of the License at\n#\n#   
http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless 
required by applicable law or agreed to in writing,\n# software 
distributed under the License is distributed on an\n# \"AS IS\" 
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either 
express or implied.  See the License for the\n# specific language 
governing permissions a
 nd limitations\n# under the License.\n#\n
#\n#\n\n# Set everything to be logged to the console\n  
  log4j.rootCategory=WARN, console\n
log4j.appender.console=org.apache.log4j.ConsoleAppender\n
log4j.appender.console.target=System.err\n
log4j.appender.console.layout=org.apache.log4j.PatternLayout\n
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: 
%m%n\n\n# Settings to quiet third party logs that are too verbose\n 
   log4j.logger.org.eclipse.jetty=WARN\n
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=WARN\n
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=WARN"
+},
+"hadoop-env": {
+  "hdfs_user": "hdfs",
+  "hdfs_tmp_dir": "/tmp"
+},
+"core-site": {
+  "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020"
+},
+"hdfs-site": {
+  "a": "b"
+},
+"yarn-site": {
+  "yarn.application.classpath": 
"/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*",
+  "yarn.resourcemanager.address": "c6401.ambari.apache.org:8050",
+  "yarn.resourcemanager.scheduler.address": "c6401.ambari.apache.org:8030"
+},
+"cluster-env": {
+  "managed_hdfs_resource_property_names": "",
+  "security_enabled": "false",
+  "ignore_groupsusers_create": "false",
+  "smokeuser": "ambari-qa",
+  

[1/4] ambari git commit: AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - Addendum, missed the new files (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
Repository: ambari
Updated Branches:
  refs/heads/trunk 4aef8fe07 -> f82277808


http://git-wip-us.apache.org/repos/asf/ambari/blob/f8227780/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_ssl.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_ssl.json 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_ssl.json
new file mode 100644
index 000..8f81c71
--- /dev/null
+++ 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_ssl.json
@@ -0,0 +1,631 @@
+{
+  "roleCommand": "SERVICE_CHECK",
+  "clusterName": "c1",
+  "hostname": "c6401.ambari.apache.org",
+  "hostLevelParams": {
+"not_managed_hdfs_path_list": 
"[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+"agent_stack_retry_count": "5",
+"agent_stack_retry_on_unavailability": "false",
+"jdk_location": "http://c6401.ambari.apache.org:8080/resources/;,
+"ambari_db_rca_password": "mapred",
+"ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+"jce_name": "UnlimitedJCEPolicyJDK7.zip",
+"stack_version": "2.6.5.0",
+"stack_name": "HDP",
+"ambari_db_rca_driver": "org.postgresql.Driver",
+"jdk_name": "jdk-7u67-linux-x64.tar.gz",
+"ambari_db_rca_username": "mapred",
+"java_home": "/usr/jdk64/jdk1.7.0_45",
+"db_name": "ambari",
+"custom_mysql_jdbc_name": "mysql-connector-java.jar"
+  },
+  "commandType": "EXECUTION_COMMAND",
+  "roleParams": {},
+  "serviceName": "SLIDER",
+  "role": "SLIDER",
+  "commandParams": {
+"version": "2.6.5.0-1235",
+"command_timeout": "300",
+"service_package_folder": "OOZIE",
+"script_type": "PYTHON",
+"script": "scripts/service_check.py",
+"excluded_hosts": "host1,host2"
+  },
+  "taskId": 152,
+  "public_hostname": "c6401.ambari.apache.org",
+  "configurations": {
+"slider-client": {
+  "slider.yarn.queue": "default"
+},
+"sqoop-site": {
+  "atlas.cluster.name": "c1",
+  "sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook"
+},
+"mahout-env": {
+  "mahout_user": "mahout"
+},
+"hbase-env": {
+  "hbase_user": "hbase"
+},
+"yarn-env": {
+  "yarn_user": "yarn"
+},
+"mahout-log4j": {
+  "content": "\n#\n#\n# Licensed to 
the Apache Software Foundation (ASF) under one\n# or more 
contributor license agreements.  See the NOTICE file\n# distributed 
with this work for additional information\n# regarding copyright 
ownership.  The ASF licenses this file\n# to you under the Apache 
License, Version 2.0 (the\n# \"License\"); you may not use this 
file except in compliance\n# with the License.  You may obtain a 
copy of the License at\n#\n#   
http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless 
required by applicable law or agreed to in writing,\n# software 
distributed under the License is distributed on an\n# \"AS IS\" 
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either 
express or implied.  See the License for the\n# specific language 
governing permissions a
 nd limitations\n# under the License.\n#\n
#\n#\n\n# Set everything to be logged to the console\n  
  log4j.rootCategory=WARN, console\n
log4j.appender.console=org.apache.log4j.ConsoleAppender\n
log4j.appender.console.target=System.err\n
log4j.appender.console.layout=org.apache.log4j.PatternLayout\n
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: 
%m%n\n\n# Settings to quiet third party logs that are too verbose\n 
   log4j.logger.org.eclipse.jetty=WARN\n
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=WARN\n
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=WARN"
+},
+"hadoop-env": {
+  "hdfs_user": "hdfs",
+  "hdfs_tmp_dir": "/tmp"
+},
+"core-site": {
+  "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020"
+},
+"hdfs-site": {
+  "a": "b"
+},
+"yarn-site": {
+  "yarn.application.classpath": 
"/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*",
+  "yarn.resourcemanager.address": "c6401.ambari.apache.org:8050",
+  "yarn.resourcemanager.scheduler.address": "c6401.ambari.apache.org:8030"
+},
+"cluster-env": {
+  "managed_hdfs_resource_property_names": "",
+  "security_enabled": "false",
+  "ignore_groupsusers_create": 

[3/4] ambari git commit: AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - Addendum, missed the new files (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
http://git-wip-us.apache.org/repos/asf/ambari/blob/f8227780/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_plaintextsasl.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_plaintextsasl.json
 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_plaintextsasl.json
new file mode 100644
index 000..1847d4b
--- /dev/null
+++ 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_plaintextsasl.json
@@ -0,0 +1,631 @@
+{
+  "roleCommand": "SERVICE_CHECK",
+  "clusterName": "c1",
+  "hostname": "c6401.ambari.apache.org",
+  "hostLevelParams": {
+"not_managed_hdfs_path_list": 
"[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+"agent_stack_retry_count": "5",
+"agent_stack_retry_on_unavailability": "false",
+"jdk_location": "http://c6401.ambari.apache.org:8080/resources/;,
+"ambari_db_rca_password": "mapred",
+"ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+"jce_name": "UnlimitedJCEPolicyJDK7.zip",
+"stack_version": "2.6.5.0",
+"stack_name": "HDP",
+"ambari_db_rca_driver": "org.postgresql.Driver",
+"jdk_name": "jdk-7u67-linux-x64.tar.gz",
+"ambari_db_rca_username": "mapred",
+"java_home": "/usr/jdk64/jdk1.7.0_45",
+"db_name": "ambari",
+"custom_mysql_jdbc_name": "mysql-connector-java.jar"
+  },
+  "commandType": "EXECUTION_COMMAND",
+  "roleParams": {},
+  "serviceName": "SLIDER",
+  "role": "SLIDER",
+  "commandParams": {
+"version": "2.6.5.0-1235",
+"command_timeout": "300",
+"service_package_folder": "OOZIE",
+"script_type": "PYTHON",
+"script": "scripts/service_check.py",
+"excluded_hosts": "host1,host2"
+  },
+  "taskId": 152,
+  "public_hostname": "c6401.ambari.apache.org",
+  "configurations": {
+"slider-client": {
+  "slider.yarn.queue": "default"
+},
+"sqoop-site": {
+  "atlas.cluster.name": "c1",
+  "sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook"
+},
+"mahout-env": {
+  "mahout_user": "mahout"
+},
+"hbase-env": {
+  "hbase_user": "hbase"
+},
+"yarn-env": {
+  "yarn_user": "yarn"
+},
+"mahout-log4j": {
+  "content": "\n#\n#\n# Licensed to 
the Apache Software Foundation (ASF) under one\n# or more 
contributor license agreements.  See the NOTICE file\n# distributed 
with this work for additional information\n# regarding copyright 
ownership.  The ASF licenses this file\n# to you under the Apache 
License, Version 2.0 (the\n# \"License\"); you may not use this 
file except in compliance\n# with the License.  You may obtain a 
copy of the License at\n#\n#   
http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless 
required by applicable law or agreed to in writing,\n# software 
distributed under the License is distributed on an\n# \"AS IS\" 
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either 
express or implied.  See the License for the\n# specific language 
governing permissions a
 nd limitations\n# under the License.\n#\n
#\n#\n\n# Set everything to be logged to the console\n  
  log4j.rootCategory=WARN, console\n
log4j.appender.console=org.apache.log4j.ConsoleAppender\n
log4j.appender.console.target=System.err\n
log4j.appender.console.layout=org.apache.log4j.PatternLayout\n
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: 
%m%n\n\n# Settings to quiet third party logs that are too verbose\n 
   log4j.logger.org.eclipse.jetty=WARN\n
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=WARN\n
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=WARN"
+},
+"hadoop-env": {
+  "hdfs_user": "hdfs",
+  "hdfs_tmp_dir": "/tmp"
+},
+"core-site": {
+  "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020"
+},
+"hdfs-site": {
+  "a": "b"
+},
+"yarn-site": {
+  "yarn.application.classpath": 
"/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*",
+  "yarn.resourcemanager.address": "c6401.ambari.apache.org:8050",
+  "yarn.resourcemanager.scheduler.address": "c6401.ambari.apache.org:8030"
+},
+"cluster-env": {
+  "managed_hdfs_resource_property_names": "",
+  "security_enabled": "false",
+  "ignore_groupsusers_create": "false",
+  "smokeuser": "ambari-qa",
+  

[2/4] ambari git commit: AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - Addendum, missed the new files (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
http://git-wip-us.apache.org/repos/asf/ambari/blob/f8227780/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_plaintext.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_plaintext.json
 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_plaintext.json
new file mode 100644
index 000..40218f1
--- /dev/null
+++ 
b/ambari-server/src/test/python/stacks/2.6/configs/default_kafka_sasl_plaintext.json
@@ -0,0 +1,631 @@
+{
+  "roleCommand": "SERVICE_CHECK",
+  "clusterName": "c1",
+  "hostname": "c6401.ambari.apache.org",
+  "hostLevelParams": {
+"not_managed_hdfs_path_list": 
"[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+"agent_stack_retry_count": "5",
+"agent_stack_retry_on_unavailability": "false",
+"jdk_location": "http://c6401.ambari.apache.org:8080/resources/;,
+"ambari_db_rca_password": "mapred",
+"ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+"jce_name": "UnlimitedJCEPolicyJDK7.zip",
+"stack_version": "2.6.5.0",
+"stack_name": "HDP",
+"ambari_db_rca_driver": "org.postgresql.Driver",
+"jdk_name": "jdk-7u67-linux-x64.tar.gz",
+"ambari_db_rca_username": "mapred",
+"java_home": "/usr/jdk64/jdk1.7.0_45",
+"db_name": "ambari",
+"custom_mysql_jdbc_name": "mysql-connector-java.jar"
+  },
+  "commandType": "EXECUTION_COMMAND",
+  "roleParams": {},
+  "serviceName": "SLIDER",
+  "role": "SLIDER",
+  "commandParams": {
+"version": "2.6.5.0-1235",
+"command_timeout": "300",
+"service_package_folder": "OOZIE",
+"script_type": "PYTHON",
+"script": "scripts/service_check.py",
+"excluded_hosts": "host1,host2"
+  },
+  "taskId": 152,
+  "public_hostname": "c6401.ambari.apache.org",
+  "configurations": {
+"slider-client": {
+  "slider.yarn.queue": "default"
+},
+"sqoop-site": {
+  "atlas.cluster.name": "c1",
+  "sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook"
+},
+"mahout-env": {
+  "mahout_user": "mahout"
+},
+"hbase-env": {
+  "hbase_user": "hbase"
+},
+"yarn-env": {
+  "yarn_user": "yarn"
+},
+"mahout-log4j": {
+  "content": "\n#\n#\n# Licensed to 
the Apache Software Foundation (ASF) under one\n# or more 
contributor license agreements.  See the NOTICE file\n# distributed 
with this work for additional information\n# regarding copyright 
ownership.  The ASF licenses this file\n# to you under the Apache 
License, Version 2.0 (the\n# \"License\"); you may not use this 
file except in compliance\n# with the License.  You may obtain a 
copy of the License at\n#\n#   
http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless 
required by applicable law or agreed to in writing,\n# software 
distributed under the License is distributed on an\n# \"AS IS\" 
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either 
express or implied.  See the License for the\n# specific language 
governing permissions a
 nd limitations\n# under the License.\n#\n
#\n#\n\n# Set everything to be logged to the console\n  
  log4j.rootCategory=WARN, console\n
log4j.appender.console=org.apache.log4j.ConsoleAppender\n
log4j.appender.console.target=System.err\n
log4j.appender.console.layout=org.apache.log4j.PatternLayout\n
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: 
%m%n\n\n# Settings to quiet third party logs that are too verbose\n 
   log4j.logger.org.eclipse.jetty=WARN\n
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=WARN\n
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=WARN"
+},
+"hadoop-env": {
+  "hdfs_user": "hdfs",
+  "hdfs_tmp_dir": "/tmp"
+},
+"core-site": {
+  "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020"
+},
+"hdfs-site": {
+  "a": "b"
+},
+"yarn-site": {
+  "yarn.application.classpath": 
"/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*",
+  "yarn.resourcemanager.address": "c6401.ambari.apache.org:8050",
+  "yarn.resourcemanager.scheduler.address": "c6401.ambari.apache.org:8030"
+},
+"cluster-env": {
+  "managed_hdfs_resource_property_names": "",
+  "security_enabled": "false",
+  "ignore_groupsusers_create": "false",
+  "smokeuser": "ambari-qa",
+  

[4/4] ambari git commit: AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - Addendum, missed the new files (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
AMBARI-22485 : Allow Ambari to support non-kerberos SASL mechanisms for Kafka - 
Addendum, missed the new files (ydavis via mradhakrishnan)


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

Branch: refs/heads/trunk
Commit: f8227780834f1b795a815380c8d2951fed1ea9ca
Parents: 4aef8fe
Author: Madhuvanthi Radhakrishnan 
Authored: Thu Nov 30 11:56:43 2017 -0800
Committer: Madhuvanthi Radhakrishnan 
Committed: Thu Nov 30 11:56:43 2017 -0800

--
 .../KAFKA/0.10.0/configuration/kafka-broker.xml |  39 ++
 .../configuration/kafka_client_jaas_conf.xml|  43 ++
 .../0.10.0/configuration/kafka_jaas_conf.xml| 116 
 .../2.6/KAFKA/test_kafka_broker_other_sasl.py   |  97 +++
 .../2.6/configs/default_kafka_plaintext.json| 631 +++
 .../configs/default_kafka_plaintextsasl.json| 631 +++
 .../configs/default_kafka_sasl_plaintext.json   | 631 +++
 .../2.6/configs/default_kafka_sasl_ssl.json | 631 +++
 8 files changed, 2819 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f8227780/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka-broker.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka-broker.xml
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka-broker.xml
new file mode 100644
index 000..da382d5
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka-broker.xml
@@ -0,0 +1,39 @@
+
+
+http://www.w3.org/2001/XInclude; 
supports_final="true">
+
+sasl.enabled.mechanisms
+GSSAPI
+The list of SASL mechanisms enabled in the Kafka server. 
The list may contain any mechanism for which a security provider is available. 
Only GSSAPI is enabled by default.
+
+
+
+security.inter.broker.protocol
+PLAINTEXT
+Security protocol used to communicate between brokers. 
Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL. It is an error to 
set this and inter.broker.listener.name properties at the same 
time.
+
+
+
+sasl.mechanism.inter.broker.protocol
+GSSAPI
+SASL mechanism used for inter-broker communication. 
Default is GSSAPI.
+
+
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/f8227780/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_client_jaas_conf.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_client_jaas_conf.xml
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_client_jaas_conf.xml
new file mode 100644
index 000..56ad27f
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_client_jaas_conf.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+content
+kafka_client_jaas template
+Kafka client jaas config
+
+{% if kerberos_security_enabled %}
+KafkaClient {
+com.sun.security.auth.module.Krb5LoginModule required
+useTicketCache=true
+renewTicket=true
+serviceName="{{kafka_bare_jaas_principal}}";
+};
+{% endif %}
+
+
+content
+false
+
+
+
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/f8227780/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_jaas_conf.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_jaas_conf.xml
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_jaas_conf.xml
new file mode 100644
index 000..acedf7b
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0/configuration/kafka_jaas_conf.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+content
+kafka_jaas template
+Kafka jaas configuration file
+
+/**
+* Example of SASL/PLAIN Configuration
+*
+* KafkaServer {
+*   org.apache.kafka.common.security.plain.PlainLoginModule required
+*   username="admin"
+*   password="admin-secret"
+*   user_admin="admin-secret"
+*   user_alice="alice-secret";
+*   };
+*
+* Example of SASL/SCRAM
+*
+* KafkaServer {
+*   org.apache.kafka.common.security.scram.ScramLoginModule required
+*   

ambari git commit: AMBARI-22505 : Kafka service check fails when using a non-root user in kerberized environment (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 b89a94b22 -> a06f69dd5


AMBARI-22505 : Kafka service check fails when using a non-root user in 
kerberized environment (ydavis via mradhakrishnan)


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

Branch: refs/heads/branch-2.6
Commit: a06f69dd50d311dd7502352fd59d2dfc072bc505
Parents: b89a94b
Author: Madhuvanthi Radhakrishnan 
Authored: Thu Nov 30 11:52:11 2017 -0800
Committer: Madhuvanthi Radhakrishnan 
Committed: Thu Nov 30 11:52:11 2017 -0800

--
 .../KAFKA/0.8.1/package/scripts/service_check.py| 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a06f69dd/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
index 0f3a417..3c1a3ab 100644
--- 
a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
@@ -19,8 +19,10 @@ limitations under the License.
 """
 from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions.validate import 
call_and_match_output
+from resource_management.core import shell
 from resource_management.libraries.functions.format import format
 from resource_management.core.logger import Logger
+from resource_management.core.exceptions import Fail
 from resource_management.core import sudo
 import subprocess
 
@@ -31,16 +33,20 @@ class ServiceCheck(Script):
 
 # TODO, Kafka Service check should be more robust , It should get all the 
broker_hosts
 # Produce some messages and check if consumer reads same no.of messages.
-
+
 kafka_config = self.read_kafka_config()
 topic = "ambari_kafka_service_check"
 create_topic_cmd_created_output = "Created topic 
\"ambari_kafka_service_check\"."
 create_topic_cmd_exists_output = "Topic \"ambari_kafka_service_check\" 
already exists."
 source_cmd = format("source {conf_dir}/kafka-env.sh")
-topic_exists_cmd = format("{kafka_home}/bin/kafka-topics.sh --zookeeper 
{kafka_config[zookeeper.connect]} --topic {topic} --list")
-topic_exists_cmd_p = subprocess.Popen(topic_exists_cmd.split(" "), 
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-topic_exists_cmd_out, topic_exists_cmd_err = 
topic_exists_cmd_p.communicate()
-# run create topic command only if the topic doesn't exists
+topic_exists_cmd = format(source_cmd + " ; " + 
"{kafka_home}/bin/kafka-topics.sh --zookeeper {kafka_config[zookeeper.connect]} 
--topic {topic} --list")
+topic_exists_cmd_code, topic_exists_cmd_out = shell.call(topic_exists_cmd, 
logoutput=True, quiet=False, user=params.kafka_user)
+
+if topic_exists_cmd_code > 0:
+  raise Fail("Error encountered when attempting to list topics: 
{0}".format(topic_exists_cmd_out))
+
+
+  # run create topic command only if the topic doesn't exists
 if topic not in topic_exists_cmd_out:
   create_topic_cmd = format("{kafka_home}/bin/kafka-topics.sh --zookeeper 
{kafka_config[zookeeper.connect]} --create --topic {topic} --partitions 1 
--replication-factor 1")
   command = source_cmd + " ; " + create_topic_cmd



ambari git commit: AMBARI-22555. Update server setup to deny GPL as default. Fixed for silent setup. (swagle)

2017-11-30 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 21e37b164 -> 4aef8fe07


AMBARI-22555. Update server setup to deny GPL as default. Fixed for silent 
setup. (swagle)


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

Branch: refs/heads/trunk
Commit: 4aef8fe07fdabc684e2a25c4a4b78073710a5f77
Parents: 21e37b1
Author: Siddharth Wagle 
Authored: Thu Nov 30 11:41:48 2017 -0800
Committer: Siddharth Wagle 
Committed: Thu Nov 30 11:41:48 2017 -0800

--
 .../src/main/python/ambari_server/serverConfiguration.py| 4 ++--
 ambari-server/src/main/python/ambari_server/serverSetup.py  | 5 ++---
 ambari-server/src/main/python/ambari_server/serverUpgrade.py| 2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4aef8fe0/ambari-server/src/main/python/ambari_server/serverConfiguration.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py 
b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index d6ab453..27b4472 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -1147,7 +1147,7 @@ def update_ambari_env():
   return 0
  
 # default should be false / not accepted 
-def write_gpl_license_accepted(text = GPL_LICENSE_PROMPT_TEXT):
+def write_gpl_license_accepted(default_prompt_value = False, text = 
GPL_LICENSE_PROMPT_TEXT):
   properties = get_ambari_properties()
   if properties == -1:
 err = "Error getting ambari properties"
@@ -1157,7 +1157,7 @@ def write_gpl_license_accepted(text = 
GPL_LICENSE_PROMPT_TEXT):
   if GPL_LICENSE_ACCEPTED_PROPERTY in properties.keys() and 
properties.get_property(GPL_LICENSE_ACCEPTED_PROPERTY).lower() == "true":
 return True
 
-  result = get_YN_input(text, False)
+  result = get_YN_input(text, default_prompt_value)
 
   properties.process_pair(GPL_LICENSE_ACCEPTED_PROPERTY, str(result).lower())
   update_properties(properties)

http://git-wip-us.apache.org/repos/asf/ambari/blob/4aef8fe0/ambari-server/src/main/python/ambari_server/serverSetup.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py 
b/ambari-server/src/main/python/ambari_server/serverSetup.py
index af45584..3b41fff 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -1182,9 +1182,8 @@ def setup(options):
 err = 'Downloading or installing JDK failed: {0}. Exiting.'.format(e)
 raise FatalException(e.code, err)
 
-  if not get_silent() or options.accept_gpl:
-print 'Checking GPL software agreement...'
-write_gpl_license_accepted()
+  print 'Checking GPL software agreement...'
+  write_gpl_license_accepted(default_prompt_value=options.accept_gpl)
 
   print 'Completing setup...'
   retcode = configure_os_settings()

http://git-wip-us.apache.org/repos/asf/ambari/blob/4aef8fe0/ambari-server/src/main/python/ambari_server/serverUpgrade.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverUpgrade.py 
b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
index c2b7de8..dd847e3 100644
--- a/ambari-server/src/main/python/ambari_server/serverUpgrade.py
+++ b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
@@ -179,7 +179,7 @@ def check_gpl_license_approved(upgrade_response):
   if 'lzo_enabled' not in upgrade_response or 
upgrade_response['lzo_enabled'].lower() != "true":
 return
 
-  while not write_gpl_license_accepted(LZO_ENABLED_GPL_TEXT) and not 
get_YN_input(INSTALLED_LZO_WITHOUT_GPL_TEXT, False):
+  while not write_gpl_license_accepted(text = LZO_ENABLED_GPL_TEXT) and not 
get_YN_input(INSTALLED_LZO_WITHOUT_GPL_TEXT, False):
 pass
 
 #



ambari git commit: AMBARI-22505 : Kafka service check fails when using a non-root user in kerberized environment (ydavis via mradhakrishnan)

2017-11-30 Thread mradhakrishnan
Repository: ambari
Updated Branches:
  refs/heads/trunk d3429491a -> 21e37b164


AMBARI-22505 : Kafka service check fails when using a non-root user in 
kerberized environment (ydavis via mradhakrishnan)


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

Branch: refs/heads/trunk
Commit: 21e37b164f87edeb21b7533af1558e4758d5ee60
Parents: d342949
Author: Madhuvanthi Radhakrishnan 
Authored: Thu Nov 30 11:31:51 2017 -0800
Committer: Madhuvanthi Radhakrishnan 
Committed: Thu Nov 30 11:31:51 2017 -0800

--
 .../KAFKA/0.8.1/package/scripts/service_check.py | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/21e37b16/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
index cb66f98..38a7f24 100644
--- 
a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/service_check.py
@@ -19,8 +19,10 @@ limitations under the License.
 """
 from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions.validate import 
call_and_match_output
+from resource_management.core import shell
 from resource_management.libraries.functions.format import format
 from resource_management.core.logger import Logger
+from resource_management.core.exceptions import Fail
 from resource_management.core import sudo
 import subprocess
 
@@ -31,15 +33,20 @@ class ServiceCheck(Script):
 
 # TODO, Kafka Service check should be more robust , It should get all the 
broker_hosts
 # Produce some messages and check if consumer reads same no.of messages.
-
+
 kafka_config = self.read_kafka_config()
 topic = "ambari_kafka_service_check"
 create_topic_cmd_created_output = "Created topic 
\"ambari_kafka_service_check\"."
 create_topic_cmd_exists_output = "Topic \"ambari_kafka_service_check\" 
already exists."
 source_cmd = format("source {conf_dir}/kafka-env.sh")
-topic_exists_cmd = format("{kafka_home}/bin/kafka-topics.sh --zookeeper 
{kafka_config[zookeeper.connect]} --topic {topic} --list")
-topic_exists_cmd_p = subprocess.Popen(topic_exists_cmd.split(" "), 
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-topic_exists_cmd_out, topic_exists_cmd_err = 
topic_exists_cmd_p.communicate()
+topic_exists_cmd = format(source_cmd + " ; " + 
"{kafka_home}/bin/kafka-topics.sh --zookeeper {kafka_config[zookeeper.connect]} 
--topic {topic} --list")
+topic_exists_cmd_code, topic_exists_cmd_out = shell.call(topic_exists_cmd, 
logoutput=True, quiet=False, user=params.kafka_user)
+
+if topic_exists_cmd_code > 0:
+  raise Fail("Error encountered when attempting to list topics: 
{0}".format(topic_exists_cmd_out))
+
+
+  # run create topic command only if the topic doesn't exists
 
 delete_topic_cmd = format("{kafka_home}/bin/kafka-topics.sh --zookeeper 
{kafka_config[zookeeper.connect]} --delete --topic {topic}")
 create_topic_cmd = format("{kafka_home}/bin/kafka-topics.sh --zookeeper 
{kafka_config[zookeeper.connect]} --create --topic {topic} --partitions 1 
--replication-factor 1")



ambari git commit: AMBARI-22555. Update server setup to deny GPL as default. Fixed for silent setup. (swagle)

2017-11-30 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 2b49f4582 -> b89a94b22


AMBARI-22555. Update server setup to deny GPL as default. Fixed for silent 
setup. (swagle)


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

Branch: refs/heads/branch-2.6
Commit: b89a94b221b27148f36bc0b6a31c8610eed97996
Parents: 2b49f45
Author: Siddharth Wagle 
Authored: Thu Nov 30 10:43:00 2017 -0800
Committer: Siddharth Wagle 
Committed: Thu Nov 30 11:27:30 2017 -0800

--
 .../src/main/python/ambari_server/serverConfiguration.py| 4 ++--
 ambari-server/src/main/python/ambari_server/serverSetup.py  | 5 ++---
 ambari-server/src/main/python/ambari_server/serverUpgrade.py| 2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b89a94b2/ambari-server/src/main/python/ambari_server/serverConfiguration.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py 
b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index 2ab2484..5658f67 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -1144,7 +1144,7 @@ def update_ambari_env():
   return 0
 
 # default should be false / not accepted
-def write_gpl_license_accepted(text = GPL_LICENSE_PROMPT_TEXT):
+def write_gpl_license_accepted(default_prompt_value = False, text = 
GPL_LICENSE_PROMPT_TEXT):
   properties = get_ambari_properties()
   if properties == -1:
 err = "Error getting ambari properties"
@@ -1154,7 +1154,7 @@ def write_gpl_license_accepted(text = 
GPL_LICENSE_PROMPT_TEXT):
   if GPL_LICENSE_ACCEPTED_PROPERTY in properties.keys() and 
properties.get_property(GPL_LICENSE_ACCEPTED_PROPERTY).lower() == "true":
 return True
 
-  result = get_YN_input(text, False)
+  result = get_YN_input(text, default_prompt_value)
 
   properties.process_pair(GPL_LICENSE_ACCEPTED_PROPERTY, str(result).lower())
   update_properties(properties)

http://git-wip-us.apache.org/repos/asf/ambari/blob/b89a94b2/ambari-server/src/main/python/ambari_server/serverSetup.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py 
b/ambari-server/src/main/python/ambari_server/serverSetup.py
index 50992d1..909497f 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -1128,9 +1128,8 @@ def setup(options):
 err = 'Downloading or installing JDK failed: {0}. Exiting.'.format(e)
 raise FatalException(e.code, err)
 
-  if not get_silent() or options.accept_gpl:
-print 'Checking GPL software agreement...'
-write_gpl_license_accepted()
+  print 'Checking GPL software agreement...'
+  write_gpl_license_accepted(default_prompt_value=options.accept_gpl)
 
   print 'Completing setup...'
   retcode = configure_os_settings()

http://git-wip-us.apache.org/repos/asf/ambari/blob/b89a94b2/ambari-server/src/main/python/ambari_server/serverUpgrade.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverUpgrade.py 
b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
index 06443d3..d5c7c7f 100644
--- a/ambari-server/src/main/python/ambari_server/serverUpgrade.py
+++ b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
@@ -179,7 +179,7 @@ def check_gpl_license_approved(upgrade_response):
   if 'lzo_enabled' not in upgrade_response or 
upgrade_response['lzo_enabled'].lower() != "true":
 return
 
-  while not write_gpl_license_accepted(LZO_ENABLED_GPL_TEXT) and not 
get_YN_input(INSTALLED_LZO_WITHOUT_GPL_TEXT, False):
+  while not write_gpl_license_accepted(text = LZO_ENABLED_GPL_TEXT) and not 
get_YN_input(INSTALLED_LZO_WITHOUT_GPL_TEXT, False):
 pass
 
 #



ambari git commit: AMBARI-22564 Log Search UI: layout and behaviour changes for filtering. (ababiichuk)

2017-11-30 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 1a803ccab -> 63a15872f


AMBARI-22564 Log Search UI: layout and behaviour changes for filtering. 
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: 63a15872fec4ffec793878258b13b356e74528fa
Parents: 1a803cc
Author: ababiichuk 
Authored: Thu Nov 30 18:03:18 2017 +0200
Committer: ababiichuk 
Committed: Thu Nov 30 20:39:06 2017 +0200

--
 .../action-menu/action-menu.component.less  |  3 -
 .../action-menu/action-menu.component.ts|  4 --
 .../audit-logs-table.component.html |  8 ++-
 .../dropdown-button.component.html  |  4 +-
 .../dropdown-button.component.less  | 17 +++---
 .../dropdown-button.component.ts|  3 +
 .../filters-panel/filters-panel.component.html  | 14 ++---
 .../filters-panel/filters-panel.component.less  | 11 +++-
 .../filters-panel/filters-panel.component.ts| 21 +--
 .../menu-button/menu-button.component.less  | 13 +---
 .../src/app/components/mixins.less  | 17 ++
 .../pagination/pagination.component.html|  4 +-
 .../search-box/search-box.component.html|  2 +-
 .../search-box/search-box.component.less| 18 +++---
 .../search-box/search-box.component.ts  | 38 
 .../service-logs-table.component.html   |  7 ++-
 .../service-logs-table.component.less   |  1 -
 .../components/top-menu/top-menu.component.html |  7 ++-
 .../components/top-menu/top-menu.component.less |  4 ++
 .../top-menu/top-menu.component.spec.ts | 64 +++-
 .../components/top-menu/top-menu.component.ts   | 25 +++-
 .../src/app/components/variables.less   |  3 +-
 .../src/app/services/logs-container.service.ts  | 11 +++-
 .../src/assets/i18n/en.json |  2 +-
 .../ambari-logsearch-web/webpack.config.js  | 20 +++---
 25 files changed, 225 insertions(+), 96 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/63a15872/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less
index 880a97b..fff57df 100644
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less
@@ -15,13 +15,10 @@
  * limitations under the License.
  */
 
-@import '../variables';
-
 :host {
   display: block;
   margin-left: auto;
   menu-button {
 margin: 0 1em;
-color: @table-border-color;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/63a15872/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
index 58e0025..72037f8 100644
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
@@ -30,7 +30,6 @@ export class ActionMenuComponent {
 {
   iconClass: 'fa fa-arrow-left',
   label: 'topMenu.undo',
-  labelClass: 'unstyled-link',
   action: 'undo',
   subItems: [
 {
@@ -50,7 +49,6 @@ export class ActionMenuComponent {
 {
   iconClass: 'fa fa-arrow-right',
   label: 'topMenu.redo',
-  labelClass: 'unstyled-link',
   action: 'redo',
   subItems: [
 {
@@ -67,13 +65,11 @@ export class ActionMenuComponent {
 {
   iconClass: 'fa fa-refresh',
   label: 'topMenu.refresh',
-  labelClass: 'unstyled-link',
   action: 'refresh'
 },
 {
   iconClass: 'fa fa-history',
   label: 'topMenu.history',
-  labelClass: 'unstyled-link',
   action: 'openHistory',
   isRightAlign: true,
   subItems: [

http://git-wip-us.apache.org/repos/asf/ambari/blob/63a15872/ambari-logsearch/ambari-logsearch-web/src/app/components/audit-logs-table/audit-logs-table.component.html

ambari git commit: AMBARI-22555. Update server setup to deny GPL as default. (swagle)

2017-11-30 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 4240f8496 -> 1a803ccab


AMBARI-22555. Update server setup to deny GPL as default. (swagle)


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

Branch: refs/heads/trunk
Commit: 1a803ccab0eeaa9bd6cf45d1be1139b7a240df1e
Parents: 4240f84
Author: Siddharth Wagle 
Authored: Thu Nov 30 09:47:46 2017 -0800
Committer: Siddharth Wagle 
Committed: Thu Nov 30 09:47:46 2017 -0800

--
 .../python/ambari_server/serverConfiguration.py| 17 ++---
 .../src/main/python/ambari_server/serverUpgrade.py | 14 +-
 .../stacks/HDP/2.0.6/services/stack_advisor.py |  2 +-
 .../stacks/2.0.6/common/test_stack_advisor.py  |  4 ++--
 4 files changed, 18 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1a803cca/ambari-server/src/main/python/ambari_server/serverConfiguration.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py 
b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index f744fa0..d6ab453 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -196,14 +196,8 @@ SETUP_OR_UPGRADE_MSG = "- If this is a new setup, then run 
the \"ambari-server s
"- If this is an upgrade of an existing setup, run the 
\"ambari-server upgrade\" command.\n" \
"Refer to the Ambari documentation for more information 
on setup and upgrade."
 
-GPL_LICENSE_PROMPT_TEXT = """To download GPL licensed products like lzo you 
must accept the license terms below:
-LICENSE_LINE_1
-LICENSE_LINE_2
-LICENSE_LINE_3
-LICENSE_LINE_4
-LICENSE_LINE_5
-LICENSE_LINE_6
-Do you accept the GPL License Agreement [y/n] (y)?"""
+GPL_LICENSE_PROMPT_TEXT = """GPL License for LZO: 
https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
+Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] 
(n)? """
 
 DEFAULT_DB_NAME = "ambari"
 
@@ -1151,8 +1145,9 @@ def update_ambari_env():
 return -1
 
   return 0
-  
-def write_gpl_license_accepted():
+ 
+# default should be false / not accepted 
+def write_gpl_license_accepted(text = GPL_LICENSE_PROMPT_TEXT):
   properties = get_ambari_properties()
   if properties == -1:
 err = "Error getting ambari properties"
@@ -1162,7 +1157,7 @@ def write_gpl_license_accepted():
   if GPL_LICENSE_ACCEPTED_PROPERTY in properties.keys() and 
properties.get_property(GPL_LICENSE_ACCEPTED_PROPERTY).lower() == "true":
 return True
 
-  result = get_YN_input(GPL_LICENSE_PROMPT_TEXT, True)
+  result = get_YN_input(text, False)
 
   properties.process_pair(GPL_LICENSE_ACCEPTED_PROPERTY, str(result).lower())
   update_properties(properties)

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a803cca/ambari-server/src/main/python/ambari_server/serverUpgrade.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverUpgrade.py 
b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
index 57a1ae0..c2b7de8 100644
--- a/ambari-server/src/main/python/ambari_server/serverUpgrade.py
+++ b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
@@ -74,10 +74,14 @@ SCHEMA_UPGRADE_DEBUG = False
 
 SUSPEND_START_MODE = False
 
-INSALLED_LZO_WITHOUT_GPL_TEXT = "By saying no, Ambari will not automatically 
install LZO on any  new host in the cluster." + \
-"It is up to you to ensure LZO is installed and configured appropriately." + \
-"Without LZO being installed and configured data compressed with LZO will not 
be readable. " + \
-"Are you sure you want to proceed? [y/n] (n)?"
+INSTALLED_LZO_WITHOUT_GPL_TEXT = "By saying no, Ambari will not automatically 
install LZO on any new host in the cluster.  " \
+"It is up to you to ensure LZO is installed 
and configured appropriately.  " \
+"Without LZO being installed and configured, 
data compressed with LZO will not be readable.  " \
+"Are you sure you want to proceed? [y/n] (n)? "
+
+LZO_ENABLED_GPL_TEXT = "GPL License for LZO: 
https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html\n; \
+   "Your cluster is configured to use LZO which is GPL 
software. " \
+   "You must agree to enable Ambari to continue 
downloading and installing LZO  [y/n] (n)? "
 
 def load_stack_values(version, 

ambari git commit: AMBARI-22555. Update server setup to deny GPL as default. (swagle)

2017-11-30 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 70418a031 -> 51bd023a2


AMBARI-22555. Update server setup to deny GPL as default. (swagle)


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

Branch: refs/heads/branch-2.6
Commit: 51bd023a2e3cfeafebe6a0e65820f82c0dd0cbd5
Parents: 70418a0
Author: Siddharth Wagle 
Authored: Thu Nov 30 09:43:09 2017 -0800
Committer: Siddharth Wagle 
Committed: Thu Nov 30 09:43:20 2017 -0800

--
 .../main/python/ambari_server/serverConfiguration.py | 15 +--
 .../src/main/python/ambari_server/serverUpgrade.py   | 14 +-
 .../stacks/HDP/2.0.6/services/stack_advisor.py   |  2 +-
 .../python/stacks/2.0.6/common/test_stack_advisor.py |  4 ++--
 4 files changed, 17 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/51bd023a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py 
b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index 8697e4c..2ab2484 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -190,14 +190,8 @@ SETUP_OR_UPGRADE_MSG = "- If this is a new setup, then run 
the \"ambari-server s
"- If this is an upgrade of an existing setup, run the 
\"ambari-server upgrade\" command.\n" \
"Refer to the Ambari documentation for more information 
on setup and upgrade."
 
-GPL_LICENSE_PROMPT_TEXT = """To download GPL licensed products like lzo you 
must accept the license terms below:
-LICENSE_LINE_1
-LICENSE_LINE_2
-LICENSE_LINE_3
-LICENSE_LINE_4
-LICENSE_LINE_5
-LICENSE_LINE_6
-Do you accept the GPL License Agreement [y/n] (y)?"""
+GPL_LICENSE_PROMPT_TEXT = """GPL License for LZO: 
https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
+Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] 
(n)? """
 
 DEFAULT_DB_NAME = "ambari"
 
@@ -1149,7 +1143,8 @@ def update_ambari_env():
 
   return 0
 
-def write_gpl_license_accepted():
+# default should be false / not accepted
+def write_gpl_license_accepted(text = GPL_LICENSE_PROMPT_TEXT):
   properties = get_ambari_properties()
   if properties == -1:
 err = "Error getting ambari properties"
@@ -1159,7 +1154,7 @@ def write_gpl_license_accepted():
   if GPL_LICENSE_ACCEPTED_PROPERTY in properties.keys() and 
properties.get_property(GPL_LICENSE_ACCEPTED_PROPERTY).lower() == "true":
 return True
 
-  result = get_YN_input(GPL_LICENSE_PROMPT_TEXT, True)
+  result = get_YN_input(text, False)
 
   properties.process_pair(GPL_LICENSE_ACCEPTED_PROPERTY, str(result).lower())
   update_properties(properties)

http://git-wip-us.apache.org/repos/asf/ambari/blob/51bd023a/ambari-server/src/main/python/ambari_server/serverUpgrade.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverUpgrade.py 
b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
index a864609..06443d3 100644
--- a/ambari-server/src/main/python/ambari_server/serverUpgrade.py
+++ b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
@@ -74,10 +74,14 @@ SCHEMA_UPGRADE_DEBUG = False
 
 SUSPEND_START_MODE = False
 
-INSALLED_LZO_WITHOUT_GPL_TEXT = "By saying no, Ambari will not automatically 
install LZO on any  new host in the cluster." + \
-"It is up to you to ensure LZO is installed and configured appropriately." + \
-"Without LZO being installed and configured data compressed with LZO will not 
be readable. " + \
-"Are you sure you want to proceed? [y/n] (n)?"
+INSTALLED_LZO_WITHOUT_GPL_TEXT = "By saying no, Ambari will not automatically 
install LZO on any new host in the cluster.  " \
+"It is up to you to ensure LZO is installed 
and configured appropriately.  " \
+"Without LZO being installed and configured, 
data compressed with LZO will not be readable.  " \
+"Are you sure you want to proceed? [y/n] (n)? "
+
+LZO_ENABLED_GPL_TEXT = "GPL License for LZO: 
https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html\n; \
+   "Your cluster is configured to use LZO which is GPL 
software. " \
+   "You must agree to enable Ambari to continue 
downloading and installing LZO  [y/n] (n)? "
 
 def load_stack_values(version, 

[2/2] ambari git commit: AMBARI-22481. Make Ambari LDAP configuration API consistent with existing API (rlevas)

2017-11-30 Thread rlevas
AMBARI-22481. Make Ambari LDAP 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/4240f849
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4240f849
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4240f849

Branch: refs/heads/trunk
Commit: 4240f8496175bf9fb369b9411e71ad1127e356ad
Parents: c3150a4
Author: Robert Levas 
Authored: Thu Nov 30 12:04:12 2017 -0500
Committer: Robert Levas 
Committed: Thu Nov 30 12:04:12 2017 -0500

--
 .../server/api/handlers/CreateHandler.java  |   8 +-
 .../server/api/handlers/UpdateHandler.java  |   8 +-
 .../resources/ResourceInstanceFactoryImpl.java  |   4 +-
 ...ootServiceComponentConfigurationService.java |  15 ++
 .../api/services/ldap/AmbariConfiguration.java  |  46 
 .../api/services/ldap/LdapConfigOperation.java  |  43 
 .../services/ldap/LdapConfigurationRequest.java |  49 
 .../services/ldap/LdapConfigurationService.java | 185 --
 .../api/services/ldap/LdapRequestInfo.java  |  61 -
 .../services/serializers/JsonSerializer.java|  38 ++-
 .../commands/StackAdvisorCommand.java   |  14 +-
 .../AmbariServerConfigurationCategory.java  |  69 ++
 .../AmbariServerConfigurationHandler.java   | 110 +
 .../AmbariServerLDAPConfigurationHandler.java   | 172 +
 .../internal/OperationStatusMetaData.java   |  90 +++
 ...ootServiceComponentConfigurationHandler.java | 114 +
 ...iceComponentConfigurationHandlerFactory.java |  54 +
 ...eComponentConfigurationResourceProvider.java | 243 ---
 .../apache/ambari/server/ldap/LdapModule.java   |   4 -
 .../ldap/domain/AmbariLdapConfigKeys.java   |  83 ---
 .../ldap/domain/AmbariLdapConfiguration.java|  85 +++
 .../domain/AmbariLdapConfigurationFactory.java  |  34 ---
 .../domain/AmbariLdapConfigurationKeys.java |  83 +++
 .../AmbariLdapConfigurationProvider.java|  19 +-
 .../server/ldap/service/AmbariLdapFacade.java   |   4 +-
 .../ambari/server/ldap/service/LdapFacade.java  |   9 +-
 .../DefaultLdapAttributeDetectionService.java   |   8 +-
 .../ads/DefaultLdapConfigurationService.java|   4 +-
 .../ads/detectors/GroupMemberAttrDetector.java  |   4 +-
 .../ads/detectors/GroupNameAttrDetector.java|   7 +-
 .../ads/detectors/GroupObjectClassDetector.java |   8 +-
 .../detectors/UserGroupMemberAttrDetector.java  |   5 +-
 .../ads/detectors/UserNameAttrDetector.java |   4 +-
 .../ads/detectors/UserObjectClassDetector.java  |   4 +-
 .../commands/StackAdvisorCommandTest.java   |   4 +-
 ...ponentConfigurationResourceProviderTest.java | 214 +---
 .../server/ldap/LdapModuleFunctionalTest.java   |  49 ++--
 .../TestAmbariLdapConfigurationFactory.java |  29 ---
 .../ldap/service/AmbariLdapFacadeTest.java  |  36 ++-
 ...efaultLdapAttributeDetectionServiceTest.java |  24 +-
 .../DefaultLdapConfigurationServiceTest.java|  31 ++-
 41 files changed, 1184 insertions(+), 891 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4240f849/ambari-server/src/main/java/org/apache/ambari/server/api/handlers/CreateHandler.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/handlers/CreateHandler.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/handlers/CreateHandler.java
index b614c5e..484547a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/handlers/CreateHandler.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/handlers/CreateHandler.java
@@ -24,6 +24,7 @@ import org.apache.ambari.server.api.services.Result;
 import org.apache.ambari.server.api.services.ResultImpl;
 import org.apache.ambari.server.api.services.ResultMetadata;
 import org.apache.ambari.server.api.services.ResultStatus;
+import org.apache.ambari.server.controller.internal.OperationStatusMetaData;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
 import org.apache.ambari.server.controller.spi.RequestStatus;
 import org.apache.ambari.server.controller.spi.RequestStatusMetaData;
@@ -94,6 +95,11 @@ public class CreateHandler extends BaseManagementHandler {
   return null;
 }
 
-throw new UnsupportedOperationException();
+if (requestStatusMetaData.getClass() == OperationStatusMetaData.class) {
+  return (OperationStatusMetaData) requestStatusMetaData;
+} else {
+  throw new IllegalArgumentException(String.format("RequestStatusDetails 
is of an expected type: %s",
+  requestStatusMetaData.getClass().getName()));
+}
   }
 }


[1/2] ambari git commit: AMBARI-22481. Make Ambari LDAP configuration API consistent with existing API (rlevas)

2017-11-30 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk c3150a465 -> 4240f8496


http://git-wip-us.apache.org/repos/asf/ambari/blob/4240f849/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java
index 6c466ba..193a5c2 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java
@@ -15,17 +15,15 @@
 
 package org.apache.ambari.server.ldap.domain;
 
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
-import javax.inject.Inject;
-
 import org.apache.commons.lang.builder.EqualsBuilder;
 import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.inject.assistedinject.Assisted;
-
 /**
  * This class is an immutable representation of all the LDAP related 
configurationMap entries.
  */
@@ -35,142 +33,145 @@ public class AmbariLdapConfiguration {
 
   private final Map configurationMap;
 
-  private Object configValue(AmbariLdapConfigKeys ambariLdapConfigKeys) {
+  private Object configValue(AmbariLdapConfigurationKeys 
ambariLdapConfigurationKeys) {
 Object value = null;
-if (configurationMap.containsKey(ambariLdapConfigKeys.key())) {
-  value = configurationMap.get(ambariLdapConfigKeys.key());
+if (configurationMap.containsKey(ambariLdapConfigurationKeys.key())) {
+  value = configurationMap.get(ambariLdapConfigurationKeys.key());
 } else {
-  LOGGER.warn("Ldap configuration property [{}] hasn't been set", 
ambariLdapConfigKeys.key());
+  LOGGER.warn("Ldap configuration property [{}] hasn't been set", 
ambariLdapConfigurationKeys.key());
 }
 return value;
   }
 
-  public void setValueFor(AmbariLdapConfigKeys ambariLdapConfigKeys, String 
value) {
-configurationMap.put(ambariLdapConfigKeys.key(), value);
+  public void setValueFor(AmbariLdapConfigurationKeys 
ambariLdapConfigurationKeys, String value) {
+configurationMap.put(ambariLdapConfigurationKeys.key(), value);
   }
 
-  // intentionally package private, instances to be created through the factory
-  @Inject
-  AmbariLdapConfiguration(@Assisted Map configuration) {
+  public AmbariLdapConfiguration(Map configuration) {
 this.configurationMap = configuration;
   }
 
   public boolean ldapEnabled() {
-return Boolean.valueOf((String) 
configValue(AmbariLdapConfigKeys.LDAP_ENABLED));
+return Boolean.valueOf((String) 
configValue(AmbariLdapConfigurationKeys.LDAP_ENABLED));
   }
 
   public String serverHost() {
-return (String) configValue(AmbariLdapConfigKeys.SERVER_HOST);
+return (String) configValue(AmbariLdapConfigurationKeys.SERVER_HOST);
   }
 
   public int serverPort() {
-return Integer.valueOf((String) 
configValue(AmbariLdapConfigKeys.SERVER_PORT));
+return Integer.valueOf((String) 
configValue(AmbariLdapConfigurationKeys.SERVER_PORT));
   }
 
   public boolean useSSL() {
-return Boolean.valueOf((String) configValue(AmbariLdapConfigKeys.USE_SSL));
+return Boolean.valueOf((String) 
configValue(AmbariLdapConfigurationKeys.USE_SSL));
   }
 
   public String trustStore() {
-return (String) configValue(AmbariLdapConfigKeys.TRUST_STORE);
+return (String) configValue(AmbariLdapConfigurationKeys.TRUST_STORE);
   }
 
   public String trustStoreType() {
-return (String) configValue(AmbariLdapConfigKeys.TRUST_STORE_TYPE);
+return (String) configValue(AmbariLdapConfigurationKeys.TRUST_STORE_TYPE);
   }
 
   public String trustStorePath() {
-return (String) configValue(AmbariLdapConfigKeys.TRUST_STORE_PATH);
+return (String) configValue(AmbariLdapConfigurationKeys.TRUST_STORE_PATH);
   }
 
   public String trustStorePassword() {
-return (String) configValue(AmbariLdapConfigKeys.TRUST_STORE_PASSWORD);
+return (String) 
configValue(AmbariLdapConfigurationKeys.TRUST_STORE_PASSWORD);
   }
 
   public boolean anonymousBind() {
-return Boolean.valueOf((String) 
configValue(AmbariLdapConfigKeys.ANONYMOUS_BIND));
+return Boolean.valueOf((String) 
configValue(AmbariLdapConfigurationKeys.ANONYMOUS_BIND));
   }
 
   public String bindDn() {
-return (String) configValue(AmbariLdapConfigKeys.BIND_DN);
+return (String) configValue(AmbariLdapConfigurationKeys.BIND_DN);
   }
 
   public String bindPassword() {
-return (String) configValue(AmbariLdapConfigKeys.BIND_PASSWORD);
+return (String) configValue(AmbariLdapConfigurationKeys.BIND_PASSWORD);
   }
 
   public String attributeDetection() {
-return (String) 

[08/50] [abbrv] ambari git commit: AMBARI-22508 Ambari 3.0: Implement new design for Admin View: User Management. (atkach)

2017-11-30 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/99b19e58/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/userManagement/UsersListCtrl_test.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/userManagement/UsersListCtrl_test.js
 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/userManagement/UsersListCtrl_test.js
new file mode 100644
index 000..fcafa59
--- /dev/null
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/userManagement/UsersListCtrl_test.js
@@ -0,0 +1,344 @@
+/**
+ * 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.
+ */
+
+describe('#Cluster', function () {
+
+  describe('UsersListCtrl', function() {
+
+var scope, ctrl, $t, $httpBackend;
+
+beforeEach(module('ambariAdminConsole', function () {}));
+
+beforeEach(inject(function($rootScope, $controller, _$translate_, 
_$httpBackend_) {
+  scope = $rootScope.$new();
+  $t = _$translate_.instant;
+  $httpBackend = _$httpBackend_;
+  ctrl = $controller('UsersListCtrl', {
+$scope: scope
+  });
+}));
+
+describe('#clearFilters()', function () {
+
+  it('should clear filters and reset pagination', function () {
+scope.currentPage = 2;
+scope.filters.name = 'a';
+scope.filters.status = {
+  label: $t('common.local'),
+  value: false
+};
+scope.filters.type = {
+  label: $t('common.local'),
+  value: 'LOCAL'
+};
+scope.clearFilters();
+expect(scope.filters.name).toEqual('');
+expect(scope.filters.status).toEqual({
+  label: $t('common.all'),
+  value: '*'
+});
+expect(scope.filters.type).toEqual({
+  label: $t('common.all'),
+  value: '*'
+});
+expect(scope.currentPage).toEqual(1);
+  });
+
+});
+
+describe('#isNotEmptyFilter', function () {
+
+  var cases = [
+{
+  currentNameFilter: '',
+  currentTypeFilter: null,
+  currentActiveFilter: null,
+  isNotEmptyFilter: false,
+  title: 'no filters'
+},
+{
+  currentNameFilter: '',
+  currentTypeFilter: {
+value: '*'
+  },
+  currentActiveFilter: {
+value: '*'
+  },
+  isNotEmptyFilter: false,
+  title: 'empty filters'
+},
+{
+  currentNameFilter: 'a',
+  currentTypeFilter: {
+value: '*'
+  },
+  currentActiveFilter: {
+value: '*'
+  },
+  isNotEmptyFilter: true,
+  title: 'name filter'
+},
+{
+  currentNameFilter: '0',
+  currentTypeFilter: {
+value: '*'
+  },
+  currentActiveFilter: {
+value: '*'
+  },
+  isNotEmptyFilter: true,
+  title: 'name filter with "0" as string'
+},
+{
+  currentNameFilter: '',
+  currentTypeFilter: {
+value: 'LOCAL'
+  },
+  currentActiveFilter: {
+value: '*'
+  },
+  isNotEmptyFilter: true,
+  title: 'type filter'
+},
+{
+  currentNameFilter: '',
+  currentTypeFilter: {
+value: '*'
+  },
+  currentActiveFilter: {
+value: false
+  },
+  isNotEmptyFilter: true,
+  title: 'activity filter'
+},
+{
+  currentNameFilter: 'a',
+  currentTypeFilter: {
+value: 'LOCAL'
+  },
+  currentActiveFilter: {
+value: '*'
+  },
+  isNotEmptyFilter: true,
+  title: 'name and type filters'
+},
+{
+  currentNameFilter: 'a',
+  currentTypeFilter: {
+value: '*'
+  },
+  currentActiveFilter: {
+value: false
+  },
+  isNotEmptyFilter: true,
+  title: 'name and activity filters'
+},
+{
+  currentNameFilter: 'a',
+  

[36/50] [abbrv] ambari git commit: AMBARI-22545 - Tie MapReduce to Hive and Tez For Patch Upgrades (jonathanhurley)

2017-11-30 Thread ncole
AMBARI-22545 - Tie MapReduce to Hive and Tez For Patch Upgrades (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: ff3eca0ef9f33c45c162669a94a61a6a172ece3a
Parents: 0cf8276
Author: Jonathan Hurley 
Authored: Wed Nov 29 09:47:46 2017 -0500
Committer: Jonathan Hurley 
Committed: Wed Nov 29 10:59:02 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/ff3eca0e/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 794d2b0..1783655 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
@@ -1277,7 +1277,9 @@
   }
 },
 "upgrade-dependencies" : {
-  "HIVE": ["TEZ"],
+  "HIVE": ["TEZ", "MAPREDUCE2"],
+  "TEZ": ["HIVE"],
+  "MAPREDUCE2": ["HIVE"],
   "MAHOUT": ["MAPREDUCE2"],
   "OOZIE": ["MAPREDUCE2"]
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff3eca0e/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 5fb61c8..4b4d0bb 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,7 +1154,9 @@
   }
 },
 "upgrade-dependencies" : {
-  "HIVE": ["TEZ"],
+  "HIVE": ["TEZ", "MAPREDUCE2"],
+  "TEZ": ["HIVE"],
+  "MAPREDUCE2": ["HIVE"],
   "MAHOUT": ["MAPREDUCE2"],
   "OOZIE": ["MAPREDUCE2"]
 }



[28/50] [abbrv] ambari git commit: AMBARI-22458 - SNMP Trap should contain sysuptime field filled (Amarnathreddy Pappu via jonathanhurley)

2017-11-30 Thread ncole
AMBARI-22458 - SNMP Trap should contain sysuptime field filled (Amarnathreddy 
Pappu via jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 73d99d8c3f7f0067f06b1a0c04eccbcf9554c0bd
Parents: 3fa1289
Author: Jonathan Hurley 
Authored: Tue Nov 28 10:29:59 2017 -0500
Committer: Jonathan Hurley 
Committed: Tue Nov 28 10:30:41 2017 -0500

--
 .../notifications/dispatchers/AmbariSNMPDispatcher.java  | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/73d99d8c/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
index 596079b..8e397ed 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
@@ -38,9 +38,13 @@ import org.snmp4j.smi.OID;
 import org.snmp4j.smi.OctetString;
 import org.snmp4j.smi.VariableBinding;
 import org.snmp4j.util.DefaultPDUFactory;
+import org.snmp4j.smi.TimeTicks;
 
 import com.google.inject.Singleton;
 
+import java.lang.management.RuntimeMXBean;
+import java.lang.management.ManagementFactory;
+
 /**
  * The {@link AmbariSNMPDispatcher} class is used to dispatch {@link 
AlertNotification} via SNMP using predefined Ambari OIDs.
  *
@@ -113,7 +117,12 @@ public class AmbariSNMPDispatcher extends SNMPDispatcher {
 }
 
 pdu.setType(snmpVersion.getTrapType());
-// Set trap oid for PDU
+
+RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
+long uptimeInMillis = runtimeMXBean.getUptime();
+pdu.add(new VariableBinding(SnmpConstants.sysUpTime, new 
TimeTicks(uptimeInMillis)));
+
+   // Set trap oid for PDU
 pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, new 
OID(AMBARI_ALERT_TRAP_OID)));
 // Set notification body and subject for PDU objects with identifiers 
specified in dispatch properties.
 AlertNoticeDispatchService.AlertInfo alertInfo = 
alertNotification.getAlertInfo();



[15/50] [abbrv] ambari git commit: AMBARI-22402. PERF stack: Deploy fails due to common hooks being used instead of one specific to PERF (aonishuk)

2017-11-30 Thread ncole
AMBARI-22402. PERF stack: Deploy fails due to common hooks being used instead 
of one specific to PERF (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 3dca5607d736f5d70ef0a48898c2e009fd60b50a
Parents: c9936ad
Author: Andrew Onishuk 
Authored: Mon Nov 27 15:06:24 2017 +0200
Committer: Andrew Onishuk 
Committed: Mon Nov 27 15:06:24 2017 +0200

--
 .../ambari/server/actionmanager/ExecutionCommandWrapper.java  | 7 +--
 .../java/org/apache/ambari/server/agent/HeartbeatMonitor.java | 3 +--
 .../org/apache/ambari/server/configuration/Configuration.java | 7 +++
 .../server/controller/internal/UpgradeResourceProvider.java   | 3 +--
 .../java/org/apache/ambari/server/stack/StackManager.java | 5 -
 contrib/utils/perf/deploy-gce-perf-cluster.py | 1 +
 6 files changed, 15 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3dca5607/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
index a0c5f26..7b693cd 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
@@ -20,7 +20,6 @@ package org.apache.ambari.server.actionmanager;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.HOOKS_FOLDER;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SERVICE_PACKAGE_FOLDER;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.VERSION;
-import static org.apache.ambari.server.stack.StackManager.DEFAULT_HOOKS_FOLDER;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -34,6 +33,7 @@ import 
org.apache.ambari.server.agent.AgentCommand.AgentCommandType;
 import org.apache.ambari.server.agent.CommandRepository;
 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.spi.SystemException;
 import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
 import org.apache.ambari.server.orm.entities.OperatingSystemEntity;
@@ -93,6 +93,9 @@ public class ExecutionCommandWrapper {
   @Inject
   private AmbariMetaInfo ambariMetaInfo;
 
+  @Inject
+  private Configuration configuration;
+
   @AssistedInject
   public ExecutionCommandWrapper(@Assisted String jsonExecutionCommand) {
 this.jsonExecutionCommand = jsonExecutionCommand;
@@ -304,7 +307,7 @@ public class ExecutionCommandWrapper {
   stackId.getStackVersion());
 
 if (!commandParams.containsKey(HOOKS_FOLDER)) {
-  commandParams.put(HOOKS_FOLDER, DEFAULT_HOOKS_FOLDER);
+  
commandParams.put(HOOKS_FOLDER,configuration.getProperty(Configuration.HOOKS_FOLDER));
 }
 
 if (!commandParams.containsKey(SERVICE_PACKAGE_FOLDER)) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dca5607/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java
index c13df6b..d51364e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java
@@ -25,7 +25,6 @@ import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SCRIPT_TY
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SERVICE_PACKAGE_FOLDER;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.STACK_NAME;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.STACK_VERSION;
-import static org.apache.ambari.server.stack.StackManager.DEFAULT_HOOKS_FOLDER;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -341,7 +340,7 @@ public class HeartbeatMonitor implements Runnable {
 commandParams.put(COMMAND_TIMEOUT, commandTimeout);
 commandParams.put(SERVICE_PACKAGE_FOLDER,

[18/50] [abbrv] ambari git commit: AMBARI-22522 - Livy server fails to start during downgrade due to absence of 'conf' directory (jonathanhurley)

2017-11-30 Thread ncole
AMBARI-22522 - Livy server fails to start during downgrade due to absence of 
'conf' directory (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 1d9985cf5727bd4b8085ee0afe477b759875b348
Parents: 32e25b8
Author: Jonathan Hurley 
Authored: Mon Nov 27 09:03:23 2017 -0500
Committer: Jonathan Hurley 
Committed: Mon Nov 27 12:04:02 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/1d9985cf/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 245449c..794d2b0 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
@@ -1069,7 +1069,7 @@
   "livy": [
 {
   "conf_dir": "/etc/livy/conf",
-  "current_dir": "{0}/current/livy"
+  "current_dir": "{0}/current/livy-client/conf"
 }
   ],
   "mahout": [

http://git-wip-us.apache.org/repos/asf/ambari/blob/1d9985cf/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 5603c0c..5fb61c8 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
@@ -946,7 +946,7 @@
   "livy": [
 {
   "conf_dir": "/etc/livy/conf",
-  "current_dir": "{0}/current/livy"
+  "current_dir": "{0}/current/livy-client/conf"
 }
   ],
   "mahout": [



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

2017-11-30 Thread ncole
Merge branch 'trunk' into branch-feature-AMBARI-21674


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: f02eb4e1806bde6aa7c21e03ac5b233c2265963d
Parents: d43882d c3150a4
Author: Nate Cole 
Authored: Thu Nov 30 09:24:41 2017 -0500
Committer: Nate Cole 
Committed: Thu Nov 30 09:24:41 2017 -0500

--
 .../main/resources/ui/admin-web/app/index.html  |  19 +-
 .../resources/ui/admin-web/app/scripts/app.js   |   3 +-
 .../controllers/ClusterInformationCtrl.js   |  65 --
 .../ambariViews/CloneViewInstanceCtrl.js| 274 ---
 .../ambariViews/CreateViewInstanceCtrl.js   | 103 ++-
 .../controllers/ambariViews/ViewsListCtrl.js|  25 +-
 .../clusters/ClusterInformationCtrl.js  | 106 +++
 .../clusters/ClustersManageAccessCtrl.js|  97 ---
 .../controllers/clusters/UserAccessListCtrl.js  | 351 
 .../controllers/groups/GroupsCreateCtrl.js  |  65 --
 .../controllers/groups/GroupsEditCtrl.js| 180 
 .../controllers/groups/GroupsListCtrl.js| 106 ---
 .../stackVersions/StackVersionsEditCtrl.js  |  27 +-
 .../userManagement/GroupCreateCtrl.js   | 120 +++
 .../controllers/userManagement/GroupEditCtrl.js | 248 ++
 .../userManagement/GroupsListCtrl.js| 167 
 .../userManagement/UserCreateCtrl.js| 113 +++
 .../controllers/userManagement/UserEditCtrl.js  | 364 
 .../userManagement/UserManagementCtrl.js|  23 +
 .../controllers/userManagement/UsersListCtrl.js | 177 
 .../controllers/users/UsersCreateCtrl.js|  75 --
 .../scripts/controllers/users/UsersListCtrl.js  | 122 ---
 .../scripts/controllers/users/UsersShowCtrl.js  | 290 ---
 .../ui/admin-web/app/scripts/i18n.config.js |  15 +-
 .../ui/admin-web/app/scripts/routes.js  |  67 +-
 .../admin-web/app/scripts/services/Cluster.js   |  90 +-
 .../ui/admin-web/app/scripts/services/Group.js  | 144 ++--
 .../app/scripts/services/GroupConstants.js  |  38 -
 .../app/scripts/services/RoleDetailsModal.js|   5 +-
 .../ui/admin-web/app/scripts/services/Stack.js  |  17 +-
 .../ui/admin-web/app/scripts/services/User.js   |  20 +-
 .../ui/admin-web/app/scripts/services/View.js   |   8 +-
 .../app/styles/cluster-information.css  |  13 +-
 .../resources/ui/admin-web/app/styles/main.css  | 132 +--
 .../ui/admin-web/app/styles/toggle-switch.css   |  72 ++
 .../ui/admin-web/app/styles/top-nav.css |   3 +
 .../ui/admin-web/app/styles/user-management.css |  43 +
 .../resources/ui/admin-web/app/styles/views.css |  90 +-
 .../admin-web/app/views/ambariViews/create.html | 204 -
 .../admin-web/app/views/ambariViews/edit.html   |  37 +-
 .../app/views/ambariViews/modals/create.html| 262 +++---
 .../app/views/ambariViews/viewsList.html|  65 +-
 .../app/views/authentication/main.html  |  14 +-
 .../admin-web/app/views/clusterInformation.html |  66 --
 .../app/views/clusters/clusterInformation.html  |  87 ++
 .../app/views/clusters/manageAccess.html|  63 --
 .../app/views/clusters/userAccessList.html  | 102 ---
 .../ui/admin-web/app/views/groups/create.html   |  43 -
 .../ui/admin-web/app/views/groups/edit.html |  98 ---
 .../ui/admin-web/app/views/groups/list.html |  80 --
 .../views/loginActivities/homeDirectory.html|   6 +-
 .../app/views/loginActivities/loginMessage.html |   6 +-
 .../app/views/modals/AddVersionModal.html   |  14 +-
 .../app/views/remoteClusters/list.html  |   5 +-
 .../ui/admin-web/app/views/sideNav.html |  22 +-
 .../admin-web/app/views/stackVersions/list.html |  18 +-
 .../views/stackVersions/stackVersionPage.html   |  55 +-
 .../ui/admin-web/app/views/urls/create.html |   2 -
 .../ui/admin-web/app/views/urls/edit.html   |   2 -
 .../app/views/userManagement/groupEdit.html | 122 +++
 .../app/views/userManagement/groupsList.html|  94 +++
 .../app/views/userManagement/main.html  |  36 +
 .../userManagement/modals/changePassword.html   |  46 ++
 .../userManagement/modals/groupCreate.html  |  87 ++
 .../views/userManagement/modals/userCreate.html | 152 
 .../app/views/userManagement/userEdit.html  | 144 
 .../app/views/userManagement/usersList.html | 119 +++
 .../ui/admin-web/app/views/users/create.html|  82 --
 .../ui/admin-web/app/views/users/list.html  |  97 ---
 .../app/views/users/modals/changePassword.html  |  46 --
 .../ui/admin-web/app/views/users/show.html  | 122 ---
 .../unit/controllers/CloneViewInstanceCtrl.js   | 135 ---
 .../controllers/ClusterInformationCtrl_test.js  | 102 +++
 

[32/50] [abbrv] ambari git commit: AMBARI-22527 : Error while viewing topology details - Storm View (Sanket Shah via mradhakrishnan)

2017-11-30 Thread ncole
AMBARI-22527 : Error while viewing topology details - Storm View (Sanket Shah 
via mradhakrishnan)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 11d7a6ad7a1c7070e87069d5183acfeb68fe6ab9
Parents: aa652af
Author: Madhuvanthi Radhakrishnan 
Authored: Tue Nov 28 10:34:26 2017 -0800
Committer: Madhuvanthi Radhakrishnan 
Committed: Tue Nov 28 10:34:26 2017 -0800

--
 .../scripts/containers/ComponentDetailView.jsx  |  2 +-
 .../storm/src/main/resources/ui/package.json| 20 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/11d7a6ad/contrib/views/storm/src/main/resources/ui/app/scripts/containers/ComponentDetailView.jsx
--
diff --git 
a/contrib/views/storm/src/main/resources/ui/app/scripts/containers/ComponentDetailView.jsx
 
b/contrib/views/storm/src/main/resources/ui/app/scripts/containers/ComponentDetailView.jsx
index 2b3ed69..a5b356b 100644
--- 
a/contrib/views/storm/src/main/resources/ui/app/scripts/containers/ComponentDetailView.jsx
+++ 
b/contrib/views/storm/src/main/resources/ui/app/scripts/containers/ComponentDetailView.jsx
@@ -574,7 +574,7 @@ export default class ComponentDetailView extends Component {
   
 ID:
 
-  {componentDetail.id}
+  {componentDetail.id}
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/11d7a6ad/contrib/views/storm/src/main/resources/ui/package.json
--
diff --git a/contrib/views/storm/src/main/resources/ui/package.json 
b/contrib/views/storm/src/main/resources/ui/package.json
index f9e029b..3b68936 100644
--- a/contrib/views/storm/src/main/resources/ui/package.json
+++ b/contrib/views/storm/src/main/resources/ui/package.json
@@ -66,22 +66,22 @@
 "postcss-loader": "^1.2.2",
 "prop-types": "^15.6.0",
 "react": "15.6.2",
-"react-bootstrap": "^0.31.3",
-"react-bootstrap-switch": "^3.4.5",
-"react-breadcrumbs": "^1.3.16",
-"react-codemirror": "^0.2.6",
-"react-datetime": "^2.5.0",
+"react-bootstrap": "0.31.3",
+"react-bootstrap-switch": "3.4.5",
+"react-breadcrumbs": "1.3.16",
+"react-codemirror": "0.2.6",
+"react-datetime": "2.5.0",
 "react-dom": "15.6.2",
 "react-hot-loader": "^3.0.0-beta.3",
 "react-onclickoutside": "^5.3.2",
-"react-router": "^2.6.0",
-"react-router-bootstrap": "^0.23.1",
-"react-select": "^1.0.0-beta14",
-"react-toastr": "^2.8.0",
+"react-router": "2.6.0",
+"react-router-bootstrap": "0.23.1",
+"react-select": "1.0.0-rc.10",
+"react-toastr": "2.8.0",
 "react-treebeard": "^1.1.4",
 "react-twitter-typeahead": "^1.1.12",
 "react-utils": "^1.0.0",
-"reactable": "^0.14.0",
+"reactable": "0.14.0",
 "require-dir": "^0.3.0",
 "run-sequence": "^1.2.2",
 "style-loader": "^0.13.1",



[06/50] [abbrv] ambari git commit: AMBARI-22502.Workflow Manager View - FS node will overwrite internal commands and replace them with blank "move" commands when reopening the node(Venkata Sairam)

2017-11-30 Thread ncole
AMBARI-22502.Workflow Manager View - FS node will overwrite internal commands 
and replace them with blank "move" commands when reopening the node(Venkata 
Sairam)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 51360219866386d8103326def2a1d412348414ed
Parents: 20dee7f
Author: Venkata Sairam 
Authored: Thu Nov 23 15:36:57 2017 +0530
Committer: Venkata Sairam 
Committed: Thu Nov 23 15:36:57 2017 +0530

--
 .../src/main/resources/ui/app/domain/workflow-importer.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/51360219/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
index 84a789d..2afc304 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
@@ -112,7 +112,8 @@ var WorkflowImporter= Ember.Object.extend({
   if (nodeHandler){
 if (Ember.isArray(workflowAppJson[key])){
   workflowAppJson[key].forEach(function(jsonObj){
-var node=nodeHandler.handleImportNode(key,jsonObj,workflow,xmlDoc);
+var actionDom = xmlDoc.find("action[name='" + jsonObj._name + 
"']");
+var node = 
nodeHandler.handleImportNode(key,jsonObj,workflow,actionDom);
 nodeMap.set(jsonObj._name,{json:jsonObj,node:node});
   });
 }else{



[48/50] [abbrv] ambari git commit: AMBARI-22479 After removing force_delete_components option hosts are not deleted (dsen)

2017-11-30 Thread ncole
AMBARI-22479 After removing force_delete_components option hosts are not 
deleted (dsen)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 1f7bd75e0e8514539ca27fe53b7a39a01a11c285
Parents: 19e6518
Author: Dmytro Sen 
Authored: Thu Nov 30 10:45:18 2017 +0200
Committer: Dmytro Sen 
Committed: Thu Nov 30 10:45:18 2017 +0200

--
 .../AmbariManagementControllerImpl.java |  9 
 .../internal/HostResourceProvider.java  | 54 ++--
 .../AmbariManagementControllerTest.java | 42 +--
 .../internal/HostResourceProviderTest.java  |  6 +--
 4 files changed, 30 insertions(+), 81 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f7bd75e/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 3d09154..455814a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -3477,15 +3477,6 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
   + ", hostname=" + request.getHostname()
   + ", request=" + request);
 }
-
-// Only allow removing master/slave components in 
DISABLED/UNKNOWN/INSTALL_FAILED/INIT state without stages
-// generation.
-// Clients may be removed without a state check.
-if (!component.isClientComponent() &&
-!componentHost.getState().isRemovableState()) {
-  throw new AmbariException("To remove master or slave components they 
must be in " +
-  "DISABLED/INIT/INSTALLED/INSTALL_FAILED/UNKNOWN state. Current=" 
+ componentHost.getState() + ".");
-}
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f7bd75e/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
index 2b18eb2..5c740f1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
@@ -62,7 +62,6 @@ import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.Host;
 import org.apache.ambari.server.state.MaintenanceState;
 import org.apache.ambari.server.state.ServiceComponentHost;
-import org.apache.ambari.server.state.State;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.apache.ambari.server.topology.ClusterTopology;
 import org.apache.ambari.server.topology.InvalidTopologyException;
@@ -146,9 +145,6 @@ public class HostResourceProvider extends 
AbstractControllerResourceProvider {
 
   //todo use the same json structure for cluster host addition (cluster 
template and upscale)
 
-  protected static final String FORCE_DELETE_COMPONENTS = 
"force_delete_components";
-
-
   private static final Set PK_PROPERTY_IDS = 
ImmutableSet.of(HOST_HOST_NAME_PROPERTY_ID);
 
   @Inject
@@ -320,8 +316,6 @@ public class HostResourceProvider extends 
AbstractControllerResourceProvider {
 
 final Set requests = new HashSet<>();
 Map requestInfoProperties = 
request.getRequestInfoProperties();
-final boolean forceDelete = 
requestInfoProperties.containsKey(FORCE_DELETE_COMPONENTS) &&
-  
requestInfoProperties.get(FORCE_DELETE_COMPONENTS).equals("true");
 
 for (Map propertyMap : getPropertyMaps(predicate)) {
   requests.add(getRequest(propertyMap));
@@ -330,7 +324,7 @@ public class HostResourceProvider extends 
AbstractControllerResourceProvider {
 DeleteStatusMetaData deleteStatusMetaData = modifyResources(new 
Command() {
   @Override
   public DeleteStatusMetaData invoke() throws AmbariException {
-return deleteHosts(requests, request.isDryRunRequest(), forceDelete);
+return deleteHosts(requests, 

[01/50] [abbrv] ambari git commit: AMBARI-22503 Log Search UI: refine time range picker. (ababiichuk)

2017-11-30 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-21674 d43882d1a -> f02eb4e18


AMBARI-22503 Log Search UI: refine time range picker. (ababiichuk)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: bce0bd8f9424828d0d43ad5e427dff7259496e64
Parents: 5d421b7
Author: ababiichuk 
Authored: Wed Nov 22 19:54:00 2017 +0200
Committer: ababiichuk 
Committed: Thu Nov 23 00:47:34 2017 +0200

--
 .../date-picker/date-picker.component.spec.ts   |  2 ++
 .../date-picker/date-picker.component.ts| 35 +---
 .../time-range-picker.component.html|  6 ++--
 .../time-range-picker.component.ts  | 12 ---
 .../src/app/services/logs-container.service.ts  | 20 ---
 .../src/assets/i18n/en.json |  4 ++-
 6 files changed, 61 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bce0bd8f/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.spec.ts
index e6c0bfe..dfd9711 100644
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.spec.ts
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.spec.ts
@@ -18,6 +18,7 @@
 
 import {async, ComponentFixture, TestBed} from '@angular/core/testing';
 import {StoreModule} from '@ngrx/store';
+import * as moment from 'moment-timezone';
 import {AppSettingsService, appSettings} from 
'@app/services/storage/app-settings.service';
 
 import {DatePickerComponent} from './date-picker.component';
@@ -42,6 +43,7 @@ describe('DatePickerComponent', () => {
   beforeEach(() => {
 fixture = TestBed.createComponent(DatePickerComponent);
 component = fixture.componentInstance;
+component.time = moment();
 fixture.detectChanges();
   });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bce0bd8f/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.ts
index efb5e34..e33d71e 100644
--- 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.ts
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/date-picker/date-picker.component.ts
@@ -16,8 +16,11 @@
  * limitations under the License.
  */
 
-import {Component, OnInit, OnDestroy, Output, EventEmitter, ViewChild, 
ElementRef} from '@angular/core';
+import {
+  Component, OnInit, OnChanges, OnDestroy, SimpleChanges, Input, Output, 
EventEmitter, ViewChild, ElementRef
+} from '@angular/core';
 import * as $ from 'jquery';
+import {Moment} from 'moment-timezone';
 import '@vendor/js/bootstrap-datetimepicker.min';
 import {AppSettingsService} from '@app/services/storage/app-settings.service';
 
@@ -25,10 +28,10 @@ import {AppSettingsService} from 
'@app/services/storage/app-settings.service';
   selector: 'date-picker',
   templateUrl: './date-picker.component.html'
 })
-export class DatePickerComponent implements OnInit, OnDestroy {
+export class DatePickerComponent implements OnInit, OnChanges, OnDestroy {
 
   constructor(private appSettings: AppSettingsService) {
-appSettings.getParameter('timeZone').subscribe(value => {
+appSettings.getParameter('timeZone').subscribe((value: string): void => {
   this.destroyDatePicker();
   this.timeZone = value;
   if (this.datePickerElement) {
@@ -37,14 +40,27 @@ export class DatePickerComponent implements OnInit, 
OnDestroy {
 });
   }
 
-  ngOnInit() {
+  ngOnInit(): void {
 this.createDatePicker();
   }
 
-  ngOnDestroy() {
+  ngOnChanges(changes: SimpleChanges): void {
+if (changes.hasOwnProperty('time') && this.datePickerElement) {
+  this.setTime(changes.time.currentValue);
+}
+  }
+
+  ngOnDestroy(): void {
 this.destroyDatePicker();
   }
 
+  /**
+   * Value of time input field passed from parent component
+   * @type {Moment}
+   */
+  @Input()
+  time: Moment;
+
   @Output()
   timeChange: EventEmitter = new 

[40/50] [abbrv] ambari git commit: AMBARI-22484. Stack advisor should disallow lzo enable without accepting license agreement. (mpapirkovskyy)

2017-11-30 Thread ncole
AMBARI-22484. Stack advisor should disallow lzo enable without accepting 
license agreement. (mpapirkovskyy)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 41853a1041a848b69384592c49f8f5b539a5c4f9
Parents: 7750398
Author: Myroslav Papirkovskyi 
Authored: Wed Nov 29 16:48:11 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Wed Nov 29 18:30:08 2017 +0200

--
 .../stackadvisor/StackAdvisorRequest.java   | 11 +
 .../commands/StackAdvisorCommand.java   |  2 +
 .../ambari/server/controller/AmbariServer.java  |  3 +-
 .../internal/StackAdvisorResourceProvider.java  |  9 +++-
 .../GPLLicenseNotAcceptedException.java | 28 +++
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 17 +++
 .../ValidationResourceProviderTest.java |  4 +-
 .../stacks/2.0.6/common/test_stack_advisor.py   | 51 ++--
 8 files changed, 116 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/41853a10/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
index cd26c56..62b8d15 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
@@ -51,6 +51,7 @@ public class StackAdvisorRequest {
   private Set configGroups;
   private Map userContext = new HashMap<>();
   private Map ldapConfig = new HashMap<>();
+  private Boolean gplLicenseAccepted;
 
   public String getStackName() {
 return stackName;
@@ -122,6 +123,10 @@ public class StackAdvisorRequest {
 this.configGroups = configGroups;
   }
 
+  public Boolean getGplLicenseAccepted() {
+return gplLicenseAccepted;
+  }
+
   private StackAdvisorRequest(String stackName, String stackVersion) {
 this.stackName = stackName;
 this.stackVersion = stackVersion;
@@ -194,6 +199,12 @@ public class StackAdvisorRequest {
   return this;
 }
 
+public StackAdvisorRequestBuilder withGPLLicenseAccepted(
+Boolean gplLicenseAccepted) {
+  this.instance.gplLicenseAccepted = gplLicenseAccepted;
+  return this;
+}
+
 public StackAdvisorRequestBuilder withLdapConfig(Map 
ldapConfig) {
   Preconditions.checkNotNull(ldapConfig);
   this.instance.ldapConfig = ldapConfig;

http://git-wip-us.apache.org/repos/asf/ambari/blob/41853a10/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
index 1b89c4f..4ec15ef 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
@@ -107,6 +107,7 @@ public abstract class StackAdvisorCommand extend
   private static final String CONFIGURATIONS_PROPERTY = "configurations";
   private static final String CHANGED_CONFIGURATIONS_PROPERTY = 
"changed-configurations";
   private static final String USER_CONTEXT_PROPERTY = "user-context";
+  private static final String GPL_LICENSE_ACCEPTED = "gpl-license-accepted";
   private static final String AMBARI_SERVER_CONFIGURATIONS_PROPERTY = 
"ambari-server-properties";
 
   private File recommendationsDir;
@@ -269,6 +270,7 @@ public abstract class StackAdvisorCommand extend
 
 JsonNode userContext = mapper.valueToTree(request.getUserContext());
 root.put(USER_CONTEXT_PROPERTY, userContext);
+root.put(GPL_LICENSE_ACCEPTED, request.getGplLicenseAccepted());
   }
 
   private void populateConfigGroups(ObjectNode root,

http://git-wip-us.apache.org/repos/asf/ambari/blob/41853a10/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java

[46/50] [abbrv] ambari git commit: AMBARI-22490. Uploading a Zero KB file to HDFS via File View Fails (pallavkul)

2017-11-30 Thread ncole
AMBARI-22490. Uploading a Zero KB file to HDFS via File View Fails (pallavkul)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: ff08592a32d3b8bf4c2ba2c674b73233c775f424
Parents: ca174fb
Author: pallavkul 
Authored: Thu Nov 30 07:16:47 2017 +0530
Committer: pallavkul 
Committed: Thu Nov 30 07:16:47 2017 +0530

--
 .../resources/ui/app/components/upload-file.js  | 38 ++--
 1 file changed, 19 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ff08592a/contrib/views/files/src/main/resources/ui/app/components/upload-file.js
--
diff --git 
a/contrib/views/files/src/main/resources/ui/app/components/upload-file.js 
b/contrib/views/files/src/main/resources/ui/app/components/upload-file.js
index 8a14272..1a5e911 100644
--- a/contrib/views/files/src/main/resources/ui/app/components/upload-file.js
+++ b/contrib/views/files/src/main/resources/ui/app/components/upload-file.js
@@ -104,25 +104,25 @@ export default Ember.Component.extend(OperationModal, {
   url: url
 });
 this.set('uploader', uploader);
-if(!Ember.isEmpty(file)) {
-  uploader.upload(file, {path: this.get('path')});
-  this.setUploading(file.name);
-  uploader.on('progress', (e) => {
-this.setUploadPercent(e.percent);
-  });
-  uploader.on('didUpload', (e) => {
-this.set('uploader');
-this.send('close');
-this.sendAction('refreshAction');
-  });
-  uploader.on('didError', (jqXHR, textStatus, errorThrown) => {
-var error = Ember.$.parseJSON(jqXHR.responseText);
-this.set('uploader');
-this.get('logger').danger(`Failed to upload ${file.name} to 
${this.get('path')}`, error);
-this.send('close');
-return false;
-  });
-}
+uploader.upload(file, {
+  path: this.get('path')
+});
+this.setUploading(file.name);
+uploader.on('progress', (e) => {
+  this.setUploadPercent(e.percent);
+});
+uploader.on('didUpload', (e) => {
+  this.set('uploader');
+  this.send('close');
+  this.sendAction('refreshAction');
+});
+uploader.on('didError', (jqXHR, textStatus, errorThrown) => {
+  var error = Ember.$.parseJSON(jqXHR.responseText);
+  this.set('uploader');
+  this.get('logger').danger(`Failed to upload ${file.name} to 
${this.get('path')}`, error);
+  this.send('close');
+  return false;
+});
   }, (error) => {
 console.error("Cannot add a directory.", error);
 this.send('close');



[31/50] [abbrv] ambari git commit: AMBARI-22458 - SNMP Trap should contain sysuptime field filled (unit test fixes) (jonathanhurley)

2017-11-30 Thread ncole
AMBARI-22458 - SNMP Trap should contain sysuptime field filled (unit test 
fixes) (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: aa652afe18c26ebbb52ffa1d8ecfad4270a093d7
Parents: 82af6fb
Author: Jonathan Hurley 
Authored: Tue Nov 28 12:23:31 2017 -0500
Committer: Jonathan Hurley 
Committed: Tue Nov 28 12:31:13 2017 -0500

--
 .../dispatchers/AmbariSNMPDispatcherTest.java   | 23 +
 .../AlertNoticeDispatchServiceTest.java | 53 +---
 2 files changed, 59 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/aa652afe/ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcherTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcherTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcherTest.java
index 0b299f6..14b6216 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcherTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcherTest.java
@@ -21,11 +21,11 @@ package org.apache.ambari.server.notifications.dispatchers;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.any;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
@@ -36,6 +36,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.ambari.server.notifications.DispatchCallback;
@@ -90,7 +91,7 @@ public class AmbariSNMPDispatcherTest {
 AmbariSNMPDispatcher.SnmpVersion snmpVersion = 
AmbariSNMPDispatcher.SnmpVersion.SNMPv1;
 Notification notification = mock(AlertNotification.class);
 notification.Callback = mock(DispatchCallback.class);
-notification.CallbackIds = new ArrayList<>();
+notification.CallbackIds = mock(List.class);
 Map properties = new HashMap<>();
 properties.put(AmbariSNMPDispatcher.PORT_PROPERTY, "3");
 properties.put(AmbariSNMPDispatcher.COMMUNITY_PROPERTY, "4");
@@ -109,7 +110,7 @@ public class AmbariSNMPDispatcherTest {
 AmbariSNMPDispatcher dispatcher = new 
AmbariSNMPDispatcher(DEFAULT_SNMP_PORT);
 Notification notification = mock(AlertNotification.class);
 notification.Callback = mock(DispatchCallback.class);
-notification.CallbackIds = new ArrayList<>();
+notification.CallbackIds = mock(List.class);
 notification.DispatchProperties = new HashMap<>();
 dispatcher.dispatch(notification);
 verify(notification.Callback).onFailure(notification.CallbackIds);
@@ -121,7 +122,7 @@ public class AmbariSNMPDispatcherTest {
 AmbariSNMPDispatcher dispatcher = new 
AmbariSNMPDispatcher(DEFAULT_SNMP_PORT);
 Notification notification = getAlertNotification(true);
 notification.Callback = mock(DispatchCallback.class);
-notification.CallbackIds = new ArrayList<>();
+notification.CallbackIds = mock(List.class);
 Map properties = new HashMap<>();
 properties.put(AmbariSNMPDispatcher.PORT_PROPERTY, "3");
 properties.put(AmbariSNMPDispatcher.COMMUNITY_PROPERTY, "4");
@@ -137,7 +138,7 @@ public class AmbariSNMPDispatcherTest {
 AmbariSNMPDispatcher dispatcher = new 
AmbariSNMPDispatcher(DEFAULT_SNMP_PORT);
 Notification notification = getAlertNotification(true);
 notification.Callback = mock(DispatchCallback.class);
-notification.CallbackIds = new ArrayList<>();
+notification.CallbackIds = mock(List.class);
 Map properties = new HashMap<>();
 properties.put(AmbariSNMPDispatcher.PORT_PROPERTY, "3");
 properties.put(AmbariSNMPDispatcher.COMMUNITY_PROPERTY, "4");
@@ -209,7 +210,7 @@ public class AmbariSNMPDispatcherTest {
   

[38/50] [abbrv] ambari git commit: AMBARI-22480. Validate blueprint does not allow lzo enable without setup with license agreement. (mpapirkovskyy)

2017-11-30 Thread ncole
AMBARI-22480. Validate blueprint does not allow lzo enable without setup with 
license agreement. (mpapirkovskyy)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 9bbc0ef720bc91ff39701955984bb9635d811c59
Parents: 41853a1
Author: Myroslav Papirkovskyi 
Authored: Wed Nov 29 16:55:34 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Wed Nov 29 18:30:08 2017 +0200

--
 .../internal/BlueprintResourceProvider.java |  3 +-
 .../ambari/server/topology/Blueprint.java   |  2 +-
 .../ambari/server/topology/BlueprintImpl.java   |  2 +-
 .../server/topology/BlueprintValidator.java |  2 +-
 .../server/topology/BlueprintValidatorImpl.java | 21 +-
 .../server/topology/BlueprintImplTest.java  | 69 ++--
 .../topology/BlueprintValidatorImplTest.java| 10 ++-
 7 files changed, 95 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9bbc0ef7/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
index 67f5448..8f4d62e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
@@ -56,6 +56,7 @@ import org.apache.ambari.server.state.SecurityType;
 import org.apache.ambari.server.state.StackInfo;
 import org.apache.ambari.server.topology.Blueprint;
 import org.apache.ambari.server.topology.BlueprintFactory;
+import org.apache.ambari.server.topology.GPLLicenseNotAcceptedException;
 import org.apache.ambari.server.topology.InvalidTopologyException;
 import org.apache.ambari.server.topology.SecurityConfiguration;
 import org.apache.ambari.server.topology.SecurityConfigurationFactory;
@@ -519,7 +520,7 @@ public class BlueprintResourceProvider extends 
AbstractControllerResourceProvide
 
 try {
   blueprint.validateRequiredProperties();
-} catch (InvalidTopologyException e) {
+} catch (InvalidTopologyException | GPLLicenseNotAcceptedException e) {
   throw new IllegalArgumentException("Blueprint configuration 
validation failed: " + e.getMessage(), e);
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9bbc0ef7/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java
index 779a02d..6ed38f8 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java
@@ -152,7 +152,7 @@ public interface Blueprint {
*
* @throws InvalidTopologyException if the blueprint doesn't contain all 
required properties
*/
-  void validateRequiredProperties() throws InvalidTopologyException;
+  void validateRequiredProperties() throws InvalidTopologyException, 
GPLLicenseNotAcceptedException;
 
   /**
*

http://git-wip-us.apache.org/repos/asf/ambari/blob/9bbc0ef7/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
index 8c83ed6..6801e33 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
@@ -353,7 +353,7 @@ public class BlueprintImpl implements Blueprint {
* @throws InvalidTopologyException if the blueprint configuration is invalid
*/
   @Override
-  public void validateRequiredProperties() throws InvalidTopologyException {
+  public void validateRequiredProperties() throws InvalidTopologyException, 
GPLLicenseNotAcceptedException {
 validator.validateRequiredProperties();
   }
 


[13/50] [abbrv] ambari git commit: AMBARI-22510. Handle new error type from Stack Advisor (akovalenko)

2017-11-30 Thread ncole
AMBARI-22510. Handle new error type from Stack Advisor (akovalenko)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: c5fe6cb96a6530d0fc44c4ffced2ec46db97233b
Parents: 0249073
Author: Aleksandr Kovalenko 
Authored: Fri Nov 24 11:37:07 2017 +0200
Committer: Aleksandr Kovalenko 
Committed: Fri Nov 24 17:59:19 2017 +0200

--
 ambari-web/app/messages.js  |   5 +-
 ambari-web/app/mixins/common/serverValidator.js |  41 +---
 ambari-web/app/styles/application.less  |   3 +-
 .../config_recommendation_popup.hbs | 102 +--
 .../config_validation_popup.js  |   7 +-
 .../test/mixins/common/serverValidator_test.js  |  15 +--
 6 files changed, 112 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c5fe6cb9/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 390f803..b294877 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -359,6 +359,7 @@ Em.I18n.translations = {
   'common.rolling.downgrade': 'Rolling Downgrade',
   'common.express.downgrade': 'Express Downgrade',
   'common.views': 'Views',
+  'common.critical.error': 'Critical',
 
   'models.alert_instance.tiggered.verbose': "Occurred on {0}  Checked on 
{1}",
   'models.alert_definition.triggered.verbose': "Occurred on {0}",
@@ -951,8 +952,8 @@ Em.I18n.translations = {
   'installer.step7.popup.validation.failed.body': 'Some services are not 
properly configured. You have to change the highlighted configs according to 
the recommended values.',
   'installer.step7.popup.validation.request.failed.body': 'The configuration 
changes could not be validated for consistency due to an unknown error.  Your 
changes have not been saved yet.  Would you like to proceed and save the 
changes?',
   'installer.step7.popup.validation.warning.header': 'Configurations',
-  'installer.step7.popup.validation.warning.body': 'Some service 
configurations are not configured properly. We recommend you review and change 
the highlighted configuration values. Are you sure you want to proceed without 
correcting configurations?',
-  'installer.step7.popup.validation.error.body': 'Service configurations 
resulted in validation errors. Please address them before proceeding.',
+  'installer.step7.popup.validation.issues.body': 'The following configuration 
changes are highly recommended, but can be skipped.',
+  'installer.step7.popup.validation.criticalIssues.body': 'You must correct 
the following critical issues before proceeding:',
   'installer.step7.popup.oozie.derby.warning': 'Derby is not recommended for 
production use. With Derby, Oozie Server HA and concurrent connection support 
will not be available.',
   'installer.step7.oozie.database.new': 'New Derby Database',
   'installer.step7.hive.database.new.mysql': 'New MySQL Database',

http://git-wip-us.apache.org/repos/asf/ambari/blob/c5fe6cb9/ambari-web/app/mixins/common/serverValidator.js
--
diff --git a/ambari-web/app/mixins/common/serverValidator.js 
b/ambari-web/app/mixins/common/serverValidator.js
index 319c281..65f43b7 100644
--- a/ambari-web/app/mixins/common/serverValidator.js
+++ b/ambari-web/app/mixins/common/serverValidator.js
@@ -57,7 +57,10 @@ App.ServerValidatorMixin = Em.Mixin.create({
*
* @type {Object[]}
*/
-  configErrorList: [],
+  configErrorList: Em.Object.create({
+issues: [],
+criticalIssues: []
+  }),
 
   /**
* Map with allowed error types
@@ -65,6 +68,7 @@ App.ServerValidatorMixin = Em.Mixin.create({
* @type {Object}
*/
   errorTypes: {
+CRITICAL_ERROR: 'NOT_APPLICABLE',
 ERROR: 'ERROR',
 WARN: 'WARN',
 GENERAL: 'GENERAL'
@@ -113,10 +117,13 @@ App.ServerValidatorMixin = Em.Mixin.create({
   self = this,
   primary = function() { deferred.resolve(); },
   secondary = function() { deferred.reject('invalid_configs'); };
-this.set('configErrorList', []);
+this.set('configErrorList', Em.Object.create({
+  issues: [],
+  criticalIssues: []
+}));
 
 this.runServerSideValidation().done(function() {
-  if (self.get('configErrorList.length')) {
+  if (self.get('configErrorList.issues.length') || 
self.get('configErrorList.criticalIssues.length')) {
 App.showConfigValidationPopup(self.get('configErrorList'), primary, 
secondary);
   } else {

[12/50] [abbrv] ambari git commit: AMBARI-22513 Make yumrpm.py functions to use global defined commands (dgrinenko)

2017-11-30 Thread ncole
AMBARI-22513 Make yumrpm.py functions to use global defined commands (dgrinenko)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 0249073469de5cd11f032705d609f8cb19ff28c0
Parents: 99b19e5
Author: Dmytro Grinenko 
Authored: Fri Nov 24 16:41:12 2017 +0200
Committer: Dmytro Grinenko 
Committed: Fri Nov 24 16:41:12 2017 +0200

--
 .../core/providers/package/yumrpm.py|  4 ++--
 .../HIVE/0.12.0.2.0/package/scripts/hive.py | 12 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/02490734/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 8426479..367e2af 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
@@ -138,7 +138,7 @@ class YumProvider(RPMBasedPackageProvider):
 :rtype list[list,]
 """
 
-cmd = [AMBARI_SUDO_BINARY, "yum", "list", "available"]
+cmd = list(ALL_AVAILABLE_PACKAGES_CMD)
 
 if repo_filter:
   cmd.extend(["--disablerepo=*", "--enablerepo=" + repo_filter])
@@ -154,7 +154,7 @@ class YumProvider(RPMBasedPackageProvider):
 :rtype list[list,]
 """
 
-packages = self._lookup_packages([AMBARI_SUDO_BINARY, "yum", "list", 
"installed"], "Installed Packages")
+packages = self._lookup_packages(list(ALL_INSTALLED_PACKAGES_CMD), 
"Installed Packages")
 if repo_filter:
   packages = [item for item in packages if item[2].lower() == 
repo_filter.lower()]
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/02490734/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
index 716a37c..d9cc55f 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
@@ -24,7 +24,7 @@ from urlparse import urlparse
 
 from resource_management.libraries.script.script import Script
 from resource_management.libraries.resources.hdfs_resource import HdfsResource
-from resource_management.libraries.functions.copy_tarball import copy_to_hdfs
+from resource_management.libraries.functions import copy_tarball
 from resource_management.libraries.functions.get_config import get_config
 from resource_management.libraries.functions import StackFeature
 from resource_management.libraries.functions.stack_features import 
check_stack_feature
@@ -177,19 +177,19 @@ def setup_hiveserver2():
   # *
   #  if copy tarball to HDFS feature  supported copy mapreduce.tar.gz and 
tez.tar.gz to HDFS
   if params.stack_version_formatted_major and 
check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, 
params.stack_version_formatted_major):
-copy_to_hdfs("mapreduce", params.user_group, params.hdfs_user, 
skip=params.sysprep_skip_copy_tarballs_hdfs)
-copy_to_hdfs("tez", params.user_group, params.hdfs_user, 
skip=params.sysprep_skip_copy_tarballs_hdfs)
+copy_tarball.copy_to_hdfs("mapreduce", params.user_group, 
params.hdfs_user, skip=params.sysprep_skip_copy_tarballs_hdfs)
+copy_tarball.copy_to_hdfs("tez", params.user_group, params.hdfs_user, 
skip=params.sysprep_skip_copy_tarballs_hdfs)
 
   # Always copy pig.tar.gz and hive.tar.gz using the appropriate mode.
   # This can use a different source and dest location to account
-  copy_to_hdfs("pig",
+  copy_tarball.copy_to_hdfs("pig",
params.user_group,
params.hdfs_user,
file_mode=params.tarballs_mode,
custom_source_file=params.pig_tar_source,
custom_dest_file=params.pig_tar_dest_file,
skip=params.sysprep_skip_copy_tarballs_hdfs)
-  copy_to_hdfs("hive",
+  copy_tarball.copy_to_hdfs("hive",
params.user_group,
params.hdfs_user,
file_mode=params.tarballs_mode,
@@ -210,7 +210,7 @@ def 

[45/50] [abbrv] ambari git commit: AMBARI-22554. UI should pass repo_name for repository validation (vsubramanian)

2017-11-30 Thread ncole
AMBARI-22554. UI should pass repo_name for repository validation (vsubramanian)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: ca174fb32a0e34582776b0607b6a2d14dc72c20d
Parents: 323ce7a
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 29 16:22:20 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 29 16:22:20 2017 -0800

--
 .../main/resources/ui/admin-web/app/scripts/services/Stack.js   | 3 ++-
 ambari-web/app/controllers/installer.js | 5 -
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ca174fb3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index 90f4f48..f52e687 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -405,7 +405,8 @@ angular.module('ambariAdminConsole')
   $http.post(url + '/operating_systems/' + 
os.OperatingSystems.os_type + '/repositories/' + repo.Repositories.repo_id + 
'?validate_only=true',
 {
   "Repositories": {
-"base_url": repo.Repositories.base_url
+"base_url": repo.Repositories.base_url,
+"repo_name": repo.Repositories.repo_name
   }
 },
 {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ca174fb3/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index d6be78d..f49fc11 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -315,7 +315,9 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
   App.Repository.find().findProperty('id', repo.id).set('baseUrl', 
repo.base_url);
 });
 _oses.forEach(function (os) {
-  App.OperatingSystem.find().findProperty('id', os.id).set('isSelected', 
os.is_selected);
+  if (App.OperatingSystem.find().findProperty('id', os.id)) {
+App.OperatingSystem.find().findProperty('id', os.id).set('isSelected', 
os.is_selected);
+  }
 });
 //should delete the record on going to step 2, on going back to step 1, 
still need the record
 if (App.router.get('currentState.name') != "step1") {
@@ -863,6 +865,7 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
   data: {
 'Repositories': {
   'base_url': repo.get('baseUrl'),
+  'repo_name': repo.get('repoName'),
   "verify_base_url": verifyBaseUrl
 }
   }



[22/50] [abbrv] ambari git commit: AMBARI-22529. PERF stack fixes (aonishuk)

2017-11-30 Thread ncole
AMBARI-22529. PERF stack fixes (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 530f1d5e34eb5eb5e3e509bd9934a590bed64ac9
Parents: b832f70
Author: Andrew Onishuk 
Authored: Tue Nov 28 15:30:10 2017 +0200
Committer: Andrew Onishuk 
Committed: Tue Nov 28 15:30:10 2017 +0200

--
 .../main/java/org/apache/ambari/server/state/ServiceInfo.java | 2 +-
 .../stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py  | 7 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/530f1d5e/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java
index f1c63bf..c0342eb 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java
@@ -87,7 +87,7 @@ public class ServiceInfo implements Validable{
 JAVA
   }
   @XmlElement(name="service_advisor_type")
-  private ServiceAdvisorType serviceAdvisorType = null;
+  private ServiceAdvisorType serviceAdvisorType = ServiceAdvisorType.PYTHON;
 
   @XmlTransient
   private List properties;

http://git-wip-us.apache.org/repos/asf/ambari/blob/530f1d5e/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
index 833fdbc..513b994 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
@@ -23,6 +23,7 @@ from resource_management.core.resources.system import 
Directory, File, Execute
 from resource_management.libraries.script import Hook
 
 AMBARI_AGENT_CACHE_DIR = 'AMBARI_AGENT_CACHE_DIR'
+DEFAULT_AMBARI_AGENT_CACHE_DIR = '/var/lib/ambari-agent/cache/'
 
 BEFORE_INSTALL_SCRIPTS = "hooks/before-INSTALL/scripts"
 STACK = "PERF/1.0"
@@ -38,6 +39,12 @@ class BeforeInstallHook(Hook):
 self.run_custom_hook('before-ANY')
 print "Before Install Hook"
 cache_dir = self.extrakt_var_from_pythonpath(AMBARI_AGENT_CACHE_DIR)
+
+# this happens if PythonExecutor.py.sed hack was not done.
+if not cache_dir:
+  print "WARN: Cache dir for the agent could not be detected. Using 
default cache dir"
+  cache_dir = DEFAULT_AMBARI_AGENT_CACHE_DIR
+
 conf_select = os.path.join(cache_dir, CONF_SELECT_PY)
 dist_select = os.path.join(cache_dir, DISTRO_SELECT_PY)
 try:



[16/50] [abbrv] ambari git commit: AMBARI-22519 Admin View: add ability to change roles. (atkach)

2017-11-30 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/32e25b80/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/userEdit.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/userEdit.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/userEdit.html
index 0372a11..cc46173 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/userEdit.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/userEdit.html
@@ -16,13 +16,13 @@
 * limitations under the License.
 -->
 
-
+
   
 
-  {{'common.users' | translate}}
+  {{'common.users' | 
translate}}
   {{user.user_name}}
 
-
+
   
 {{'common.delete' | translate: '{term: 
constants.user}'}}
 {{'common.delete' | translate: '{term: 
constants.user}'}}
@@ -32,25 +32,25 @@
   
   
 
-  {{'common.type' | 
translate}}
+  {{'common.type' | translate}}
   
-{{user.userTypeName}}
+{{user.userTypeName}}
   
 
 
-  {{'users.status' | 
translate}}
+  {{'users.status' | translate}}
   
 
   
 
 
-   {{'users.ambariAdmin' | translate}}
+   
{{'users.ambariAdmin' | translate}}
   
 
   
 
 
-  {{'users.password' 
| translate}}
+  {{'users.password' | translate}}
   
 
   {{'users.changePassword' | translate}}
@@ -60,14 +60,32 @@
   
 
 
-  {{getUserMembership(user.user_type)}}
+  {{getUserMembership(user.user_type)}}
   
 
   
-
 
+
+
+  
+{{'users.role' | translate}}
+
+  
+  
+
+
+{{user.roles[0].permission_label}}
+  
+
+
 
-  {{'common.privileges' | 
translate}}
+  {{'common.privileges' | translate}}
   
 
   
@@ -77,7 +95,7 @@
 
   
   
-
+
   
  
 {{name}}
@@ -97,7 +115,7 @@
 
   
   
-
+
   
 
 {{name}}
@@ -106,7 +124,7 @@
 {{item | translate}}{{$last ? '' : ', 
'}}
   
   
-
+
   
 
 
@@ -114,7 +132,7 @@
 
   
 
-{{'common.alerts.noPrivilegesDescription' | translate: '{term: 
constants.user}'}}
+{{'common.alerts.noPrivilegesDescription' | translate: '{term: 
constants.user}'}}
 {{'users.userIsAdmin' | translate}}
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/32e25b80/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/usersList.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/usersList.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/usersList.html
index cc4789b..4a33a31 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/usersList.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/usersList.html
@@ -78,7 +78,7 @@
   {{user.Users.user_name}}
 
 
-  {{user.Users.role}}
+  {{user.Users.roles[0].permission_label}}
 
 
   



[10/50] [abbrv] ambari git commit: AMBARI-22508 Ambari 3.0: Implement new design for Admin View: User Management. (atkach)

2017-11-30 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/99b19e58/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/userManagement/UsersListCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/userManagement/UsersListCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/userManagement/UsersListCtrl.js
new file mode 100644
index 000..abe1780
--- /dev/null
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/userManagement/UsersListCtrl.js
@@ -0,0 +1,178 @@
+/**
+ * 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('UsersListCtrl',
+['$scope', 'User', '$modal', '$rootScope', 'UserConstants', '$translate', 
'Cluster', 'View', 'ConfirmationModal', 'Settings',
+function($scope, User, $modal, $rootScope, UserConstants, $translate, Cluster, 
View, ConfirmationModal, Settings) {
+  var $t = $translate.instant;
+  $scope.constants = {
+admin: $t('users.ambariAdmin'),
+users: $t('common.users').toLowerCase()
+  };
+  $scope.minRowsToShowPagination = Settings.minRowsToShowPagination;
+  $scope.isLoading = false;
+  $scope.users = [];
+  $scope.usersPerPage = 10;
+  $scope.currentPage = 1;
+  $scope.totalUsers = 0;
+  $scope.filters = {
+name: '',
+status: null,
+type: null
+  };
+  $scope.maxVisiblePages = 20;
+  $scope.tableInfo = {
+total: 0,
+showed: 0
+  };
+  $scope.isNotEmptyFilter = true;
+
+  $scope.pageChanged = function() {
+$scope.loadUsers();
+  };
+  $scope.usersPerPageChanges = function() {
+$scope.resetPagination();
+  };
+
+  $scope.loadUsers = function(){
+$scope.isLoading = true;
+User.list({
+  currentPage: $scope.currentPage,
+  usersPerPage: $scope.usersPerPage,
+  searchString: $scope.filters.name,
+  user_type: $scope.filters.type.value,
+  active: $scope.filters.status.value
+}).then(function(data) {
+  $scope.isLoading = false;
+  $scope.totalUsers = data.data.itemTotal;
+  $scope.users = data.data.items.map(User.makeUser);
+  $scope.tableInfo.showed = data.data.items.length;
+  $scope.tableInfo.total = data.data.itemTotal;
+});
+  };
+
+  $scope.resetPagination = function() {
+$scope.currentPage = 1;
+$scope.loadUsers();
+  };
+
+  $scope.activeFilterOptions = [
+{label: $t('common.all'), value: '*'},
+{label: $t('users.active'), value: true},
+{label: $t('users.inactive'), value:false}
+  ];
+  $scope.filters.status = $scope.activeFilterOptions[0];
+
+  $scope.typeFilterOptions = [{ label: $t('common.all'), value: '*'}]
+.concat(Object.keys(UserConstants.TYPES).map(function(key) {
+  return {
+label: $t(UserConstants.TYPES[key].LABEL_KEY),
+value: UserConstants.TYPES[key].VALUE
+  };
+}));
+
+  $scope.filters.type = $scope.typeFilterOptions[0];
+
+  $scope.clearFilters = function () {
+$scope.filters.name = '';
+$scope.filters.type = $scope.typeFilterOptions[0];
+$scope.filters.status = $scope.activeFilterOptions[0];
+$scope.resetPagination();
+  };
+
+  $scope.loadUsers();
+
+  $scope.$watch(
+function (scope) {
+  return Boolean(scope.filters.name || (scope.filters.status && 
scope.filters.status.value !== '*')
+|| (scope.filters.type && scope.filters.type.value !== '*'));
+},
+function (newValue, oldValue, scope) {
+  scope.isNotEmptyFilter = newValue;
+}
+  );
+
+  $rootScope.$watch(function(scope) {
+return scope.LDAPSynced;
+  }, function(LDAPSynced) {
+if(LDAPSynced === true){
+  $rootScope.LDAPSynced = false;
+  $scope.loadUsers();
+}
+  });
+
+  $scope.createUser = function () {
+var modalInstance = $modal.open({
+  templateUrl: 'views/userManagement/modals/userCreate.html',
+  controller: 'UserCreateCtrl',
+  backdrop: 'static'
+});
+
+modalInstance.result.finally($scope.loadUsers);
+  };
+
+  $scope.deleteUser = function(user) {
+ConfirmationModal.show(
+  $t('common.delete', {
+term: $t('common.user')
+  }),
+  

[19/50] [abbrv] ambari git commit: AMBARI-22521. Log Search: Adding new dynamic field for service logs (oleewere)

2017-11-30 Thread ncole
AMBARI-22521. Log Search: Adding new dynamic field for service logs (oleewere)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 74bc7401cdeeec5fed8f0ba28f68d4e05d83af62
Parents: 1d9985c
Author: Oliver Szabo 
Authored: Mon Nov 27 17:40:04 2017 +0100
Committer: Oliver Szabo 
Committed: Mon Nov 27 18:06:16 2017 +0100

--
 .../configsets/hadoop_logs/conf/managed-schema |  2 ++
 .../ambari/logsearch/solr/SolrConstants.java   |  1 +
 .../logsearch/solr/model/SolrServiceLogData.java   | 17 +
 3 files changed, 20 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/74bc7401/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/managed-schema
--
diff --git 
a/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/managed-schema
 
b/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/managed-schema
index c6f498b..93b2d6b 100644
--- 
a/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/managed-schema
+++ 
b/ambari-logsearch/ambari-logsearch-server/src/main/configsets/hadoop_logs/conf/managed-schema
@@ -115,6 +115,8 @@
   
   
   
+  
+
   
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/74bc7401/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/SolrConstants.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/SolrConstants.java
 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/SolrConstants.java
index 60fc1a3..6554bcf 100644
--- 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/SolrConstants.java
+++ 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/SolrConstants.java
@@ -66,6 +66,7 @@ public class SolrConstants {
 public static final String STORED_TOKEN_DYNAMIC_FIELDS = "std_*";
 public static final String KEY_DYNAMIC_FIELDS = "key_*";
 public static final String WS_DYNAMIC_FIELDS = "ws_*";
+public static final String SDI_DYNAMIC_FIELDS = "sdi_*";
   }
 
   public class AuditLogConstants {

http://git-wip-us.apache.org/repos/asf/ambari/blob/74bc7401/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/model/SolrServiceLogData.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/model/SolrServiceLogData.java
 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/model/SolrServiceLogData.java
index c6fdba3..224ed8c 100644
--- 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/model/SolrServiceLogData.java
+++ 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/solr/model/SolrServiceLogData.java
@@ -22,6 +22,7 @@ import 
org.apache.ambari.logsearch.model.response.ServiceLogData;
 import org.apache.solr.client.solrj.beans.Field;
 
 import java.util.Date;
+import java.util.Map;
 
 import static 
org.apache.ambari.logsearch.solr.SolrConstants.ServiceLogConstants.*;
 
@@ -48,6 +49,9 @@ public class SolrServiceLogData extends SolrCommonLogData 
implements ServiceLogD
   @Field(HOST)
   private String host;
 
+  @Field(SDI_DYNAMIC_FIELDS)
+  private Map sdiDynamicFields;
+
   @Override
   public String getPath() {
 return path;
@@ -117,4 +121,17 @@ public class SolrServiceLogData extends SolrCommonLogData 
implements ServiceLogD
   public void setLevel(String level) {
 this.level = level;
   }
+
+  public void setSdiDynamicFields(Map sdiDynamicFields) {
+this.sdiDynamicFields = sdiDynamicFields;
+  }
+
+  @Override
+  public Map getAllDynamicFields() {
+Map dynamicFieldsMap = super.getAllDynamicFields();
+if (sdiDynamicFields != null) {
+  dynamicFieldsMap.putAll(sdiDynamicFields);
+}
+return dynamicFieldsMap;
+  }
 }



[17/50] [abbrv] ambari git commit: AMBARI-22519 Admin View: add ability to change roles. (atkach)

2017-11-30 Thread ncole
AMBARI-22519 Admin View: add ability to change roles. (atkach)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 32e25b80c43158bd7114f11825eaa590c9b7e8b0
Parents: 3dca560
Author: Andrii Tkach 
Authored: Mon Nov 27 14:18:59 2017 +0200
Committer: Andrii Tkach 
Committed: Mon Nov 27 15:41:01 2017 +0200

--
 .../main/resources/ui/admin-web/app/index.html  |   1 -
 .../userManagement/GroupCreateCtrl.js   |  32 +-
 .../controllers/userManagement/GroupEditCtrl.js | 162 +++---
 .../userManagement/GroupsListCtrl.js|  17 +-
 .../userManagement/UserCreateCtrl.js|  25 +-
 .../controllers/userManagement/UserEditCtrl.js  | 304 ---
 .../userManagement/UserManagementCtrl.js|   4 +-
 .../controllers/userManagement/UsersListCtrl.js |  69 +++--
 .../ui/admin-web/app/scripts/i18n.config.js |   6 +-
 .../admin-web/app/scripts/services/Cluster.js   |  90 +++---
 .../ui/admin-web/app/scripts/services/Group.js  | 144 -
 .../app/scripts/services/GroupConstants.js  |  38 ---
 .../app/scripts/services/RoleDetailsModal.js|   5 +-
 .../ui/admin-web/app/scripts/services/User.js   |  17 +-
 .../resources/ui/admin-web/app/styles/main.css  |   5 -
 .../ui/admin-web/app/styles/user-management.css |  13 +
 .../app/views/remoteClusters/list.html  |   5 +-
 .../admin-web/app/views/stackVersions/list.html |   7 +-
 .../app/views/userManagement/groupEdit.html | 149 +
 .../app/views/userManagement/main.html  |   4 +-
 .../userManagement/modals/groupCreate.html  |   8 +-
 .../views/userManagement/modals/userCreate.html |  10 +-
 .../app/views/userManagement/userEdit.html  |  48 ++-
 .../app/views/userManagement/usersList.html |   2 +-
 24 files changed, 647 insertions(+), 518 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/32e25b80/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 e3b817e..bf033e6 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
@@ -153,7 +153,6 @@
 
 
 
-
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/32e25b80/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/userManagement/GroupCreateCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/userManagement/GroupCreateCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/userManagement/GroupCreateCtrl.js
index 94a2c9f..a34033b 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/userManagement/GroupCreateCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/userManagement/GroupCreateCtrl.js
@@ -19,8 +19,8 @@
 
 angular.module('ambariAdminConsole')
 .controller('GroupCreateCtrl',
-['$scope', '$rootScope', 'Group', '$location', 'Alert', 'UnsavedDialog', 
'$translate', '$modalInstance', 'Cluster',
-function($scope, $rootScope, Group, $location, Alert, UnsavedDialog, 
$translate, $modalInstance, Cluster) {
+['$scope', '$rootScope', 'Group', '$location', 'Alert', 'UnsavedDialog', 
'$translate', '$modalInstance', 'Cluster', 'RoleDetailsModal',
+function($scope, $rootScope, Group, $location, Alert, UnsavedDialog, 
$translate, $modalInstance, Cluster, RoleDetailsModal) {
   var $t = $translate.instant;
 
   $scope.form = {};
@@ -33,10 +33,8 @@ function($scope, $rootScope, Group, $location, Alert, 
UnsavedDialog, $translate,
 
 
   function loadRoles() {
-Cluster.getPermissions().then(function(data) {
-  $scope.roleOptions = data.map(function(item) {
-return item.PermissionInfo;
-  });
+return Cluster.getRoleOptions().then(function (data) {
+  $scope.roleOptions = data;
 });
   }
 
@@ -60,6 +58,9 @@ function($scope, $rootScope, Group, $location, Alert, 
UnsavedDialog, $translate,
   }
 
   function saveMembers(group, members) {
+if (!members.length) {
+  return;
+}
 group.members = members.filter(function(item) {
   return item.trim();
 }).map(function(item) {
@@ -70,6 +71,12 @@ function($scope, $rootScope, Group, $location, Alert, 
UnsavedDialog, $translate,
 });
   }
 
+  $scope.showHelpPage = function() {
+

[24/50] [abbrv] ambari git commit: AMBARI-22514. Initial implementation of Schedulable document deletion & archiving for Infra Solr (Krisztian Kasa via oleewere)

2017-11-30 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/393fdb80/ambari-infra/ambari-infra-manager/src/test/java/org/apache/ambari/infra/job/archive/SolrQueryBuilderTest.java
--
diff --git 
a/ambari-infra/ambari-infra-manager/src/test/java/org/apache/ambari/infra/job/archive/SolrQueryBuilderTest.java
 
b/ambari-infra/ambari-infra-manager/src/test/java/org/apache/ambari/infra/job/archive/SolrQueryBuilderTest.java
new file mode 100644
index 000..4d5ebf1
--- /dev/null
+++ 
b/ambari-infra/ambari-infra-manager/src/test/java/org/apache/ambari/infra/job/archive/SolrQueryBuilderTest.java
@@ -0,0 +1,113 @@
+/*
+ * 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.infra.job.archive;
+
+import org.apache.solr.client.solrj.SolrQuery;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.regex.Matcher;
+
+import static 
org.apache.ambari.infra.job.archive.SolrQueryBuilder.PARAMETER_PATTERN;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.Matchers.hasSize;
+import static org.junit.Assert.assertThat;
+
+public class SolrQueryBuilderTest {
+  private static final Document DOCUMENT = new Document(new HashMap() {{
+put("logtime", "2017-10-02'T'10:00:11.634Z");
+put("id", "1");
+  }});
+
+  @Test
+  public void testDefaultQuery() throws Exception {
+SolrQuery solrQuery = new SolrQueryBuilder()
+.build();
+assertThat(solrQuery.getQuery(), is("*:*"));
+  }
+
+  @Test
+  public void testSetQuery() throws Exception {
+SolrQuery solrQuery = new SolrQueryBuilder()
+.setQueryText("logtime:[* TO \"${end}\"]")
+.setEndValue("2017-11-27'T'10:12:11.372Z")
+.build();
+assertThat(solrQuery.getQuery(), is("logtime:[* TO 
\"2017-11-27'T'10:12:11.372Z\"]"));
+  }
+
+  @Test
+  public void testSetFilterQuery() throws Exception {
+SolrQuery solrQuery = new SolrQueryBuilder()
+.setFilterQueryText("(logtime:\"${logtime}\" AND id:{\"${id}\" TO 
*]) OR logtime:{\"${logtime}\" TO \"${end}\"]")
+.setDocument(DOCUMENT)
+.setEndValue("2017-11-27'T'10:12:11.372Z")
+.build();
+assertThat(solrQuery.getFilterQueries()[0], 
is("(logtime:\"2017-10-02'T'10:00:11.634Z\" AND id:{\"1\" TO *]) OR 
logtime:{\"2017-10-02'T'10:00:11.634Z\" TO \"2017-11-27'T'10:12:11.372Z\"]"));
+  }
+
+  @Test
+  public void testSetFilterQueryWhenDocumentIsNull() throws Exception {
+SolrQuery solrQuery = new SolrQueryBuilder()
+.setFilterQueryText("(logtime:\"${logtime}\" AND id:{\"${id}\" TO 
*]) OR logtime:{\"${logtime}\" TO \"${end}\"]")
+.setEndValue("2017-11-27'T'10:12:11.372Z")
+.build();
+assertThat(solrQuery.getFilterQueries(), is(nullValue()));
+  }
+
+  @Test
+  public void testSetFilterQueryWhenEndValueIsNull() throws Exception {
+SolrQuery solrQuery = new SolrQueryBuilder()
+.setFilterQueryText("logtime:\"${logtime}\" AND id:{\"${id}\" TO 
*]")
+.setDocument(DOCUMENT)
+.build();
+assertThat(solrQuery.getFilterQueries()[0], 
is("logtime:\"2017-10-02'T'10:00:11.634Z\" AND id:{\"1\" TO *]"));
+  }
+
+  @Test
+  public void testSetFilterQueryWhenQueryFilterIsNullButDocumentIsNot() throws 
Exception {
+SolrQuery solrQuery = new SolrQueryBuilder()
+.setDocument(DOCUMENT)
+.build();
+assertThat(solrQuery.getFilterQueries(), is(nullValue()));
+  }
+
+  @Test
+  public void testRegex() throws Exception {
+Matcher matcher = PARAMETER_PATTERN.matcher("(logtime:\"${logtime}\" AND 
id:{\"${id}\" TO *]) OR logtime:{\"${logtime}\" TO \"${end}\"]");
+List parameters = new ArrayList<>();
+while (matcher.find())
+  parameters.add(matcher.group());
+
+assertThat(parameters, hasSize(4));
+assertThat(parameters.get(0), is("${logtime}"));
+assertThat(parameters.get(1), is("${id}"));
+assertThat(parameters.get(2), is("${logtime}"));
+assertThat(parameters.get(3), is("${end}"));
+  }
+
+  @Test
+  public void 

[29/50] [abbrv] ambari git commit: AMBARI-22523. Service config changes on hdp + hdf cluster throws Consistency check failed. (mpapirkovskyy)

2017-11-30 Thread ncole
AMBARI-22523. Service config changes on hdp + hdf cluster throws Consistency 
check failed. (mpapirkovskyy)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 020e15281e6466ae436d228dcc7428c86560882a
Parents: 73d99d8
Author: Myroslav Papirkovskyi 
Authored: Mon Nov 20 17:19:12 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Tue Nov 28 18:31:29 2017 +0200

--
 .../resources/stacks/HDP/2.6/services/stack_advisor.py   |  3 +++
 .../test/python/stacks/2.6/common/test_stack_advisor.py  | 11 +++
 2 files changed, 14 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/020e1528/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index fc12d37..6951282 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -640,6 +640,9 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
 else:
 druid_broker_host_port = "localhost:8083"
 
+druid_metadata_uri = ""
+druid_metadata_user = ""
+druid_metadata_type = ""
 if 'druid-common' in services['configurations']:
 druid_metadata_uri = 
services['configurations']['druid-common']['properties']['druid.metadata.storage.connector.connectURI']
 druid_metadata_type = 
services['configurations']['druid-common']['properties']['druid.metadata.storage.type']

http://git-wip-us.apache.org/repos/asf/ambari/blob/020e1528/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py 
b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
index f4c5508..b112ffb 100644
--- a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
@@ -1949,6 +1949,17 @@ class TestHDP26StackAdvisor(TestCase):
 self.stackAdvisor.recommendHIVEConfigurations(recommendedConfigurations, 
clusterData, services, hosts)
 self.assertEquals(recommendedConfigurations, expected)
 
+# case there are not druid-common configs present
+del services['configurations']['druid-common']
+
expected['hive-interactive-site']['properties']['hive.druid.broker.address.default']
 = 'c6401.ambari.apache.org:8083'
+expected['hive-interactive-site']['properties']['hive.druid.metadata.uri'] 
= ''
+
expected['hive-interactive-site']['properties']['hive.druid.metadata.username'] 
= ''
+
expected['hive-interactive-site']['properties']['hive.druid.metadata.db.type'] 
= ''
+
+recommendedConfigurations = {}
+self.stackAdvisor.recommendHIVEConfigurations(recommendedConfigurations, 
clusterData, services, hosts)
+self.assertEquals(recommendedConfigurations, expected)
+
 
   def test_recommendHBASEConfigurations(self):
 configurations = {



[26/50] [abbrv] ambari git commit: AMBARI-22531 Log Search UI: refine search box. (ababiichuk)

2017-11-30 Thread ncole
AMBARI-22531 Log Search UI: refine search box. (ababiichuk)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 2bf3c8edb26a6f0aac43699483e5ebee89dcc533
Parents: 33ee1a7
Author: ababiichuk 
Authored: Tue Nov 28 16:13:51 2017 +0200
Committer: ababiichuk 
Committed: Tue Nov 28 16:49:30 2017 +0200

--
 .../src/app/classes/filtering.ts|  22 +++-
 .../src/app/classes/models/app-state.ts |   3 +-
 .../classes/queries/audit-logs-query-params.ts  |   3 +-
 .../service-logs-truncated-query-params.ts  |   3 +-
 .../src/app/classes/string.ts   |  25 
 .../filters-panel/filters-panel.component.html  |   8 +-
 .../filters-panel.component.spec.ts |   1 +
 .../filters-panel/filters-panel.component.ts|  99 ---
 .../logs-container.component.html   |   2 +-
 .../logs-container/logs-container.component.ts  |   5 +-
 .../src/app/components/mixins.less  |   2 +-
 .../search-box/search-box.component.html|  24 ++--
 .../search-box/search-box.component.less|  23 ++--
 .../search-box/search-box.component.ts  | 122 ++-
 .../src/app/components/variables.less   |   6 +-
 .../services/component-actions.service.spec.ts  |   4 +-
 .../app/services/component-actions.service.ts   |   2 +-
 .../component-generator.service.spec.ts |   4 +-
 .../app/services/logs-container.service.spec.ts |   4 +-
 .../src/app/services/logs-container.service.ts  |  69 ---
 .../src/app/services/utils.service.ts   |   4 +
 21 files changed, 303 insertions(+), 132 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2bf3c8ed/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts
--
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts
index 2a7205f..d92dd41 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/filtering.ts
@@ -18,9 +18,10 @@
 
 import {Moment, unitOfTime} from 'moment';
 import {ListItem} from '@app/classes/list-item';
+import {TimeRangeType, SortingType} from '@app/classes/string';
 
 export interface TimeUnit {
-  type: 'CURRENT' | 'LAST' | 'PAST';
+  type: TimeRangeType;
   unit: unitOfTime.DurationConstructor;
   interval?: number;
 }
@@ -33,7 +34,7 @@ export interface CustomTimeRange {
 
 export interface SortingConditions {
   key: string;
-  type: 'asc' | 'desc';
+  type: SortingType;
 }
 
 export interface TimeUnitListItem extends ListItem {
@@ -49,4 +50,21 @@ export interface FilterCondition {
   options?: (ListItem | TimeUnitListItem[])[];
   defaultSelection?: ListItem | ListItem[] | number;
   iconClass?: string;
+  fieldName?: string;
+}
+
+export interface SearchBoxParameter {
+  name: string;
+  value: string;
+  isExclude: boolean;
+}
+
+export interface SearchBoxParameterProcessed extends SearchBoxParameter {
+  id: number;
+  label: string;
+}
+
+export interface SearchBoxParameterTriggered {
+  value: string;
+  isExclude: boolean;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/2bf3c8ed/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts
index afed497..c3279ce 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/classes/models/app-state.ts
@@ -17,12 +17,13 @@
  */
 
 import {ActiveServiceLogEntry} from '@app/classes/active-service-log-entry';
+import {LogsType} from '@app/classes/string';
 
 export interface AppState {
   isAuthorized: boolean;
   isInitialLoading: boolean;
   isLoginInProgress: boolean;
-  activeLogsType?: string;
+  activeLogsType?: LogsType;
   isServiceLogsFileView: boolean;
   isServiceLogContextView: boolean;
   activeLog: ActiveServiceLogEntry | null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/2bf3c8ed/ambari-logsearch/ambari-logsearch-web/src/app/classes/queries/audit-logs-query-params.ts
--
diff --git 

[20/50] [abbrv] ambari git commit: AMBARI-22524 : Journal Node start failing when AMS is installed during BP deploy. (avijayan)

2017-11-30 Thread ncole
AMBARI-22524 : Journal Node start failing when AMS is installed during BP 
deploy. (avijayan)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 0b98ccd75c54c147638c7380d59a067afbea8145
Parents: 74bc740
Author: Aravindan Vijayan 
Authored: Mon Nov 27 11:45:40 2017 -0800
Committer: Aravindan Vijayan 
Committed: Mon Nov 27 11:45:40 2017 -0800

--
 .../ambari-metrics-hadoop-sink/pom.xml  |  3 ++-
 .../timeline/HadoopTimelineMetricsSink.java |  6 +++---
 .../timeline/HadoopTimelineMetricsSinkTest.java | 21 ++--
 3 files changed, 16 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0b98ccd7/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml
--
diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml 
b/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml
index 23f9ba9..a9d342f 100644
--- a/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml
+++ b/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml
@@ -31,6 +31,7 @@ limitations under the License.
   jar
   
 
${project.artifactId}-with-common-${project.version}.jar
+3.0.0-beta1
   
 
 
@@ -141,7 +142,7 @@ limitations under the License.
 
   org.apache.hadoop
   hadoop-common
-  2.4.0
+  ${hadoop.version}
   compile
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0b98ccd7/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
--
diff --git 
a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
 
b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
index a290ced..bbc9617 100644
--- 
a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
+++ 
b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
@@ -17,7 +17,8 @@
  */
 package org.apache.hadoop.metrics2.sink.timeline;
 
-import org.apache.commons.configuration.SubsetConfiguration;
+import org.apache.commons.configuration2.SubsetConfiguration;
+import org.apache.commons.configuration2.convert.DefaultListDelimiterHandler;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
@@ -34,7 +35,6 @@ import java.io.IOException;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -143,7 +143,7 @@ public class HadoopTimelineMetricsSink extends 
AbstractTimelineMetricsSink imple
 metricsCache = new TimelineMetricsCache(maxRowCacheSize,
   metricsSendInterval, conf.getBoolean(SKIP_COUNTER_TRANSFROMATION, true));
 
-conf.setListDelimiter(',');
+conf.setListDelimiterHandler(new DefaultListDelimiterHandler(','));
 Iterator it = (Iterator) conf.getKeys();
 while (it.hasNext()) {
   String propertyName = it.next();

http://git-wip-us.apache.org/repos/asf/ambari/blob/0b98ccd7/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
--
diff --git 
a/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
 
b/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
index 30c5c23..6bb6454 100644
--- 
a/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
+++ 
b/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
@@ -19,7 +19,8 @@
 package org.apache.hadoop.metrics2.sink.timeline;
 
 import com.google.gson.Gson;
-import org.apache.commons.configuration.SubsetConfiguration;
+import org.apache.commons.configuration2.SubsetConfiguration;
+import org.apache.commons.configuration2.convert.DefaultListDelimiterHandler;
 import 

[07/50] [abbrv] ambari git commit: AMBARI-21569.Users randomly getting "HDFS020 Could not write file" exceptions while running query from Hive View(Venkata Sairam)

2017-11-30 Thread ncole
AMBARI-21569.Users randomly getting "HDFS020 Could not write file" exceptions 
while running query from Hive View(Venkata Sairam)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 8e36662ae1dffe7cb637b3d1edb38278f0111012
Parents: 5136021
Author: Venkata Sairam 
Authored: Thu Nov 23 15:48:52 2017 +0530
Committer: Venkata Sairam 
Committed: Thu Nov 23 15:48:52 2017 +0530

--
 .../org/apache/ambari/view/utils/hdfs/HdfsApi.java | 16 +++-
 .../apache/ambari/view/utils/hdfs/HdfsUtil.java| 17 -
 2 files changed, 27 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8e36662a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java
--
diff --git 
a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java
 
b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java
index 3db2081..812cd54 100644
--- 
a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java
+++ 
b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java
@@ -485,7 +485,20 @@ public class HdfsApi {
* @throws IOException
* @throws InterruptedException
*/
-  public  T execute(PrivilegedExceptionAction action)
+  public  T execute(PrivilegedExceptionAction action) throws 
IOException, InterruptedException {
+return this.execute(action, false);
+  }
+
+
+  /**
+   * Executes action on HDFS using doAs
+   * @param action strategy object
+   * @param  result type
+   * @return result of operation
+   * @throws IOException
+   * @throws InterruptedException
+   */
+  public  T execute(PrivilegedExceptionAction action, boolean 
alwaysRetry)
   throws IOException, InterruptedException {
 T result = null;
 
@@ -508,6 +521,7 @@ public class HdfsApi {
 }
 LOG.info("HDFS threw 'IOException: Cannot obtain block length' 
exception. " +
 "Retrying... Try #" + (tryNumber + 1));
+LOG.error("Retrying: " + ex.getMessage(),ex);
 Thread.sleep(1000);  //retry after 1 second
   }
 } while (!succeeded);

http://git-wip-us.apache.org/repos/asf/ambari/blob/8e36662a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsUtil.java
--
diff --git 
a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsUtil.java
 
b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsUtil.java
index 0670f1a..810129b 100644
--- 
a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsUtil.java
+++ 
b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsUtil.java
@@ -27,6 +27,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
+import java.security.PrivilegedExceptionAction;
 import java.util.Map;
 
 public class HdfsUtil {
@@ -38,13 +39,19 @@ public class HdfsUtil {
* @param filePath path to file
* @param content new content of file
*/
-  public static void putStringToFile(HdfsApi hdfs, String filePath, String 
content) throws HdfsApiException {
-FSDataOutputStream stream;
+  public static void putStringToFile(final HdfsApi hdfs,final String filePath, 
final String content) throws HdfsApiException {
+
 try {
   synchronized (hdfs) {
-stream = hdfs.create(filePath, true);
-stream.write(content.getBytes());
-stream.close();
+hdfs.execute(new PrivilegedExceptionAction() {
+  @Override
+  public Void run() throws Exception {
+final FSDataOutputStream stream = hdfs.create(filePath, true);
+stream.write(content.getBytes());
+stream.close();
+return null;
+  }
+}, true);
   }
 } catch (IOException e) {
   throw new HdfsApiException("HDFS020 Could not write file " + filePath, 
e);



[02/50] [abbrv] ambari git commit: AMBARI-22499. Ambari server becomes unusable when config properties are misconfigured (adoroszlai)

2017-11-30 Thread ncole
AMBARI-22499. Ambari server becomes unusable when config properties are 
misconfigured (adoroszlai)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 1d4cbc8aca2eddd0294b27755ec5769c66bf6b80
Parents: bce0bd8
Author: Attila Doroszlai 
Authored: Wed Nov 22 13:30:05 2017 +0100
Committer: Doroszlai, Attila 
Committed: Thu Nov 23 00:35:09 2017 +0100

--
 .../ambari/server/state/ConfigHelper.java   | 28 ++--
 .../ambari/server/state/ConfigHelperTest.java   | 47 
 2 files changed, 61 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1d4cbc8a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index eade914..6813fc0 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -1503,22 +1503,22 @@ public class ConfigHelper {
   }
 
   /**
-   * Compares values as double in case they are numbers.
-   * @param actualValue
-   * @param newValue
-   * @return
+   * Checks for equality of parsed numbers if both values are numeric,
+   * otherwise using regular equality.
*/
-  private  boolean valuesAreEqual(String actualValue, String newValue) {
-boolean actualValueIsNumber = NumberUtils.isNumber(actualValue);
-boolean newValueIsNumber = NumberUtils.isNumber(newValue);
-if (actualValueIsNumber && newValueIsNumber) {
-  Double ab = Double.parseDouble(actualValue);
-  Double bb = Double.parseDouble(newValue);
-  return ab.equals(bb);
-} else if (!actualValueIsNumber && !newValueIsNumber) {
-  return actualValue.equals(newValue);
+  static boolean valuesAreEqual(String value1, String value2) { // exposed for 
unit test
+if (NumberUtils.isNumber(value1) && NumberUtils.isNumber(value2)) {
+  try {
+Number number1 = NumberUtils.createNumber(value1);
+Number number2 = NumberUtils.createNumber(value2);
+return Objects.equal(number1, number2) ||
+  number1.doubleValue() == number2.doubleValue();
+  } catch (NumberFormatException e) {
+// fall back to regular equality
+  }
 }
-return false;
+
+return Objects.equal(value1, value2);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/1d4cbc8a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
index 8a0a782..ff0bf59 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
@@ -22,6 +22,8 @@ import static org.easymock.EasyMock.createStrictMock;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.replay;
 import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.sql.SQLException;
 import java.util.ArrayList;
@@ -1212,4 +1214,49 @@ public class ConfigHelperTest {
   verify(mockAmbariMetaInfo, mockStackVersion, mockServiceInfo, 
mockPropertyInfo1, mockPropertyInfo2);
 }
   }
+
+  public static class RunWithoutModules {
+@Test
+public void nullsAreEqual() {
+  assertTrue(ConfigHelper.valuesAreEqual(null, null));
+}
+
+@Test
+public void equalStringsAreEqual() {
+  assertTrue(ConfigHelper.valuesAreEqual("asdf", "asdf"));
+  assertTrue(ConfigHelper.valuesAreEqual("qwerty", "qwerty"));
+}
+
+@Test
+public void nullIsNotEqualWithNonNull() {
+  assertFalse(ConfigHelper.valuesAreEqual(null, "asdf"));
+  assertFalse(ConfigHelper.valuesAreEqual("asdf", null));
+}
+
+@Test
+public void equalNumbersInDifferentFormsAreEqual() {
+  assertTrue(ConfigHelper.valuesAreEqual("1.234", "1.2340"));
+  assertTrue(ConfigHelper.valuesAreEqual("12.34", "1.234e1"));
+  assertTrue(ConfigHelper.valuesAreEqual("123L", "123l"));
+  assertTrue(ConfigHelper.valuesAreEqual("-1.234", "-1.2340"));
+  

[09/50] [abbrv] ambari git commit: AMBARI-22508 Ambari 3.0: Implement new design for Admin View: User Management. (atkach)

2017-11-30 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/99b19e58/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/modals/groupCreate.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/modals/groupCreate.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/modals/groupCreate.html
new file mode 100644
index 000..e0c1144
--- /dev/null
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/modals/groupCreate.html
@@ -0,0 +1,86 @@
+
+
+
+  
+
+  {{'groups.createLocal' | translate}}
+
+  
+  
+
+  
+{{'groups.name' | translate}}*
+  
+  
+  
+{{'common.alerts.fieldRequired' | translate}}
+  
+  
+{{'common.alerts.noSpecialChars' | translate}}
+  
+
+
+
+  {{'groups.addUsers' | translate}}
+  
+
+  
+
+
+
+  
+
+  {{'groups.role' | translate}}
+  
+
+
+  {{'common.select' | 
translate}}
+  {{role.permission_label}}
+
+
+  {{'common.alerts.fieldRequired' | translate}}
+
+  
+
+
+  
+  
+{{'common.controls.cancel' | translate}}
+{{'common.controls.save' | translate}}
+  
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/99b19e58/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/modals/userCreate.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/modals/userCreate.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/modals/userCreate.html
new file mode 100644
index 000..0af26eb
--- /dev/null
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/modals/userCreate.html
@@ -0,0 +1,147 @@
+
+
+
+  
+
+  {{'users.create' | translate}}
+
+  
+  
+
+  
+{{'users.username' | translate}}*
+
+  
+  
+  
+{{'common.alerts.fieldRequired' | translate}}
+  
+  
+{{'common.alerts.noSpecialChars' | translate}}
+  
+
+
+
+  
+
+  {{'users.password' | translate}}*
+
+
+
+  {{'common.alerts.fieldRequired' | translate}}
+
+  
+  
+
+  {{'users.confirmPassword' | translate}}*
+
+
+
+  {{'common.alerts.fieldRequired' | translate}}
+
+
+  {{'users.alerts.wrongPassword' | translate}}
+
+  
+
+
+
+  
+
+  {{'users.role' | translate}}*
+  
+
+
+  {{'common.select' | 
translate}}
+  {{role.permission_label}}
+
+
+  {{'common.alerts.fieldRequired' | translate}}
+
+  
+
+
+
+  
+{{'users.isAmbariAdmin' | translate}}*
+
+  
+  
+
+  
+
+
+
+  
+{{'users.isActive' | translate}}*
+
+  
+  
+
+  
+
+
+  
+  
+{{'common.controls.cancel' | translate}}
+{{'common.controls.save' | translate}}
+  
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/99b19e58/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/userEdit.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/userEdit.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/userEdit.html
new file mode 100644
index 000..0372a11
--- /dev/null
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/userManagement/userEdit.html
@@ -0,0 +1,122 @@
+
+
+
+  
+
+  {{'common.users' | translate}}
+  {{user.user_name}}
+
+
+  
+{{'common.delete' | translate: '{term: 
constants.user}'}}
+{{'common.delete' | translate: '{term: 
constants.user}'}}
+  
+
+  
+  
+  
+
+  {{'common.type' | 
translate}}
+  
+{{user.userTypeName}}
+  
+
+
+  {{'users.status' | 
translate}}
+  
+
+  
+
+
+   {{'users.ambariAdmin' | translate}}
+  
+
+  
+
+
+  {{'users.password' 
| translate}}
+  
+
+  {{'users.changePassword' | translate}}
+  {{'users.changePassword' | 
translate}}
+
+  
+  
+
+
+  {{getUserMembership(user.user_type)}}
+  
+
+  
+
+
+
+  {{'common.privileges' | 
translate}}
+  
+
+  
+
+  {{'common.cluster' | translate}}
+  {{'common.clusterRole' | translate}}
+
+  
+  
+
+  
+ 
+   

[11/50] [abbrv] ambari git commit: AMBARI-22508 Ambari 3.0: Implement new design for Admin View: User Management. (atkach)

2017-11-30 Thread ncole
AMBARI-22508 Ambari 3.0: Implement new design for Admin View: User Management. 
(atkach)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 99b19e5805cf3ac291eca9c8e6a1290637b08ab6
Parents: 8e36662
Author: Andrii Tkach 
Authored: Thu Nov 23 14:02:00 2017 +0200
Committer: Andrii Tkach 
Committed: Thu Nov 23 14:02:00 2017 +0200

--
 .../main/resources/ui/admin-web/app/index.html  |  17 +-
 .../resources/ui/admin-web/app/scripts/app.js   |   3 +-
 .../controllers/ClusterInformationCtrl.js   | 106 ---
 .../controllers/ambariViews/ViewsListCtrl.js|   4 +-
 .../clusters/ClusterInformationCtrl.js  | 106 +++
 .../clusters/ClustersManageAccessCtrl.js|  97 ---
 .../controllers/clusters/UserAccessListCtrl.js  | 351 
 .../controllers/groups/GroupsCreateCtrl.js  |  65 --
 .../controllers/groups/GroupsEditCtrl.js| 180 
 .../controllers/groups/GroupsListCtrl.js| 106 ---
 .../userManagement/GroupCreateCtrl.js   | 112 +++
 .../controllers/userManagement/GroupEditCtrl.js | 182 
 .../userManagement/GroupsListCtrl.js| 170 
 .../userManagement/UserCreateCtrl.js| 108 +++
 .../controllers/userManagement/UserEditCtrl.js  | 290 +++
 .../userManagement/UserManagementCtrl.js|  23 +
 .../controllers/userManagement/UsersListCtrl.js | 178 
 .../controllers/users/UsersCreateCtrl.js|  75 --
 .../scripts/controllers/users/UsersListCtrl.js  | 122 ---
 .../scripts/controllers/users/UsersShowCtrl.js  | 290 ---
 .../ui/admin-web/app/scripts/i18n.config.js |   9 +-
 .../ui/admin-web/app/scripts/routes.js  |  61 +-
 .../ui/admin-web/app/scripts/services/User.js   |   5 +-
 .../resources/ui/admin-web/app/styles/main.css  |  46 +-
 .../ui/admin-web/app/styles/user-management.css |  30 +
 .../resources/ui/admin-web/app/styles/views.css |  18 -
 .../app/views/ambariViews/viewsList.html|  26 +-
 .../admin-web/app/views/clusterInformation.html |  87 --
 .../app/views/clusters/clusterInformation.html  |  87 ++
 .../app/views/clusters/manageAccess.html|  63 --
 .../app/views/clusters/userAccessList.html  | 102 ---
 .../ui/admin-web/app/views/groups/create.html   |  43 -
 .../ui/admin-web/app/views/groups/edit.html |  98 ---
 .../ui/admin-web/app/views/groups/list.html |  80 --
 .../ui/admin-web/app/views/sideNav.html |  22 +-
 .../app/views/userManagement/groupEdit.html |  99 +++
 .../app/views/userManagement/groupsList.html|  94 +++
 .../app/views/userManagement/main.html  |  36 +
 .../userManagement/modals/changePassword.html   |  46 ++
 .../userManagement/modals/groupCreate.html  |  86 ++
 .../views/userManagement/modals/userCreate.html | 147 
 .../app/views/userManagement/userEdit.html  | 122 +++
 .../app/views/userManagement/usersList.html | 119 +++
 .../ui/admin-web/app/views/users/create.html|  82 --
 .../ui/admin-web/app/views/users/list.html  |  97 ---
 .../app/views/users/modals/changePassword.html  |  46 --
 .../ui/admin-web/app/views/users/show.html  | 122 ---
 .../clusters/UserAccessListCtrl_test.js | 820 ---
 .../controllers/groups/GroupsListCtrl_test.js   | 129 ---
 .../userManagement/GroupsListCtrl_test.js   | 129 +++
 .../userManagement/UsersListCtrl_test.js| 344 
 .../controllers/users/UsersListCtrl_test.js | 383 -
 .../test/unit/services/Utility_test.js  |  10 +-
 53 files changed, 2591 insertions(+), 3682 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/99b19e58/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 4a77e62..e3b817e 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,26 +121,25 @@
 
 
 
-
+
 
 
 
 
 
 
-
-
-
-
-
-
+
+
+
+
+
+
+
 
 
 
 
 
-
-
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/99b19e58/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js
index 80e2813..225eb12 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js

[04/50] [abbrv] ambari git commit: AMBARI-22495. Installer - Select Version page should show HDP-GPL repo if necessary (vsubramanian)

2017-11-30 Thread ncole
AMBARI-22495. Installer - Select Version page should show HDP-GPL repo if 
necessary (vsubramanian)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 6b17d0142266f714807bd06e3ce1afbe535a0a73
Parents: 9fc7223
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 22 18:00:32 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 22 18:00:32 2017 -0800

--
 ambari-web/app/controllers/installer.js | 53 +++-
 .../app/controllers/wizard/step8_controller.js  | 12 +++--
 .../app/mappers/repository_version_mapper.js|  3 +-
 ambari-web/app/mappers/stack_mapper.js  |  3 +-
 ambari-web/app/models/repository.js | 17 +++
 .../app/models/stack_version/repository.js  |  3 +-
 ambari-web/app/templates/wizard/step1.hbs   | 36 +
 ambari-web/test/controllers/installer_test.js   | 14 --
 8 files changed, 103 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6b17d014/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index 3c50b26..d6be78d 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -813,6 +813,7 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
 "repo_id": repository.get('repoId'),
 "repo_name": repository.get('repoName'),
 "components": repository.get('components'),
+"tags": repository.get('tags'),
 "distribution": repository.get('distribution')
   }
 });
@@ -833,7 +834,7 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
 var dfd = $.Deferred();
 if (selectedStack && selectedStack.get('operatingSystems')) {
   this.set('validationCnt', 
selectedStack.get('operatingSystems').filterProperty('isSelected').filterProperty('isEmpty',
 false).map(function (os) {
-return os.get('repositories.length');
+return os.get('repositories').filterProperty('showRepo', true).length;
   }).reduce(Em.sum, 0));
   var verifyBaseUrl = !wizardStep1Controller.get('skipValidationChecked') 
&& !wizardStep1Controller.get('selectedStack.useRedhatSatellite');
   if (!verifyBaseUrl) {
@@ -842,32 +843,34 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
   selectedStack.get('operatingSystems').forEach(function (os) {
 if (os.get('isSelected') && !os.get('isEmpty')) {
   os.get('repositories').forEach(function (repo) {
-repo.setProperties({
-  errorTitle: '',
-  errorContent: '',
-  validation: 'INPROGRESS'
-});
-this.set('content.isCheckInProgress', true);
-App.ajax.send({
-  name: 'wizard.advanced_repositories.valid_url',
-  sender: this,
-  data: {
-stackName: stackName,
-stackVersion: stackVersion,
-repoId: repo.get('repoId'),
-osType: os.get('osType'),
-osId: os.get('id'),
-dfd: dfd,
+if (repo.get('showRepo')) {
+  repo.setProperties({
+errorTitle: '',
+errorContent: '',
+validation: 'INPROGRESS'
+  });
+  this.set('content.isCheckInProgress', true);
+  App.ajax.send({
+name: 'wizard.advanced_repositories.valid_url',
+sender: this,
 data: {
-  'Repositories': {
-'base_url': repo.get('baseUrl'),
-"verify_base_url": verifyBaseUrl
+  stackName: stackName,
+  stackVersion: stackVersion,
+  repoId: repo.get('repoId'),
+  osType: os.get('osType'),
+  osId: os.get('id'),
+  dfd: dfd,
+  data: {
+'Repositories': {
+  'base_url': repo.get('baseUrl'),
+  "verify_base_url": verifyBaseUrl
+}
   }
-}
-  },
-  success: 'checkRepoURLSuccessCallback',
-  error: 'checkRepoURLErrorCallback'
-});
+},
+success: 'checkRepoURLSuccessCallback',
+error: 

[30/50] [abbrv] ambari git commit: AMBARI-22465 Post-Upgrade Tasks Use the Wrong Repository and Hooks Folders (dgrinenko)

2017-11-30 Thread ncole
AMBARI-22465 Post-Upgrade Tasks Use the Wrong Repository and Hooks Folders 
(dgrinenko)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 82af6fb6d3f11476df203d9871cc978091891cfe
Parents: 020e152
Author: Dmytro Grinenko 
Authored: Tue Nov 28 19:23:28 2017 +0200
Committer: Dmytro Grinenko 
Committed: Tue Nov 28 19:25:28 2017 +0200

--
 .../server/controller/internal/UpgradeResourceProvider.java  | 8 
 .../resources/custom_actions/scripts/ru_execute_tasks.py | 5 +++--
 .../src/test/python/custom_actions/test_ru_execute_tasks.py  | 6 +++---
 3 files changed, 6 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/82af6fb6/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 c5303cc..bab5369 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
@@ -1053,10 +1053,6 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 // Apply additional parameters to the command that come from the stage.
 applyAdditionalParameters(wrapper, params);
 
-// the ru_execute_tasks invokes scripts - it needs information about where
-// the scripts live and for that it should always use the target repository
-// stack
-applyRepositoryAssociatedParameters(wrapper, 
effectiveRepositoryVersion.getStackId(), params);
 
 // add each host to this stage
 RequestResourceFilter filter = new RequestResourceFilter(serviceName, 
componentName,
@@ -1204,10 +1200,6 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 // Apply additional parameters to the command that come from the stage.
 applyAdditionalParameters(wrapper, commandParams);
 
-// add things like hooks and service folders based on effective repo
-applyRepositoryAssociatedParameters(wrapper, 
effectiveRepositoryVersion.getStackId(),
-commandParams);
-
 ActionExecutionContext actionContext = new 
ActionExecutionContext(cluster.getClusterName(),
 "SERVICE_CHECK", filters, commandParams);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/82af6fb6/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py
--
diff --git 
a/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py 
b/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py
index c0f0d41..dff4ee1 100644
--- 
a/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py
+++ 
b/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py
@@ -102,8 +102,8 @@ class ExecuteUpgradeTasks(Script):
 version = default('/roleParams/version', None)
 
 # These 2 variables are optional
-service_package_folder = default('/roleParams/service_package_folder', 
None)
-hooks_folder = default('/roleParams/hooks_folder', None)
+service_package_folder = default('/commandParams/service_package_folder', 
None)
+hooks_folder = default('/commandParams/hooks_folder', None)
 
 tasks = json.loads(config['roleParams']['tasks'])
 if tasks:
@@ -154,5 +154,6 @@ class ExecuteUpgradeTasks(Script):
   task.command = replace_variables(task.command, host_name, version)
   shell.checked_call(task.command, logoutput=True, quiet=True)
 
+
 if __name__ == "__main__":
   ExecuteUpgradeTasks().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/82af6fb6/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
--
diff --git 
a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py 
b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
index 0d12a91..17d5e77 100644
--- a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
+++ b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
@@ -146,8 +146,8 @@ class TestRUExecuteTasks(RMFTestCase):
 with open(json_file_path, "r") as json_file:
  

[23/50] [abbrv] ambari git commit: AMBARI-22526. Log Feeder: handle multiple '=' (split char) in key/value filter (oleewere)

2017-11-30 Thread ncole
AMBARI-22526. Log Feeder: handle multiple '=' (split char) in key/value filter 
(oleewere)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 33ee1a7381237a6cd4a5159d0f8ddc601f342529
Parents: 530f1d5
Author: Oliver Szabo 
Authored: Tue Nov 28 15:08:51 2017 +0100
Committer: Oliver Szabo 
Committed: Tue Nov 28 15:17:31 2017 +0100

--
 .../java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/33ee1a73/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
index 670b1c3..8e5aee8 100644
--- 
a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
+++ 
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
@@ -128,14 +128,14 @@ public class FilterKeyValue extends Filter {
 
   private String[] getNameValue(String nv) {
 String splitPattern = Pattern.quote(valueSplit);
-return nv.split(splitPattern);
+return nv.split(splitPattern, 2);
   }
 
   private void logParseError(String inputStr) {
 errorMetric.value++;
 String logMessageKey = this.getClass().getSimpleName() + "_PARSEERROR";
 LogFeederUtil.logErrorMessageByInterval(logMessageKey, "Error parsing 
string. length=" + inputStr.length() + ", input=" +
-input.getShortDescription() + ". First upto 100 characters=" + 
StringUtils.abbreviate(inputStr, 100), null, LOG,
+input.getShortDescription() + ". First upto 200 characters=" + 
StringUtils.abbreviate(inputStr, 200), null, LOG,
 Level.ERROR);
   }
 



[34/50] [abbrv] ambari git commit: AMBARI-22458. SNMP Trap should have sysuptime field filled - checkstyle fix

2017-11-30 Thread ncole
AMBARI-22458. SNMP Trap should have sysuptime field filled - checkstyle fix


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 7fd404add302aed0c3d2fe52a6ddacb957a992b6
Parents: 31a0f19
Author: Doroszlai, Attila 
Authored: Tue Nov 28 22:37:33 2017 +0100
Committer: Doroszlai, Attila 
Committed: Tue Nov 28 22:37:33 2017 +0100

--
 .../notifications/dispatchers/AmbariSNMPDispatcher.java   | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7fd404ad/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
index 8e397ed..f4b2564 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java
@@ -19,6 +19,8 @@
 package org.apache.ambari.server.notifications.dispatchers;
 
 import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
 import java.math.BigDecimal;
 import java.util.Collections;
 import java.util.HashSet;
@@ -36,15 +38,12 @@ import org.snmp4j.mp.SnmpConstants;
 import org.snmp4j.smi.Integer32;
 import org.snmp4j.smi.OID;
 import org.snmp4j.smi.OctetString;
+import org.snmp4j.smi.TimeTicks;
 import org.snmp4j.smi.VariableBinding;
 import org.snmp4j.util.DefaultPDUFactory;
-import org.snmp4j.smi.TimeTicks;
 
 import com.google.inject.Singleton;
 
-import java.lang.management.RuntimeMXBean;
-import java.lang.management.ManagementFactory;
-
 /**
  * The {@link AmbariSNMPDispatcher} class is used to dispatch {@link 
AlertNotification} via SNMP using predefined Ambari OIDs.
  *



[44/50] [abbrv] ambari git commit: AMBARI-22547 - History and Hive server start failed during IOP migration with AttributeError (jonathanhurley)

2017-11-30 Thread ncole
AMBARI-22547 - History and Hive server start failed during IOP migration with 
AttributeError (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 323ce7a797a65f795382c815a4068ae4b1e94bbb
Parents: 0d7f609
Author: Jonathan Hurley 
Authored: Wed Nov 29 11:51:47 2017 -0500
Committer: Jonathan Hurley 
Committed: Wed Nov 29 16:18:57 2017 -0500

--
 .../libraries/functions/copy_tarball.py   | 10 --
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py|  4 ++--
 .../YARN/3.0.0.3.0/package/scripts/params_linux.py|  4 ++--
 3 files changed, 12 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/323ce7a7/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 c15fbd1..18800db 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
@@ -90,8 +90,14 @@ def _prepare_tez_tarball():
   # if enabled, LZO GPL libraries must be copied as well
   if lzo_utils.should_install_lzo():
 stack_root = Script.get_stack_root()
-tez_version = component_version.get_component_repository_version("TEZ")
-hadoop_lib_native_lzo_dir = os.path.join(stack_root, tez_version, 
"hadoop", "lib", "native")
+service_version = 
component_version.get_component_repository_version(service_name = "TEZ")
+
+# some installations might not have Tez, but MapReduce2 should be a 
fallback to get the LZO libraries from
+if service_version is None:
+  Logger.warning("Tez does not appear to be installed, using the MapReduce 
version to get the LZO libraries")
+  service_version = 
component_version.get_component_repository_version(service_name = "MAPREDUCE2")
+
+hadoop_lib_native_lzo_dir = os.path.join(stack_root, service_version, 
"hadoop", "lib", "native")
 
 if not sudo.path_isdir(hadoop_lib_native_lzo_dir):
   Logger.warning("Unable to located native LZO libraries at {0}, falling 
back to hadoop home".format(hadoop_lib_native_lzo_dir))

http://git-wip-us.apache.org/repos/asf/ambari/blob/323ce7a7/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
index b244af0..1bc01d4 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
@@ -87,8 +87,8 @@ version = default("/commandParams/version", None)
 # these are used to render the classpath for picking up Spark classes
 # in the event that spark is not installed, then we must default to the 
vesrion of YARN installed
 # since it will still load classes from its own spark version
-spark_version = component_version.get_component_repository_version("SPARK", 
"SPARK_CLIENT", default_value = version)
-spark2_version = component_version.get_component_repository_version("SPARK2", 
"SPARK2_CLIENT", default_value = version)
+spark_version = 
component_version.get_component_repository_version(service_name =  "SPARK", 
component_name = "SPARK_CLIENT", default_value = version)
+spark2_version = 
component_version.get_component_repository_version(service_name = "SPARK2", 
component_name = "SPARK2_CLIENT", default_value = version)
 
 stack_supports_ranger_kerberos = 
check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, 
version_for_stack_feature_checks)
 stack_supports_ranger_audit_db = 
check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, 
version_for_stack_feature_checks)

http://git-wip-us.apache.org/repos/asf/ambari/blob/323ce7a7/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_linux.py
 

[35/50] [abbrv] ambari git commit: AMBARI-22534 Package install fails with HDP-2.5.3/2.6.4.0 version at atlas falcon plugin install (dgrinenko)

2017-11-30 Thread ncole
AMBARI-22534 Package install fails with HDP-2.5.3/2.6.4.0 version at atlas 
falcon plugin install (dgrinenko)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 0cf82767c8f90ff858b678dde98c3eaba7d1fad4
Parents: 7fd404a
Author: Dmytro Grinenko 
Authored: Wed Nov 29 11:04:54 2017 +0200
Committer: Dmytro Grinenko 
Committed: Wed Nov 29 11:07:26 2017 +0200

--
 .../stacks/HDP/2.5/services/FALCON/metainfo.xml |  4 +--
 .../stacks/HDP/2.6/services/FALCON/metainfo.xml | 26 
 2 files changed, 28 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0cf82767/ambari-server/src/main/resources/stacks/HDP/2.5/services/FALCON/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/FALCON/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/FALCON/metainfo.xml
index 1066f6c..79296c3 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/FALCON/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/FALCON/metainfo.xml
@@ -30,7 +30,7 @@
   falcon_${stack_version}
 
 
-  atlas-metadata_${stack_version}-falcon-plugin
+  atlas-metadata_${stack_version}-hive-plugin
   should_install_falcon_atlas_hook
 
   
@@ -42,7 +42,7 @@
   falcon-${stack_version}
 
 
-  atlas-metadata-${stack_version}-falcon-plugin
+  atlas-metadata-${stack_version}-hive-plugin
   should_install_falcon_atlas_hook
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/0cf82767/ambari-server/src/main/resources/stacks/HDP/2.6/services/FALCON/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/FALCON/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/FALCON/metainfo.xml
index fdeca9b..c4a0c98 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/FALCON/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/FALCON/metainfo.xml
@@ -21,6 +21,32 @@
 
   FALCON
   0.10.0
+  
+
+  redhat7,amazon2015,redhat6,suse11,suse12
+  
+
+  falcon_${stack_version}
+
+
+  atlas-metadata_${stack_version}-falcon-plugin
+  should_install_falcon_atlas_hook
+
+  
+
+
+  debian7,ubuntu12,ubuntu14,ubuntu16
+  
+
+  falcon-${stack_version}
+
+
+  atlas-metadata-${stack_version}-falcon-plugin
+  should_install_falcon_atlas_hook
+
+  
+
+  
 
   
 



[42/50] [abbrv] ambari git commit: AMBARI-22484. Stack advisor should disallow lzo enable without accepting license agreement. Additional fixes. (mpapirkovskyy)

2017-11-30 Thread ncole
AMBARI-22484. Stack advisor should disallow lzo enable without accepting 
license agreement. Additional fixes. (mpapirkovskyy)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: e12efe38a0cdc6a0e1554026949bfeef60673a5a
Parents: 82692bd
Author: Myroslav Papirkovskyi 
Authored: Wed Nov 29 17:23:49 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Wed Nov 29 18:30:08 2017 +0200

--
 .../stackadvisor/StackAdvisorRequest.java   |  8 +
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 36 +++-
 .../src/main/resources/stacks/stack_advisor.py  |  9 +
 .../stacks/2.0.6/common/test_stack_advisor.py   | 14 ++--
 4 files changed, 55 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e12efe38/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
index 62b8d15..b30eec6 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
@@ -123,6 +123,9 @@ public class StackAdvisorRequest {
 this.configGroups = configGroups;
   }
 
+  /**
+   * @return true if GPL license is accepted, false otherwise
+   */
   public Boolean getGplLicenseAccepted() {
 return gplLicenseAccepted;
   }
@@ -199,6 +202,11 @@ public class StackAdvisorRequest {
   return this;
 }
 
+/**
+ * Set GPL license acceptance parameter to request.
+ * @param gplLicenseAccepted is GPL license accepted.
+ * @return stack advisor request builder.
+ */
 public StackAdvisorRequestBuilder withGPLLicenseAccepted(
 Boolean gplLicenseAccepted) {
   this.instance.gplLicenseAccepted = gplLicenseAccepted;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e12efe38/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index bfa2f5a..5584377 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -352,20 +352,38 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 self.recommendHadoopProxyUsers(configurations, services, hosts)
 
   def getLZOSupportValidationItems(self, properties, services):
+'''
+Checks GPL license is accepted when GPL software is used.
+:param properties: dict of properties' name and value pairs
+:param services: list of services
+:return: NOT_APPLICABLE messages in case GPL license is not accepted
+'''
 services_list = self.get_services_list(services)
 
+validations = []
 if "HDFS" in services_list:
   lzo_allowed = services["gpl-license-accepted"]
-  property_name = "io.compression.codec.lzo.class"
-  if property_name in properties:
-property_value = properties.get(property_name)
-if not lzo_allowed and "com.hadoop.compression.lzo.LzoCodec" in 
property_value:
-  return [{"config-name": property_name, "item": self.getErrorItem(
-"Your Ambari Server has not been configured to download LZO and 
install it. "
-"LZO is GPL software and requires you to accept a license prior to 
use. "
-"Please refer to this documentation to configure Ambari before 
proceeding.")}]
 
-return []
+  self.validatePropertyToLZOCodec("io.compression.codecs", properties, 
lzo_allowed, validations)
+  self.validatePropertyToLZOCodec("io.compression.codec.lzo.class", 
properties, lzo_allowed, validations)
+return validations
+
+  def validatePropertyToLZOCodec(self, property_name, properties, lzo_allowed, 
validations):
+'''
+Checks specified property contains LZO codec class and requires GPL 
license acceptance.
+:param property_name: property name
+:param properties: dict of properties' name and value pairs
+:param lzo_allowed: is gpl license accepted
+:param 

[41/50] [abbrv] ambari git commit: AMBARI-22480. Validate blueprint does not allow lzo enable without setup with license agreement. JavaDocs update. (mpapirkovskyy)

2017-11-30 Thread ncole
AMBARI-22480. Validate blueprint does not allow lzo enable without setup with 
license agreement. JavaDocs update. (mpapirkovskyy)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 82692bd29d6cbc4f1eba0ae4e442e1d691843cb2
Parents: 9bbc0ef
Author: Myroslav Papirkovskyi 
Authored: Tue Nov 21 17:16:51 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Wed Nov 29 18:30:08 2017 +0200

--
 .../main/java/org/apache/ambari/server/topology/BlueprintImpl.java  | 1 +
 .../java/org/apache/ambari/server/topology/BlueprintValidator.java  | 1 +
 2 files changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/82692bd2/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
index 6801e33..be3547a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
@@ -351,6 +351,7 @@ public class BlueprintImpl implements Blueprint {
* Validate blueprint configuration.
*
* @throws InvalidTopologyException if the blueprint configuration is invalid
+   * @throws GPLLicenseNotAcceptedException ambari was configured to use gpl 
software, but gpl license is not accepted
*/
   @Override
   public void validateRequiredProperties() throws InvalidTopologyException, 
GPLLicenseNotAcceptedException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/82692bd2/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidator.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidator.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidator.java
index 156fe8c..0f83168 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidator.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidator.java
@@ -36,6 +36,7 @@ public interface BlueprintValidator {
* This doesn't include password properties.
*
* @throws InvalidTopologyException if required properties are not set in 
blueprint
+   * @throws GPLLicenseNotAcceptedException ambari was configured to use gpl 
software, but gpl license is not accepted
*/
   void validateRequiredProperties() throws InvalidTopologyException, 
GPLLicenseNotAcceptedException;
 }



[43/50] [abbrv] ambari git commit: AMBARI-22543. Log Search: backend should not return with 302 redirect if authentication fails (oleewere)

2017-11-30 Thread ncole
AMBARI-22543. Log Search: backend should not return with 302 redirect if 
authentication fails (oleewere)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 0d7f60961fba7c5706ef3d79a7d9507d097fab6e
Parents: f6fd9b5
Author: Oliver Szabo 
Authored: Wed Nov 29 14:08:00 2017 +0100
Committer: Oliver Szabo 
Committed: Wed Nov 29 17:38:35 2017 +0100

--
 .../filters/LogsearchAuthenticationEntryPoint.java   | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0d7f6096/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/filters/LogsearchAuthenticationEntryPoint.java
--
diff --git 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/filters/LogsearchAuthenticationEntryPoint.java
 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/filters/LogsearchAuthenticationEntryPoint.java
index 2fe5f7b..b1ceb3a 100644
--- 
a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/filters/LogsearchAuthenticationEntryPoint.java
+++ 
b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/web/filters/LogsearchAuthenticationEntryPoint.java
@@ -24,12 +24,13 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.security.core.AuthenticationException;
 import 
org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint;
 
 public class LogsearchAuthenticationEntryPoint extends 
LoginUrlAuthenticationEntryPoint {
-  private static final Logger logger = 
Logger.getLogger(LogsearchAuthenticationEntryPoint.class);
+  private static final Logger logger = 
LoggerFactory.getLogger(LogsearchAuthenticationEntryPoint.class);
 
   public LogsearchAuthenticationEntryPoint(String loginFormUrl) {
 super(loginFormUrl);
@@ -38,13 +39,7 @@ public class LogsearchAuthenticationEntryPoint extends 
LoginUrlAuthenticationEnt
   @Override
   public void commence(HttpServletRequest request, HttpServletResponse 
response, AuthenticationException authException)
 throws IOException, ServletException {
-String ajaxRequestHeader = request.getHeader("X-Requested-With");
-if (ajaxRequestHeader != null && 
ajaxRequestHeader.equalsIgnoreCase("XMLHttpRequest")) {
-  logger.debug("AJAX request. Authentication required. Returning URL=" + 
request.getRequestURI());
-  response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Session 
Timeout");
-} else {
-  logger.debug("Redirecting to login page :" + this.getLoginFormUrl());
-  super.commence(request, response, authException);
-}
+logger.debug("Got 401 from request: {}", request.getRequestURI());
+response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
   }
 }



[25/50] [abbrv] ambari git commit: AMBARI-22514. Initial implementation of Schedulable document deletion & archiving for Infra Solr (Krisztian Kasa via oleewere)

2017-11-30 Thread ncole
AMBARI-22514. Initial implementation of Schedulable document deletion & 
archiving for Infra Solr (Krisztian Kasa via oleewere)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 393fdb8048ff579e8a55cd1b477a23d1bf105576
Parents: 2bf3c8e
Author: Krisztian Kasa 
Authored: Tue Nov 28 15:45:22 2017 +0100
Committer: Oliver Szabo 
Committed: Tue Nov 28 15:47:59 2017 +0100

--
 ambari-infra/ambari-infra-manager/pom.xml   |  11 ++
 .../infra/job/archive/CompositeFileAction.java  |  46 +
 .../ambari/infra/job/archive/Document.java  |  54 +
 .../infra/job/archive/DocumentDestination.java  |  23 +++
 .../archive/DocumentExportConfiguration.java| 118 +++
 .../job/archive/DocumentExportJobListener.java  |  35 
 .../job/archive/DocumentExportProperties.java   | 112 +++
 .../job/archive/DocumentExportStepListener.java |  47 +
 .../infra/job/archive/DocumentExporter.java |  99 ++
 .../infra/job/archive/DocumentItemReader.java   | 135 +
 .../infra/job/archive/DocumentItemWriter.java   |  25 +++
 .../infra/job/archive/DocumentIterator.java |  25 +++
 .../infra/job/archive/DocumentSource.java   |  24 +++
 .../ambari/infra/job/archive/FileAction.java|  25 +++
 .../job/archive/LocalDocumentItemWriter.java|  72 +++
 .../ambari/infra/job/archive/S3Properties.java  |  64 ++
 .../ambari/infra/job/archive/S3Uploader.java|  51 +
 .../infra/job/archive/SolrDocumentIterator.java |  90 +
 .../infra/job/archive/SolrDocumentSource.java   |  68 +++
 .../infra/job/archive/SolrQueryBuilder.java | 115 +++
 .../infra/job/archive/SolrQueryProperties.java  |  69 +++
 .../infra/job/archive/TarGzCompressor.java  |  50 +
 .../apache/ambari/infra/manager/JobManager.java |  21 +-
 .../src/main/resources/infra-manager.properties |  12 ++
 .../src/main/resources/log4j2.xml   |   2 +-
 .../infra/job/archive/DocumentExporterTest.java | 147 ++
 .../job/archive/DocumentItemReaderTest.java | 197 +++
 .../archive/LocalDocumentItemWriterTest.java|  98 +
 .../infra/job/archive/SolrQueryBuilderTest.java | 113 +++
 .../test-config/logfeeder/logfeeder.properties  |   2 +-
 30 files changed, 1940 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/393fdb80/ambari-infra/ambari-infra-manager/pom.xml
--
diff --git a/ambari-infra/ambari-infra-manager/pom.xml 
b/ambari-infra/ambari-infra-manager/pom.xml
index aa86da8..67bf7d1 100644
--- a/ambari-infra/ambari-infra-manager/pom.xml
+++ b/ambari-infra/ambari-infra-manager/pom.xml
@@ -141,6 +141,12 @@
   3.4
   test
 
+
+  org.hamcrest
+  hamcrest-all
+  1.3
+  test
+
 
 
   org.springframework
@@ -417,6 +423,11 @@
   com.google.guava
   20.0
 
+
+  com.amazonaws
+  aws-java-sdk-s3
+  1.11.5
+
   
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/393fdb80/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive/CompositeFileAction.java
--
diff --git 
a/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive/CompositeFileAction.java
 
b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive/CompositeFileAction.java
new file mode 100644
index 000..84ce160
--- /dev/null
+++ 
b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive/CompositeFileAction.java
@@ -0,0 +1,46 @@
+/*
+ * 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 

[21/50] [abbrv] ambari git commit: AMBARI-22520. PERF stack: deploy fails due to incorrect stack upgrade related information (aonishuk)

2017-11-30 Thread ncole
AMBARI-22520. PERF stack: deploy fails due to incorrect stack upgrade related 
information (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: b832f70620f9f018421479efbf056d8e4c014339
Parents: 0b98ccd
Author: Andrew Onishuk 
Authored: Tue Nov 28 12:16:04 2017 +0200
Committer: Andrew Onishuk 
Committed: Tue Nov 28 12:16:04 2017 +0200

--
 .../PERF/1.0/configuration/cluster-env.xml  | 26 
 .../PERF/1.0/properties/stack_packages.json |  8 ++
 2 files changed, 34 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b832f706/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml
index f19ac52..12a0527 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/configuration/cluster-env.xml
@@ -109,4 +109,30 @@
 
 
   
+  
+  
+stack_packages
+
+Associations between component and stack-select 
tools.
+VALUE_FROM_PROPERTY_FILE
+
+  stack_packages.json
+  json
+  true
+  false
+  false
+
+
+  
+  
+stack_root
+{"PERF":"/usr/perf"}
+JSON which defines the stack root by stack name
+
+  true
+  false
+  false
+
+
+  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b832f706/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_packages.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_packages.json
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_packages.json
new file mode 100644
index 000..6930fe6
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/properties/stack_packages.json
@@ -0,0 +1,8 @@
+{
+  "PERF": {
+"stack-select": {
+},
+"upgrade-dependencies" : {
+}
+  }
+}



[37/50] [abbrv] ambari git commit: AMBARI-22542. Upgrade Ember and jquery version for Ambari Views (pallavkul)

2017-11-30 Thread ncole
AMBARI-22542. Upgrade Ember and jquery version for Ambari Views (pallavkul)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 7750398508b7e4dc223379be107610b5a0e792fd
Parents: ff3eca0
Author: pallavkul 
Authored: Wed Nov 29 21:53:49 2017 +0530
Committer: pallavkul 
Committed: Wed Nov 29 21:53:49 2017 +0530

--
 contrib/views/files/src/main/resources/ui/bower.json | 4 ++--
 .../views/hive-next/src/main/resources/ui/hive-web/bower.json| 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/77503985/contrib/views/files/src/main/resources/ui/bower.json
--
diff --git a/contrib/views/files/src/main/resources/ui/bower.json 
b/contrib/views/files/src/main/resources/ui/bower.json
index f1472ee..dacb523 100644
--- a/contrib/views/files/src/main/resources/ui/bower.json
+++ b/contrib/views/files/src/main/resources/ui/bower.json
@@ -1,12 +1,12 @@
 {
   "name": "files-view",
   "dependencies": {
-"ember": "2.2.0",
+"ember": "2.2.1",
 "ember-cli-shims": "0.1.0",
 "ember-cli-test-loader": "0.2.2",
 "ember-load-initializers": "0.1.7",
 "ember-qunit-notifications": "0.1.0",
-"jquery": "1.11.3",
+"jquery": "2.x",
 "loader.js": "^3.5.0",
 "qunit": "~1.20.0",
 "bootstrap": "~3.3.6",

http://git-wip-us.apache.org/repos/asf/ambari/blob/77503985/contrib/views/hive-next/src/main/resources/ui/hive-web/bower.json
--
diff --git a/contrib/views/hive-next/src/main/resources/ui/hive-web/bower.json 
b/contrib/views/hive-next/src/main/resources/ui/hive-web/bower.json
index 62861b2..e467a59 100644
--- a/contrib/views/hive-next/src/main/resources/ui/hive-web/bower.json
+++ b/contrib/views/hive-next/src/main/resources/ui/hive-web/bower.json
@@ -1,8 +1,8 @@
 {
   "name": "hive",
   "dependencies": {
-"jquery": "1.11.3",
-"ember": "1.10.0",
+"jquery": "2.x",
+"ember": "1.11.4",
 "ember-data": "1.0.0-beta.16.1",
 "ember-resolver": "~0.1.12",
 "loader.js": "stefanpenner/loader.js#3.2.0",



[47/50] [abbrv] ambari git commit: AMBARI-22550. Service install/start failure due to wrong version directory

2017-11-30 Thread ncole
AMBARI-22550. Service install/start failure due to wrong version directory


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 19e6518d42170a33ca2e0161ec2d3abb5190f976
Parents: ff08592
Author: Doroszlai, Attila 
Authored: Wed Nov 29 19:02:32 2017 +0100
Committer: Doroszlai, Attila 
Committed: Thu Nov 30 09:02:46 2017 +0100

--
 .../actionmanager/ExecutionCommandWrapper.java   |  5 +
 .../actionmanager/ExecutionCommandWrapperTest.java   | 15 +--
 2 files changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/19e6518d/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
index 7b693cd..191e86c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
@@ -297,7 +297,12 @@ public class ExecutionCommandWrapper {
   if (null != repositoryVersion) {
 // only set the version if it's not set and this is NOT an install
 // command
+// Some stack scripts use version for path purposes.  Sending 
unresolved version first (for
+// blueprints) and then resolved one would result in various issues: 
duplicate directories
+// (/hdp/apps/2.6.3.0 + /hdp/apps/2.6.3.0-235), parent directory not 
found, and file not
+// found, etc.  Hence requiring repositoryVersion to be resolved.
 if (!commandParams.containsKey(VERSION)
+  && repositoryVersion.isResolved()
   && executionCommand.getRoleCommand() != RoleCommand.INSTALL) {
   commandParams.put(VERSION, repositoryVersion.getVersion());
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/19e6518d/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
index fb84df5..f12c701 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
@@ -312,8 +312,7 @@ public class ExecutionCommandWrapperTest {
 commandParams = processedExecutionCommand.getCommandParams();
 Assert.assertFalse(commandParams.containsKey(KeyNames.VERSION));
 
-// now try with a START command which should populate the version even
-// though the state is INSTALLING
+// now try with a START command, but still unresolved
 executionCommand = new ExecutionCommand();
 commandParams = new HashMap<>();
 
@@ -334,6 +333,17 @@ public class ExecutionCommandWrapperTest {
 
 processedExecutionCommand = execCommWrap.getExecutionCommand();
 commandParams = processedExecutionCommand.getCommandParams();
+Assert.assertFalse(commandParams.containsKey(KeyNames.VERSION));
+
+// now that the repositoryVersion is resolved, it should populate the 
version even
+// though the state is INSTALLING
+repositoryVersion.setResolved(true);
+ormTestHelper.repositoryVersionDAO.merge(repositoryVersion);
+execCommWrap = new ExecutionCommandWrapper(json);
+injector.injectMembers(execCommWrap);
+
+processedExecutionCommand = execCommWrap.getExecutionCommand();
+commandParams = processedExecutionCommand.getCommandParams();
 Assert.assertEquals("0.1-", commandParams.get(KeyNames.VERSION));
 }
 
@@ -346,6 +356,7 @@ public class ExecutionCommandWrapperTest {
 
 StackId stackId = cluster.getDesiredStackVersion();
 RepositoryVersionEntity repositoryVersion = 
ormTestHelper.getOrCreateRepositoryVersion(stackId, "0.1-");
+repositoryVersion.setResolved(true); // has build number
 Service service = cluster.getService("HDFS");
 service.setDesiredRepositoryVersion(repositoryVersion);
 



[27/50] [abbrv] ambari git commit: AMBARI-22525 - ATS start failed during patch upgrade due to CNF SparkATSPlugin (jonathanhurley)

2017-11-30 Thread ncole
AMBARI-22525 - ATS start failed during patch upgrade due to CNF SparkATSPlugin 
(jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 3fa1289eaaf9c30985bcf5a50725080a9eb9b368
Parents: 393fdb8
Author: Jonathan Hurley 
Authored: Mon Nov 27 13:58:38 2017 -0500
Committer: Jonathan Hurley 
Committed: Tue Nov 28 10:24:31 2017 -0500

--
 .../libraries/functions/component_version.py  |  9 +
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py|  6 ++
 .../YARN/3.0.0.3.0/package/scripts/params_linux.py|  6 ++
 .../HDP/2.5/services/YARN/configuration/yarn-site.xml |  4 ++--
 .../stacks/HDP/2.5/services/stack_advisor.py  |  2 +-
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml| 14 --
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml   | 10 --
 .../resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml |  4 
 .../HDP/3.0/services/YARN/configuration/yarn-site.xml |  4 ++--
 .../1.0/services/FAKEYARN/configuration/yarn-site.xml |  4 ++--
 .../python/stacks/2.5/common/test_stack_advisor.py|  2 +-
 11 files changed, 49 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3fa1289e/ambari-common/src/main/python/resource_management/libraries/functions/component_version.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/component_version.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/component_version.py
index 169b339..fd18232 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/component_version.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/component_version.py
@@ -20,7 +20,7 @@ limitations under the License.
 
 from resource_management.libraries.script.script import Script
 
-def get_component_repository_version(service_name = None, component_name = 
None):
+def get_component_repository_version(service_name = None, component_name = 
None, default_value = None):
   """
   Gets the version associated with the specified component from the structure 
in the command.
   Every command should contain a mapping of service/component to the desired 
repository it's set
@@ -28,22 +28,23 @@ def get_component_repository_version(service_name = None, 
component_name = None)
 
   :service_name: the name of the service
   :component_name: the name of the component
+  :default_value: the value to return if either the service or the component 
are not found
   """
   config = Script.get_config()
 
   versions = _get_component_repositories(config)
   if versions is None:
-return None
+return default_value
 
   if service_name is None:
 service_name = config['serviceName'] if config is not None and 
'serviceName' in config else None
 
   if service_name is None or service_name not in versions:
-return None
+return default_value
 
   component_versions = versions[service_name]
   if len(component_versions) == 0:
-return None
+return default_value
 
   if component_name is None:
 component_name = config["role"] if config is not None and "role" in config 
else None

http://git-wip-us.apache.org/repos/asf/ambari/blob/3fa1289e/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
index 3e4504d..b244af0 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
@@ -84,6 +84,12 @@ stack_supports_timeline_state_store = 
check_stack_feature(StackFeature.TIMELINE_
 # It cannot be used during the initial Cluser Install because the version is 
not yet known.
 version = default("/commandParams/version", None)
 
+# these are used to render the classpath for picking up Spark classes
+# in the event that spark is not installed, then we must default to the 
vesrion of YARN installed
+# since it will still load classes from its own spark version
+spark_version = component_version.get_component_repository_version("SPARK", 
"SPARK_CLIENT", default_value = version)
+spark2_version = 

[49/50] [abbrv] ambari git commit: AMBARI-22548 Admin View: update toggle styles. (atkach)

2017-11-30 Thread ncole
AMBARI-22548 Admin View: update toggle styles. (atkach)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: c3150a4652d8b129383a9a49fc3fd78991b224b7
Parents: 1f7bd75
Author: Andrii Tkach 
Authored: Wed Nov 29 19:27:44 2017 +0200
Committer: Andrii Tkach 
Committed: Thu Nov 30 12:40:00 2017 +0200

--
 .../ui/admin-web/app/styles/toggle-switch.css   | 72 
 .../app/views/ambariViews/modals/create.html|  3 +-
 .../app/views/authentication/main.html  |  6 +-
 .../views/loginActivities/homeDirectory.html|  6 +-
 .../app/views/loginActivities/loginMessage.html |  6 +-
 .../userManagement/modals/groupCreate.html  |  3 +-
 .../views/userManagement/modals/userCreate.html | 11 ++-
 .../app/views/userManagement/userEdit.html  | 12 ++--
 8 files changed, 104 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c3150a46/ambari-admin/src/main/resources/ui/admin-web/app/styles/toggle-switch.css
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/styles/toggle-switch.css 
b/ambari-admin/src/main/resources/ui/admin-web/app/styles/toggle-switch.css
new file mode 100644
index 000..3e36a6c
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/toggle-switch.css
@@ -0,0 +1,72 @@
+/**
+ * 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.
+ */
+
+.ats-switch {
+  border-radius: 20px;
+  height: 40px;
+  min-width: 66px;
+  width: 66px;
+  position: relative;
+  overflow: hidden;
+  border-color: #EBECF1;
+  border-width: 2px;
+}
+
+.ats-switch .knob {
+  margin-left: 34px;
+  border-radius: 20px;
+  height: 32px;
+  width: 32px;
+  margin-top: 2px;
+}
+
+.ats-switch .switch-left,
+.ats-switch .switch-right {
+  position: absolute;
+  right: -40px;
+}
+
+.ats-switch .switch-animate {
+  height: 100%;
+}
+
+.ats-switch .switch-off {
+  background-color: white;
+}
+
+.ats-switch .switch-on {
+  background-color: #1EB475;
+  left: -10%;
+}
+
+.ats-switch .switch-on .knob {
+  background-color: white;
+}
+
+.ats-switch .switch-off .knob {
+  background-color: #999;
+}
+
+.switch-option-label {
+  padding-left: 5px;
+  font-size: 14px;
+}
+
+.switch-inline-label {
+  line-height: 40px;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3150a46/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
index 82f90b3..b9d50c7 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
@@ -17,7 +17,7 @@
 -->
 
 
-  
+  
 
   {{'views.create' | translate}}
 
@@ -25,6 +25,7 @@
   {{'views.clone' | translate}}
 
   
+  
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3150a46/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
index 0275a21..9e672e1 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
@@ -28,9 +28,11 @@
   
 {{'authentication.description' | 
translate}}
 
-  {{'authentication.ldap' | 
translate}}
+  

[03/50] [abbrv] ambari git commit: AMBARI-22496. Admin View - Manage Versions page should show HDP-GPL repo if necessary (vsubramanian)

2017-11-30 Thread ncole
AMBARI-22496. Admin View - Manage Versions page should show HDP-GPL repo if 
necessary (vsubramanian)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 9fc7223df9a50fe69f4d8884939718b3f3bcf31b
Parents: 1d4cbc8
Author: Vivek Ratnavel Subramanian 
Authored: Wed Nov 22 17:01:15 2017 -0800
Committer: Vivek Ratnavel Subramanian 
Committed: Wed Nov 22 17:01:15 2017 -0800

--
 .../stackVersions/StackVersionsEditCtrl.js  | 27 ++-
 .../ui/admin-web/app/scripts/services/Stack.js  | 14 ++
 .../views/stackVersions/stackVersionPage.html   | 28 +++-
 3 files changed, 55 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9fc7223d/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
index 09e3c28..542772e 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
@@ -33,6 +33,15 @@ angular.module('ambariAdminConsole')
 display_name: ''
   };
   $scope.defaulfOSRepos = {}; // a copy of initial loaded repo info for 
"changed" check later
+  $scope.isGPLAccepted = false;
+
+  $scope.isGPLRepo = function (repository) {
+return repository.Repositories.tags.indexOf('GPL') >= 0;
+  };
+
+  $scope.showRepo = function (repository) {
+return $scope.isGPLAccepted || !$scope.isGPLRepo(repository);
+  };
 
   $scope.loadStackVersionInfo = function () {
 return Stack.getRepo($routeParams.versionId, 
$routeParams.stackName).then(function (response) {
@@ -67,6 +76,9 @@ angular.module('ambariAdminConsole')
   // load supported os type base on stack version
   $scope.afterStackVersionRead();
 
+  // Load GPL license accepted value
+  $scope.fetchGPLLicenseAccepted();
+
   // if user reach here from UI click, repo status should be cached
   // otherwise re-fetch repo status from cluster end point.
   $scope.repoStatus = Cluster.repoStatusCache[$scope.id];
@@ -85,6 +97,15 @@ angular.module('ambariAdminConsole')
   };
 
   /**
+   * Load GPL License Accepted value
+   */
+  $scope.fetchGPLLicenseAccepted = function () {
+Stack.getGPLLicenseAccepted().then(function (data) {
+  $scope.isGPLAccepted = data === 'true';
+})
+  };
+
+  /**
* Load supported OS list
*/
   $scope.afterStackVersionRead = function () {
@@ -170,7 +191,11 @@ angular.module('ambariAdminConsole')
 
   $scope.updateRepoVersions = function () {
 var skip = $scope.skipValidation || $scope.useRedhatSatellite;
-return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+// Filter out repositories that are not shown in the UI
+var osList = Object.assign([], $scope.osList).map(function(os) {
+  return Object.assign({}, os, {repositories: 
os.repositories.filter(function(repo) { return $scope.showRepo(repo); })});
+});
+return Stack.validateBaseUrls(skip, osList, 
$scope.upgradeStack).then(function (invalidUrls) {
   if (invalidUrls.length === 0) {
 Stack.updateRepo($scope.upgradeStack.stack_name, 
$scope.upgradeStack.stack_version, $scope.id, $scope.updateObj).then(function 
() {
   Alert.success($t('versions.alerts.versionEdited', {

http://git-wip-us.apache.org/repos/asf/ambari/blob/9fc7223d/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index 8003dd1..90f4f48 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -87,6 +87,20 @@ angular.module('ambariAdminConsole')
   return deferred.promise;
 },
 
+getGPLLicenseAccepted: function() {
+  var deferred = $q.defer();
+
+  $http.get(Settings.baseUrl + 

[39/50] [abbrv] ambari git commit: AMBARI-22480. Validate blueprint does not allow lzo enable without setup with license agreement. Added io.compression.codecs property validation. (mpapirkovskyy)

2017-11-30 Thread ncole
AMBARI-22480. Validate blueprint does not allow lzo enable without setup with 
license agreement. Added io.compression.codecs property validation. 
(mpapirkovskyy)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: f6fd9b5c5e04998ed0b0631c87c2d4b521e99a44
Parents: e12efe3
Author: Myroslav Papirkovskyi 
Authored: Tue Nov 28 14:51:58 2017 +0200
Committer: Myroslav Papirkovskyi 
Committed: Wed Nov 29 18:30:08 2017 +0200

--
 .../server/topology/BlueprintValidatorImpl.java |  4 +++-
 .../server/topology/BlueprintImplTest.java  | 20 +++-
 2 files changed, 22 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f6fd9b5c/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
index 87b5936..fbd0e4b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
@@ -49,6 +49,7 @@ public class BlueprintValidatorImpl implements 
BlueprintValidator {
   private final Stack stack;
 
   public static final String LZO_CODEC_CLASS_PROPERTY_NAME = 
"io.compression.codec.lzo.class";
+  public static final String CODEC_CLASSES_PROPERTY_NAME = 
"io.compression.codecs";
   public static final String LZO_CODEC_CLASS = 
"com.hadoop.compression.lzo.LzoCodec";
 
   @Inject
@@ -114,7 +115,8 @@ public class BlueprintValidatorImpl implements 
BlueprintValidator {
 String propertyName = propertyEntry.getKey();
 String propertyValue = propertyEntry.getValue();
 if (propertyValue != null) {
-  if (!gplEnabled && configType.equals("core-site") && 
propertyName.equals(LZO_CODEC_CLASS_PROPERTY_NAME)
+  if (!gplEnabled && configType.equals("core-site")
+  && (propertyName.equals(LZO_CODEC_CLASS_PROPERTY_NAME) || 
propertyName.equals(CODEC_CLASSES_PROPERTY_NAME))
   && propertyValue.contains(LZO_CODEC_CLASS)) {
 throw new GPLLicenseNotAcceptedException("Your Ambari server 
has not been configured to download LZO GPL software. " +
 "Please refer to documentation to configure Ambari before 
proceeding.");

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6fd9b5c/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
index 6d3179e..dd0adcc 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
@@ -299,7 +299,24 @@ public class BlueprintImplTest {
   }
 
   @Test(expected = GPLLicenseNotAcceptedException.class)
-  public void testValidateConfigurations__gplIsNotAllowed() throws 
InvalidTopologyException,
+  public void testValidateConfigurations__gplIsNotAllowedCodecsProperty() 
throws InvalidTopologyException,
+  GPLLicenseNotAcceptedException, NoSuchFieldException, 
IllegalAccessException {
+Map> lzoProperties = new HashMap<>();
+lzoProperties.put("core-site", new HashMap(){{
+  put(BlueprintValidatorImpl.CODEC_CLASSES_PROPERTY_NAME, "OtherCodec, " + 
BlueprintValidatorImpl.LZO_CODEC_CLASS);
+}});
+Configuration lzoUsageConfiguration = new Configuration(lzoProperties, 
EMPTY_ATTRIBUTES, EMPTY_CONFIGURATION);
+
+org.apache.ambari.server.configuration.Configuration serverConfig = 
setupConfigurationWithGPLLicense(false);
+replay(stack, group1, group2, serverConfig);
+
+Blueprint blueprint = new BlueprintImpl("test", hostGroups, stack, 
lzoUsageConfiguration, null);
+blueprint.validateRequiredProperties();
+verify(stack, group1, group2, serverConfig);
+  }
+
+  @Test(expected = GPLLicenseNotAcceptedException.class)
+  public void testValidateConfigurations__gplIsNotAllowedLZOProperty() throws 
InvalidTopologyException,
   GPLLicenseNotAcceptedException, 

[14/50] [abbrv] ambari git commit: AMBARI-22517. NPE during Ambari schema upgrade while updating Hive configs.

2017-11-30 Thread ncole
AMBARI-22517. NPE during Ambari schema upgrade while updating Hive configs.


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: c9936ad349e3e703dcbf6f2a1644f8a3e45a23d0
Parents: c5fe6cb
Author: Swapan Shridhar 
Authored: Mon Nov 27 00:47:57 2017 -0800
Committer: Swapan Shridhar 
Committed: Mon Nov 27 00:47:57 2017 -0800

--
 .../server/upgrade/UpgradeCatalog260.java   | 38 ++--
 1 file changed, 20 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c9936ad3/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
index 33b62f8..4d9a5da 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
@@ -775,26 +775,28 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
   // hive-interactive-site/hive.llap.zk.sm.keytab.file and 
hive-interactive-site/hive.llap.task.keytab.file respectively,
   // based on what hive-interactive-site/hive.llap.daemon.keytab.file 
has.
   Config hsiSiteConfig = 
cluster.getDesiredConfigByType(HIVE_INTERACTIVE_SITE);
-  Map hsiSiteConfigProperties = 
hsiSiteConfig.getProperties();
-  if (hsiSiteConfigProperties != null &&
-  
hsiSiteConfigProperties.containsKey(HIVE_LLAP_DAEMON_KEYTAB_FILE)) {
-String[] identities = {HIVE_LLAP_ZK_SM_KEYTAB_FILE, 
HIVE_LLAP_TASK_KEYTAB_FILE};
-Map newProperties = new HashMap<>();
-for (String identity : identities) {
-  // Update only if we were able to modify the corresponding 
kerberos descriptor,
-  // reflected in list 'getYarnKerberosDescUpdatedList'.
-  if (getYarnKerberosDescUpdatedList().contains(identity) && 
hsiSiteConfigProperties.containsKey(identity)) {
-newProperties.put(identity, 
hsiSiteConfigProperties.get(HIVE_LLAP_DAEMON_KEYTAB_FILE));
+  if (hsiSiteConfig != null) {
+Map hsiSiteConfigProperties = 
hsiSiteConfig.getProperties();
+if (hsiSiteConfigProperties != null &&
+
hsiSiteConfigProperties.containsKey(HIVE_LLAP_DAEMON_KEYTAB_FILE)) {
+  String[] identities = {HIVE_LLAP_ZK_SM_KEYTAB_FILE, 
HIVE_LLAP_TASK_KEYTAB_FILE};
+  Map newProperties = new HashMap<>();
+  for (String identity : identities) {
+// Update only if we were able to modify the corresponding 
kerberos descriptor,
+// reflected in list 'getYarnKerberosDescUpdatedList'.
+if (getYarnKerberosDescUpdatedList().contains(identity) && 
hsiSiteConfigProperties.containsKey(identity)) {
+  newProperties.put(identity, 
hsiSiteConfigProperties.get(HIVE_LLAP_DAEMON_KEYTAB_FILE));
+}
   }
-}
 
-// Update step.
-if (newProperties.size() > 0) {
-  try {
-updateConfigurationPropertiesForCluster(cluster, 
HIVE_INTERACTIVE_SITE, newProperties, true, false);
-LOG.info("Updated HSI config(s) : " + newProperties.keySet() + 
" with value(s) = " + newProperties.values()+" respectively.");
-  } catch (AmbariException e) {
-e.printStackTrace();
+  // Update step.
+  if (newProperties.size() > 0) {
+try {
+  updateConfigurationPropertiesForCluster(cluster, 
HIVE_INTERACTIVE_SITE, newProperties, true, false);
+  LOG.info("Updated HSI config(s) : " + newProperties.keySet() 
+ " with value(s) = " + newProperties.values() + " respectively.");
+} catch (AmbariException e) {
+  e.printStackTrace();
+}
   }
 }
   }



[33/50] [abbrv] ambari git commit: AMBARI-22535 - Remove extjs From Oozie Installations By Default (jonathanhurley)

2017-11-30 Thread ncole
AMBARI-22535 - Remove extjs From Oozie Installations By Default (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 31a0f1971a2be44c5322e7817a57d9e8aa1b606c
Parents: 11d7a6a
Author: Jonathan Hurley 
Authored: Tue Nov 28 13:50:49 2017 -0500
Committer: Jonathan Hurley 
Committed: Tue Nov 28 15:27:27 2017 -0500

--
 .../OOZIE/4.2.0.3.0/metainfo.xml|  9 ++---
 .../stacks/HDP/2.6/services/OOZIE/metainfo.xml  | 37 
 2 files changed, 39 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/31a0f197/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/metainfo.xml
index 47b3705..11ef853 100644
--- 
a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/metainfo.xml
@@ -25,7 +25,8 @@
 true
   
   Oozie
-  System for workflow coordination and execution of Apache Hadoop 
jobs.  This also includes the installation of the optional Oozie Web Console 
which relies on and will install the a target="_blank" 
href="http://www.sencha.com/legal/open-source-faq/"ExtJS/a; Library.
+  
+System for workflow coordination and execution of Apache Hadoop jobs.
   
   4.2.0.3.0
   
@@ -125,9 +126,6 @@
 
   zip
 
-
-  extjs
-
   
 
 
@@ -150,9 +148,6 @@
 
   falcon-${stack_version}
 
-
-  extjs
-
   
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/31a0f197/ambari-server/src/main/resources/stacks/HDP/2.6/services/OOZIE/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/OOZIE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/OOZIE/metainfo.xml
index c9dfaad..9b12d01 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/OOZIE/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/OOZIE/metainfo.xml
@@ -20,7 +20,44 @@
   
 
   OOZIE
+  
+System for workflow coordination and execution of Apache Hadoop jobs.
+
   4.2.0
+
+  
+
+  any
+  
+
+  zip
+
+  
+
+
+  redhat5,amazon2015,redhat6,redhat7,suse11,suse12
+  
+
+  oozie_${stack_version}
+
+
+  falcon_${stack_version}
+
+  
+
+
+  debian7,ubuntu12,ubuntu14,ubuntu16
+  
+
+  oozie-${stack_version}
+
+
+  falcon-${stack_version}
+
+  
+
+  
+
   
 application-properties
   



[05/50] [abbrv] ambari git commit: AMBARI-22467. YARN, MapReduce2, Hive, and Oozie Should Conditionally Install LZO (aonishuk)

2017-11-30 Thread ncole
AMBARI-22467. YARN, MapReduce2, Hive, and Oozie Should Conditionally Install 
LZO (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 20dee7f817d412088e1ba41a341a9fb5bbf33080
Parents: 6b17d01
Author: Andrew Onishuk 
Authored: Thu Nov 23 10:38:35 2017 +0200
Committer: Andrew Onishuk 
Committed: Thu Nov 23 10:38:35 2017 +0200

--
 .../common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py| 1 -
 .../common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py| 1 -
 2 files changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/20dee7f8/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
index e9d48c0..29813d3 100644
--- 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
+++ 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
@@ -193,7 +193,6 @@ def oozie(is_server=False, upgrade_type=None):
   if params.lzo_enabled:
 install_lzo_if_needed()
 Execute(format('{sudo} cp {hadoop_lib_home}/hadoop-lzo*.jar 
{oozie_lib_dir}'),
-  not_if  = no_op_test,
 )
   
   if is_server:

http://git-wip-us.apache.org/repos/asf/ambari/blob/20dee7f8/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py
 
b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py
index 1db16a9..96f1f1a 100644
--- 
a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py
+++ 
b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie.py
@@ -193,7 +193,6 @@ def oozie(is_server=False):
   if params.lzo_enabled:
 install_lzo_if_needed()
 Execute(format('{sudo} cp {hadoop_lib_home}/hadoop-lzo*.jar 
{oozie_lib_dir}'),
-  not_if  = no_op_test,
 )
   
   if is_server:  



ambari git commit: UI changes for prompting user during registration failure for new OS family (Sonia Garudi via ncole)

2017-11-30 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-21674 a11a8712a -> d43882d1a


UI changes for prompting user during registration failure for new OS family 
(Sonia Garudi via ncole)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: d43882d1aa55dc2f7e358fec176641b57a6c71f6
Parents: a11a871
Author: Nate Cole 
Authored: Thu Nov 30 09:07:47 2017 -0500
Committer: Nate Cole 
Committed: Thu Nov 30 09:07:47 2017 -0500

--
 .../ambari/server/bootstrap/BSHostStatus.java   |   9 ++
 .../server/bootstrap/BSHostStatusCollector.java |   7 +
 .../app/controllers/wizard/step3_controller.js  | 114 +++
 ambari-web/app/messages.js  |   3 +
 ambari-web/app/styles/wizard.less   |  22 +++
 ambari-web/app/templates/wizard/step3.hbs   |  47 +++
 .../test/controllers/wizard/step3_test.js   | 140 +++
 7 files changed, 342 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d43882d1/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatus.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatus.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatus.java
index 3d1b31c..a91a1f2 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatus.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatus.java
@@ -41,7 +41,16 @@ public class BSHostStatus {
   private String statusAction;
   @XmlElement
   private String log;
+  @XmlElement
+  private String osType;
+
+  public String getOsType() {
+return osType;
+  }
 
+  public void setOsType(String osType) {
+this.osType = osType;
+  }
 
   public void setStatus(String status) {
 this.status = status;

http://git-wip-us.apache.org/repos/asf/ambari/blob/d43882d1/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
index b72ca20..45e0870 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
@@ -79,6 +79,13 @@ class BSHostStatusCollector {
   if (statusCode.equals("0")) {
 status.setStatus("DONE");
   }
+  //the status code 44 is returned if ambari-repo property isn't set 
for the host's os_type in ambari.properties file.
+  //'44:' is written to the .done file for the respective 
host.
+  if (statusCode.startsWith("44")) {
+String[] sc = statusCode.split(":");
+status.setOsType(sc[1]);
+statusCode = sc[0];
+  }
   
   updateStatus(status, statusCode);
 } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d43882d1/ambari-web/app/controllers/wizard/step3_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js 
b/ambari-web/app/controllers/wizard/step3_controller.js
index 29393e3..5ff2cdc 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -184,6 +184,9 @@ App.WizardStep3Controller = 
Em.Controller.extend(App.ReloadPopupMixin, App.Check
 this.set('isLoaded', false);
 this.set('isSubmitDisabled', true);
 this.set('stopChecking', false);
+this.set('newAmbariOsTypes', []);
+this.set('promptAmbariRepoUrl', false);
+this.set('bootstrapInProgress', false);
   },
 
   /**
@@ -301,6 +304,24 @@ App.WizardStep3Controller = 
Em.Controller.extend(App.ReloadPopupMixin, App.Check
 return App.showConfirmationPopup(function () {
   App.router.send('removeHosts', hosts);
   self.hosts.removeObjects(hosts);
+  hosts.forEach(function(_host) {
+var ambariOsTypeIndex = -1;
+self.newAmbariOsTypes.some(function(os, index) {
+  if (os.hosts.contains(_host.name)){
+ambariOsTypeIndex = index;
+return true;
+  }
+});
+if (ambariOsTypeIndex != -1) {
+  

ambari git commit: AMBARI-22559. Upgrade Ambari Infra to use Solr 5.5.5 for Ambari 2.6.1 (oleewere)

2017-11-30 Thread oleewere
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 6db752cb0 -> 70418a031


AMBARI-22559. Upgrade Ambari Infra to use Solr 5.5.5 for Ambari 2.6.1 (oleewere)


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

Branch: refs/heads/branch-2.6
Commit: 70418a031793bc1809d86f1e77ecd417e0eca7a2
Parents: 6db752c
Author: Oliver Szabo 
Authored: Thu Nov 30 12:48:10 2017 +0100
Committer: Oliver Szabo 
Committed: Thu Nov 30 12:48:19 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/70418a03/ambari-logsearch/ambari-logsearch-assembly/pom.xml
--
diff --git a/ambari-logsearch/ambari-logsearch-assembly/pom.xml 
b/ambari-logsearch/ambari-logsearch-assembly/pom.xml
index c0a92f4..4cf40a5 100644
--- a/ambari-logsearch/ambari-logsearch-assembly/pom.xml
+++ b/ambari-logsearch/ambari-logsearch-assembly/pom.xml
@@ -28,7 +28,8 @@
   4.0.0
   
 /usr/lib
-
http://archive.apache.org/dist/lucene/solr/${solr.version}/solr-${solr.version}.tgz
+
+
http://public-repo-1.hortonworks.com/ARTIFACTS/dist/lucene/solr/${solr.version}/solr-${solr.version}.tgz
 
${mapping.base.path}/ambari-infra-solr
 ambari-infra-solr
 
ambari-infra-solr-client

http://git-wip-us.apache.org/repos/asf/ambari/blob/70418a03/ambari-logsearch/pom.xml
--
diff --git a/ambari-logsearch/pom.xml b/ambari-logsearch/pom.xml
index 5a1edee..d21074a 100644
--- a/ambari-logsearch/pom.xml
+++ b/ambari-logsearch/pom.xml
@@ -43,7 +43,7 @@
 python (= 2.6)
 amd64
 ${deb.python.ver}
-5.5.2
+5.5.5
 2.7.2
 2.5
   



ambari git commit: AMBARI-22548 Admin View: update toggle styles. (atkach)

2017-11-30 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk 1f7bd75e0 -> c3150a465


AMBARI-22548 Admin View: update toggle styles. (atkach)


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

Branch: refs/heads/trunk
Commit: c3150a4652d8b129383a9a49fc3fd78991b224b7
Parents: 1f7bd75
Author: Andrii Tkach 
Authored: Wed Nov 29 19:27:44 2017 +0200
Committer: Andrii Tkach 
Committed: Thu Nov 30 12:40:00 2017 +0200

--
 .../ui/admin-web/app/styles/toggle-switch.css   | 72 
 .../app/views/ambariViews/modals/create.html|  3 +-
 .../app/views/authentication/main.html  |  6 +-
 .../views/loginActivities/homeDirectory.html|  6 +-
 .../app/views/loginActivities/loginMessage.html |  6 +-
 .../userManagement/modals/groupCreate.html  |  3 +-
 .../views/userManagement/modals/userCreate.html | 11 ++-
 .../app/views/userManagement/userEdit.html  | 12 ++--
 8 files changed, 104 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c3150a46/ambari-admin/src/main/resources/ui/admin-web/app/styles/toggle-switch.css
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/styles/toggle-switch.css 
b/ambari-admin/src/main/resources/ui/admin-web/app/styles/toggle-switch.css
new file mode 100644
index 000..3e36a6c
--- /dev/null
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/toggle-switch.css
@@ -0,0 +1,72 @@
+/**
+ * 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.
+ */
+
+.ats-switch {
+  border-radius: 20px;
+  height: 40px;
+  min-width: 66px;
+  width: 66px;
+  position: relative;
+  overflow: hidden;
+  border-color: #EBECF1;
+  border-width: 2px;
+}
+
+.ats-switch .knob {
+  margin-left: 34px;
+  border-radius: 20px;
+  height: 32px;
+  width: 32px;
+  margin-top: 2px;
+}
+
+.ats-switch .switch-left,
+.ats-switch .switch-right {
+  position: absolute;
+  right: -40px;
+}
+
+.ats-switch .switch-animate {
+  height: 100%;
+}
+
+.ats-switch .switch-off {
+  background-color: white;
+}
+
+.ats-switch .switch-on {
+  background-color: #1EB475;
+  left: -10%;
+}
+
+.ats-switch .switch-on .knob {
+  background-color: white;
+}
+
+.ats-switch .switch-off .knob {
+  background-color: #999;
+}
+
+.switch-option-label {
+  padding-left: 5px;
+  font-size: 14px;
+}
+
+.switch-inline-label {
+  line-height: 40px;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3150a46/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
index 82f90b3..b9d50c7 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/modals/create.html
@@ -17,7 +17,7 @@
 -->
 
 
-  
+  
 
   {{'views.create' | translate}}
 
@@ -25,6 +25,7 @@
   {{'views.clone' | translate}}
 
   
+  
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3150a46/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
index 0275a21..9e672e1 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/authentication/main.html
@@ -28,9 +28,11 @@
   
 {{'authentication.description' | 
translate}}
 

ambari git commit: AMBARI-22479 After removing force_delete_components option hosts are not deleted (dsen)

2017-11-30 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 19e6518d4 -> 1f7bd75e0


AMBARI-22479 After removing force_delete_components option hosts are not 
deleted (dsen)


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

Branch: refs/heads/trunk
Commit: 1f7bd75e0e8514539ca27fe53b7a39a01a11c285
Parents: 19e6518
Author: Dmytro Sen 
Authored: Thu Nov 30 10:45:18 2017 +0200
Committer: Dmytro Sen 
Committed: Thu Nov 30 10:45:18 2017 +0200

--
 .../AmbariManagementControllerImpl.java |  9 
 .../internal/HostResourceProvider.java  | 54 ++--
 .../AmbariManagementControllerTest.java | 42 +--
 .../internal/HostResourceProviderTest.java  |  6 +--
 4 files changed, 30 insertions(+), 81 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f7bd75e/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 3d09154..455814a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -3477,15 +3477,6 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
   + ", hostname=" + request.getHostname()
   + ", request=" + request);
 }
-
-// Only allow removing master/slave components in 
DISABLED/UNKNOWN/INSTALL_FAILED/INIT state without stages
-// generation.
-// Clients may be removed without a state check.
-if (!component.isClientComponent() &&
-!componentHost.getState().isRemovableState()) {
-  throw new AmbariException("To remove master or slave components they 
must be in " +
-  "DISABLED/INIT/INSTALLED/INSTALL_FAILED/UNKNOWN state. Current=" 
+ componentHost.getState() + ".");
-}
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f7bd75e/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
index 2b18eb2..5c740f1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
@@ -62,7 +62,6 @@ import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.Host;
 import org.apache.ambari.server.state.MaintenanceState;
 import org.apache.ambari.server.state.ServiceComponentHost;
-import org.apache.ambari.server.state.State;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.apache.ambari.server.topology.ClusterTopology;
 import org.apache.ambari.server.topology.InvalidTopologyException;
@@ -146,9 +145,6 @@ public class HostResourceProvider extends 
AbstractControllerResourceProvider {
 
   //todo use the same json structure for cluster host addition (cluster 
template and upscale)
 
-  protected static final String FORCE_DELETE_COMPONENTS = 
"force_delete_components";
-
-
   private static final Set PK_PROPERTY_IDS = 
ImmutableSet.of(HOST_HOST_NAME_PROPERTY_ID);
 
   @Inject
@@ -320,8 +316,6 @@ public class HostResourceProvider extends 
AbstractControllerResourceProvider {
 
 final Set requests = new HashSet<>();
 Map requestInfoProperties = 
request.getRequestInfoProperties();
-final boolean forceDelete = 
requestInfoProperties.containsKey(FORCE_DELETE_COMPONENTS) &&
-  
requestInfoProperties.get(FORCE_DELETE_COMPONENTS).equals("true");
 
 for (Map propertyMap : getPropertyMaps(predicate)) {
   requests.add(getRequest(propertyMap));
@@ -330,7 +324,7 @@ public class HostResourceProvider extends 
AbstractControllerResourceProvider {
 DeleteStatusMetaData deleteStatusMetaData = modifyResources(new 
Command() {
   @Override
   public DeleteStatusMetaData invoke() throws AmbariException {
-return deleteHosts(requests, request.isDryRunRequest(), 

[2/2] ambari git commit: AMBARI-22550. Service install/start failure due to wrong version directory

2017-11-30 Thread adoroszlai
AMBARI-22550. Service install/start failure due to wrong version directory


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

Branch: refs/heads/trunk
Commit: 19e6518d42170a33ca2e0161ec2d3abb5190f976
Parents: ff08592
Author: Doroszlai, Attila 
Authored: Wed Nov 29 19:02:32 2017 +0100
Committer: Doroszlai, Attila 
Committed: Thu Nov 30 09:02:46 2017 +0100

--
 .../actionmanager/ExecutionCommandWrapper.java   |  5 +
 .../actionmanager/ExecutionCommandWrapperTest.java   | 15 +--
 2 files changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/19e6518d/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
index 7b693cd..191e86c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
@@ -297,7 +297,12 @@ public class ExecutionCommandWrapper {
   if (null != repositoryVersion) {
 // only set the version if it's not set and this is NOT an install
 // command
+// Some stack scripts use version for path purposes.  Sending 
unresolved version first (for
+// blueprints) and then resolved one would result in various issues: 
duplicate directories
+// (/hdp/apps/2.6.3.0 + /hdp/apps/2.6.3.0-235), parent directory not 
found, and file not
+// found, etc.  Hence requiring repositoryVersion to be resolved.
 if (!commandParams.containsKey(VERSION)
+  && repositoryVersion.isResolved()
   && executionCommand.getRoleCommand() != RoleCommand.INSTALL) {
   commandParams.put(VERSION, repositoryVersion.getVersion());
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/19e6518d/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
index fb84df5..f12c701 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
@@ -312,8 +312,7 @@ public class ExecutionCommandWrapperTest {
 commandParams = processedExecutionCommand.getCommandParams();
 Assert.assertFalse(commandParams.containsKey(KeyNames.VERSION));
 
-// now try with a START command which should populate the version even
-// though the state is INSTALLING
+// now try with a START command, but still unresolved
 executionCommand = new ExecutionCommand();
 commandParams = new HashMap<>();
 
@@ -334,6 +333,17 @@ public class ExecutionCommandWrapperTest {
 
 processedExecutionCommand = execCommWrap.getExecutionCommand();
 commandParams = processedExecutionCommand.getCommandParams();
+Assert.assertFalse(commandParams.containsKey(KeyNames.VERSION));
+
+// now that the repositoryVersion is resolved, it should populate the 
version even
+// though the state is INSTALLING
+repositoryVersion.setResolved(true);
+ormTestHelper.repositoryVersionDAO.merge(repositoryVersion);
+execCommWrap = new ExecutionCommandWrapper(json);
+injector.injectMembers(execCommWrap);
+
+processedExecutionCommand = execCommWrap.getExecutionCommand();
+commandParams = processedExecutionCommand.getCommandParams();
 Assert.assertEquals("0.1-", commandParams.get(KeyNames.VERSION));
 }
 
@@ -346,6 +356,7 @@ public class ExecutionCommandWrapperTest {
 
 StackId stackId = cluster.getDesiredStackVersion();
 RepositoryVersionEntity repositoryVersion = 
ormTestHelper.getOrCreateRepositoryVersion(stackId, "0.1-");
+repositoryVersion.setResolved(true); // has build number
 Service service = cluster.getService("HDFS");
 service.setDesiredRepositoryVersion(repositoryVersion);
 



[1/2] ambari git commit: AMBARI-22550. Service install/start failure due to wrong version directory

2017-11-30 Thread adoroszlai
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 128c7fb5f -> 6db752cb0
  refs/heads/trunk ff08592a3 -> 19e6518d4


AMBARI-22550. Service install/start failure due to wrong version directory


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

Branch: refs/heads/branch-2.6
Commit: 6db752cb0c2f6b024d85a597f1385a9c2189ad2a
Parents: 128c7fb
Author: Doroszlai, Attila 
Authored: Wed Nov 29 19:02:32 2017 +0100
Committer: Doroszlai, Attila 
Committed: Thu Nov 30 09:01:05 2017 +0100

--
 .../actionmanager/ExecutionCommandWrapper.java   |  5 +
 .../actionmanager/ExecutionCommandWrapperTest.java   | 15 +--
 2 files changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6db752cb/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
index 212363b..f9935bd 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
@@ -302,7 +302,12 @@ public class ExecutionCommandWrapper {
   if (null != repositoryVersion) {
 // only set the version if it's not set and this is NOT an install
 // command
+// Some stack scripts use version for path purposes.  Sending 
unresolved version first (for
+// blueprints) and then resolved one would result in various issues: 
duplicate directories
+// (/hdp/apps/2.6.3.0 + /hdp/apps/2.6.3.0-235), parent directory not 
found, and file not
+// found, etc.  Hence requiring repositoryVersion to be resolved.
 if (!commandParams.containsKey(VERSION)
+  && repositoryVersion.isResolved()
   && executionCommand.getRoleCommand() != RoleCommand.INSTALL) {
   commandParams.put(VERSION, repositoryVersion.getVersion());
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/6db752cb/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
index 7630c55..2efc7a7 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
@@ -318,8 +318,7 @@ public class ExecutionCommandWrapperTest {
 commandParams = processedExecutionCommand.getCommandParams();
 Assert.assertFalse(commandParams.containsKey(KeyNames.VERSION));
 
-// now try with a START command which should populate the version even
-// though the state is INSTALLING
+// now try with a START command, but still unresolved
 executionCommand = new ExecutionCommand();
 commandParams = new HashMap<>();
 
@@ -340,6 +339,17 @@ public class ExecutionCommandWrapperTest {
 
 processedExecutionCommand = execCommWrap.getExecutionCommand();
 commandParams = processedExecutionCommand.getCommandParams();
+Assert.assertFalse(commandParams.containsKey(KeyNames.VERSION));
+
+// now that the repositoryVersion is resolved, it should populate the 
version even
+// though the state is INSTALLING
+repositoryVersion.setResolved(true);
+ormTestHelper.repositoryVersionDAO.merge(repositoryVersion);
+execCommWrap = new ExecutionCommandWrapper(json);
+injector.injectMembers(execCommWrap);
+
+processedExecutionCommand = execCommWrap.getExecutionCommand();
+commandParams = processedExecutionCommand.getCommandParams();
 Assert.assertEquals("0.1-", commandParams.get(KeyNames.VERSION));
   }
 
@@ -352,6 +362,7 @@ public class ExecutionCommandWrapperTest {
 
 StackId stackId = cluster.getDesiredStackVersion();
 RepositoryVersionEntity repositoryVersion = 
ormTestHelper.getOrCreateRepositoryVersion(stackId, "0.1-");
+repositoryVersion.setResolved(true); // has build number
 Service service = cluster.getService("HDFS");
 service.setDesiredRepositoryVersion(repositoryVersion);