[1/2] ambari git commit: AMBARI-14915. Ambari Server should not use /tmp for extraction. (mpapirkovskyy)

2016-02-04 Thread mpapirkovskyy
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 16ff8f30a -> 0734caf1d
  refs/heads/trunk 4fbf172c3 -> ed3ca611b


AMBARI-14915. Ambari Server should not use /tmp for extraction. (mpapirkovskyy)


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

Branch: refs/heads/branch-2.2
Commit: 0734caf1de23a0a8f5c54a77141d32b2631f52cb
Parents: 16ff8f3
Author: Myroslav Papirkovskyy 
Authored: Thu Feb 4 13:05:05 2016 +0200
Committer: Myroslav Papirkovskyy 
Committed: Thu Feb 4 13:05:05 2016 +0200

--
 .../apache/ambari/server/configuration/Configuration.java |  8 
 .../org/apache/ambari/server/controller/AmbariServer.java | 10 ++
 .../apache/ambari/server/controller/AmbariServerTest.java |  9 +
 3 files changed, 27 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0734caf1/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index f74073f..edcfa28 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -2327,6 +2327,14 @@ public class Configuration {
   }
 
   /**
+   * Ambari server temp dir
+   * @return server temp dir
+   */
+  public String getServerTempDir() {
+return properties.getProperty(SERVER_TMP_DIR_KEY, SERVER_TMP_DIR_DEFAULT);
+  }
+
+  /**
* Gets whether to use experiemental concurrent processing to convert
* {@link StageEntity} instances into {@link Stage} instances. The default is
* {@code false}.

http://git-wip-us.apache.org/repos/asf/ambari/blob/0734caf1/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index 433853b..373b7fc 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -248,6 +248,14 @@ public class AmbariServer {
 
   private static AmbariManagementController clusterController = null;
 
+  /**
+   * Alters system variables on base of Ambari configuration
+   */
+  static void setSystemProperties(Configuration configs) {
+// modify location of temporary dir to avoid using default /tmp dir
+System.setProperty("java.io.tmpdir", configs.getServerTempDir());
+  }
+
   public static AmbariManagementController getController() {
 return clusterController;
   }
