ambari git commit: AMBARI-10407. Create API endpoint for widgets.

2015-04-10 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk f71f175e2 - 2f2e37267


AMBARI-10407. Create API endpoint for widgets.


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

Branch: refs/heads/trunk
Commit: 2f2e372672e908628de5e0dbd40d0b491bee4eb6
Parents: f71f175
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu Apr 9 12:37:35 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Fri Apr 10 12:49:15 2015 -0700

--
 .../server/api/services/ClusterService.java |  10 +
 .../server/api/services/WidgetService.java  | 131 ++
 .../AbstractControllerResourceProvider.java |   2 +
 .../internal/WidgetResourceProvider.java| 383 +++
 .../server/orm/entities/WidgetEntity.java   |  11 +-
 .../entities/WidgetLayoutUserWidgetEntity.java  |   4 +-
 .../WidgetLayoutUserWidgetEntityPK.java |   2 +-
 .../server/upgrade/UpgradeCatalog210.java   |  14 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |  14 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |  14 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql|  14 +-
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |  16 +-
 .../internal/WidgetResourceProviderTest.java| 465 +++
 .../server/upgrade/UpgradeCatalog210Test.java   |  14 +-
 14 files changed, 1044 insertions(+), 50 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2f2e3726/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
index 87a4f7f..be40bc4 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
@@ -644,6 +644,16 @@ public class ClusterService extends BaseService {
 return new WidgetLayoutService(clusterName);
   }
 
+  /**
+   * Gets the widget service
+   */
+  @Path({clusterName}/widgets)
+  public WidgetService getWidgetService(@Context javax.ws.rs.core.Request 
request,
+@PathParam (clusterName) 
String clusterName) {
+
+return new WidgetService(clusterName);
+  }
+
   // - helper methods 
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/2f2e3726/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
new file mode 100644
index 000..ead0985
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
@@ -0,0 +1,131 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.api.services;
+
+import com.sun.jersey.core.util.Base64;
+import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.spi.Resource;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import java.nio.charset.Charset;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Widget Service
+ */
+public class WidgetService extends BaseService {
+
+  private final String clusterName;
+
+  public WidgetService(String clusterName) {
+this.clusterName = clusterName;
+  }
+
+  @GET
+  @Path({widgetId})
+  @Produces(text/plain)
+  public 

ambari git commit: AMBARI-10440. Manual RU - Client-only services need restart to advertise version (alexantonenko)

2015-04-10 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 5fcfb6ab9 - 96c6ccad1


AMBARI-10440. Manual RU - Client-only services need restart to advertise 
version (alexantonenko)


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

Branch: refs/heads/branch-2.0.maint
Commit: 96c6ccad1e8e618da4b20dcdcf73e4b83b88b5ae
Parents: 5fcfb6a
Author: Alex Antonenko hiv...@gmail.com
Authored: Sat Apr 11 00:09:11 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Sat Apr 11 00:10:27 2015 +0300

--
 ambari-web/app/controllers/main/host/details.js|  4 +---
 ambari-web/app/templates/main/host/summary.hbs |  2 +-
 ambari-web/app/views/main/service/item.js  |  2 +-
 .../test/controllers/main/host/details_test.js | 17 +++--
 ambari-web/test/views/main/service/item_test.js|  2 +-
 5 files changed, 7 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/96c6ccad/ambari-web/app/controllers/main/host/details.js
--
diff --git a/ambari-web/app/controllers/main/host/details.js 
b/ambari-web/app/controllers/main/host/details.js
index 1df8c0c..d935405 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -1864,9 +1864,7 @@ App.MainHostDetailsController = Em.Controller.extend({
*/
   refreshConfigs: function (event) {
 var self = this;
-var components = event.context.filter(function (component) {
-  return component.get('staleConfigs');
-});
+var components = event.context;
 if (components.get('length')  0) {
   return App.showConfirmationPopup(function () {
 batchUtils.restartHostComponents(components, 
Em.I18n.t('rollingrestart.context.allClientsOnSelectedHost').format(self.get('content.hostName')),
 HOST);

http://git-wip-us.apache.org/repos/asf/ambari/blob/96c6ccad/ambari-web/app/templates/main/host/summary.hbs
--
diff --git a/ambari-web/app/templates/main/host/summary.hbs 
b/ambari-web/app/templates/main/host/summary.hbs
index 322522a..f0bf50f 100644
--- a/ambari-web/app/templates/main/host/summary.hbs
+++ b/ambari-web/app/templates/main/host/summary.hbs
@@ -86,7 +86,7 @@
 /button
 ul class=dropdown-menu
   li
-a href=javascript:void(null) {{bindAttr 
class=view.areClientWithStaleConfigs::disabled}} data-toggle=modal {{action 
refreshConfigs view.clients target=controller}}
+a href=javascript:void(null) data-toggle=modal 
{{action refreshConfigs view.clients target=controller}}
   {{t hosts.host.details.refreshConfigs}}
 /a
   /li

http://git-wip-us.apache.org/repos/asf/ambari/blob/96c6ccad/ambari-web/app/views/main/service/item.js
--
diff --git a/ambari-web/app/views/main/service/item.js 
b/ambari-web/app/views/main/service/item.js
index d6d9173..f902b78 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -62,7 +62,7 @@ App.MainServiceItemView = Em.View.extend({
 action: 'refreshConfigs',
 label: Em.I18n.t('hosts.host.details.refreshConfigs'),
 cssClass: 'icon-refresh',
-disabled: !this.get('controller.content.isRestartRequired')
+disabled: false
   },
   REFRESH_YARN_QUEUE: {
 action: 'refreshYarnQueues',

http://git-wip-us.apache.org/repos/asf/ambari/blob/96c6ccad/ambari-web/test/controllers/main/host/details_test.js
--
diff --git a/ambari-web/test/controllers/main/host/details_test.js 
b/ambari-web/test/controllers/main/host/details_test.js
index b9612e4..2bd05f2 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -1762,23 +1762,12 @@ describe('App.MainHostDetailsController', function () {
   controller.refreshConfigs(event);
   expect(App.showConfirmationPopup.called).to.be.false;
 });
-it('No components with stale configs', function () {
-  var event = {context: [Em.Object.create({
-staleConfigs: false
-  })]};
-  controller.refreshConfigs(event);
-  expect(App.showConfirmationPopup.called).to.be.false;
-});
-it('Components with stale configs', function () {
-  var event = {context: [Em.Object.create({
-

ambari git commit: AMBARI-10447. Unit tests fail due to Java 1.7 code - java.nio.file.* (rlevas)

2015-04-10 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 96c6ccad1 - 1f569fb9b


AMBARI-10447. Unit tests fail due to Java 1.7 code - java.nio.file.* (rlevas)


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

Branch: refs/heads/branch-2.0.maint
Commit: 1f569fb9ba711b7ccbfc174c71fda68d29eac81d
Parents: 96c6cca
Author: Robert Levas rle...@hortonworks.com
Authored: Fri Apr 10 18:13:41 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Fri Apr 10 18:14:16 2015 -0400

--
 .../CreateKeytabFilesServerActionTest.java  | 47 +++-
 1 file changed, 6 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f569fb9/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerActionTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerActionTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerActionTest.java
index d2252a9..bbde8e0 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerActionTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerActionTest.java
@@ -24,11 +24,6 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 import java.io.File;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.attribute.PosixFilePermission;
-import java.util.Set;
 
 public class CreateKeytabFilesServerActionTest {
 
@@ -37,32 +32,15 @@ public class CreateKeytabFilesServerActionTest {
 
   @Test
   public void testEnsureAmbariOnlyAccess() throws Exception {
-Path path;
-SetPosixFilePermission permissions;
-
 File directory = testFolder.newFolder();
 Assert.assertNotNull(directory);
 
 new CreateKeytabFilesServerAction().ensureAmbariOnlyAccess(directory);
 
 // The directory is expected to have the following permissions: rwx-- 
(700)
-path = Paths.get(directory.getAbsolutePath());
-Assert.assertNotNull(path);
-
-permissions = Files.getPosixFilePermissions(path);
-Assert.assertNotNull(permissions);
-
-Assert.assertNotNull(permissions);
-Assert.assertEquals(3, permissions.size());
-Assert.assertTrue(permissions.contains(PosixFilePermission.OWNER_READ));
-Assert.assertTrue(permissions.contains(PosixFilePermission.OWNER_WRITE));
-Assert.assertTrue(permissions.contains(PosixFilePermission.OWNER_EXECUTE));
-Assert.assertFalse(permissions.contains(PosixFilePermission.GROUP_READ));
-Assert.assertFalse(permissions.contains(PosixFilePermission.GROUP_WRITE));
-
Assert.assertFalse(permissions.contains(PosixFilePermission.GROUP_EXECUTE));
-Assert.assertFalse(permissions.contains(PosixFilePermission.OTHERS_READ));
-Assert.assertFalse(permissions.contains(PosixFilePermission.OTHERS_WRITE));
-
Assert.assertFalse(permissions.contains(PosixFilePermission.OTHERS_EXECUTE));
+Assert.assertTrue(directory.canRead());
+Assert.assertTrue(directory.canWrite());
+Assert.assertTrue(directory.canExecute());
 
 File file = File.createTempFile(temp_, , directory);
 Assert.assertNotNull(file);
@@ -71,21 +49,8 @@ public class CreateKeytabFilesServerActionTest {
 new CreateKeytabFilesServerAction().ensureAmbariOnlyAccess(file);
 
 // The file is expected to have the following permissions: rw--- (600)
-path = Paths.get(file.getAbsolutePath());
-Assert.assertNotNull(path);
-
-permissions = Files.getPosixFilePermissions(path);
-Assert.assertNotNull(permissions);
-
-Assert.assertEquals(2, permissions.size());
-Assert.assertTrue(permissions.contains(PosixFilePermission.OWNER_READ));
-Assert.assertTrue(permissions.contains(PosixFilePermission.OWNER_WRITE));
-
Assert.assertFalse(permissions.contains(PosixFilePermission.OWNER_EXECUTE));
-Assert.assertFalse(permissions.contains(PosixFilePermission.GROUP_READ));
-Assert.assertFalse(permissions.contains(PosixFilePermission.GROUP_WRITE));
-
Assert.assertFalse(permissions.contains(PosixFilePermission.GROUP_EXECUTE));
-Assert.assertFalse(permissions.contains(PosixFilePermission.OTHERS_READ));
-Assert.assertFalse(permissions.contains(PosixFilePermission.OTHERS_WRITE));
-
Assert.assertFalse(permissions.contains(PosixFilePermission.OTHERS_EXECUTE));
+Assert.assertTrue(file.canRead());
+

[1/2] ambari git commit: AMBARI-10445. Populate cluster widgets from stack-defined widgets on cluster/service create. (swagle)

2015-04-10 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 2f2e37267 - fe702ab2a


AMBARI-10445. Populate cluster widgets from stack-defined widgets on 
cluster/service create. (swagle)


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

Branch: refs/heads/trunk
Commit: c71624a60654b1ed2ef04068fe986a0409fdd648
Parents: 2f2e372
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Fri Apr 10 15:09:08 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Fri Apr 10 15:09:08 2015 -0700

--
 .../api/services/WidgetLayoutService.java   |  17 ++-
 .../server/api/services/WidgetService.java  |  17 ++-
 .../controller/AmbariManagementController.java  |   9 ++
 .../AmbariManagementControllerImpl.java | 139 -
 .../internal/ClusterResourceProvider.java   |  33 ++--
 .../internal/ServiceResourceProvider.java   |  12 +-
 .../internal/StackArtifactResourceProvider.java |   4 +-
 .../internal/WidgetLayoutResourceProvider.java  |  19 ++-
 .../internal/WidgetResourceProvider.java|  19 ++-
 .../apache/ambari/server/orm/dao/WidgetDAO.java |  11 ++
 .../ambari/server/orm/dao/WidgetLayoutDAO.java  |  11 ++
 .../server/orm/entities/WidgetEntity.java   |   7 +-
 .../server/orm/entities/WidgetLayoutEntity.java |   3 +-
 .../ambari/server/state/stack/WidgetLayout.java |   7 +
 .../server/state/stack/WidgetLayoutInfo.java|   2 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |   4 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |   4 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql|   4 +-
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |   4 +-
 .../AmbariManagementControllerTest.java | 150 +--
 .../OTHER/2.0/services/HBASE/widgets.json   |   2 +-
 21 files changed, 374 insertions(+), 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c71624a6/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java
index 234b773..fad83cb 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java
@@ -28,6 +28,7 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import java.nio.charset.Charset;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -119,13 +120,15 @@ public class WidgetLayoutService extends BaseService {
   }
 
   private String getUserName(HttpHeaders headers) {
-String authorizationString = 
headers.getRequestHeaders().get(Authorization).get(0);
-if (authorizationString != null  
authorizationString.startsWith(Basic)) {
-  String base64Credentials = 
authorizationString.substring(Basic.length()).trim();
-  String clearCredentials = new 
String(Base64.decode(base64Credentials),Charset.forName(UTF-8));
-  return clearCredentials.split(:, 2)[0];
-} else {
-  return null;
+ListString authorizationHeaders = 
headers.getRequestHeaders().get(Authorization);
+if (authorizationHeaders != null  !authorizationHeaders.isEmpty()){
+  String authorizationString = authorizationHeaders.get(0);
+  if (authorizationString != null  
authorizationString.startsWith(Basic)) {
+String base64Credentials = 
authorizationString.substring(Basic.length()).trim();
+String clearCredentials = new 
String(Base64.decode(base64Credentials),Charset.forName(UTF-8));
+return clearCredentials.split(:, 2)[0];
+  }
 }
+return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/c71624a6/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
index ead0985..07dae40 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
@@ -28,6 +28,7 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import java.nio.charset.Charset;
 import java.util.HashMap;
+import java.util.List;
 import 

[2/2] ambari git commit: AMBARI-10445. Populate cluster widgets from stack-defined widgets on cluster/service create. Dispaly Name not null fix. (swagle)

2015-04-10 Thread swagle
AMBARI-10445. Populate cluster widgets from stack-defined widgets on 
cluster/service create. Dispaly Name not null fix. (swagle)


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

Branch: refs/heads/trunk
Commit: fe702ab2a0e36371d0a311d04e5c58a028ead9c2
Parents: c71624a
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Fri Apr 10 15:26:32 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Fri Apr 10 15:26:32 2015 -0700

--
 ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql| 4 ++--
 ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql   | 4 ++--
 ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fe702ab2/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
--
diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 
b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
index 2edb93e..fb2a831 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
@@ -542,7 +542,7 @@ CREATE TABLE widget (
   time_created BIGINT NOT NULL,
   author VARCHAR(255),
   description VARCHAR(255),
-  display_name VARCHAR(255) NOT NULL,
+  display_name VARCHAR(255),
   scope VARCHAR(255),
   widget_values VARCHAR(4000),
   properties VARCHAR(4000),
@@ -556,7 +556,7 @@ CREATE TABLE widget_layout (
   section_name VARCHAR(255) NOT NULL,
   scope VARCHAR(255) NOT NULL,
   user_name VARCHAR(255) NOT NULL,
-  display_name VARCHAR(255) NOT NULL,
+  display_name VARCHAR(255),
   cluster_id BIGINT NOT NULL,
   PRIMARY KEY(id)
 );

http://git-wip-us.apache.org/repos/asf/ambari/blob/fe702ab2/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
--
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 
b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
index 9834933..ae70ed3 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
@@ -530,7 +530,7 @@ CREATE TABLE widget (
   time_created NUMBER(19) NOT NULL,
   author VARCHAR2(255),
   description VARCHAR2(255),
-  display_name VARCHAR2(255) NOT NULL,
+  display_name VARCHAR2(255),
   scope VARCHAR2(255),
   widget_values VARCHAR2(4000),
   properties VARCHAR2(4000),
@@ -544,7 +544,7 @@ CREATE TABLE widget_layout (
   section_name VARCHAR2(255) NOT NULL,
   scope VARCHAR2(255) NOT NULL,
   user_name VARCHAR2(255) NOT NULL,
-  display_name VARCHAR2(255) NOT NULL,
+  display_name VARCHAR2(255),
   cluster_id NUMBER(19) NOT NULL,
   PRIMARY KEY(id)
 );

http://git-wip-us.apache.org/repos/asf/ambari/blob/fe702ab2/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
--
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 
b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
index 1b97c2a..f1f3055 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
@@ -535,7 +535,7 @@ CREATE TABLE widget (
   time_created BIGINT NOT NULL,
   author VARCHAR(255),
   description VARCHAR(255),
-  display_name VARCHAR(255) NOT NULL,
+  display_name VARCHAR(255),
   scope VARCHAR(255),
   widget_values VARCHAR(4000),
   properties VARCHAR(4000),
@@ -549,7 +549,7 @@ CREATE TABLE widget_layout (
   section_name VARCHAR(255) NOT NULL,
   scope VARCHAR(255) NOT NULL,
   user_name VARCHAR(255) NOT NULL,
-  display_name VARCHAR(255) NOT NULL,
+  display_name VARCHAR(255),
   cluster_id BIGINT NOT NULL,
   PRIMARY KEY(id)
 );



ambari git commit: AMBARI-10394. JDK-8013062 appeared during adding service. (swagle)

2015-04-10 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk fe702ab2a - 25fe9bd51


AMBARI-10394. JDK-8013062 appeared during adding service. (swagle)


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

Branch: refs/heads/trunk
Commit: 25fe9bd51d6eb03196267d6abf226a0f75a08280
Parents: fe702ab
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Fri Apr 10 16:01:37 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Fri Apr 10 16:01:37 2015 -0700

--
 ambari-server/src/main/python/ambari_server_main.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/25fe9bd5/ambari-server/src/main/python/ambari_server_main.py
--
diff --git a/ambari-server/src/main/python/ambari_server_main.py 
b/ambari-server/src/main/python/ambari_server_main.py
index 902b457..1e6b2ec 100644
--- a/ambari-server/src/main/python/ambari_server_main.py
+++ b/ambari-server/src/main/python/ambari_server_main.py
@@ -58,7 +58,8 @@ jvm_args = os.getenv('AMBARI_JVM_ARGS', '-Xms512m -Xmx2048m')
 SERVER_START_CMD = {0}  \
 -server -XX:NewRatio=3  \
 -XX:+UseConcMarkSweepGC  + \
--XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60  + \
+-XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60  \
+-Dsun.zip.disableMemoryMapping=true  + \
 {1} {2}  \
 -cp {3} \
 org.apache.ambari.server.controller.AmbariServer  \



ambari git commit: AMBARI-10332. BE: Extend stack-advisor to recommend property_value_attributes for HDFS (dsen via srimanth)

2015-04-10 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 25fe9bd51 - 55aaed016


AMBARI-10332. BE: Extend stack-advisor to recommend property_value_attributes 
for HDFS (dsen via srimanth)


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

Branch: refs/heads/trunk
Commit: 55aaed016eff89592843cb779a0ca8f308a3d9b3
Parents: 25fe9bd
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Fri Apr 10 14:29:17 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Fri Apr 10 16:26:40 2015 -0700

--
 .../apache/ambari/server/agent/DiskInfo.java|  12 +-
 .../commands/StackAdvisorCommand.java   |   2 +-
 .../HDFS/2.1.0.2.0/configuration/hdfs-site.xml  |   6 +
 .../stacks/HDP/2.0.6/services/stack_advisor.py  |  21 ++-
 .../stacks/HDP/2.2/services/stack_advisor.py|  59 +-
 .../stacks/2.2/common/test_stack_advisor.py | 181 +--
 6 files changed, 250 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/55aaed01/ambari-server/src/main/java/org/apache/ambari/server/agent/DiskInfo.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/agent/DiskInfo.java 
b/ambari-server/src/main/java/org/apache/ambari/server/agent/DiskInfo.java
index e3fb88e..0f345b8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/DiskInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/DiskInfo.java
@@ -117,7 +117,17 @@ public class DiskInfo {
   public void setSize(String size) {
 this.size = size;
   }
-  
+
+  @JsonProperty(device)
+  public String getDevice() {
+return device;
+  }
+
+  @JsonProperty(device)
+  public void setDevice(String device) {
+this.device = device;
+  }
+
   @Override
   public String toString() {
 return available= + this.available + ,mountpoint= + this.mountpoint

http://git-wip-us.apache.org/repos/asf/ambari/blob/55aaed01/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
index ce67002..15ab6fb 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
@@ -70,7 +70,7 @@ public abstract class StackAdvisorCommandT extends 
StackAdvisorResponse extend
   protected static Log LOG = LogFactory.getLog(StackAdvisorCommand.class);
 
   private static final String GET_HOSTS_INFO_URI = /api/v1/hosts
-  + ?fields=HostsHosts/host_name.in(%s);
+  + ?fields=Hosts/*Hosts/host_name.in(%s);
   private static final String GET_SERVICES_INFO_URI = 
/api/v1/stacks/%s/versions/%s/
   + 
?fields=Versions/stack_name,Versions/stack_version,Versions/parent_stack_version
   + 
,services/StackServices/service_name,services/StackServices/service_version

http://git-wip-us.apache.org/repos/asf/ambari/blob/55aaed01/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
index 28191e2..c9d7172 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
@@ -61,6 +61,12 @@
   maximum2/maximum
   increment-step1/increment-step
 /value-attributes
+depends-on
+  property
+typehdfs-site/type
+namedfs.datanode.data.dir/name
+  /property
+/depends-on
   /property
 
   property

http://git-wip-us.apache.org/repos/asf/ambari/blob/55aaed01/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 08badf8..e692411 100644
--- 

ambari git commit: AMBARI-10428. Combo drop-down panel showing on the right (Richard Zang via srimanth)

2015-04-10 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 55aaed016 - d3d73f762


AMBARI-10428. Combo drop-down panel showing on the right (Richard Zang via 
srimanth)


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

Branch: refs/heads/trunk
Commit: d3d73f7624ee6a3ba412ebda52cc889e0e8532e9
Parents: 55aaed0
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Fri Apr 10 16:49:46 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Fri Apr 10 16:49:46 2015 -0700

--
 ambari-web/app/styles/widgets.less  | 20 +---
 .../configs/widgets/combo_config_widget.hbs |  2 +-
 2 files changed, 10 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d3d73f76/ambari-web/app/styles/widgets.less
--
diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index 9dcec28..e3cb9a0 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -183,21 +183,19 @@
 
 .combo-widget {
   .input-append {
-
- input {
-  border-radius: 3px 0 0 3px;
-  width: @combo-widget-width;
-
-  [disabled] {
-background: #fff;
-cursor: default;
-  }
-}
-
 .btn-group {
   display: inline-block;
   margin-left: -1px;
 
+   input {
+border-radius: 3px 0 0 3px;
+width: @combo-widget-width;
+
+[disabled] {
+  background: #fff;
+  cursor: default;
+}
+  }
   .btn {
 border-radius: 0 3px 3px 0;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3d73f76/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs
--
diff --git 
a/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs 
b/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs
index d69d613..74d8b13 100644
--- a/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs
@@ -20,8 +20,8 @@
 {{/if}}
 div {{bindAttr class=view.isOriginalSCP:original-widget}}
   div class=input-append
-{{view Em.TextField valueBinding=view.content.value disabled=disabled}}
 div class=dropdown btn-group
+  {{view Em.TextField valueBinding=view.content.value 
disabled=disabled}}
   button {{bindAttr class=view.disabled:disabled :btn 
:dropdown-toggle}} data-toggle=dropdown
 span class=caret/span
   /button



ambari git commit: AMBARI-10445. Populate cluster widgets from stack-defined widgets on cluster/service create. Upgrade Catalog changes. (swagle)

2015-04-10 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk d3d73f762 - 5dad81c3d


AMBARI-10445. Populate cluster widgets from stack-defined widgets on 
cluster/service create. Upgrade Catalog changes. (swagle)


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

Branch: refs/heads/trunk
Commit: 5dad81c3df577bc81f588cb61eae6b0f56089b87
Parents: d3d73f7
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Fri Apr 10 17:24:25 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Fri Apr 10 17:24:32 2015 -0700

--
 .../org/apache/ambari/server/upgrade/UpgradeCatalog210.java  | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5dad81c3/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
index e94d5f4..d72c9d3 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
@@ -309,10 +309,10 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
 columns.add(new DBColumnInfo(time_created, Long.class,  255,   null, 
false));
 columns.add(new DBColumnInfo(author, String.class,  255,   null, true));
 columns.add(new DBColumnInfo(description, String.class,  255,   null, 
true));
-columns.add(new DBColumnInfo(display_name, String.class,  255,   null, 
false));
+columns.add(new DBColumnInfo(display_name, String.class,  255,   null, 
true));
 columns.add(new DBColumnInfo(scope, String.class,  255,   null, true));
-columns.add(new DBColumnInfo(widget_values, String.class,  255,   null, 
true));
-columns.add(new DBColumnInfo(properties, String.class,  255,   null, 
true));
+columns.add(new DBColumnInfo(widget_values, String.class,  4000,   null, 
true));
+columns.add(new DBColumnInfo(properties, String.class,  4000,   null, 
true));
 columns.add(new DBColumnInfo(cluster_id, Long.class,  255,   null, 
false));
 dbAccessor.createTable(WIDGET_TABLE, columns, id);
 
@@ -323,7 +323,7 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
 columns.add(new DBColumnInfo(cluster_id, Long.class,  255,   null, 
false));
 columns.add(new DBColumnInfo(scope, String.class,  255,   null, false));
 columns.add(new DBColumnInfo(user_name, String.class,  255,   null, 
false));
-columns.add(new DBColumnInfo(display_name, String.class,  255,   null, 
false));
+columns.add(new DBColumnInfo(display_name, String.class,  255,   null, 
true));
 
 dbAccessor.createTable(WIDGET_LAYOUT_TABLE, columns, id);
 



[3/3] ambari git commit: AMBARI-10427. Display service specific Heatmap in the respective service page. (jaimin)

2015-04-10 Thread jaimin
AMBARI-10427. Display service specific Heatmap in the respective service page. 
(jaimin)


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

Branch: refs/heads/trunk
Commit: dba8f65691a7042569d77deb3929f93c86a96e72
Parents: 5dad81c
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Fri Apr 10 17:48:03 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Fri Apr 10 17:48:03 2015 -0700

--
 .../data/stacks/HDP-2.1/service_components.json | 2239 +++---
 ambari-web/app/controllers.js   |1 +
 .../app/controllers/main/charts/heatmap.js  |   68 +-
 .../controllers/main/service/info/heatmap.js|   52 +
 ambari-web/app/messages.js  |1 +
 ambari-web/app/models/stack_service.js  |6 +-
 ambari-web/app/routes/main.js   |   12 +
 ambari-web/app/styles/application.less  |8 +
 .../app/templates/main/charts/heatmap.hbs   |   25 +-
 ambari-web/app/templates/main/service/item.hbs  |2 +-
 ambari-web/app/views.js |1 +
 ambari-web/app/views/main/charts/heatmap.js |   31 +-
 .../views/main/charts/heatmap/heatmap_rack.js   |6 +-
 .../app/views/main/service/info/heatmap_view.js |   21 +
 ambari-web/app/views/main/service/info/menu.js  |4 +-
 ambari-web/app/views/main/service/item.js   |4 +
 16 files changed, 2081 insertions(+), 400 deletions(-)
--




[2/3] ambari git commit: AMBARI-10427. Display service specific Heatmap in the respective service page. (jaimin)

2015-04-10 Thread jaimin
http://git-wip-us.apache.org/repos/asf/ambari/blob/dba8f656/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
--
diff --git a/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json 
b/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
index 23f65f2..75eef5e 100644
--- a/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
+++ b/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
@@ -1,8 +1,271 @@
+
 {
-  href : 
http://192.168.56.101:8080/api/v1/stacks/HDP/versions/2.1/services?fields=StackServices/*,components/*_=1409656091161;,
+  href : 
http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services?fields=StackServices/*,components/*,components/dependencies/Dependencies/scope,artifacts/Artifacts/artifact_name;,
   items : [
 {
-  href : 
http://192.168.56.101:8080/api/v1/stacks/HDP/versions/2.1/services/FALCON;,
+  href : 
http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/AMBARI_METRICS;,
+  StackServices : {
+comments : A system for metrics collection that provides storage 
and retrieval capability for metrics collected from the cluster\n  ,
+custom_commands : [ ],
+display_name : Ambari Metrics,
+required_services : [
+  ZOOKEEPER
+],
+service_check_supported : true,
+service_name : AMBARI_METRICS,
+service_version : 0.1.0,
+stack_name : HDP,
+stack_version : 2.1,
+user_name : null,
+config_types : {
+  ams-env : {
+supports : {
+  adding_forbidden : false,
+  do_not_extend : false,
+  final : false
+}
+  },
+  ams-hbase-env : {
+supports : {
+  adding_forbidden : false,
+  do_not_extend : false,
+  final : false
+}
+  },
+  ams-hbase-log4j : {
+supports : {
+  adding_forbidden : false,
+  do_not_extend : false,
+  final : false
+}
+  },
+  ams-hbase-policy : {
+supports : {
+  adding_forbidden : false,
+  do_not_extend : false,
+  final : true
+}
+  },
+  ams-hbase-security-site : {
+supports : {
+  adding_forbidden : false,
+  do_not_extend : false,
+  final : false
+}
+  },
+  ams-hbase-site : {
+supports : {
+  adding_forbidden : false,
+  do_not_extend : false,
+  final : false
+}
+  },
+  ams-log4j : {
+supports : {
+  adding_forbidden : false,
+  do_not_extend : false,
+  final : false
+}
+  },
+  ams-site : {
+supports : {
+  adding_forbidden : false,
+  do_not_extend : false,
+  final : false
+}
+  }
+},
+kerberos_descriptor : {
+  components : [
+{
+  identities : [
+{
+  principal : {
+configuration : 
ams-hbase-security-site/hbase.master.kerberos.principal,
+type : service,
+local_username : ${ams-env/ambari_metrics_user},
+value : amshbase/_HOST@${realm}
+  },
+  name : ams_hbase_master_hbase,
+  keytab : {
+owner : {
+  access : r,
+  name : ${ams-env/ambari_metrics_user}
+},
+file : ${keytab_dir}/ams-hbase.master.keytab,
+configuration : 
ams-hbase-security-site/hbase.master.keytab.file,
+group : {
+  access : ,
+  name : ${cluster-env/user_group}
+}
+  }
+},
+{
+  principal : {
+configuration : 
ams-hbase-security-site/hbase.regionserver.kerberos.principal,
+type : service,
+local_username : ${ams-env/ambari_metrics_user},
+value : amshbase/_HOST@${realm}
+  },
+  name : ams_hbase_regionserver_hbase,
+  keytab : {
+owner : {
+  access : r,
+  name : ${ams-env/ambari_metrics_user}
+},
+file : ${keytab_dir}/ams-hbase.regionserver.keytab,
+configuration : 
ams-hbase-security-site/hbase.regionserver.keytab.file,
+group : {
+  access : ,
+   

[1/3] ambari git commit: AMBARI-10427. Display service specific Heatmap in the respective service page. (jaimin)

2015-04-10 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk 5dad81c3d - dba8f6569


http://git-wip-us.apache.org/repos/asf/ambari/blob/dba8f656/ambari-web/app/controllers.js
--
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index 816dbf5..68ff5d1 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -137,6 +137,7 @@ 
require('controllers/main/charts/heatmap_metrics/heatmap_metric_hbase_compaction
 
require('controllers/main/charts/heatmap_metrics/heatmap_metric_hbase_regions');
 
require('controllers/main/charts/heatmap_metrics/heatmap_metric_hbase_memstoresize');
 require('controllers/main/charts/heatmap');
+require('controllers/main/service/info/heatmap');
 require('controllers/main/views_controller');
 require('controllers/main/views/details_controller');
 require('controllers/wizard/slave_component_groups_controller');

http://git-wip-us.apache.org/repos/asf/ambari/blob/dba8f656/ambari-web/app/controllers/main/charts/heatmap.js
--
diff --git a/ambari-web/app/controllers/main/charts/heatmap.js 
b/ambari-web/app/controllers/main/charts/heatmap.js
index ecc57b3..02ccbed 100644
--- a/ambari-web/app/controllers/main/charts/heatmap.js
+++ b/ambari-web/app/controllers/main/charts/heatmap.js
@@ -22,6 +22,7 @@ App.MainChartsHeatmapController = Em.Controller.extend({
   rackMap: [],
   modelRacks: [],
   rackViews: [],
+  loadRacksUrlParams: 
'fields=Hosts/rack_info,Hosts/host_name,Hosts/public_host_name,Hosts/os_type,Hosts/ip,host_components,metrics/disk,metrics/cpu/cpu_system,metrics/cpu/cpu_user,metrics/memory/mem_total,metrics/memory/mem_freeminimal_response=true',
 
   racks: function () {
 return this.get('modelRacks');
@@ -33,10 +34,13 @@ App.MainChartsHeatmapController = Em.Controller.extend({
   loadRacks: function () {
 this.get('modelRacks').clear();
 this.get('rackMap').clear();
+var urlParams = this.get('loadRacksUrlParams');
 App.ajax.send({
   name: 'hosts.heatmaps',
   sender: this,
-  data: {},
+  data: {
+urlParams: urlParams
+  },
   success: 'getHostsSuccessCallback'
 });
   },
@@ -108,64 +112,13 @@ App.MainChartsHeatmapController = Em.Controller.extend({
 
 // Display host heatmaps if the stack definition has a host metrics 
service to display it.
 if(App.get('services.hostMetrics').length) {
-  metrics.push(
-Em.Object.create({
-  label: Em.I18n.t('charts.heatmap.category.host'),
-  category: 'host',
-  items: [
-App.MainChartHeatmapDiskSpaceUsedMetric.create(),
-App.MainChartHeatmapMemoryUsedMetric.create(),
-App.MainChartHeatmapCpuWaitIOMetric.create()
-/*, App.MainChartHeatmapProcessRunMetric.create()*/
-  ]
-})
-  );
+  metrics.pushObjects([
+App.MainChartHeatmapDiskSpaceUsedMetric.create(),
+App.MainChartHeatmapMemoryUsedMetric.create(),
+App.MainChartHeatmapCpuWaitIOMetric.create()
+  ]);
 }
 
-if(App.HDFSService.find().get('length')) {
-  metrics.push(
-Em.Object.create({
-  label: Em.I18n.t('charts.heatmap.category.hdfs'),
-  category: 'hdfs',
-  items: [
-App.MainChartHeatmapDFSBytesReadMetric.create(),
-App.MainChartHeatmapDFSBytesWrittenMetric.create(),
-App.MainChartHeatmapDFSGCTimeMillisMetric.create(),
-App.MainChartHeatmapDFSMemHeapUsedMetric.create()
-  ]
-})
-  );
-}
-
-if (App.YARNService.find().get('length')) {
-  metrics.push(
-Em.Object.create({
-  label: Em.I18n.t('charts.heatmap.category.yarn'),
-  category: 'yarn',
-  items: [
-App.MainChartHeatmapYarnGCTimeMillisMetric.create(),
-App.MainChartHeatmapYarnMemHeapUsedMetric.create(),
-App.MainChartHeatmapYarnResourceUsedMetric.create()
-  ]
-})
-  );
-}
-
-if (App.HBaseService.find().get('length')) {
-  metrics.push(
-Em.Object.create({
-  label: Em.I18n.t('charts.heatmap.category.hbase'),
-  category: 'hbase',
-  items: [
-App.MainChartHeatmapHbaseReadReqCount.create(),
-App.MainChartHeatmapHbaseWriteReqCount.create(),
-App.MainChartHeatmapHbaseCompactionQueueSize.create(),
-App.MainChartHeatmapHbaseRegions.create(),
-App.MainChartHeatmapHbaseMemStoreSize.create()
-  ]
-})
-  );
-}
 return metrics;
   }.property(),
 
@@ -213,7 +166,6 @@ App.MainChartsHeatmapController = Em.Controller.extend({
   loadMetrics: function () {
 var selectedMetric = this.get('selectedMetric');
 var hostNames = [];
-
 if (selectedMetric  this.get('racks').everyProperty('isLoaded', true)) {
   

ambari git commit: AMBARI-10423. Widgets should occupy available horizontal space (MapReduce) (Richard Zang via srimanth)

2015-04-10 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk dba8f6569 - 4d5050c23


AMBARI-10423. Widgets should occupy available horizontal space (MapReduce) 
(Richard Zang via srimanth)


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

Branch: refs/heads/trunk
Commit: 4d5050c23dce477ecdbb2d0c22cdf2ae8e8d5008
Parents: dba8f65
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Fri Apr 10 18:16:33 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Fri Apr 10 18:16:39 2015 -0700

--
 ambari-web/app/styles/widgets.less | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4d5050c2/ambari-web/app/styles/widgets.less
--
diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index e3cb9a0..6467a4a 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -113,8 +113,11 @@
   .ui-slider-wrapper {
 height: 40px;
 .ui-slider-wrapper-inner {
-  width: 70%;
+  width: 75%;
   margin-right: 10px;
+  .slider.slider-horizontal {
+width: 100%;
+  }
 }
 .ui-slider-label {
   color: #aaa;



ambari git commit: AMBARI-10443. Hide empty property_display_name from stack configuration API (mpapirkovskyy via srimanth)

2015-04-10 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 4d5050c23 - f8b83e2f6


AMBARI-10443. Hide empty property_display_name from stack configuration API 
(mpapirkovskyy via srimanth)


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

Branch: refs/heads/trunk
Commit: f8b83e2f699848ba1d4d913859af9fff3e405f53
Parents: 4d5050c
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Fri Apr 10 18:22:01 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Fri Apr 10 18:22:01 2015 -0700

--
 .../internal/StackConfigurationResourceProvider.java  | 10 +++---
 .../apache/ambari/server/state/ValueAttributesInfo.java   |  2 +-
 .../ambari/server/api/services/AmbariMetaInfoTest.java|  5 ++---
 3 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f8b83e2f/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
index f00a46f..cc624b1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
@@ -38,6 +38,7 @@ import org.apache.ambari.server.controller.spi.Resource.Type;
 import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
 import org.apache.ambari.server.controller.utilities.PropertyHelper;
+import org.apache.commons.lang.StringUtils;
 
 public class StackConfigurationResourceProvider extends
 ReadOnlyResourceProvider {
@@ -149,9 +150,12 @@ public class StackConfigurationResourceProvider extends
   setResourceProperty(resource, PROPERTY_DESCRIPTION_PROPERTY_ID,
   response.getPropertyDescription(), requestedIds);
 
-  setResourceProperty(resource, PROPERTY_DISPLAY_NAME_PROPERTY_ID,
-  response.getPropertyDisplayName(), requestedIds);
-  
+  //should not be returned if empty
+  if (StringUtils.isNotEmpty(response.getPropertyDisplayName())) {
+setResourceProperty(resource, PROPERTY_DISPLAY_NAME_PROPERTY_ID,
+response.getPropertyDisplayName(), requestedIds);
+  }
+
   setResourceProperty(resource, PROPERTY_PROPERTY_TYPE_PROPERTY_ID, 
   response.getPropertyType(), requestedIds);
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/f8b83e2f/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
index 7285374..bf8caff 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
@@ -43,7 +43,7 @@ public class ValueAttributesInfo {
 
   @XmlElementWrapper(name = entries)
   @XmlElements(@XmlElement(name = entry))
-  private CollectionValueEntryInfo entries = new ArrayListValueEntryInfo();
+  private CollectionValueEntryInfo entries;
 
   @XmlElement(name = entries_editable)
   private Boolean entriesEditable;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f8b83e2f/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
index 2b4d7da..14c66a2 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
@@ -812,10 +812,9 @@ public class AmbariMetaInfoTest {
 Assert.assertEquals(512, 
newEnhancedProperty.getPropertyValueAttributes().getMinimum());
 Assert.assertEquals(15360, 
newEnhancedProperty.getPropertyValueAttributes().getMaximum());
 Assert.assertEquals(256, 

ambari git commit: AMBARI-10445. Populate cluster widgets from stack-defined widgets on cluster/service create. Upgrade Catalog changes. (swagle)

2015-04-10 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk f8b83e2f6 - 37717dd4c


AMBARI-10445. Populate cluster widgets from stack-defined widgets on 
cluster/service create. Upgrade Catalog changes. (swagle)


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

Branch: refs/heads/trunk
Commit: 37717dd4cd55ee75f3f218e6fee20af529cc0f87
Parents: f8b83e2
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Fri Apr 10 18:46:44 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Fri Apr 10 18:49:57 2015 -0700

--
 .../server/upgrade/UpgradeCatalog210.java   | 36 +
 .../server/upgrade/UpgradeCatalog210Test.java   | 78 
 2 files changed, 114 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/37717dd4/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
index d72c9d3..09a8740 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
@@ -22,10 +22,18 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.orm.DBAccessor.DBColumnInfo;
+import org.apache.ambari.server.orm.dao.ClusterDAO;
+import org.apache.ambari.server.orm.dao.ClusterServiceDAO;
+import org.apache.ambari.server.orm.entities.ClusterEntity;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Service;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -357,6 +365,32 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
 false);
   }
 
+  /**
+   * Copy cluster  service widgets from stack to DB.
+   */
+  protected void initializeClusterAndServiceWidgets() throws AmbariException {
+AmbariManagementController controller = 
injector.getInstance(AmbariManagementController.class);
+Clusters clusters = controller.getClusters();
+if (clusters == null) {
+  return;
+}
+
+MapString, Cluster clusterMap = clusters.getClusters();
+
+if (clusterMap != null  !clusterMap.isEmpty()) {
+  for (Cluster cluster : clusterMap.values()) {
+controller.initializeWidgetsAndLayouts(cluster, null);
+
+MapString, Service serviceMap = cluster.getServices();
+if (serviceMap != null  !serviceMap.isEmpty()) {
+  for (Service service : serviceMap.values()) {
+controller.initializeWidgetsAndLayouts(cluster, service);
+  }
+}
+  }
+}
+  }
+
   // - UpgradeCatalog 
 
   /**
@@ -425,5 +459,7 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
   @Override
   protected void executeDMLUpdates() throws AmbariException, SQLException {
 addNewConfigurationsFromXml();
+// Initialize all default widgets and widget layouts
+initializeClusterAndServiceWidgets();
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/37717dd4/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
index af9dcda..6ca7dfd 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
@@ -18,19 +18,29 @@
 
 package org.apache.ambari.server.upgrade;
 
+import com.google.inject.AbstractModule;
 import com.google.inject.Binder;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.Module;
 import com.google.inject.Provider;
 import com.google.inject.persist.PersistService;
+import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.configuration.Configuration;

ambari git commit: AMBARI-10374. Implement hover icons on widgets (clone, hide, edit, etc)(xiwang)

2015-04-10 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 37717dd4c - 473c583c2


AMBARI-10374. Implement hover icons on widgets (clone, hide, edit, etc)(xiwang)


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

Branch: refs/heads/trunk
Commit: 473c583c2d8a686b1a5acfb709fae3962f2212cd
Parents: 37717dd
Author: Xi Wang xiw...@apache.org
Authored: Mon Apr 6 18:11:41 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Fri Apr 10 18:51:10 2015 -0700

--
 ambari-web/app/mixins/common/widget_mixin.js| 21 +++-
 .../app/styles/enhanced_service_dashboard.less  | 57 +---
 .../templates/common/widget/gauge_widget.hbs| 11 +++-
 .../templates/common/widget/graph_widget.hbs| 11 +++-
 .../templates/common/widget/number_widget.hbs   | 11 +++-
 .../templates/common/widget/template_widget.hbs | 11 +++-
 .../app/views/main/service/info/summary.js  | 12 +
 7 files changed, 121 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/473c583c/ambari-web/app/mixins/common/widget_mixin.js
--
diff --git a/ambari-web/app/mixins/common/widget_mixin.js 
b/ambari-web/app/mixins/common/widget_mixin.js
index 0fe7958..9003161 100644
--- a/ambari-web/app/mixins/common/widget_mixin.js
+++ b/ambari-web/app/mixins/common/widget_mixin.js
@@ -248,10 +248,29 @@ App.WidgetMixin = Ember.Mixin.create({
 
   getHostComponentMetricsSuccessCallback: function () {
 //TODO push data to metrics after response structure approved
+  },
+
+  /*
+   * make call when clicking on remove icon on widget
+   */
+  hideWidget: function () {
+
+  },
+  /*
+   * make call when clicking on clone icon on widget
+   */
+  cloneWidget: function () {
+
+  },
+
+  /*
+   * make call when clicking on edit icon on widget
+   */
+  editWidget: function () {
+
   }
 
 });
-
 App.WidgetPreviewMixin = Ember.Mixin.create({
   beforeRender: Em.K,
   isLoaded: true,

http://git-wip-us.apache.org/repos/asf/ambari/blob/473c583c/ambari-web/app/styles/enhanced_service_dashboard.less
--
diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less 
b/ambari-web/app/styles/enhanced_service_dashboard.less
index 0578ee7..5eae29e 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -51,7 +51,6 @@
 #widget_layout,
 #widget-preview {
   .frame {
-overflow: hidden;
 height: 150px;
 width: 90%;
   }
@@ -59,7 +58,6 @@
 width: 19.3%;
 background-color: white;
 margin: 5px 0 5px 5px;
-cursor: move;
   }
   .widget {
 .spinner {
@@ -70,22 +68,26 @@
   height: 25px;
   font-weight: bold;
   text-align: left;
+  position: relative;
 }
 .content {
   text-align: center;
   color: @health-status-green;
-  padding-top: 35px;
   font-weight: bold;
   font-size: 35px;
+  position: relative;
 }
 .template-widget,
 .number-widget {
   .frame;
+  .content {
+padding-top: 70px;
+  }
 }
 .graph-widget {
   .frame;
   .content {
-padding-top: 0;
+padding-top: 30px;
   }
   .chart-legend {
 min-width: 100%;
@@ -98,7 +100,7 @@
 .gauge-widget {
   .frame;
   .content {
-padding-top: 5px;
+padding-top: 40px;
   }
 }
 .red {
@@ -115,9 +117,48 @@
 
 #widget-preview {
   max-width: 200px;
-  .graph-widget {
-.title {
-  height: 0;
+  .widget {
+.thumbnail .corner-icon {
+  display: none;
+}
+.graph-widget {
+  .title {
+height: 0;
+  }
+}
+  }
+}
+
+#widget_layout {
+  .widget {
+.thumbnail .corner-icon {
+  display: none;
+  position: relative;
+  .icon-remove-sign{
+color: #00;
+text-shadow: #fff 0px 0px 15px;
+position: relative;
+left: -17px;
+top: -11px;
+  }
+  .icon-edit,.icon-copy{
+color: #55;
+position: relative;
+  }
+  .icon-edit {
+left: 2px;
+  }
+}
+.thumbnail:hover {
+  cursor: move;
+  .corner-icon{
+display: block;
+text-decoration: none;
+z-index: 9;
+  }
+  .caption{
+margin-left: -10px;
+  }
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/473c583c/ambari-web/app/templates/common/widget/gauge_widget.hbs
--
diff --git 

ambari git commit: AMBARI-10449. NameNode cannot to start on cluster installed via blueprint with NN HA enabled

2015-04-10 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 473c583c2 - e59089b40


AMBARI-10449. NameNode cannot to start on cluster installed via blueprint with 
NN HA enabled


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

Branch: refs/heads/trunk
Commit: e59089b40fbc08ef247ecbba5501bf28ab45920b
Parents: 473c583
Author: Sumit Mohanty smoha...@hortonworks.com
Authored: Fri Apr 10 19:17:22 2015 -0700
Committer: Sumit Mohanty smoha...@hortonworks.com
Committed: Fri Apr 10 19:17:22 2015 -0700

--
 .../HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py| 2 ++
 .../main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml | 2 +-
 .../src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py| 1 +
 .../src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py| 1 +
 .../test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py  | 1 +
 .../src/test/python/stacks/2.0.6/HDFS/test_namenode.py | 6 ++
 6 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e59089b4/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
index d1e56b5..e36019e 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
@@ -103,6 +103,8 @@ def namenode(action=None, do_format=True, 
rolling_restart=False, env=None):
   if code != 0:
 leave_safe_mode_cmd = format(hdfs --config {hadoop_conf_dir} dfsadmin 
-fs {namenode_address} -safemode leave)
 Execute(leave_safe_mode_cmd,
+tries=10,
+try_sleep=10,
 user=params.hdfs_user,
 path=[params.hadoop_bin_dir],
 )

http://git-wip-us.apache.org/repos/asf/ambari/blob/e59089b4/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml
index 6ca83d5..c3f1cc1 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml
@@ -20,7 +20,7 @@
   services
 service
   nameSLIDER/name
-  version0.61.0.2.3/version
+  version0.72.0.2.3/version
   osSpecifics
 osSpecific
   osFamilyredhat7,redhat6,suse11/osFamily

http://git-wip-us.apache.org/repos/asf/ambari/blob/e59089b4/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py 
b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
index 370aca0..58c661b 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
@@ -20,6 +20,7 @@ limitations under the License.
 from mock.mock import MagicMock, call, patch
 from stacks.utils.RMFTestCase import *
 
+@patch(platform.linux_distribution, new = MagicMock(return_value=Linux))
 @patch(os.path.exists, new = MagicMock(return_value=True))
 class TestHBaseClient(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = HBASE/0.96.0.2.0/package

http://git-wip-us.apache.org/repos/asf/ambari/blob/e59089b4/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py 
b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
index 36c942e..48431cf 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
@@ -20,6 +20,7 @@ limitations under the License.
 from mock.mock import MagicMock, patch
 from stacks.utils.RMFTestCase import *
 
+@patch(platform.linux_distribution, new = MagicMock(return_value=Linux))
 @patch(os.path.exists, new = MagicMock(return_value=True))
 class TestHBaseMaster(RMFTestCase):