@@ -260,6 +268,8 @@ public class AmbariServer {
 server.setSessionIdManager(sessionIdManager);
 Server serverForAgent = new Server();
 
+setSystemProperties(configs);
+
 DatabaseChecker.checkDBVersion();
 DatabaseChecker.checkDBConsistency();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0734caf1/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
index 02941b5..54f6147 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
@@ -105,6 +105,15 @@ public class AmbariServerTest {
   }
 
   @Test
+  public void testSystemProperties() throws Exception {
+Configuration configuration = EasyMock.createNiceMock(Configuration.class);
+
expect(configuration.getServerTempDir()).andReturn("/ambari/server/temp/dir").anyTimes();
+replay(configuration);
+AmbariServer.setSystemProperties(configuration);
+Assert.assertEquals(System.getProperty("java.io.tmpdir"), 
"/ambari/server/temp/dir");
+  }
+
+  @Test
   public void testProxyUser() throws Exception {
 
 PasswordAuthentication pa = Authenticator.requestPasswordAuthentication(



[2/2] ambari git commit: AMBARI-14915. Ambari Server should not use /tmp for extraction. (mpapirkovskyy)

2016-02-04 Thread mpapirkovskyy
AMBARI-14915. Ambari Server should not use /tmp for extraction. (mpapirkovskyy)


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

Branch: refs/heads/trunk
Commit: ed3ca611b98a6a68c12a735ca934a83755913b39
Parents: 4fbf172
Author: Myroslav Papirkovskyy 
Authored: Thu Feb 4 13:14:06 2016 +0200
Committer: Myroslav Papirkovskyy 
Committed: Thu Feb 4 13:14:06 2016 +0200

--
 .../apache/ambari/server/configuration/Configuration.java |  8 
 .../org/apache/ambari/server/controller/AmbariServer.java | 10 ++
 .../apache/ambari/server/controller/AmbariServerTest.java |  9 +
 3 files changed, 27 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ed3ca611/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 4a4ae43..35e9b6f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -2419,6 +2419,14 @@ public class Configuration {
   }
 
   /**
+   * Ambari server temp dir
+   * @return server temp dir
+   */
+  public String getServerTempDir() {
+return properties.getProperty(SERVER_TMP_DIR_KEY, SERVER_TMP_DIR_DEFAULT);
+  }
+
+  /**
* Gets whether to use experiemental concurrent processing to convert
* {@link StageEntity} instances into {@link Stage} instances. The default is
* {@code false}.

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed3ca611/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index 9c05bf8..c7e7880 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -253,6 +253,14 @@ public class AmbariServer {
 
   private static AmbariManagementController clusterController = null;
 
+  /**
+   * Alters system variables on base of Ambari configuration
+   */
+  static void setSystemProperties(Configuration configs) {
+// modify location of temporary dir to avoid using default /tmp dir
+System.setProperty("java.io.tmpdir", configs.getServerTempDir());
+  }
+
   public static AmbariManagementController getController() {
 return clusterController;
   }
@@ -265,6 +273,8 @@ public class AmbariServer {
 server.setSessionIdManager(sessionIdManager);
 Server serverForAgent = new Server();
 
+setSystemProperties(configs);
+
 if (System.getProperty("skipDatabaseConsistencyValidation") == null) {
   DatabaseChecker.checkDBVersion();
   DatabaseChecker.checkDBConsistency();

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed3ca611/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
index 02941b5..54f6147 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
@@ -105,6 +105,15 @@ public class AmbariServerTest {
   }
 
   @Test
+  public void testSystemProperties() throws Exception {
+Configuration configuration = EasyMock.createNiceMock(Configuration.class);
+
expect(configuration.getServerTempDir()).andReturn("/ambari/server/temp/dir").anyTimes();
+replay(configuration);
+AmbariServer.setSystemProperties(configuration);
+Assert.assertEquals(System.getProperty("java.io.tmpdir"), 
"/ambari/server/temp/dir");
+  }
+
+  @Test
   public void testProxyUser() throws Exception {
 
 PasswordAuthentication pa = Authenticator.requestPasswordAuthentication(



ambari git commit: AMBARI-14919. [Ambari tarballs] Create script to install ambari tar.gz into custom root (aonishuk)

2016-02-04 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk ed3ca611b -> 04b02273a


AMBARI-14919. [Ambari tarballs] Create script to install ambari tar.gz into 
custom root (aonishuk)


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

Branch: refs/heads/trunk
Commit: 04b02273a611377602f023f4b6700856dc8eb115
Parents: ed3ca61
Author: Andrew Onishuk 
Authored: Thu Feb 4 14:06:02 2016 +0200
Committer: Andrew Onishuk 
Committed: Thu Feb 4 14:06:02 2016 +0200

--
 ambari-agent/pom.xml|  44 +-
 .../src/main/repo/install_ambari_tarball.py | 145 +++
 ambari-server/conf/unix/install-helper.sh   |  52 ---
 ambari-server/pom.xml   | 106 ++
 .../src/main/package/deb/control/postinst   |   6 +-
 .../src/main/package/deb/control/preinst|  23 +--
 .../src/main/package/deb/control/prerm  |   6 +-
 7 files changed, 313 insertions(+), 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/04b02273/ambari-agent/pom.xml
--
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 918065f..7531650 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -334,6 +334,48 @@
   
 
   
+  
+copy-repo-resources
+package
+
+  copy-resources
+
+
+  ${basedir}/target/repo
+  
+
+  
${project.basedir}/../ambari-common/src/main/repo
+
+
+  ${project.build.directory}
+  
+
${project.artifactId}-${project.version}.tar.gz
+  
+
+
+  
${basedir}/src/main/package/deb/control
+
+  
+
+  
+
+  
+  
+com.coderplus.maven.plugins
+copy-rename-maven-plugin
+1.0.1
+
+  
+rename-file
+package
+
+  rename
+
+
+  
${basedir}/target/repo/${project.artifactId}-${project.version}.tar.gz
+  
${basedir}/target/repo/${project.artifactId}.tar.gz
+
+  
 
   
   
@@ -449,7 +491,7 @@
 
   
 build-windows-zip
-prepare-package
+package
 
   single
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/04b02273/ambari-common/src/main/repo/install_ambari_tarball.py
--
diff --git a/ambari-common/src/main/repo/install_ambari_tarball.py 
b/ambari-common/src/main/repo/install_ambari_tarball.py
new file mode 100644
index 000..aa33ede
--- /dev/null
+++ b/ambari-common/src/main/repo/install_ambari_tarball.py
@@ -0,0 +1,145 @@
+#!/usr/bin/env python2
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+
+import os
+import sys
+import logging
+import subprocess
+from optparse import OptionParser
+
+USAGE = "Usage: %prog [OPTION]... URL"
+DESCRIPTION = "URL should point to full tar.gz location e.g.: 
https://public-repo-1.hortonworks.com/something/ambari-server.tar.gz;
+
+logger = logging.getLogger("install_ambari_tarball")
+
+PREINST_SCRIPT = "preinst"
+PRERM_SCRIPT = "prerm"
+POSTINST_SCRIPT = "postinst"
+POSTRM_SCRIPT = "postrm"
+
+ROOT_FOLDER_ENV_VARIABLE = "AMBARI_ROOT_FOLDER"
+
+class Utils:
+  verbose = False
+  @staticmethod
+  def os_call(command, logoutput=None, env={}):
+shell = not isinstance(command, list)
+print_output = logoutput==True or (logoutput==None and Utils.verbose)
+
+if not print_output:
+

[2/4] ambari git commit: AMBARI-14797. Register Version: display loaded version definition info in different categories and Save them.(XIWANG)

2016-02-04 Thread xiwang
AMBARI-14797. Register Version: display loaded version definition info in 
different categories and Save them.(XIWANG)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 0b47564002b295efb6be1b41aa66381561dbe7e4
Parents: e4d03b5
Author: Xi Wang 
Authored: Wed Feb 3 15:58:18 2016 -0800
Committer: Xi Wang 
Committed: Wed Feb 3 16:02:48 2016 -0800

--
 .../app/assets/data/version/version.json|   3 +
 .../stackVersions/StackVersionsCreateCtrl.js|  46 ++---
 .../ui/admin-web/app/scripts/i18n.config.js |  12 +-
 .../ui/admin-web/app/scripts/services/Stack.js  | 170 ++-
 .../resources/ui/admin-web/app/styles/main.css  |  15 ++
 .../views/stackVersions/stackVersionPage.html   |  87 +-
 6 files changed, 269 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0b475640/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
 
b/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
index b5b3601..d6530e2 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
@@ -26,6 +26,7 @@
 "services": [
   {
 "name": "HDFS",
+"display_name": "HDFS",
 "versions": [
   {
 "version": "2.1.1",
@@ -36,6 +37,7 @@
   },
   {
 "name": "HIVE",
+"display_name": "Hive",
 "versions": [
   {
 "version": "1.2.1"
@@ -44,6 +46,7 @@
   },
   {
 "name": "ZOOKEEPER",
+"display_name": "ZooKeeper",
 "versions": [
   {
 "version": "3.4.5"

http://git-wip-us.apache.org/repos/asf/ambari/blob/0b475640/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 40aa103..81ad7f7 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
@@ -156,14 +156,14 @@ angular.module('ambariAdminConsole')
 index: 1,
 displayName: 'Upload Version Definition File',
 url: 'files://',
-selected: true,
-hasError: true
+//selected: true,
+hasError: false
   };
   $scope.option2 = {
 index: 2,
 displayName: 'Version Definition File URL',
 url: 'https://',
-selected: false,
+//selected: false,
 hasError: false
   };
   $scope.selectedOption = 1;
@@ -172,8 +172,8 @@ angular.module('ambariAdminConsole')
* User can select ONLY one option to upload version definition file
*/
   $scope.toggleOptionSelect = function () {
-$scope.option1.selected = $scope.selectedOption == $scope.option1.index;
-$scope.option2.selected = $scope.selectedOption == $scope.option2.index;
+//$scope.option1.selected = $scope.selectedOption == $scope.option1.index;
+//$scope.option2.selected = $scope.selectedOption == $scope.option2.index;
 $scope.option1.hasError = false;
 $scope.option2.hasError = false;
   };
@@ -215,11 +215,11 @@ angular.module('ambariAdminConsole')
 return Stack.getLatestRepo('HDP').then(function (response) {
   $scope.id = response.id;
   $scope.isPatch = response.type == 'PATCH';
-  $scope.stackNameVersion = response.stackNameVersion;
-  $scope.displayName = response.displayName;
-  $scope.version = response.version;
-  $scope.actualVersion = response.actualVersion;
-  $scope.services = response.services;
+  $scope.stackNameVersion = response.stackNameVersion || 'n/a';
+  $scope.displayName = response.displayName || 'n/a';
+  $scope.version = response.version || 'n/a';
+  $scope.actualVersion = response.actualVersion || 'n/a';
+  $scope.services 

[1/4] ambari git commit: AMBARI-14795. Register Version: add ability to load new version definition file.

2016-02-04 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/branch-dev-patch-upgrade c72dc41db -> 0f9da4282


AMBARI-14795. Register Version: add ability to load new version definition file.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: e4d03b5b5879aff474abdbb3a9d571215383a6c4
Parents: c72dc41
Author: Xi Wang 
Authored: Fri Jan 22 17:24:01 2016 -0800
Committer: Xi Wang 
Committed: Wed Feb 3 13:55:05 2016 -0800

--
 .../app/assets/data/version/version.json|  38 ++-
 .../stackVersions/StackVersionsCreateCtrl.js| 100 +++
 .../ui/admin-web/app/scripts/i18n.config.js |   4 +
 .../ui/admin-web/app/scripts/services/Stack.js  |  38 +++
 .../resources/ui/admin-web/app/styles/main.css  |  16 ++-
 .../views/stackVersions/stackVersionPage.html   |  31 ++
 6 files changed, 225 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e4d03b5b/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
 
b/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
index 7c604f1..b5b3601 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/assets/data/version/version.json
@@ -14,7 +14,43 @@
 "id" : 15,
 "repository_version" : "2.2.0.1-901",
 "stack_name" : "HDP",
-"stack_version" : "2.2"
+"stack_version" : "2.2",
+"release": {
+  "type": "PATCH",
+  "stack_id": "HDP-2.2",
+  "version": "2.2.0.1",
+  "build": "901",
+  "compatible_with": "2.2.0.1-[1-9]",
+  "release_notes": "http://someurl;
+},
+"services": [
+  {
+"name": "HDFS",
+"versions": [
+  {
+"version": "2.1.1",
+"version_id": "10",
+"components": [ "NAMENODE"]
+  }
+]
+  },
+  {
+"name": "HIVE",
+"versions": [
+  {
+"version": "1.2.1"
+  }
+]
+  },
+  {
+"name": "ZOOKEEPER",
+"versions": [
+  {
+"version": "3.4.5"
+  }
+]
+  }
+]
   },
   "operating_systems" : [
 {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4d03b5b/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 a817d88..40aa103 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
@@ -151,4 +151,104 @@ angular.module('ambariAdminConsole')
 $location.path('/stackVersions');
   };
 
+  // two options to upload version definition file
+  $scope.option1 = {
+index: 1,
+displayName: 'Upload Version Definition File',
+url: 'files://',
+selected: true,
+hasError: true
+  };
+  $scope.option2 = {
+index: 2,
+displayName: 'Version Definition File URL',
+url: 'https://',
+selected: false,
+hasError: false
+  };
+  $scope.selectedOption = 1;
+
+  /**
+   * User can select ONLY one option to upload version definition file
+   */
+  $scope.toggleOptionSelect = function () {
+$scope.option1.selected = $scope.selectedOption == $scope.option1.index;
+$scope.option2.selected = $scope.selectedOption == $scope.option2.index;
+$scope.option1.hasError = false;
+$scope.option2.hasError = false;
+  };
+  $scope.clearOptionsError = function () {
+$scope.option1.hasError = false;
+$scope.option2.hasError = false;
+  };
+  $scope.readInfoButtonDisabled = function () {
+return 

[4/4] ambari git commit: AMBARI-14837. Versions: display all versions as tabs on left side, version details on selecting.(xiwang)

2016-02-04 Thread xiwang
AMBARI-14837. Versions: display all versions as tabs on left side, version 
details on selecting.(xiwang)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 0f9da42829c5d7118284d09e98190403bfdce41e
Parents: efc3a07
Author: Xi Wang 
Authored: Wed Feb 3 16:15:24 2016 -0800
Committer: Xi Wang 
Committed: Wed Feb 3 16:15:24 2016 -0800

--
 .../stackVersions/StackVersionsCreateCtrl.js|  35 +--
 .../stackVersions/StackVersionsEditCtrl.js  | 241 ---
 .../stackVersions/StackVersionsListCtrl.js  | 127 +++---
 .../ui/admin-web/app/scripts/i18n.config.js |   1 +
 .../ui/admin-web/app/scripts/services/Stack.js  |  30 ++-
 .../resources/ui/admin-web/app/styles/main.css  |  80 +-
 .../admin-web/app/views/stackVersions/list.html | 105 +++-
 .../views/stackVersions/stackVersionPage.html   |  50 +++-
 .../stackVersions/StackversionsListCtrl_test.js | 152 
 9 files changed, 357 insertions(+), 464 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f9da428/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 37f9c34..df76c15 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
@@ -23,7 +23,6 @@ angular.module('ambariAdminConsole')
   $scope.createController = true;
   $scope.osList = [];
   $scope.skipValidation = false;
-  $scope.repoSubversion = "";
 
   $scope.clusterName = $routeParams.clusterName;
   $scope.subversionPattern = /^\d+\.\d+(-\d+)?$/;
@@ -111,10 +110,8 @@ angular.module('ambariAdminConsole')
 };
   });
   $scope.repoVersionFullName = response.repoVersionFullName;
-  $scope.selectedOS = [];
   angular.forEach(response.osList, function (os) {
 os.selected = true;
-$scope.selectedOS.push(os.OperatingSystems.os_type);
   });
   $scope.osList = response.osList;
   // load supported os type base on stack version
@@ -130,8 +127,12 @@ angular.module('ambariAdminConsole')
   .then(function (data) {
 var operatingSystems = data.operating_systems;
 operatingSystems.map(function (os) {
-  // os not in the list, mark as un-selected, add this to the osList
-  if ($scope.selectedOS.indexOf(os.OperatingSystems.os_type) < 0) {
+  var existingOSHash = {};
+  angular.forEach($scope.osList, function (os) {
+existingOSHash[os.OperatingSystems.os_type] = os;
+  });
+  // if os not in the list, mark as un-selected, add this to the osList
+  if (!existingOSHash[os.OperatingSystems.os_type]) {
 os.selected = false;
 os.repositories.forEach(function(repo) {
   repo.Repositories.base_url = '';
@@ -183,9 +184,10 @@ angular.module('ambariAdminConsole')
   if (invalidUrls.length === 0) {
 Stack.addRepo($scope.upgradeStack, $scope.actualVersion, $scope.osList)
   .success(function () {
-var versionName = $scope.actualVersion + '';
-var stackName = $scope.upgradeStack.stack_name;
-Alert.success($t('versions.alerts.versionCreated'), {stackName: 
stackName, versionName: versionName});
+Alert.success($t('versions.alerts.versionCreated', {
+  stackName: $scope.upgradeStack.stack_name,
+  versionName: $scope.actualVersion
+}));
 $location.path('/stackVersions');
   })
   .error(function (data) {
@@ -196,19 +198,12 @@ angular.module('ambariAdminConsole')
   }
 });
   };
-  /**
-   * TODO create parent controller for StackVersionsEditCtrl and 
StackVersionsCreateCtrl and
-   * move this method to it
-   */
+
   $scope.cancel = function () {
 $scope.editVersionDisabled = true;
 $location.path('/stackVersions');
   };
 
-  /**
-   * TODO create parent controller for StackVersionsEditCtrl and 
StackVersionsCreateCtrl and
-   * move this method to it
-   */
   $scope.clearErrors = function() {
 if ($scope.osList) {
   $scope.osList.forEach(function(os) {
@@ -221,18 

ambari git commit: AMBARI-14901. NPE when configuring Kerberos at provisioning secure cluster with Blueprint. (Sandor Magyari via rnettleton)

2016-02-04 Thread rnettleton
Repository: ambari
Updated Branches:
  refs/heads/trunk f026accf2 -> 080991d13


AMBARI-14901. NPE when configuring Kerberos at provisioning secure cluster with 
Blueprint. (Sandor Magyari via rnettleton)


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

Branch: refs/heads/trunk
Commit: 080991d131768ece5e0d7065df2bb8443e14053f
Parents: f026acc
Author: Bob Nettleton 
Authored: Thu Feb 4 17:41:16 2016 -0500
Committer: Bob Nettleton 
Committed: Thu Feb 4 17:41:16 2016 -0500

--
 .../topology/ClusterConfigurationRequest.java   |  35 ++-
 .../ClusterConfigurationRequestTest.java| 101 +--
 2 files changed, 125 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/080991d1/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
index 0aae007..70fa880 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
@@ -161,9 +161,8 @@ public class ClusterConfigurationRequest {
 Map clusterConfigProperties = 
existingConfigurations.get(configType);
 Map stackDefaultConfigProperties = 
stackDefaultProps.get(configType);
 for (String property : propertyMap.keySet()) {
-  if (clusterConfigProperties == null || 
!clusterConfigProperties.containsKey(property)
- || (clusterConfigProperties.get(property) == null && 
stackDefaultConfigProperties.get(property) == null)
- || (clusterConfigProperties.get(property) != null && 
clusterConfigProperties.get(property).equals(stackDefaultConfigProperties.get(property
 {
+  // update value only if property value configured in Blueprint 
/ClusterTemplate is not a custom one
+  if (!propertyHasCustomValue(clusterConfigProperties, 
stackDefaultConfigProperties, property)) {
 LOG.debug("Update Kerberos related config property: {} {} {}", 
configType, property, propertyMap.get
   (property));
 clusterConfiguration.setProperty(configType, property, 
propertyMap.get(property));
@@ -179,6 +178,36 @@ public class ClusterConfigurationRequest {
 return updatedConfigTypes;
   }
 
+  /**
+   * Returns true if the property exists in clusterConfigProperties and has a 
custom user defined value. Property has
+   * custom value in case we there's no stack default value for it or it's not 
equal to stack default value.
+   * @param clusterConfigProperties
+   * @param stackDefaultConfigProperties
+   * @param property
+   * @return
+   */
+  private boolean propertyHasCustomValue(Map 
clusterConfigProperties, Map
+stackDefaultConfigProperties, String property) {
+
+boolean propertyHasCustomValue = false;
+if (clusterConfigProperties != null) {
+  String propertyValue = clusterConfigProperties.get(property);
+  if (propertyValue != null) {
+if (stackDefaultConfigProperties != null) {
+  String stackDefaultValue = 
stackDefaultConfigProperties.get(property);
+  if (stackDefaultValue != null) {
+propertyHasCustomValue = !propertyValue.equals(stackDefaultValue);
+  } else {
+propertyHasCustomValue = true;
+  }
+} else {
+  propertyHasCustomValue = true;
+}
+  }
+}
+return propertyHasCustomValue;
+  }
+
   private Map createComponentHostMap(Blueprint blueprint) {
 Map componentHostsMap = new HashMap();
 for (String service : blueprint.getServices()) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/080991d1/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
index 7309d5b..2e7bd3b 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
+++ 

ambari git commit: AMBARI-14901. NPE when configuring Kerberos at provisioning secure cluster with Blueprint. (Sandor Magyari via rnettleton)

2016-02-04 Thread rnettleton
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 feca33de8 -> 72f4367ea


AMBARI-14901. NPE when configuring Kerberos at provisioning secure cluster with 
Blueprint. (Sandor Magyari via rnettleton)


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

Branch: refs/heads/branch-2.2
Commit: 72f4367ea2c79b69e0eb76e5812aee0d89215aec
Parents: feca33d
Author: Bob Nettleton 
Authored: Thu Feb 4 17:48:51 2016 -0500
Committer: Bob Nettleton 
Committed: Thu Feb 4 17:48:51 2016 -0500

--
 .../topology/ClusterConfigurationRequest.java   |  35 ++-
 .../ClusterConfigurationRequestTest.java| 101 +--
 2 files changed, 125 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/72f4367e/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
index c719009..464aee7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java
@@ -148,9 +148,8 @@ public class ClusterConfigurationRequest {
 Map clusterConfigProperties = 
existingConfigurations.get(configType);
 Map stackDefaultConfigProperties = 
stackDefaultProps.get(configType);
 for (String property : propertyMap.keySet()) {
-  if (clusterConfigProperties == null || 
!clusterConfigProperties.containsKey(property)
- || (clusterConfigProperties.get(property) == null && 
stackDefaultConfigProperties.get(property) == null)
- || (clusterConfigProperties.get(property) != null && 
clusterConfigProperties.get(property).equals(stackDefaultConfigProperties.get(property
 {
+  // update value only if property value configured in Blueprint 
/ClusterTemplate is not a custom one
+  if (!propertyHasCustomValue(clusterConfigProperties, 
stackDefaultConfigProperties, property)) {
 LOG.debug("Update Kerberos related config property: {} {} {}", 
configType, property, propertyMap.get
   (property));
 clusterConfiguration.setProperty(configType, property, 
propertyMap.get(property));
@@ -166,6 +165,36 @@ public class ClusterConfigurationRequest {
 return updatedConfigTypes;
   }
 
+  /**
+   * Returns true if the property exists in clusterConfigProperties and has a 
custom user defined value. Property has
+   * custom value in case we there's no stack default value for it or it's not 
equal to stack default value.
+   * @param clusterConfigProperties
+   * @param stackDefaultConfigProperties
+   * @param property
+   * @return
+   */
+  private boolean propertyHasCustomValue(Map 
clusterConfigProperties, Map
+stackDefaultConfigProperties, String property) {
+
+boolean propertyHasCustomValue = false;
+if (clusterConfigProperties != null) {
+  String propertyValue = clusterConfigProperties.get(property);
+  if (propertyValue != null) {
+if (stackDefaultConfigProperties != null) {
+  String stackDefaultValue = 
stackDefaultConfigProperties.get(property);
+  if (stackDefaultValue != null) {
+propertyHasCustomValue = !propertyValue.equals(stackDefaultValue);
+  } else {
+propertyHasCustomValue = true;
+  }
+} else {
+  propertyHasCustomValue = true;
+}
+  }
+}
+return propertyHasCustomValue;
+  }
+
   private Map createComponentHostMap(Blueprint blueprint) {
 Map componentHostsMap = new HashMap();
 for (String service : blueprint.getServices()) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/72f4367e/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
index 8afff46..5967a64 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java

ambari git commit: AMBARI-14913: Show HAWQ default_segment_num parameter in General section (mithmatt via jaoki)

2016-02-04 Thread jaoki
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 72f4367ea -> 305a85fb5


AMBARI-14913: Show HAWQ default_segment_num parameter in General section 
(mithmatt via jaoki)


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

Branch: refs/heads/branch-2.2
Commit: 305a85fb54902e294495f4d600685bff9d902c9b
Parents: 72f4367
Author: Jun Aoki 
Authored: Thu Feb 4 14:51:19 2016 -0800
Committer: Jun Aoki 
Committed: Thu Feb 4 14:51:19 2016 -0800

--
 ambari-web/app/data/HDP2.3/site_properties.js | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/305a85fb/ambari-web/app/data/HDP2.3/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2.3/site_properties.js 
b/ambari-web/app/data/HDP2.3/site_properties.js
index fb79cd3..61cbe88 100644
--- a/ambari-web/app/data/HDP2.3/site_properties.js
+++ b/ambari-web/app/data/HDP2.3/site_properties.js
@@ -333,6 +333,13 @@ hdp23properties.push({
 "index": 8
   },
   {
+"name": "default_segment_num",
+"filename": "hawq-site.xml",
+"category": "General",
+"serviceName": "HAWQ",
+"index": 9
+  },
+  {
 "name": "content",
 "serviceName": "HAWQ",
 "filename": "gpcheck-env.xml",



ambari git commit: AMBARI-14913: Show HAWQ default_segment_num parameter in General section (mithmatt via jaoki)

2016-02-04 Thread jaoki
Repository: ambari
Updated Branches:
  refs/heads/trunk 080991d13 -> 3d7643b41


AMBARI-14913: Show HAWQ default_segment_num parameter in General section 
(mithmatt via jaoki)


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

Branch: refs/heads/trunk
Commit: 3d7643b41c214dfc2bca4af2ab5dc37f27b8e652
Parents: 080991d
Author: Jun Aoki 
Authored: Thu Feb 4 14:52:27 2016 -0800
Committer: Jun Aoki 
Committed: Thu Feb 4 14:52:27 2016 -0800

--
 ambari-web/app/data/HDP2.3/site_properties.js | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3d7643b4/ambari-web/app/data/HDP2.3/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2.3/site_properties.js 
b/ambari-web/app/data/HDP2.3/site_properties.js
index fb79cd3..61cbe88 100644
--- a/ambari-web/app/data/HDP2.3/site_properties.js
+++ b/ambari-web/app/data/HDP2.3/site_properties.js
@@ -333,6 +333,13 @@ hdp23properties.push({
 "index": 8
   },
   {
+"name": "default_segment_num",
+"filename": "hawq-site.xml",
+"category": "General",
+"serviceName": "HAWQ",
+"index": 9
+  },
+  {
 "name": "content",
 "serviceName": "HAWQ",
 "filename": "gpcheck-env.xml",



ambari git commit: AMBARI-14905. Add API directive to force toggling Kerberos if the cluster's security type has not changed (rlevas)

2016-02-04 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 4a739b2d3 -> feca33de8


AMBARI-14905. Add API directive to force toggling Kerberos if the cluster's 
security type has not changed (rlevas)


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

Branch: refs/heads/branch-2.2
Commit: feca33de8217b61e0c4d7a77dbfb1955ca971edb
Parents: 4a739b2
Author: Robert Levas 
Authored: Thu Feb 4 16:41:19 2016 -0500
Committer: Robert Levas 
Committed: Thu Feb 4 16:41:23 2016 -0500

--
 .../resources/ClusterResourceDefinition.java|  3 +-
 .../AmbariManagementControllerImpl.java | 39 +++-
 .../server/controller/KerberosHelper.java   | 26 +++-
 .../server/controller/KerberosHelperImpl.java   |  5 ++
 .../AmbariManagementControllerImplTest.java | 12 
 .../server/controller/KerberosHelperTest.java   | 66 +++-
 6 files changed, 130 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/feca33de/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
index b2be291..e57364f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
@@ -81,8 +81,9 @@ public class ClusterResourceDefinition extends 
BaseResourceDefinition {
   @Override
   public Collection getUpdateDirectives() {
 Collection directives = super.getUpdateDirectives();
-directives.add("regenerate_keytabs");
+directives.add(KerberosHelper.DIRECTIVE_REGENERATE_KEYTABS);
 directives.add(KerberosHelper.DIRECTIVE_MANAGE_KERBEROS_IDENTITIES);
+directives.add(KerberosHelper.DIRECTIVE_FORCE_TOGGLE_KERBEROS);
 return directives;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/feca33de/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 1f450bc..157b961 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
@@ -1597,25 +1597,30 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 } catch (KerberosOperationException e) {
   throw new IllegalArgumentException(e.getMessage(), e);
 }
-  } else if (cluster.getSecurityType() != securityType) {
-LOG.info("Received cluster security type change request from {} to {}",
-cluster.getSecurityType().name(), securityType.name());
-
-if ((securityType == SecurityType.KERBEROS) || (securityType == 
SecurityType.NONE)) {
-  // Since the security state of the cluster has changed, invoke 
toggleKerberos to handle
-  // adding or removing Kerberos from the cluster. This may generate 
multiple stages
-  // or not depending the current state of the cluster.
-  try {
-requestStageContainer = kerberosHelper.toggleKerberos(cluster, 
securityType, requestStageContainer,
-
kerberosHelper.getManageIdentitiesDirective(requestProperties));
-  } catch (KerberosOperationException e) {
-throw new IllegalArgumentException(e.getMessage(), e);
+  } else {
+// If force_toggle_kerberos is not specified, null will be returned. 
Therefore, perform an
+// equals check to yield true if the result is Boolean.TRUE, otherwise 
false.
+boolean forceToggleKerberos = 
kerberosHelper.getForceToggleKerberosDirective(requestProperties);
+
+if (forceToggleKerberos || (cluster.getSecurityType() != 
securityType)) {
+  LOG.info("Received cluster security type change request from {} to 
{} (forced: {})",
+  cluster.getSecurityType().name(), securityType.name(), 
forceToggleKerberos);
+  if ((securityType == SecurityType.KERBEROS) || (securityType == 

ambari git commit: AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku)

2016-02-04 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk eb3f99596 -> f026accf2


AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao 
via yusaku)


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

Branch: refs/heads/trunk
Commit: f026accf2df9f2be6e6f4dac049593c90f37bbc9
Parents: eb3f995
Author: Yusaku Sako 
Authored: Thu Feb 4 13:15:49 2016 -0800
Committer: Yusaku Sako 
Committed: Thu Feb 4 13:15:49 2016 -0800

--
 ambari-metrics/ambari-metrics-grafana/pom.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f026accf/ambari-metrics/ambari-metrics-grafana/pom.xml
--
diff --git a/ambari-metrics/ambari-metrics-grafana/pom.xml 
b/ambari-metrics/ambari-metrics-grafana/pom.xml
index 45ca1a0..8304416 100644
--- a/ambari-metrics/ambari-metrics-grafana/pom.xml
+++ b/ambari-metrics/ambari-metrics-grafana/pom.xml
@@ -67,6 +67,7 @@
 
   
 conf/unix/ams-grafana.ini
+**/*.json
   
 
 



ambari git commit: AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku)

2016-02-04 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 79681f8fb -> 4a739b2d3


AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao 
via yusaku)


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

Branch: refs/heads/branch-2.2
Commit: 4a739b2d33aa04d36e0e7632191ef3428c7fa04d
Parents: 79681f8
Author: Yusaku Sako 
Authored: Thu Feb 4 13:15:49 2016 -0800
Committer: Yusaku Sako 
Committed: Thu Feb 4 13:16:18 2016 -0800

--
 ambari-metrics/ambari-metrics-grafana/pom.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4a739b2d/ambari-metrics/ambari-metrics-grafana/pom.xml
--
diff --git a/ambari-metrics/ambari-metrics-grafana/pom.xml 
b/ambari-metrics/ambari-metrics-grafana/pom.xml
index 50eca9d..2f83c3c 100644
--- a/ambari-metrics/ambari-metrics-grafana/pom.xml
+++ b/ambari-metrics/ambari-metrics-grafana/pom.xml
@@ -67,6 +67,7 @@
 
   
 conf/unix/ams-grafana.ini
+**/*.json
   
 
 



ambari git commit: AMBARI-14916. Issues with Login Message dialog (alexantonenko)

2016-02-04 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 04b02273a -> 81b46da33


AMBARI-14916. Issues with Login Message dialog (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 81b46da33da91d672f16e88c9165e69954d2b292
Parents: 04b0227
Author: Alex Antonenko 
Authored: Thu Feb 4 13:11:57 2016 +0200
Committer: Alex Antonenko 
Committed: Thu Feb 4 17:08:46 2016 +0200

--
 .../loginActivities/LoginActivitiesMainCtrl.js  |  4 ++--
 .../loginActivities/LoginMessageMainCtrl.js |  5 ++--
 .../ui/admin-web/app/scripts/i18n.config.js |  6 +++--
 .../ui/admin-web/app/scripts/routes.js  |  9 ++-
 .../ui/admin-web/app/views/leftNavbar.html  |  2 +-
 .../app/views/loginActivities/loginMessage.html | 25 
 .../app/views/loginActivities/main.html |  4 ++--
 .../src/main/resources/ui/admin-web/gulpfile.js |  1 -
 ambari-web/app/router.js|  2 +-
 9 files changed, 30 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/81b46da3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js
index 84af924..3fcf8b2 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginActivitiesMainCtrl.js
@@ -18,6 +18,6 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-  .controller('LoginActivitiesMainCtrl',['$scope', function($scope) {
-$scope.tab = 'loginMessage';
+  .controller('LoginActivitiesMainCtrl',['$scope', '$location', 
function($scope, $location) {
+$scope.tab = $location.path().substr(1) == "loginActivities" ? 
"loginMessage" : $location.path().substr(1);
   }]);

http://git-wip-us.apache.org/repos/asf/ambari/blob/81b46da3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
index af78dde..763bd59 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/loginActivities/LoginMessageMainCtrl.js
@@ -29,18 +29,17 @@ angular.module('ambariAdminConsole')
 $scope.submitDisabled = true;
 
 $http.get('/api/v1/settings/motd').then(function (res) {
-  var response = JSON.parse(res.data.Settings.content);
+  $scope.motdExists = true;
+  var response = JSON.parse(res.data.Settings.content.replace(/\n/g, 
"\\n"));
   $scope.text = response.text ? response.text : "";
   $scope.buttonText = response.button ? response.button : "";
   $scope.status = response.status && response.status == "true" ? true : 
false;
-  $scope.motdExists = true;
 });
 
 $scope.inputChangeEvent = function(){
   $scope.submitDisabled = false;
 };
 $scope.changeStatus = function(){
-  $scope.status = !$scope.status;
   $scope.submitDisabled = false;
 };
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/81b46da3/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
index 086bc13..91a1645 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
@@ -90,8 +90,10 @@ angular.module('ambariAdminConsole')
 'onlySimpleChars': 'Must contain only simple characters.',
 'saveError': 'Save error',
 'message': 'Message',
-'buttonText': 'Button text',
-'switch': 'On/Off'
+'buttonText': 'Button',
+'status': 'Status',
+'status.enabled': 

ambari git commit: AMBARI-14929. Enable security wizard hangs (srimanth)

2016-02-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 3e1e4f86e -> 49c03e04d


AMBARI-14929. Enable security wizard hangs (srimanth)


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

Branch: refs/heads/branch-2.2
Commit: 49c03e04dbd74aa15b16280ac25aefeb3f686387
Parents: 3e1e4f8
Author: Srimanth Gunturi 
Authored: Thu Feb 4 11:07:25 2016 -0800
Committer: Srimanth Gunturi 
Committed: Thu Feb 4 11:16:53 2016 -0800

--
 ambari-web/app/controllers/wizard/step7_controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/49c03e04/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index a38222a..db6464d 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -725,7 +725,7 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
   }
 }
 // On single node cluster, update hawq configs
-if (Object.keys(this.get('content.hosts')).length === 1) 
this.removeHawqStandbyHostAddressConfig(configs);
+if (this.get('content.hosts') && 
Object.keys(this.get('content.hosts')).length === 1) 
this.removeHawqStandbyHostAddressConfig(configs);
 var dependedServices = ["STORM", "YARN"];
 dependedServices.forEach(function (serviceName) {
   if (this.get('allSelectedServiceNames').contains(serviceName)) {



ambari git commit: AMBARI-14786. Localhost configuration value for multiple host properties does not work properly. (Daniel Gergely via rnettleton)

2016-02-04 Thread rnettleton
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 49c03e04d -> 79681f8fb


AMBARI-14786. Localhost configuration value for multiple host properties does 
not work properly. (Daniel Gergely via rnettleton)


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

Branch: refs/heads/branch-2.2
Commit: 79681f8fb21a32c9ab2338e74a90f1a718e37ac0
Parents: 49c03e0
Author: Bob Nettleton 
Authored: Thu Feb 4 14:16:29 2016 -0500
Committer: Bob Nettleton 
Committed: Thu Feb 4 14:17:17 2016 -0500

--
 .../BlueprintConfigurationProcessor.java| 206 ++--
 .../BlueprintConfigurationProcessorTest.java| 243 ++-
 2 files changed, 370 insertions(+), 79 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/79681f8f/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index 93afe0d..82cff93 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -125,6 +125,11 @@ public class BlueprintConfigurationProcessor {
   private static Pattern HOSTGROUP_PORT_REGEX = 
Pattern.compile("%HOSTGROUP::(\\S+?)%:?(\\d+)?");
 
   /**
+   * Compiled regex for hostgroup token with port information.
+   */
+  private static Pattern LOCALHOST_PORT_REGEX = 
Pattern.compile("localhost:?(\\d+)?");
+
+  /**
* Statically-defined set of properties that can support HA using a 
nameservice name
*   in the configuration, rather than just a host name.
*   This set also contains other HA properties that will be exported if the
@@ -1578,7 +1583,9 @@ public class BlueprintConfigurationProcessor {
  */
 private final boolean usePrefixForEachHost;
 
-private final Set setOfKnownURLSchemes = 
Collections.singleton("thrift://");
+private final boolean useSuffixForEachHost;
+
+private final boolean usePortForEachHost;
 
 /**
  * Constructor.
@@ -1586,7 +1593,7 @@ public class BlueprintConfigurationProcessor {
  * @param component  component name associated with the property
  */
 public MultipleHostTopologyUpdater(String component) {
-  this(component, DEFAULT_SEPARATOR, false);
+  this(component, DEFAULT_SEPARATOR, false, false, true);
 }
 
 /**
@@ -1596,10 +1603,12 @@ public class BlueprintConfigurationProcessor {
  * @param separator the separator character to use when multiple hosts
  *  are specified in a property or URL
  */
-public MultipleHostTopologyUpdater(String component, Character separator, 
boolean userPrefixForEachHost) {
+public MultipleHostTopologyUpdater(String component, Character separator, 
boolean usePrefixForEachHost, boolean useSuffixForEachHost, boolean 
usePortForEachHost) {
   this.component = component;
   this.separator = separator;
-  this.usePrefixForEachHost = userPrefixForEachHost;
+  this.usePrefixForEachHost = usePrefixForEachHost;
+  this.useSuffixForEachHost = useSuffixForEachHost;
+  this.usePortForEachHost = usePortForEachHost;
 }
 
 /**
@@ -1620,36 +1629,101 @@ public class BlueprintConfigurationProcessor {
 
   StringBuilder sb = new StringBuilder();
 
-  if (!origValue.contains("%HOSTGROUP") &&
-  (!origValue.contains("localhost"))) {
+  if (!origValue.contains("%HOSTGROUP") && 
(!origValue.contains("localhost"))) {
 // this property must contain FQDNs specified directly by the user
 // of the Blueprint, so the processor should not attempt to update them
 return origValue;
   }
 
-  if (origValue.contains("localhost") && 
topology.getHostGroupsForComponent(component).size() == 1) {
-return origValue.replace("localhost", 
topology.getHostAssignmentsForComponent(component).iterator().next());
+  Collection hostStrings = getHostStrings(origValue, topology);
+  hostStrings.addAll(getHostStringsFromLocalhost(origValue, topology));
+
+  return resolveHostGroupPlaceholder(origValue, hostStrings);
+}
+
+/**
+ * Gets the prefix for hosts
+ * @param value property value
+ * @return prefix
+ */
+private 

ambari git commit: AMBARI-14929. Enable security wizard hangs (srimanth)

2016-02-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 7af40ca15 -> ab06c68ac


AMBARI-14929. Enable security wizard hangs (srimanth)


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

Branch: refs/heads/trunk
Commit: ab06c68acafd9e31a24e6b136f5772fdbf25655c
Parents: 7af40ca
Author: Srimanth Gunturi 
Authored: Thu Feb 4 11:19:12 2016 -0800
Committer: Srimanth Gunturi 
Committed: Thu Feb 4 11:19:12 2016 -0800

--
 ambari-web/app/controllers/wizard/step7_controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ab06c68a/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index 011833b..c92e83d 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -699,7 +699,7 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
   if (App.get('isHaEnabled')) this.addHawqConfigsOnNnHa(configs);
   if (App.get('isRMHaEnabled')) this.addHawqConfigsOnRMHa(configs);
 }
-if (Object.keys(this.get('content.hosts')).length === 1) 
this.removeHawqStandbyHostAddressConfig(configs);
+if (this.get('content.hosts') && 
Object.keys(this.get('content.hosts')).length === 1) 
this.removeHawqStandbyHostAddressConfig(configs);
 return configs
   },
 



ambari git commit: AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku)

2016-02-04 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk 7616e0f5d -> 7af40ca15


AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao 
via yusaku)


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

Branch: refs/heads/trunk
Commit: 7af40ca158e83c6d8c0de3d8381a6ad0c8a6b903
Parents: 7616e0f
Author: Yusaku Sako 
Authored: Thu Feb 4 11:13:19 2016 -0800
Committer: Yusaku Sako 
Committed: Thu Feb 4 11:13:24 2016 -0800

--
 .../screenshots/1-add-datasource.png  | Bin 0 -> 108602 bytes
 .../screenshots/10-choose-hostname.png| Bin 0 -> 298654 bytes
 .../screenshots/11-choose-agg-rate-precision.png  | Bin 0 -> 276486 bytes
 .../screenshots/12-change-panel-title.png | Bin 0 -> 258642 bytes
 .../screenshots/13-save-dashboard.png | Bin 0 -> 262005 bytes
 .../screenshots/14-change-timerange.png   | Bin 0 -> 310766 bytes
 .../screenshots/15-change-units.png   | Bin 0 -> 322069 bytes
 .../screenshots/16-display-style-graph-1.png  | Bin 0 -> 285467 bytes
 .../screenshots/17-series-specific-override.png   | Bin 0 -> 302825 bytes
 .../screenshots/18-override-time.png  | Bin 0 -> 255655 bytes
 .../screenshots/19-edit-graph.png | Bin 0 -> 191904 bytes
 .../screenshots/2-datasource-details.png  | Bin 0 -> 125313 bytes
 .../screenshots/3-test-datasource.png | Bin 0 -> 136121 bytes
 .../screenshots/4-dashboard-dropdown.png  | Bin 0 -> 126964 bytes
 .../screenshots/5-dashboard-graph-menu.png| Bin 0 -> 146851 bytes
 .../screenshots/6-graph-panels.png| Bin 0 -> 105383 bytes
 .../screenshots/7-choose-datasource.png   | Bin 0 -> 246860 bytes
 .../screenshots/8-choose-component.png| Bin 0 -> 199123 bytes
 .../screenshots/9-choose-metric.png   | Bin 0 -> 216473 bytes
 .../screenshots/add-dashboard.png | Bin 0 -> 107965 bytes
 .../screenshots/full-dashboard.png| Bin 0 -> 161956 bytes
 21 files changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/1-add-datasource.png
--
diff --git 
a/ambari-metrics/ambari-metrics-grafana/screenshots/1-add-datasource.png 
b/ambari-metrics/ambari-metrics-grafana/screenshots/1-add-datasource.png
new file mode 100644
index 000..1c1eaa4
Binary files /dev/null and 
b/ambari-metrics/ambari-metrics-grafana/screenshots/1-add-datasource.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/10-choose-hostname.png
--
diff --git 
a/ambari-metrics/ambari-metrics-grafana/screenshots/10-choose-hostname.png 
b/ambari-metrics/ambari-metrics-grafana/screenshots/10-choose-hostname.png
new file mode 100644
index 000..d6a7d1a
Binary files /dev/null and 
b/ambari-metrics/ambari-metrics-grafana/screenshots/10-choose-hostname.png 
differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/11-choose-agg-rate-precision.png
--
diff --git 
a/ambari-metrics/ambari-metrics-grafana/screenshots/11-choose-agg-rate-precision.png
 
b/ambari-metrics/ambari-metrics-grafana/screenshots/11-choose-agg-rate-precision.png
new file mode 100644
index 000..363fdf1
Binary files /dev/null and 
b/ambari-metrics/ambari-metrics-grafana/screenshots/11-choose-agg-rate-precision.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/12-change-panel-title.png
--
diff --git 
a/ambari-metrics/ambari-metrics-grafana/screenshots/12-change-panel-title.png 
b/ambari-metrics/ambari-metrics-grafana/screenshots/12-change-panel-title.png
new file mode 100644
index 000..fe34f82
Binary files /dev/null and 
b/ambari-metrics/ambari-metrics-grafana/screenshots/12-change-panel-title.png 
differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/7af40ca1/ambari-metrics/ambari-metrics-grafana/screenshots/13-save-dashboard.png
--
diff --git 
a/ambari-metrics/ambari-metrics-grafana/screenshots/13-save-dashboard.png 
b/ambari-metrics/ambari-metrics-grafana/screenshots/13-save-dashboard.png
new file mode 100644

svn commit: r12229 - /release/ambari/KEYS

2016-02-04 Thread yusaku
Author: yusaku
Date: Thu Feb  4 19:21:42 2016
New Revision: 12229

Log:
Update KEYS for Ambari. (yusaku)

Modified:
release/ambari/KEYS

Modified: release/ambari/KEYS
==
--- release/ambari/KEYS (original)
+++ release/ambari/KEYS Thu Feb  4 19:21:42 2016
@@ -487,3 +487,38 @@ Ku642inSr8PomuGyuTkLTnpo/lD5etZlJb9KWGGK
 ExGv9cmNDPgXcltrQaO9+vF6bewcfw1MdA==
 =deK2
 -END PGP PUBLIC KEY BLOCK-
+
+pub   2048R/0EF56BD9 2016-01-25 [expires: 2026-01-22]
+uid   [ultimate] Robert Levas 
+sub   2048R/E5E92AB1 2016-01-25 [expires: 2026-01-22]
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Comment: GPGTools - https://gpgtools.org
+
+mQENBFamF+sBCACw0G6bDBUx3P1USIoVjPVlb6CpaInKFnQbLTeYe8GcmEE9Lbc3
+9Iu6WUP//+y+IknFt0kj2lLKa/HnY2mY8iHNnxvy+cxPGjlXzBAyzUs3ASFoupoM
+nkB0OchWQmAec8Dm4dYKEt5go+vZp5ZSqHv7Q55YmKdfAREysqYP5/Fz8IBuphqO
+ESKokQxnLrTGElPWVRVFoH1i2ApKl1XzVCF4USsef0UqjSQNMpzlZ3So10g12OyT
+1N6yck7ocG2sLImpGRfREYtA4eeNRDEJGhgtW8GfF6X1ZaqAfHCa5o15XAbHA14X
+5ajRw0FfyJX/OcsMiLyuU+rTu3L0HepsjACrABEBAAG0IFJvYmVydCBMZXZhcyA8
+cmxldmFzQGFwYWNoZS5vcmc+iQE9BBMBCgAnBQJWphfrAhsDBQkSzAMABQsJCAcD
+BRUKCQgLBRYCAwEAAh4BAheAAAoJEILtj+EO9WvZQbkIAJeaSobMl55p9ZZufp/U
+8AUVyaCr8W8acqUE/9PYQ54/kTw493fTqGye0iYXUNGiN3qjg0ab4aw8vL5pzN32
+Vs+Au9hcAqSPgFUPPee6ipcb8B8lqWkNScyX6V63ti53UQU15POCKS8vxwutF7cA
+frpuweSySiGPvs4RM5/cbSZETNMwFcEvq3Af+bAuheUCh3Nb3a0/I+otafipH72L
+XgFnKtRGW/FXeA7Kas93nntizJOdewlaRP9jqIk9XTwCIccRUClef9RIlgt9oF1v
+wUYEHzsqXLuh91QCqNH8m9/35RudeyrkBYuDaDdqdJWH4DmP3NQtgo4qokjnUNtG
+cn25AQ0EVqYX6wEIAMY+jwWDHOIEmxs8buv6hWbJ1RZcyQoB19hb3+JT3gPfst5H
+Q00Jr9mOxQBZlGzPm8nhV129HsGKTPQhN/4xq2ecr+q+qEevhLRPjzI+RoSRorO3
+60uXQjiAX8jt2iUNtzAAFlnpk8H0gTYC0Y9yuScm3F1XFTeTKCa0ubhIR0KW4FOK
+fsilulFkcN5ZxIe737UzL0qSpSSdyO9uxuCgnWvmcF83+t6pnGv/eN2/J+z8nad/
+qlr+Th2Q5XD3OZMjKl15phj/V9P/3aBn5ctgxpnEREOXhclIKgC++zS5bNFcp1gz
+7J7B1ezmUI4I/nEqR45E7NyoZ1+bbNjD2SLanqsAEQEAAYkBJQQYAQoADwUCVqYX
+6wIbDAUJEswDAAAKCRCC7Y/hDvVr2YfqCACMr7KN6W3VHiHerHDeZUJJ2XijBwwy
+wNkujrS7gk3ZRHuJAr33pps/JyKKMp+uPeCUZyYGldSfnd4/i0wf+DWf3+DmVEa/
+E0acC3N0t01mN3I94vrjheb/Zm9PK1bDWS8xPmt6WUQ9o28DK+FCmNselwwYNNHV
+2d4S3gxf/vAhgJDm1FkoExD4kDCNDycBvoFDRxxdDG9xQDAJqkIEJpZeao26+dTF
+7I15zLastr2+KjIF3EgiapqlQUndShWmFwxGLEYY1REkLJJaVsqD+joJoQN8cJhc
+JH93bd2K+dqt3ZLR5z2FNzk+oJ4kdqIdO0rRgpfV9LZaBbX7e9acLelS
+=P4K4
+-END PGP PUBLIC KEY BLOCK-




ambari git commit: AMBARI-14918 enabling ranger caused proxy settings for user hive in hdfs to get updated (dsen)

2016-02-04 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 0734caf1d -> 23e01de9a


AMBARI-14918 enabling ranger caused proxy settings for user hive in hdfs to get 
updated (dsen)


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

Branch: refs/heads/branch-2.2
Commit: 23e01de9a60bd14663228996837ec93e72e7aebc
Parents: 0734caf
Author: Dmytro Sen 
Authored: Thu Feb 4 19:10:35 2016 +0200
Committer: Dmytro Sen 
Committed: Thu Feb 4 19:10:35 2016 +0200

--
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 32 +
 .../stacks/2.0.6/common/test_stack_advisor.py   | 50 
 2 files changed, 63 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/23e01de9/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 cbddea1..b4bb68f 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
@@ -173,11 +173,14 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   oozie_user = None
   if "oozie-env" in services["configurations"] and "oozie_user" in 
services["configurations"]["oozie-env"]["properties"]:
 oozie_user = 
services["configurations"]["oozie-env"]["properties"]["oozie_user"]
-oozieServerrHost = self.getHostWithComponent("OOZIE", "OOZIE_SERVER", 
services, hosts)
-if oozieServerrHost is not None:
-  oozieServerHostName = oozieServerrHost["Hosts"]["public_host_name"]
+oozieServerrHosts = self.getHostsWithComponent("OOZIE", 
"OOZIE_SERVER", services, hosts)
+if oozieServerrHosts is not None:
+  oozieServerHostsNameList = []
+  for oozieServerHost in oozieServerrHosts:
+
oozieServerHostsNameList.append(oozieServerHost["Hosts"]["public_host_name"])
+  oozieServerHostsNames = ",".join(oozieServerHostsNameList)
   if not oozie_user in users and oozie_user is not None:
-users[oozie_user] = {"propertyHosts" : 
oozieServerHostName,"propertyGroups" : "*", "config" : "oozie-env", 
"propertyName" : "oozie_user"}
+users[oozie_user] = {"propertyHosts" : 
oozieServerHostsNames,"propertyGroups" : "*", "config" : "oozie-env", 
"propertyName" : "oozie_user"}
 
 if "HIVE" in servicesList:
   hive_user = None
@@ -186,13 +189,24 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   and "webhcat_user" in 
services["configurations"]["hive-env"]["properties"]:
 hive_user = 
services["configurations"]["hive-env"]["properties"]["hive_user"]
 webhcat_user = 
services["configurations"]["hive-env"]["properties"]["webhcat_user"]
-hiveServerrHost = self.getHostWithComponent("HIVE", "HIVE_SERVER", 
services, hosts)
-if hiveServerrHost is not None:
-  hiveServerHostName = hiveServerrHost["Hosts"]["public_host_name"]
+hiveServerHosts = self.getHostsWithComponent("HIVE", "HIVE_SERVER", 
services, hosts)
+webHcatServerHosts = self.getHostsWithComponent("HIVE", 
"WEBHCAT_SERVER", services, hosts)
+
+if hiveServerHosts is not None:
+  hiveServerHostsNameList = []
+  for hiveServerHost in hiveServerHosts:
+
hiveServerHostsNameList.append(hiveServerHost["Hosts"]["public_host_name"])
+  hiveServerHostsNames = ",".join(hiveServerHostsNameList)
   if not hive_user in users and hive_user is not None:
-users[hive_user] = {"propertyHosts" : 
hiveServerHostName,"propertyGroups" : "*", "config" : "hive-env", 
"propertyName" : "hive_user"}
+users[hive_user] = {"propertyHosts" : 
hiveServerHostsNames,"propertyGroups" : "*", "config" : "hive-env", 
"propertyName" : "hive_user"}
+
+if webHcatServerHosts is not None:
+  webHcatServerHostsNameList = []
+  for webHcatServerHost in webHcatServerHosts:
+
webHcatServerHostsNameList.append(webHcatServerHost["Hosts"]["public_host_name"])
+  webHcatServerHostsNames = ",".join(webHcatServerHostsNameList)
   if not webhcat_user in users and webhcat_user is not None:
-users[webhcat_user] = {"propertyHosts" : 
hiveServerHostName,"propertyGroups" : "*", "config" : "hive-env", 
"propertyName" : "webhcat_user"}
+users[webhcat_user] = {"propertyHosts" : 

ambari git commit: AMBARI-14925 Make AMS Grafana component available as a DEB package (dsen)

2016-02-04 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 23e01de9a -> a9e2d1871


AMBARI-14925 Make AMS Grafana component available as a DEB package (dsen)


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

Branch: refs/heads/branch-2.2
Commit: a9e2d18712eba6090f6175780d7a295da4b54a7d
Parents: 23e01de
Author: Dmytro Sen 
Authored: Thu Feb 4 19:54:35 2016 +0200
Committer: Dmytro Sen 
Committed: Thu Feb 4 19:54:35 2016 +0200

--
 ambari-metrics/ambari-metrics-assembly/pom.xml | 53 -
 1 file changed, 52 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a9e2d187/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 aa8c287..2cb3016 100644
--- a/ambari-metrics/ambari-metrics-assembly/pom.xml
+++ b/ambari-metrics/ambari-metrics-assembly/pom.xml
@@ -501,11 +501,14 @@
   template
   
 /etc/ambari-metrics-monitor/conf
-/usr/lib/ambari-metrics-collector
 /etc/ambari-metrics-collector/conf
+/etc/ambari-metrics-grafana/conf
 /etc/ams-hbase/conf
 /var/run/ams-hbase
+/var/run/ambari-metrics-grafana
+/var/log/ambari-metrics-grafana
 /var/lib/ambari-metrics-collector
+/var/lib/ambari-metrics-grafana
 /usr/lib/ambari-metrics-hadoop-sink
 /usr/lib/ambari-metrics-kafka-sink
 /usr/lib/ambari-metrics-kafka-sink/lib
@@ -655,6 +658,54 @@
   
 
 
+
+
+
+  ${grafana.dir}/target/grafana/${grafana.folder}
+  directory
+  
+perm
+644
+/usr/lib/ambari-metrics-grafana
+  
+
+
+  
${grafana.dir}/target/grafana/${grafana.folder}/bin
+  directory
+  
+perm
+755
+/usr/lib/ambari-metrics-grafana/bin
+  
+
+
+  ${grafana.dir}/conf/unix/ambari-metrics-grafana
+  file
+  
+perm
+755
+/usr/sbin
+  
+
+
+  ${grafana.dir}/conf/unix/ams-grafana-env.sh
+  file
+  
+perm
+755
+/etc/ambari-metrics-grafana/conf
+  
+
+
+  ${grafana.dir}/conf/unix/ams-grafana.ini
+  file
+  
+perm
+644
+/etc/ambari-metrics-grafana/conf
+  
+
+
 
 
 



ambari git commit: AMBARI-14925 Make AMS Grafana component available as a DEB package (dsen)

2016-02-04 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 549ee24c3 -> 407822583


AMBARI-14925 Make AMS Grafana component available as a DEB package (dsen)


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

Branch: refs/heads/trunk
Commit: 407822583d2d4f1a21e9d610e80fb32de548d9ac
Parents: 549ee24
Author: Dmytro Sen 
Authored: Thu Feb 4 19:49:57 2016 +0200
Committer: Dmytro Sen 
Committed: Thu Feb 4 19:49:57 2016 +0200

--
 ambari-metrics/ambari-metrics-assembly/pom.xml | 53 -
 1 file changed, 52 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/40782258/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 dfc9351..511dc1f 100644
--- a/ambari-metrics/ambari-metrics-assembly/pom.xml
+++ b/ambari-metrics/ambari-metrics-assembly/pom.xml
@@ -501,11 +501,14 @@
   template
   
 /etc/ambari-metrics-monitor/conf
-/usr/lib/ambari-metrics-collector
 /etc/ambari-metrics-collector/conf
+/etc/ambari-metrics-grafana/conf
 /etc/ams-hbase/conf
 /var/run/ams-hbase
+/var/run/ambari-metrics-grafana
+/var/log/ambari-metrics-grafana
 /var/lib/ambari-metrics-collector
+/var/lib/ambari-metrics-grafana
 /usr/lib/ambari-metrics-hadoop-sink
 /usr/lib/ambari-metrics-kafka-sink
 /usr/lib/ambari-metrics-kafka-sink/lib
@@ -655,6 +658,54 @@
   
 
 
+
+
+
+  ${grafana.dir}/target/grafana/${grafana.folder}
+  directory
+  
+perm
+644
+/usr/lib/ambari-metrics-grafana
+  
+
+
+  
${grafana.dir}/target/grafana/${grafana.folder}/bin
+  directory
+  
+perm
+755
+/usr/lib/ambari-metrics-grafana/bin
+  
+
+
+  ${grafana.dir}/conf/unix/ambari-metrics-grafana
+  file
+  
+perm
+755
+/usr/sbin
+  
+
+
+  ${grafana.dir}/conf/unix/ams-grafana-env.sh
+  file
+  
+perm
+755
+/etc/ambari-metrics-grafana/conf
+  
+
+
+  ${grafana.dir}/conf/unix/ams-grafana.ini
+  file
+  
+perm
+644
+/etc/ambari-metrics-grafana/conf
+  
+
+
 
 
 



ambari git commit: AMBARI-14907 : Metrics not displayed for 'Last 1 year' period. (avijayan)

2016-02-04 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/trunk 8c6c13da3 -> d0bec5cb3


AMBARI-14907 : Metrics not displayed for 'Last 1 year' period. (avijayan)


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

Branch: refs/heads/trunk
Commit: d0bec5cb3c0298d83413342d55baf36133632ab8
Parents: 8c6c13d
Author: Aravindan Vijayan 
Authored: Thu Feb 4 10:48:38 2016 -0800
Committer: Aravindan Vijayan 
Committed: Thu Feb 4 10:48:38 2016 -0800

--
 .../server/upgrade/UpgradeCatalog222.java   | 46 
 .../0.1.0/configuration/ams-site.xml|  4 +-
 .../server/upgrade/UpgradeCatalog222Test.java   | 79 
 3 files changed, 127 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0bec5cb/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
index 22f6a39..7e2683d 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
@@ -27,6 +27,7 @@ import org.apache.ambari.server.orm.dao.DaoUtils;
 import org.apache.ambari.server.orm.entities.AlertDefinitionEntity;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,6 +47,11 @@ public class UpgradeCatalog222 extends 
AbstractUpgradeCatalog {
* Logger.
*/
   private static final Logger LOG = 
LoggerFactory.getLogger(UpgradeCatalog222.class);
+  private static final String AMS_SITE = "ams-site";
+  private static final String HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER =
+"timeline.metrics.host.aggregator.daily.checkpointCutOffMultiplier";
+  private static final String 
CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER =
+"timeline.metrics.cluster.aggregator.daily.checkpointCutOffMultiplier";
 
 
 
@@ -99,6 +105,7 @@ public class UpgradeCatalog222 extends 
AbstractUpgradeCatalog {
 addNewConfigurationsFromXml();
 updateAlerts();
 updateStormConfigs();
+updateAMSConfigs();
   }
 
   protected void updateStormConfigs() throws  AmbariException {
@@ -137,4 +144,43 @@ public class UpgradeCatalog222 extends 
AbstractUpgradeCatalog {
 
   }
 
+  protected void updateAMSConfigs() throws AmbariException {
+AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
+Clusters clusters = ambariManagementController.getClusters();
+
+if (clusters != null) {
+  Map clusterMap = clusters.getClusters();
+
+  if (clusterMap != null && !clusterMap.isEmpty()) {
+for (final Cluster cluster : clusterMap.values()) {
+
+  Config amsSite = cluster.getDesiredConfigByType(AMS_SITE);
+  if (amsSite != null) {
+Map amsSiteProperties = amsSite.getProperties();
+Map newProperties = new HashMap<>();
+
+if 
(amsSiteProperties.containsKey(HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER) 
&&
+  
amsSiteProperties.get(HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER).equals("1"))
 {
+
+  LOG.info("Setting value of " + 
HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER + " : 2");
+  
newProperties.put(HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER, 
String.valueOf(2));
+
+}
+
+if 
(amsSiteProperties.containsKey(CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER)
 &&
+  
amsSiteProperties.get(CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER).equals("1"))
 {
+
+  LOG.info("Setting value of " + 
CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER + " : 2");
+  
newProperties.put(CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER, 
String.valueOf(2));
+
+}
+
+updateConfigurationPropertiesForCluster(cluster, AMS_SITE, 
newProperties, true, true);
+  }
+
+}
+  }
+}
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/d0bec5cb/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml
--
diff --git 

ambari git commit: AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku)

2016-02-04 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk d0bec5cb3 -> 8ff0b5ed8


AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao 
via yusaku)


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

Branch: refs/heads/trunk
Commit: 8ff0b5ed82784a202978017345348d0d130b64af
Parents: d0bec5c
Author: Yusaku Sako 
Authored: Thu Feb 4 11:05:37 2016 -0800
Committer: Yusaku Sako 
Committed: Thu Feb 4 11:05:37 2016 -0800

--
 ambari-metrics/ambari-metrics-grafana/README.md | 243 +++
 .../ambari-metrics/datasource.js| 304 +++
 .../ambari-metrics/directives.js|  36 +++
 .../ambari-metrics/partials/config.html |  19 ++
 .../ambari-metrics/partials/query.editor.html   | 133 
 .../ambari-metrics/partials/query.options.html  |  42 +++
 .../ambari-metrics/plugin.json  |  14 +
 .../ambari-metrics/queryCtrl.js | 131 
 ambari-metrics/pom.xml  |   1 +
 9 files changed, 923 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8ff0b5ed/ambari-metrics/ambari-metrics-grafana/README.md
--
diff --git a/ambari-metrics/ambari-metrics-grafana/README.md 
b/ambari-metrics/ambari-metrics-grafana/README.md
new file mode 100644
index 000..0a138e8
--- /dev/null
+++ b/ambari-metrics/ambari-metrics-grafana/README.md
@@ -0,0 +1,243 @@
+
+# AMS (Ambari Metrics Service) Datasource Plugin for Grafana
+
+Use **ambari-metrics** to visualize metrics exposed via AMS in Grafana. 
+
+### If you already have Ambari Metrics UI as a part of your AMS Install, [go 
here](#createdash) to get started
+
+
+**ToC**
+ - [Install Grafana](#installg)
+ - [Install Datasource Plugin](#installam)
+ - [Access Grafana](#accessgraf)
+ - [Add Datasource to Grafana](#addds)
+   - [Test Datasource](#testds)
+ - [Create Dashboard](#createdash)
+ - [Add a Graph](#addgraph)
+ - [Save Dashboard](#savedash)
+ - [Time Ranges](#timerange)
+ - [Edit Panel/Graph](#editpanel)
+
+
+--
+![enter image description here](screenshots/full-dashboard.png)
+
+--
+
+### Install Grafana
+
+
+You can install Grafana on any host.  It does not need to be co-located with 
Ambari Metrics Collector.  The only requirement is that it has network access 
to Ambari Metrics Collector.
+
+**Install on CentOS/Red Hat:**
+```
+sudo yum install 
https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm
+```
+
+**Install on Ubuntu/Debian:**
+```
+wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.6.0_amd64.deb
+sudo apt-get install -y adduser libfontconfig
+sudo dpkg -i grafana_2.6.0_amd64.deb
+```
+
+**Install on SUSE/SLES:**
+```
+sudo rpm -i --nodeps grafana-2.6.0-1.x86_64.rpm
+```
+ 
+### Deploy ambari-metrics 
+
+**On your Grafana Server**
+
+```
+cp -R ambari/ambari-metrics/ambari-metrics-grafana/ambari-metrics 
/usr/share/grafana/public/app/plugins/datasource
+```
+
+### Start Grafana
+
+```
+sudo service grafana-server start
+```
+
+ 
+### Access Grafana
+
+```
+http://GRAFANA_HOST:3000 
+```
+
+---
+
+
+## Add Ambari Metrics Datasource in Grafana UI
+
+**Add a Datasource**
+>  - Click on "Datasources"
+>  - Click on "Add New" at the top 
+
+![add-datasource](screenshots/1-add-datasource.png)
+
+**Add a Datasource (continued)**
+
+>  1. Name of your Datasource
+>  2. Type = AmbariMetrics
+>  3. Host+Port of your AMS installation. (usually host:6188) 
+>  - No trailing slashes
+>  - Nothing else needs to be changed
+>  - Click on Save.
+
+![datasource-details](screenshots/2-datasource-details.png)
+
+
+
+**Test your Datasource**
+
+>  To make sure it's all working, click on **Test Connection** and you 
should see a message that says "Data source is working". 
+
+
+![test-datasource](screenshots/3-test-datasource.png)
+
+---
+
+
+## Creating a Dashboard
+
+**To create a dashboard**
+
+>  - Click on Dashboards on the left
+>  - Click on "Home"
+>  - Click on New at the bottom of the dropdown 
+
+![Dashboard Dropdown](screenshots/4-dashboard-dropdown.png)
+
+
+
+**To add a panel to your newly created dashboard**
+
+>  - Click on the green button on the left(see image below)
+>  - This will expand a flyout menu that will allow you to add a panel
+>  - Choose Graph / Table / Single Stat
+
+![Add Panel](screenshots/5-dashboard-graph-menu.png)
+
+![Types of Panels](screenshots/6-graph-panels.png)
+
+
+---
+
+
+**To add a Graph**
+
+
+>  - 

ambari git commit: AMBARI-14786. Localhost configuration value for multiple host properties does not work properly. (Daniel Gergely via rnettleton)

2016-02-04 Thread rnettleton
Repository: ambari
Updated Branches:
  refs/heads/trunk 8ff0b5ed8 -> 7616e0f5d


AMBARI-14786. Localhost configuration value for multiple host properties does 
not work properly. (Daniel Gergely via rnettleton)


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

Branch: refs/heads/trunk
Commit: 7616e0f5d6939509d1914857dc03150eacc9e3b9
Parents: 8ff0b5e
Author: Bob Nettleton 
Authored: Thu Feb 4 14:06:34 2016 -0500
Committer: Bob Nettleton 
Committed: Thu Feb 4 14:07:02 2016 -0500

--
 .../BlueprintConfigurationProcessor.java| 206 ++--
 .../BlueprintConfigurationProcessorTest.java| 243 ++-
 2 files changed, 370 insertions(+), 79 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7616e0f5/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index 9f42901..de31a0d 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -126,6 +126,11 @@ public class BlueprintConfigurationProcessor {
   private static Pattern HOSTGROUP_PORT_REGEX = 
Pattern.compile("%HOSTGROUP::(\\S+?)%:?(\\d+)?");
 
   /**
+   * Compiled regex for hostgroup token with port information.
+   */
+  private static Pattern LOCALHOST_PORT_REGEX = 
Pattern.compile("localhost:?(\\d+)?");
+
+  /**
* Statically-defined set of properties that can support HA using a 
nameservice name
*   in the configuration, rather than just a host name.
*   This set also contains other HA properties that will be exported if the
@@ -1583,7 +1588,9 @@ public class BlueprintConfigurationProcessor {
  */
 private final boolean usePrefixForEachHost;
 
-private final Set setOfKnownURLSchemes = 
Collections.singleton("thrift://");
+private final boolean useSuffixForEachHost;
+
+private final boolean usePortForEachHost;
 
 /**
  * Constructor.
@@ -1591,7 +1598,7 @@ public class BlueprintConfigurationProcessor {
  * @param component  component name associated with the property
  */
 public MultipleHostTopologyUpdater(String component) {
-  this(component, DEFAULT_SEPARATOR, false);
+  this(component, DEFAULT_SEPARATOR, false, false, true);
 }
 
 /**
@@ -1601,10 +1608,12 @@ public class BlueprintConfigurationProcessor {
  * @param separator the separator character to use when multiple hosts
  *  are specified in a property or URL
  */
-public MultipleHostTopologyUpdater(String component, Character separator, 
boolean userPrefixForEachHost) {
+public MultipleHostTopologyUpdater(String component, Character separator, 
boolean usePrefixForEachHost, boolean useSuffixForEachHost, boolean 
usePortForEachHost) {
   this.component = component;
   this.separator = separator;
-  this.usePrefixForEachHost = userPrefixForEachHost;
+  this.usePrefixForEachHost = usePrefixForEachHost;
+  this.useSuffixForEachHost = useSuffixForEachHost;
+  this.usePortForEachHost = usePortForEachHost;
 }
 
 /**
@@ -1625,36 +1634,101 @@ public class BlueprintConfigurationProcessor {
 
   StringBuilder sb = new StringBuilder();
 
-  if (!origValue.contains("%HOSTGROUP") &&
-  (!origValue.contains("localhost"))) {
+  if (!origValue.contains("%HOSTGROUP") && 
(!origValue.contains("localhost"))) {
 // this property must contain FQDNs specified directly by the user
 // of the Blueprint, so the processor should not attempt to update them
 return origValue;
   }
 
-  if (origValue.contains("localhost") && 
topology.getHostGroupsForComponent(component).size() == 1) {
-return origValue.replace("localhost", 
topology.getHostAssignmentsForComponent(component).iterator().next());
+  Collection hostStrings = getHostStrings(origValue, topology);
+  hostStrings.addAll(getHostStringsFromLocalhost(origValue, topology));
+
+  return resolveHostGroupPlaceholder(origValue, hostStrings);
+}
+
+/**
+ * Gets the prefix for hosts
+ * @param value property value
+ * @return prefix
+ */
+private String 

ambari git commit: AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao via yusaku)

2016-02-04 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 dc4c1cfbd -> df7ba1b1b


AMBARI-14893. Add Grafana-based Ambari Metrics Dashboard Builder. (Prajwal Rao 
via yusaku)


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

Branch: refs/heads/branch-2.2
Commit: df7ba1b1bf06ad21f321722f6055e39b35e98e40
Parents: dc4c1cf
Author: Yusaku Sako 
Authored: Thu Feb 4 11:05:37 2016 -0800
Committer: Yusaku Sako 
Committed: Thu Feb 4 11:06:47 2016 -0800

--
 ambari-metrics/ambari-metrics-grafana/README.md | 243 +++
 .../ambari-metrics/datasource.js| 304 +++
 .../ambari-metrics/directives.js|  36 +++
 .../ambari-metrics/partials/config.html |  19 ++
 .../ambari-metrics/partials/query.editor.html   | 133 
 .../ambari-metrics/partials/query.options.html  |  42 +++
 .../ambari-metrics/plugin.json  |  14 +
 .../ambari-metrics/queryCtrl.js | 131 
 ambari-metrics/pom.xml  |   1 +
 9 files changed, 923 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/df7ba1b1/ambari-metrics/ambari-metrics-grafana/README.md
--
diff --git a/ambari-metrics/ambari-metrics-grafana/README.md 
b/ambari-metrics/ambari-metrics-grafana/README.md
new file mode 100644
index 000..0a138e8
--- /dev/null
+++ b/ambari-metrics/ambari-metrics-grafana/README.md
@@ -0,0 +1,243 @@
+
+# AMS (Ambari Metrics Service) Datasource Plugin for Grafana
+
+Use **ambari-metrics** to visualize metrics exposed via AMS in Grafana. 
+
+### If you already have Ambari Metrics UI as a part of your AMS Install, [go 
here](#createdash) to get started
+
+
+**ToC**
+ - [Install Grafana](#installg)
+ - [Install Datasource Plugin](#installam)
+ - [Access Grafana](#accessgraf)
+ - [Add Datasource to Grafana](#addds)
+   - [Test Datasource](#testds)
+ - [Create Dashboard](#createdash)
+ - [Add a Graph](#addgraph)
+ - [Save Dashboard](#savedash)
+ - [Time Ranges](#timerange)
+ - [Edit Panel/Graph](#editpanel)
+
+
+--
+![enter image description here](screenshots/full-dashboard.png)
+
+--
+
+### Install Grafana
+
+
+You can install Grafana on any host.  It does not need to be co-located with 
Ambari Metrics Collector.  The only requirement is that it has network access 
to Ambari Metrics Collector.
+
+**Install on CentOS/Red Hat:**
+```
+sudo yum install 
https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm
+```
+
+**Install on Ubuntu/Debian:**
+```
+wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.6.0_amd64.deb
+sudo apt-get install -y adduser libfontconfig
+sudo dpkg -i grafana_2.6.0_amd64.deb
+```
+
+**Install on SUSE/SLES:**
+```
+sudo rpm -i --nodeps grafana-2.6.0-1.x86_64.rpm
+```
+ 
+### Deploy ambari-metrics 
+
+**On your Grafana Server**
+
+```
+cp -R ambari/ambari-metrics/ambari-metrics-grafana/ambari-metrics 
/usr/share/grafana/public/app/plugins/datasource
+```
+
+### Start Grafana
+
+```
+sudo service grafana-server start
+```
+
+ 
+### Access Grafana
+
+```
+http://GRAFANA_HOST:3000 
+```
+
+---
+
+
+## Add Ambari Metrics Datasource in Grafana UI
+
+**Add a Datasource**
+>  - Click on "Datasources"
+>  - Click on "Add New" at the top 
+
+![add-datasource](screenshots/1-add-datasource.png)
+
+**Add a Datasource (continued)**
+
+>  1. Name of your Datasource
+>  2. Type = AmbariMetrics
+>  3. Host+Port of your AMS installation. (usually host:6188) 
+>  - No trailing slashes
+>  - Nothing else needs to be changed
+>  - Click on Save.
+
+![datasource-details](screenshots/2-datasource-details.png)
+
+
+
+**Test your Datasource**
+
+>  To make sure it's all working, click on **Test Connection** and you 
should see a message that says "Data source is working". 
+
+
+![test-datasource](screenshots/3-test-datasource.png)
+
+---
+
+
+## Creating a Dashboard
+
+**To create a dashboard**
+
+>  - Click on Dashboards on the left
+>  - Click on "Home"
+>  - Click on New at the bottom of the dropdown 
+
+![Dashboard Dropdown](screenshots/4-dashboard-dropdown.png)
+
+
+
+**To add a panel to your newly created dashboard**
+
+>  - Click on the green button on the left(see image below)
+>  - This will expand a flyout menu that will allow you to add a panel
+>  - Choose Graph / Table / Single Stat
+
+![Add Panel](screenshots/5-dashboard-graph-menu.png)
+
+![Types of Panels](screenshots/6-graph-panels.png)
+
+
+---
+
+
+**To add a Graph**
+
+
+>

ambari git commit: AMBARI-14833 : Add role command order Start/Stop dependency between Metrics Collector and Zookeeper Server (avijayan)

2016-02-04 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 a9e2d1871 -> db898020a


AMBARI-14833 : Add role command order Start/Stop dependency between Metrics 
Collector and Zookeeper Server (avijayan)


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

Branch: refs/heads/branch-2.2
Commit: db898020a11ca80e6f3c9b5de86e5683203fbb52
Parents: a9e2d18
Author: Aravindan Vijayan 
Authored: Thu Feb 4 10:06:41 2016 -0800
Committer: Aravindan Vijayan 
Committed: Thu Feb 4 10:06:41 2016 -0800

--
 .../src/main/resources/stacks/HDP/2.0.6/role_command_order.json  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/db898020/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
index 6ed1537..a480e2a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
@@ -22,7 +22,7 @@
 "SQOOP_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", 
"RESOURCEMANAGER-START"],
 "ZOOKEEPER_SERVICE_CHECK-SERVICE_CHECK": ["ZOOKEEPER_SERVER-START"],
 "ZOOKEEPER_QUORUM_SERVICE_CHECK-SERVICE_CHECK": ["ZOOKEEPER_SERVER-START"],
-"ZOOKEEPER_SERVER-STOP" : ["HBASE_MASTER-STOP", "HBASE_REGIONSERVER-STOP"],
+"ZOOKEEPER_SERVER-STOP" : ["HBASE_MASTER-STOP", "HBASE_REGIONSERVER-STOP", 
"METRICS_COLLECTOR-STOP"],
 "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"]
   },
   "_comment" : "GLUSTERFS-specific dependencies",
@@ -32,7 +32,7 @@
   },
   "_comment" : "Dependencies that are used when GLUSTERFS is not present in 
cluster",
   "optional_no_glusterfs": {
-"METRICS_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START", 
"SECONDARY_NAMENODE-START"],
+"METRICS_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START", 
"SECONDARY_NAMENODE-START", "ZOOKEEPER_SERVER-START"],
 "AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK": ["METRICS_COLLECTOR-START", 
"HDFS_SERVICE_CHECK-SERVICE_CHECK"],
 "SECONDARY_NAMENODE-START": ["NAMENODE-START"],
 "RESOURCEMANAGER-START": ["NAMENODE-START", "DATANODE-START"],



ambari git commit: AMBARI-14907 : Metrics not displayed for 'Last 1 year' period. (avijayan)

2016-02-04 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 db898020a -> dc4c1cfbd


AMBARI-14907 : Metrics not displayed for 'Last 1 year' period. (avijayan)


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

Branch: refs/heads/branch-2.2
Commit: dc4c1cfbd92b06c4ed0976b80e33ad5b189784d9
Parents: db89802
Author: Aravindan Vijayan 
Authored: Thu Feb 4 10:40:55 2016 -0800
Committer: Aravindan Vijayan 
Committed: Thu Feb 4 10:40:55 2016 -0800

--
 .../server/upgrade/UpgradeCatalog222.java   | 46 
 .../0.1.0/configuration/ams-site.xml|  4 +-
 .../server/upgrade/UpgradeCatalog222Test.java   | 77 
 3 files changed, 125 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dc4c1cfb/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
index 22f6a39..7e2683d 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
@@ -27,6 +27,7 @@ import org.apache.ambari.server.orm.dao.DaoUtils;
 import org.apache.ambari.server.orm.entities.AlertDefinitionEntity;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,6 +47,11 @@ public class UpgradeCatalog222 extends 
AbstractUpgradeCatalog {
* Logger.
*/
   private static final Logger LOG = 
LoggerFactory.getLogger(UpgradeCatalog222.class);
+  private static final String AMS_SITE = "ams-site";
+  private static final String HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER =
+"timeline.metrics.host.aggregator.daily.checkpointCutOffMultiplier";
+  private static final String 
CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER =
+"timeline.metrics.cluster.aggregator.daily.checkpointCutOffMultiplier";
 
 
 
@@ -99,6 +105,7 @@ public class UpgradeCatalog222 extends 
AbstractUpgradeCatalog {
 addNewConfigurationsFromXml();
 updateAlerts();
 updateStormConfigs();
+updateAMSConfigs();
   }
 
   protected void updateStormConfigs() throws  AmbariException {
@@ -137,4 +144,43 @@ public class UpgradeCatalog222 extends 
AbstractUpgradeCatalog {
 
   }
 
+  protected void updateAMSConfigs() throws AmbariException {
+AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
+Clusters clusters = ambariManagementController.getClusters();
+
+if (clusters != null) {
+  Map clusterMap = clusters.getClusters();
+
+  if (clusterMap != null && !clusterMap.isEmpty()) {
+for (final Cluster cluster : clusterMap.values()) {
+
+  Config amsSite = cluster.getDesiredConfigByType(AMS_SITE);
+  if (amsSite != null) {
+Map amsSiteProperties = amsSite.getProperties();
+Map newProperties = new HashMap<>();
+
+if 
(amsSiteProperties.containsKey(HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER) 
&&
+  
amsSiteProperties.get(HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER).equals("1"))
 {
+
+  LOG.info("Setting value of " + 
HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER + " : 2");
+  
newProperties.put(HOST_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER, 
String.valueOf(2));
+
+}
+
+if 
(amsSiteProperties.containsKey(CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER)
 &&
+  
amsSiteProperties.get(CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER).equals("1"))
 {
+
+  LOG.info("Setting value of " + 
CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER + " : 2");
+  
newProperties.put(CLUSTER_AGGREGATOR_DAILY_CHECKPOINTCUTOFFMULTIPIER, 
String.valueOf(2));
+
+}
+
+updateConfigurationPropertiesForCluster(cluster, AMS_SITE, 
newProperties, true, true);
+  }
+
+}
+  }
+}
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/dc4c1cfb/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml
--
diff --git 

ambari git commit: AMBARI-14833 : Add role command order Start/Stop dependency between Metrics Collector and Zookeeper Server (avijayan)

2016-02-04 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/trunk 407822583 -> 7d2191c9d


AMBARI-14833 : Add role command order Start/Stop dependency between Metrics 
Collector and Zookeeper Server (avijayan)


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

Branch: refs/heads/trunk
Commit: 7d2191c9d89570de6394e71d02ccfd7564c36e40
Parents: 4078225
Author: Aravindan Vijayan 
Authored: Thu Feb 4 10:07:18 2016 -0800
Committer: Aravindan Vijayan 
Committed: Thu Feb 4 10:07:18 2016 -0800

--
 .../src/main/resources/stacks/HDP/2.0.6/role_command_order.json  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7d2191c9/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
index 6ed1537..a480e2a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
@@ -22,7 +22,7 @@
 "SQOOP_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", 
"RESOURCEMANAGER-START"],
 "ZOOKEEPER_SERVICE_CHECK-SERVICE_CHECK": ["ZOOKEEPER_SERVER-START"],
 "ZOOKEEPER_QUORUM_SERVICE_CHECK-SERVICE_CHECK": ["ZOOKEEPER_SERVER-START"],
-"ZOOKEEPER_SERVER-STOP" : ["HBASE_MASTER-STOP", "HBASE_REGIONSERVER-STOP"],
+"ZOOKEEPER_SERVER-STOP" : ["HBASE_MASTER-STOP", "HBASE_REGIONSERVER-STOP", 
"METRICS_COLLECTOR-STOP"],
 "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"]
   },
   "_comment" : "GLUSTERFS-specific dependencies",
@@ -32,7 +32,7 @@
   },
   "_comment" : "Dependencies that are used when GLUSTERFS is not present in 
cluster",
   "optional_no_glusterfs": {
-"METRICS_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START", 
"SECONDARY_NAMENODE-START"],
+"METRICS_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START", 
"SECONDARY_NAMENODE-START", "ZOOKEEPER_SERVER-START"],
 "AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK": ["METRICS_COLLECTOR-START", 
"HDFS_SERVICE_CHECK-SERVICE_CHECK"],
 "SECONDARY_NAMENODE-START": ["NAMENODE-START"],
 "RESOURCEMANAGER-START": ["NAMENODE-START", "DATANODE-START"],



ambari git commit: AMBARI-14889. Auto-start services: Create cluster level toggle switch (Zhe (Joe) Wang via srimanth)

2016-02-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 7d2191c9d -> 8c6c13da3


AMBARI-14889. Auto-start services: Create cluster level toggle switch (Zhe 
(Joe) Wang via srimanth)


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

Branch: refs/heads/trunk
Commit: 8c6c13da3ffbf9349232dfcaa7b7504c48156fcf
Parents: 7d2191c
Author: Srimanth Gunturi 
Authored: Thu Feb 4 10:15:19 2016 -0800
Committer: Srimanth Gunturi 
Committed: Thu Feb 4 10:15:25 2016 -0800

--
 ambari-web/app/config.js|  3 +-
 .../nameNode/rollback_controller.js | 10 +--
 .../main/admin/service_auto_start.js| 21 +-
 ambari-web/app/messages.js  |  2 +-
 ambari-web/app/styles/application.less  |  4 ++
 ambari-web/app/styles/widgets.less  | 71 +++-
 .../templates/main/admin/service_auto_start.hbs | 11 ++-
 ambari-web/app/utils/ajax/ajax.js   |  6 +-
 ambari-web/app/views/main/admin.js  | 12 ++--
 .../app/views/main/admin/service_auto_start.js  | 64 +-
 ambari-web/app/views/main/menu.js   | 12 ++--
 ambari-web/config.coffee|  2 +
 ambari-web/karma.conf.js|  1 +
 13 files changed, 160 insertions(+), 59 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8c6c13da/ambari-web/app/config.js
--
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index f2b7938..0beafb3 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -79,7 +79,8 @@ App.supports = {
   skipComponentStartAfterInstall: false,
   storeKDCCredentials: true,
   preInstallChecks: false,
-  hostComboSearchBox: false
+  hostComboSearchBox: false,
+  serviceAutoStart: false
 };
 
 if (App.enableExperimental) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c6c13da/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
 
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
index aa3d3b0..465a1d2 100644
--- 
a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
+++ 
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
@@ -351,7 +351,7 @@ App.HighAvailabilityRollbackController = 
App.HighAvailabilityProgressPageControl
   onLoadHbaseConfigs: function (data) {
 var hbaseSiteProperties = data.items.findProperty('type', 
'hbase-site').properties;
 App.ajax.send({
-  name: 'admin.high_availability.save_configs',
+  name: 'admin.save_configs',
   sender: this,
   data: {
 siteName: 'hbase-site',
@@ -364,7 +364,7 @@ App.HighAvailabilityRollbackController = 
App.HighAvailabilityProgressPageControl
   onLoadAccumuloConfigs: function (data) {
 var accumuloSiteProperties = data.items.findProperty('type', 
'accumulo-site').properties;
 App.ajax.send({
-  name: 'admin.high_availability.save_configs',
+  name: 'admin.save_configs',
   sender: this,
   data: {
 siteName: 'accumulo-site',
@@ -378,7 +378,7 @@ App.HighAvailabilityRollbackController = 
App.HighAvailabilityProgressPageControl
   onLoadHawqConfigs: function (data) {
 var hawqSiteProperties = data.items.findProperty('type', 
'hawq-site').properties;
 App.ajax.send({
-  name: 'admin.high_availability.save_configs',
+  name: 'admin.save_configs',
   sender: this,
   data: {
 siteName: 'hawq-site',
@@ -415,7 +415,7 @@ App.HighAvailabilityRollbackController = 
App.HighAvailabilityProgressPageControl
   onLoadConfigs: function (data) {
 this.set('configsSaved', false);
 App.ajax.send({
-  name: 'admin.high_availability.save_configs',
+  name: 'admin.save_configs',
   sender: this,
   data: {
 siteName: 'hdfs-site',
@@ -425,7 +425,7 @@ App.HighAvailabilityRollbackController = 
App.HighAvailabilityProgressPageControl
   error: 'onTaskError'
 });
 App.ajax.send({
-  name: 'admin.high_availability.save_configs',
+  name: 'admin.save_configs',
   sender: this,
   data: {
 siteName: 'core-site',

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c6c13da/ambari-web/app/controllers/main/admin/service_auto_start.js

svn commit: r12230 - in /release/ambari/ambari-2.2.1: ./ apache-ambari-2.2.1-src.tar.gz apache-ambari-2.2.1-src.tar.gz.asc apache-ambari-2.2.1-src.tar.gz.md5 apache-ambari-2.2.1-src.tar.gz.sha1

2016-02-04 Thread yusaku
Author: yusaku
Date: Thu Feb  4 20:03:36 2016
New Revision: 12230

Log:
Committing Release 2.2.1. (yusaku)

Added:
release/ambari/ambari-2.2.1/
release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz   (with props)
release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.asc
release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.md5
release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.sha1

Added: release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz
==
Binary file - no diff available.

Propchange: release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz
--
svn:mime-type = application/octet-stream

Added: release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.asc
==
--- release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.asc (added)
+++ release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.asc Thu Feb  4 
20:03:36 2016
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+Comment: GPGTools - https://gpgtools.org
+
+iQEcBAABCgAGBQJWr8pGAAoJEILtj+EO9WvZHJYH/jaw1Kwelmo8qnYKefJovG3M
+zr2Bg7sdg1srvNAt8eKPRnZtCwJUiwa5dW7XC/OlwHnNXttpUi8kYIr9i+3fqTVv
+FdVdEh6tcTc1KnL5M4V+cZV8SbdMmA8xecadOyt8E36Tv+02A67OKrLo2HrCSR4b
+1I3QkOVjY3U2tXpqhkkzscZbXnjj5D0/qasBG+eB8RJWiukVEXmBt0Ok1p9PJwB8
+iBUOhsP5DeNyQPa9UPFA4Y3nvukfMAfnEp5O8TAeLGSUFMLCwKduniVCEWYgIzWn
+jIPGGzLZGeNtxD2Vf9armxph2bAeSPzf78uR7TZaQjrSZSoIj2SWp7Y45IU4LqU=
+=xj/A
+-END PGP SIGNATURE-

Added: release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.md5
==
--- release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.md5 (added)
+++ release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.md5 Thu Feb  4 
20:03:36 2016
@@ -0,0 +1 @@
+MD5(apache-ambari-2.2.1-src.tar.gz)= cf78e10c97dbb6966a699c7bf305b5ae

Added: release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.sha1
==
--- release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.sha1 (added)
+++ release/ambari/ambari-2.2.1/apache-ambari-2.2.1-src.tar.gz.sha1 Thu Feb  4 
20:03:36 2016
@@ -0,0 +1 @@
+SHA1(apache-ambari-2.2.1-src.tar.gz)= 001aa634c426e2ead19326815fda3e890dc84172




ambari git commit: AMBARI-14905. Add API directive to force toggling Kerberos if the cluster's security type has not changed (rlevas)

2016-02-04 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk ab06c68ac -> eb3f99596


AMBARI-14905. Add API directive to force toggling Kerberos if the cluster's 
security type has not changed (rlevas)


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

Branch: refs/heads/trunk
Commit: eb3f995965b2749910ceae9e5cc8f8bc043e6862
Parents: ab06c68
Author: Robert Levas 
Authored: Thu Feb 4 15:46:18 2016 -0500
Committer: Robert Levas 
Committed: Thu Feb 4 15:46:23 2016 -0500

--
 .../resources/ClusterResourceDefinition.java|  3 +-
 .../AmbariManagementControllerImpl.java | 44 +++--
 .../server/controller/KerberosHelper.java   | 26 +++-
 .../server/controller/KerberosHelperImpl.java   |  5 ++
 .../AmbariManagementControllerImplTest.java | 12 
 .../server/controller/KerberosHelperTest.java   | 66 +++-
 6 files changed, 133 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/eb3f9959/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
index b2be291..e57364f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
@@ -81,8 +81,9 @@ public class ClusterResourceDefinition extends 
BaseResourceDefinition {
   @Override
   public Collection getUpdateDirectives() {
 Collection directives = super.getUpdateDirectives();
-directives.add("regenerate_keytabs");
+directives.add(KerberosHelper.DIRECTIVE_REGENERATE_KEYTABS);
 directives.add(KerberosHelper.DIRECTIVE_MANAGE_KERBEROS_IDENTITIES);
+directives.add(KerberosHelper.DIRECTIVE_FORCE_TOGGLE_KERBEROS);
 return directives;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/eb3f9959/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 5010311..69b3348 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
@@ -1708,29 +1708,35 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 } catch (KerberosOperationException e) {
   throw new IllegalArgumentException(e.getMessage(), e);
 }
-  } else if (cluster.getSecurityType() != securityType) {
-LOG.info("Received cluster security type change request from {} to {}",
-cluster.getSecurityType().name(), securityType.name());
+  } else {
+// If force_toggle_kerberos is not specified, null will be returned. 
Therefore, perform an
+// equals check to yield true if the result is Boolean.TRUE, otherwise 
false.
+boolean forceToggleKerberos = 
kerberosHelper.getForceToggleKerberosDirective(requestProperties);
 
-if ((securityType == SecurityType.KERBEROS) || (securityType == 
SecurityType.NONE)) {
-  if(!AuthorizationHelper.isAuthorized(ResourceType.CLUSTER, 
cluster.getResourceId(), 
EnumSet.of(RoleAuthorization.CLUSTER_TOGGLE_KERBEROS))) {
-throw new AuthorizationException("The authenticated user does not 
have authorization to enable or disable Kerberos");
-  }
+if (forceToggleKerberos || (cluster.getSecurityType() != 
securityType)) {
+  LOG.info("Received cluster security type change request from {} to 
{} (forced: {})",
+  cluster.getSecurityType().name(), securityType.name(), 
forceToggleKerberos);
 
-  // Since the security state of the cluster has changed, invoke 
toggleKerberos to handle
-  // adding or removing Kerberos from the cluster. This may generate 
multiple stages
-  // or not depending the current state of the cluster.
-  try {
-requestStageContainer = kerberosHelper.toggleKerberos(cluster, 
securityType, requestStageContainer,
-