ambari git commit: AMBARI-10703. Dependent configs information bar should float at the top of the page (onechiporenko)

2015-04-23 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk ee3bfa112 - 5a71e013d


AMBARI-10703. Dependent configs information bar should float at the top of the 
page (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 5a71e013db7ae396d347bfab7cd2d846dd54a004
Parents: ee3bfa1
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Thu Apr 23 18:21:23 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Thu Apr 23 18:21:23 2015 +0300

--
 ambari-web/app/styles/config_history_flow.less  | 17 +++-
 .../templates/common/configs/service_config.hbs | 11 ++-
 ambari-web/app/utils/pages/scroll_manager.js| 91 
 .../views/common/configs/config_history_flow.js | 62 +++--
 .../app/views/main/service/info/configs.js  | 21 -
 5 files changed, 146 insertions(+), 56 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5a71e013/ambari-web/app/styles/config_history_flow.less
--
diff --git a/ambari-web/app/styles/config_history_flow.less 
b/ambari-web/app/styles/config_history_flow.less
index f62e995..5ed6e67 100644
--- a/ambari-web/app/styles/config_history_flow.less
+++ b/ambari-web/app/styles/config_history_flow.less
@@ -33,6 +33,21 @@
   }
 }
 
+.dependencies-info {
+  margin-bottom: 110px;
+}
+
+.dependencies-info-bar-wrapper {
+  position: fixed;
+  z-index: 2;
+  width: 757px;
+}
+@media (min-width: 1200px) {
+  .dependencies-info-bar-wrapper {
+width: 970px;
+  }
+}
+
 #config_history_flow {
   margin-top: -5px;
   .version-slider {
@@ -181,7 +196,7 @@
   }
   .version-info-bar-wrapper {
 position: fixed;
-z-index: 2;
+z-index: 3;
 width: 747px;
   }
   @media (min-width: 1200px) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5a71e013/ambari-web/app/templates/common/configs/service_config.hbs
--
diff --git a/ambari-web/app/templates/common/configs/service_config.hbs 
b/ambari-web/app/templates/common/configs/service_config.hbs
index 4c7a1f0..e516dc4 100644
--- a/ambari-web/app/templates/common/configs/service_config.hbs
+++ b/ambari-web/app/templates/common/configs/service_config.hbs
@@ -83,11 +83,14 @@
 {{/if}}
 
 {{#if versionLoaded}}
-  {{#if hasChangedDependencies}}
-div class=alert alert-warning
-  span{{dependenciesMessage}}/span a href=# {{action 
showChangedDependentConfigs target=controller}}{{t common.showDetails}}/a
+  div {{bindAttr class=hasChangedDependencies:show:hide 
:dependencies-info}}
+div class=dependencies-info-bar-wrapper
+  div class=alert alert-warning
+span{{dependenciesMessage}}/span a
+  href=# {{action showChangedDependentConfigs 
target=controller}}{{t common.showDetails}}/a
+  /div
 /div
-  {{/if}}
+  /div
   {{#if view.supportsConfigLayout}}
 ul class=nav nav-tabs
   {{#each tab in view.tabs}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/5a71e013/ambari-web/app/utils/pages/scroll_manager.js
--
diff --git a/ambari-web/app/utils/pages/scroll_manager.js 
b/ambari-web/app/utils/pages/scroll_manager.js
new file mode 100644
index 000..16b08f6
--- /dev/null
+++ b/ambari-web/app/utils/pages/scroll_manager.js
@@ -0,0 +1,91 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+function calculatePosition(movedTop, defaultTop, scrollTop, defaultLeft, 
scrollLeft) {
+  var css = {
+top: 'auto',
+left: 'auto'
+  };
+  if (scrollTop = defaultTop) {
+css.top = movedTop;
+  } else if (scrollTop  0) {
+css.top = (defaultTop - scrollTop) + 'px';
+  }
+  //if (css.top == '0px') debugger;
+  if (scrollLeft  0) {
+css.left = defaultLeft;
+  }
+  

ambari git commit: AMBARI-10456 - Ambari Server Deadlock When Mapping Hosts (jonathanhurley)

2015-04-23 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint c534b2727 - 734a5ee44


AMBARI-10456 - Ambari Server Deadlock When Mapping Hosts (jonathanhurley)


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

Branch: refs/heads/branch-2.0.maint
Commit: 734a5ee4465e42aaf7c7d3168372352a5806ee7c
Parents: c534b27
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Tue Apr 14 10:59:57 2015 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Thu Apr 23 11:48:02 2015 -0400

--
 .../events/publishers/AmbariEventPublisher.java |  10 +-
 .../server/state/cluster/ClustersImpl.java  | 101 --
 .../server/agent/TestHeartbeatHandler.java  |   4 +
 .../apache/ambari/server/events/EventsTest.java |  13 +-
 .../server/orm/dao/AlertDispatchDAOTest.java|  19 +--
 .../ambari/server/orm/dao/AlertsDAOTest.java|  15 +-
 .../state/alerts/AlertEventPublisherTest.java   |  26 +---
 .../alerts/AlertStateChangedEventTest.java  |  20 +--
 .../state/alerts/InitialAlertEventTest.java |  28 +---
 .../state/cluster/AlertDataManagerTest.java |   9 +-
 .../state/cluster/ClusterDeadlockTest.java  |   6 -
 .../state/cluster/ClustersDeadlockTest.java | 137 ++-
 .../server/utils/EventBusSynchronizer.java  | 137 +++
 13 files changed, 332 insertions(+), 193 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/734a5ee4/ambari-server/src/main/java/org/apache/ambari/server/events/publishers/AmbariEventPublisher.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/events/publishers/AmbariEventPublisher.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/events/publishers/AmbariEventPublisher.java
index 96e66a62..05194e4 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/events/publishers/AmbariEventPublisher.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/events/publishers/AmbariEventPublisher.java
@@ -17,16 +17,19 @@
  */
 package org.apache.ambari.server.events.publishers;
 
+import java.util.concurrent.Executors;
+
 import org.apache.ambari.server.events.AmbariEvent;
 
+import com.google.common.eventbus.AsyncEventBus;
 import com.google.common.eventbus.EventBus;
 import com.google.common.eventbus.Subscribe;
 import com.google.inject.Singleton;
 
 /**
  * The {@link AmbariEventPublisher} is used to publish instances of
- * {@link AmbariEvent} to any {@link Subscribe} interested. It uses a
- * single-threaded, serial {@link EventBus}.
+ * {@link AmbariEvent} to any {@link Subscribe} methods interested. It uses a
+ * single-threaded {@link AsyncEventBus}.
  */
 @Singleton
 public class AmbariEventPublisher {
@@ -40,7 +43,8 @@ public class AmbariEventPublisher {
* Constructor.
*/
   public AmbariEventPublisher() {
-m_eventBus = new EventBus(ambari-event-bus);
+m_eventBus = new AsyncEventBus(ambari-event-bus,
+Executors.newSingleThreadExecutor());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/734a5ee4/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
index 9cf1f5a..c7a8ddb 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
@@ -28,7 +28,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import javax.persistence.RollbackException;
@@ -230,29 +229,25 @@ public class ClustersImpl implements Clusters {
   public Cluster getCluster(String clusterName)
   throws AmbariException {
 checkLoaded();
-r.lock();
-try {
-  if (!clusters.containsKey(clusterName)) {
-throw new ClusterNotFoundException(clusterName);
-  }
-  return clusters.get(clusterName);
-} finally {
-  r.unlock();
+
+Cluster cluster = clusters.get(clusterName);
+if (null == cluster) {
+  throw new ClusterNotFoundException(clusterName);
 }
+
+return cluster;
   }
 
   @Override
   public Cluster getClusterById(long id) throws AmbariException {
 checkLoaded();
-

ambari git commit: AMBARI-10704. Installer showing incorrect error count for enhanced config tab (onechiporenko)

2015-04-23 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 5a71e013d - 64cae309c


AMBARI-10704. Installer showing incorrect error count for enhanced config tab 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 64cae309c91d3d4b82b4ca1eaa758dae78123680
Parents: 5a71e01
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Thu Apr 23 18:29:26 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Thu Apr 23 18:29:26 2015 +0300

--
 .../controllers/main/service/info/configs.js|  2 +-
 .../app/controllers/wizard/step7_controller.js  |  2 +-
 .../main/service/info/config_test.js| 24 +++---
 .../test/controllers/wizard/step7_test.js   | 26 
 4 files changed, 43 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/64cae309/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index de4e87e..5f22112 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -179,7 +179,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   errorsCount: function () {
 return this.get('selectedService.configs').filter(function (config) {
   return Em.isNone(config.get('widget'));
-}).filterProperty('isValid', false).length;
+}).filterProperty('isValid', false).filterProperty('isVisible').length;
   }.property('selectedService.configs.@each.isValid'),
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/64cae309/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 a0b58c4..ede0579 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -139,7 +139,7 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
   errorsCount: function () {
 return this.get('selectedService.configs').filter(function (config) {
   return Em.isNone(config.get('widget'));
-}).filterProperty('isValid', false).length;
+}).filterProperty('isValid', false).filterProperty('isVisible').length;
   }.property('selectedService.configs.@each.isValid'),
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/64cae309/ambari-web/test/controllers/main/service/info/config_test.js
--
diff --git a/ambari-web/test/controllers/main/service/info/config_test.js 
b/ambari-web/test/controllers/main/service/info/config_test.js
index e1d93c3..7bed552 100644
--- a/ambari-web/test/controllers/main/service/info/config_test.js
+++ b/ambari-web/test/controllers/main/service/info/config_test.js
@@ -1311,10 +1311,26 @@ describe(App.MainServiceInfoConfigsController, 
function () {
 
   mainServiceInfoConfigsController.reopen({selectedService: {
 configs: [
-  Em.Object.create({widget: Em.View, isValid: false}),
-  Em.Object.create({widget: Em.View, isValid: true}),
-  Em.Object.create({isValid: true}),
-  Em.Object.create({isValid: false})
+  Em.Object.create({isVisible: true, widget: Em.View, isValid: false}),
+  Em.Object.create({isVisible: true, widget: Em.View, isValid: true}),
+  Em.Object.create({isVisible: true, isValid: true}),
+  Em.Object.create({isVisible: true, isValid: false})
+]
+  }});
+
+  expect(mainServiceInfoConfigsController.get('errorsCount')).to.equal(1);
+
+});
+
+it('should ignore configs with widgets (enhanced configs) and hidden 
configs', function () {
+
+  mainServiceInfoConfigsController.reopen({selectedService: {
+configs: [
+  Em.Object.create({isVisible: true, widget: Em.View, isValid: false}),
+  Em.Object.create({isVisible: true, widget: Em.View, isValid: true}),
+  Em.Object.create({isVisible: false, isValid: false}),
+  Em.Object.create({isVisible: true, isValid: true}),
+  Em.Object.create({isVisible: true, isValid: false})
 ]
   }});
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/64cae309/ambari-web/test/controllers/wizard/step7_test.js

[4/5] ambari git commit: AMBARI-10701. hosts page rack tooltip hangs around (alexantonenko)

2015-04-23 Thread alexantonenko
AMBARI-10701. hosts page rack tooltip hangs around (alexantonenko)


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

Branch: refs/heads/trunk
Commit: ee3bfa112e02e147e595e0eddb5eb44c38010b8c
Parents: 571c192
Author: Alex Antonenko hiv...@gmail.com
Authored: Thu Apr 23 16:55:41 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Thu Apr 23 18:04:49 2015 +0300

--
 ambari-web/app/views/main/host.js   |   1 +
 .../test/controllers/wizard/step8_test.js   | 692 +++
 .../test/controllers/wizard/step9_test.js   | 324 +
 3 files changed, 1017 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ee3bfa11/ambari-web/app/views/main/host.js
--
diff --git a/ambari-web/app/views/main/host.js 
b/ambari-web/app/views/main/host.js
index d28a5d8..d3de708 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -216,6 +216,7 @@ App.MainHostView = 
App.TableView.extend(App.TableServerViewMixin, {
 
   willDestroyElement: function () {
 this.clearExpandedSections();
+$('.tooltip').remove();
   },
 
   clearExpandedSections: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ee3bfa11/ambari-web/test/controllers/wizard/step8_test.js
--
diff --git a/ambari-web/test/controllers/wizard/step8_test.js 
b/ambari-web/test/controllers/wizard/step8_test.js
index 1b97f6d..2dd939a 100644
--- a/ambari-web/test/controllers/wizard/step8_test.js
+++ b/ambari-web/test/controllers/wizard/step8_test.js
@@ -236,6 +236,629 @@ describe('App.WizardStep8Controller', function () {
 });
   });
 
+  describe('#createCoreSiteObj', function () {
+it('should return config', function () {
+  var content = Em.Object.create({
+services: Em.A([
+  Em.Object.create({
+serviceName: 's1',
+isSelected: true,
+isInstalled: false
+  }),
+  Em.Object.create({
+serviceName: 's2',
+isSelected: true,
+isInstalled: false
+  }),
+  Em.Object.create({
+serviceName: 's3',
+isSelected: true,
+isInstalled: false
+  }),
+  Em.Object.create({
+serviceName: 'GLUSTERFS',
+isSelected: false,
+isInstalled: true,
+configTypesRendered: {hdfs:'tag1'}
+  })
+])
+  });
+  var installedServices = content.services.filterProperty('isInstalled', 
true);
+  var selectedServices = content.services.filterProperty('isSelected', 
true);
+  installerStep8Controller.set('content', content);
+  installerStep8Controller.set('installedServices', installedServices);
+  installerStep8Controller.set('selectedServices', selectedServices);
+  installerStep8Controller.set('configs', Em.A([
+Em.Object.create({
+  name: 'fs_glusterfs_default_name',
+  filename: 'core-site.xml', 
+  value: 'value',
+  overrides: Em.A([
+Em.Object.create({
+  value: '4',
+  hosts: Em.A(['h1','h2'])
+})
+  ])
+}),
+Em.Object.create({
+  name: 'fs.defaultFS',
+  filename: 'core-site.xml', 
+  value: 'value',
+  overrides: Em.A([
+Em.Object.create({
+  value: '4',
+  hosts: Em.A(['h1','h2'])
+})
+  ])
+}),
+Em.Object.create({
+  name: 'glusterfs_defaultFS_name',
+  filename: 'core-site.xml', 
+  value: 'value',
+  overrides: Em.A([
+Em.Object.create({
+  value: '4',
+  hosts: Em.A(['h1','h2'])
+})
+  ])
+})
+  ]));
+  var expected = {
+type: core-site,
+tag: version1,
+properties: {
+  fs_glusterfs_default_name: value,
+  fs.defaultFS: value,
+  glusterfs_defaultFS_name: value
+}
+  };
+
+  expect(installerStep8Controller.createCoreSiteObj()).to.eql(expected);
+});
+  });
+
+  describe('#createConfigurationGroups', function () {
+beforeEach(function() {
+  sinon.stub(App.router,'get').returns(Em.Object.create({
+getDBProperty: function() {
+  return Em.A([
+Em.Object.create({
+  value: 1
+})
+  ]);
+},
+getConfigAttributes: function() {
+  return Em.A(['atr']);
+}
+  }));

[1/5] ambari git commit: AMBARI-10693. Install clients on host: dependent clients aren't installed, dependencies info is displayed behind BG operations popup (alexantonenko)

2015-04-23 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 7113ce228 - ee3bfa112


AMBARI-10693. Install clients on host: dependent clients aren't installed, 
dependencies info is displayed behind BG operations popup (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 14436286b425c2b83ba9afa57cded39319abbef8
Parents: 7113ce2
Author: Alex Antonenko hiv...@gmail.com
Authored: Thu Apr 23 15:23:55 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Thu Apr 23 18:04:48 2015 +0300

--
 ambari-web/app/controllers/main/host/details.js | 103 +++
 ambari-web/app/messages.js  |   1 +
 .../test/controllers/main/host/details_test.js  | 185 ++-
 3 files changed, 206 insertions(+), 83 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/14436286/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 99fea74..d23fc79 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -432,20 +432,18 @@ App.MainHostDetailsController = Em.Controller.extend({
* add component as codeaddComponentcode method but perform
* kdc sessionstate if cluster is secure;
* @param event
-   * @param skipConfirmation
*/
-  addComponentWithCheck: function (event, skipConfirmation) {
+  addComponentWithCheck: function (event) {
 var componentName = event.context ? event.context.get('componentName') : 
;
 event.hiveMetastoreHost = (componentName == HIVE_METASTORE  
!!this.get('content.hostName')) ? this.get('content.hostName') : null;
-
App.get('router.mainAdminKerberosController').getKDCSessionState(this.addComponent.bind(this,
 event, skipConfirmation));
+
App.get('router.mainAdminKerberosController').getKDCSessionState(this.addComponent.bind(this,
 event));
   },
   /**
* Send command to server to install selected host component
* @param {object} event
-   * @param {boolean} skipConfirmation
* @method addComponent
*/
-  addComponent: function (event, skipConfirmation) {
+  addComponent: function (event) {
 var
   returnFunc,
   self = this,
@@ -477,41 +475,40 @@ App.MainHostDetailsController = Em.Controller.extend({
 }, Em.I18n.t('hosts.host.addComponent.' + componentName ));
 break;
   default:
-returnFunc = this.addClientComponent(component, skipConfirmation);
+returnFunc = this.addClientComponent(component);
   }
 return returnFunc;
   },
   /**
* Send command to server to install client on selected host
* @param component
-   * @param skipConfirmation
*/
-  addClientComponent: function (component, skipConfirmation) {
+  addClientComponent: function (component) {
 var self = this;
 var message = this.formatClientsMessage(component);
-var returnFunction;
-if (skipConfirmation) {
-  returnFunction = this.primary(component);
-} else {
-  returnFunction = App.ModalPopup.show({
-primary: Em.I18n.t('hosts.host.addComponent.popup.confirm'),
-header: Em.I18n.t('popup.confirmation.commonHeader'),
+return this.showAddComponentPopup(message, function () {
+  self.primary(component);
+});
+  },
 
-addComponentMsg: function () {
-  return Em.I18n.t('hosts.host.addComponent.msg').format(message);
-}.property(),
+  showAddComponentPopup: function (message, primary) {
+return App.ModalPopup.show({
+  primary: Em.I18n.t('hosts.host.addComponent.popup.confirm'),
+  header: Em.I18n.t('popup.confirmation.commonHeader'),
 
-bodyClass: Em.View.extend({
-  templateName: 
require('templates/main/host/details/addComponentPopup')
-}),
+  addComponentMsg: function () {
+return Em.I18n.t('hosts.host.addComponent.msg').format(message);
+  }.property(),
 
-onPrimary: function () {
-  this.hide();
-  self.primary(component);
-}
-  });
-}
-return returnFunction;
+  bodyClass: Em.View.extend({
+templateName: require('templates/main/host/details/addComponentPopup')
+  }),
+
+  onPrimary: function () {
+this.hide();
+primary();
+  }
+});
   },
 
   /**
@@ -1933,7 +1930,10 @@ App.MainHostDetailsController = Em.Controller.extend({
 
   installClients: function(event) {
 var clientsToInstall = [],
-  clientsToAdd = [];
+  clientsToAdd = [],
+ 

[3/5] ambari git commit: AMBARI-10697. Remove the Jobs View from Ambari (alexantonenko)

2015-04-23 Thread alexantonenko
AMBARI-10697. Remove the Jobs View from Ambari (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 571c192643e4abba6a9b4eaa00888f53626c8e08
Parents: 5ab5f3f
Author: Alex Antonenko hiv...@gmail.com
Authored: Thu Apr 23 16:26:44 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Thu Apr 23 18:04:49 2015 +0300

--
 contrib/views/pom.xml | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/571c1926/contrib/views/pom.xml
--
diff --git a/contrib/views/pom.xml b/contrib/views/pom.xml
index 60c3b71..6eb6aeb 100644
--- a/contrib/views/pom.xml
+++ b/contrib/views/pom.xml
@@ -34,7 +34,6 @@
   /properties
   modules
 modulefiles/module
-modulejobs/module
 modulepig/module
 moduleslider/module
 modulecapacity-scheduler/module



[2/5] ambari git commit: AMBARI-10696. Prevent the Make Current operation on a historical config with an incompatible stack (alexantonenko)

2015-04-23 Thread alexantonenko
AMBARI-10696. Prevent the Make Current operation on a historical config with 
an incompatible stack (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 5ab5f3f779620865bbf245f7a69b41b7d790c425
Parents: f333a78
Author: Alex Antonenko hiv...@gmail.com
Authored: Thu Apr 23 15:41:17 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Thu Apr 23 18:04:49 2015 +0300

--
 .../data/configurations/service_versions.json   | 52 +++-
 .../mappers/service_config_version_mapper.js|  3 +-
 .../models/configs/service_config_version.js|  4 ++
 ambari-web/app/styles/config_history_flow.less  | 14 ++
 .../common/configs/config_history_flow.hbs  |  8 +--
 .../common/configs/service_version_box.hbs  |  2 +-
 ambari-web/app/utils/ajax/ajax.js   |  2 +-
 .../configs/service_config_version_test.js  | 35 +
 8 files changed, 80 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5ab5f3f7/ambari-web/app/assets/data/configurations/service_versions.json
--
diff --git a/ambari-web/app/assets/data/configurations/service_versions.json 
b/ambari-web/app/assets/data/configurations/service_versions.json
index 5b30903..c5eb46c 100644
--- a/ambari-web/app/assets/data/configurations/service_versions.json
+++ b/ambari-web/app/assets/data/configurations/service_versions.json
@@ -8,7 +8,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id : HDP-2.0.6
   },
   type : ganglia-env,
   tag : version1414410959005,
@@ -36,7 +36,8 @@
   service_config_version_note : Initial configurations for Ganglia,
   service_name : GANGLIA,
   user : admin,
-  stack_id: HDP-2.0.6
+  stack_id : HDP-2.0.6,
+  is_cluster_compatible: true
 },
 {
   href : 
http://192.168.56.101:8080/api/v1/clusters/tdk/configurations/service_config_versions?service_name=HDFSservice_config_version=2;,
@@ -45,7 +46,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id : HDP-2.0.5
   },
   type : core-site,
   tag : version1,
@@ -75,7 +76,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id : HDP-2.0.5
   },
   type : hadoop-policy,
   tag : version1,
@@ -97,7 +98,8 @@
 },
 {
   Config : {
-cluster_name : tdk
+cluster_name : tdk,
+stack_id : HDP-2.0.5
   },
   type : hdfs-log4j,
   tag : version1,
@@ -110,7 +112,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id : HDP-2.0.5
   },
   type : hdfs-site,
   tag : version1,
@@ -173,7 +175,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id : HDP-2.0.5
   },
   type : hadoop-env,
   tag : version1414314983497,
@@ -206,7 +208,8 @@
   service_config_version_note : ,
   service_name : HDFS,
   user : admin,
-  stack_id: HDP-2.0.6
+  stack_id : HDP-2.0.5,
+  is_cluster_compatible: false
 },
 {
   href : 
http://192.168.56.101:8080/api/v1/clusters/tdk/configurations/service_config_versions?service_name=HDFSservice_config_version=1;,
@@ -215,7 +218,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id : HDP-2.0.5
   },
   type : hadoop-env,
   tag : version1,
@@ -241,7 +244,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id : HDP-2.0.5
   },
   type : hdfs-log4j,
   tag : version1,
@@ -254,7 +257,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id : HDP-2.0.5
   },
   type : hdfs-site,
   tag : version1,
@@ -317,7 +320,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id : HDP-2.0.5
   },
   type : hadoop-policy,
   tag : version1,
@@ -340,7 +343,7 @@
 {
   Config : {
 cluster_name : tdk,
-stack_id: HDP-2.0.6
+stack_id 

[5/5] ambari git commit: AMBARI-10694. Update ranger install requirements dialog (alexantonenko)

2015-04-23 Thread alexantonenko
AMBARI-10694. Update ranger install requirements dialog (alexantonenko)


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

Branch: refs/heads/trunk
Commit: f333a78c0134b1b059b2ad137ca917a38be6f062
Parents: 1443628
Author: Alex Antonenko hiv...@gmail.com
Authored: Thu Apr 23 15:27:20 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Thu Apr 23 18:04:49 2015 +0300

--
 ambari-web/app/messages.js | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f333a78c/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 3e43684..df96749 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -693,10 +693,10 @@ Em.I18n.translations = {
   'installer.step4.ambariMetricsCheck.popup.header':'Limited Functionality 
Warning',
   'installer.step4.ambariMetricsCheck.popup.body':'Ambari Metrics collects 
metrics from the cluster and makes them available to Ambari.  If you do not 
install Ambari Metrics service, metrics will not be accessible from Ambari.  
Are you sure you want to proceed without Ambari Metrics?',
   'installer.step4.rangerRequirements.popup.header': 'Ranger Requirements',
-  'installer.step4.rangerRequirements.popup.body.requirements': 'olliYou 
must have an strongexisting MySQL Server or Oracle Server/strong database 
instance running to be used by Ranger./li' +
-'liIn Assign Masters step of this wizard, you will be prompted to 
specify which host for the Ranger Admin. On that host, you strongmust have 
MySQL Client or Oracle Client installed/strong for Ranger to access to the 
database./li' +
-'liEnsure that the access for the DB Admin user (strongroot/strong 
in case of MySQL or strongSYS/strong in case of Oracle) is enabled in DB 
server from any host./li' +
-'liExecute the following command on the Ambari Server host. Replace 
codedatabase-type/code with strongmysql/strong or 
strongoracle/strong and code/jdbc/driver/path/code based on the 
location of the MySQL or Oracle JDBC driver:' +
+  'installer.step4.rangerRequirements.popup.body.requirements': 'olliYou 
must have an strongMySQL/Oracle/Postgres/MSSQL Server/strong database 
instance running to be used by Ranger./li' +
+'liIn Assign Masters step of this wizard, you will be prompted to 
specify which host for the Ranger Admin. On that host, you strongmust have DB 
Client installed/strong for Ranger to access to the database. (Note: This is 
only applicable for only HDP 2.2)/li' +
+'liEnsure that the access for the DB Admin user is enabled in DB server 
from any host./li' +
+'liExecute the following command on the Ambari Server host. Replace 
codedatabase-type/code with strongmysql|oracle|postgres|mssql/strong 
and code/jdbc/driver/path/code based on the location of corresponding JDBC 
driver:' +
 'preambari-server setup --jdbc-db={database-type} 
--jdbc-driver={/jdbc/driver/path}/pre/li/ol',
   'installer.step4.rangerRequirements.popup.body.confirmation': 'I have met 
all the requirements above.',
   'installer.step4.sparkWarning.popup.body': 'Spark requires HDP 2.2.2 or 
later. Attempting to install Spark to a HDP 2.2.0 cluster will fail. Confirm 
you are using HDP 2.2.2 or later packages. Are you sure you want to proceed?',



ambari git commit: AMBARI-10611 Ensure Accumulo client conf is in sync with accumulo-site conf (billie)

2015-04-23 Thread billie
Repository: ambari
Updated Branches:
  refs/heads/trunk b4d7b388b - 7113ce228


AMBARI-10611 Ensure Accumulo client conf is in sync with accumulo-site conf 
(billie)


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

Branch: refs/heads/trunk
Commit: 7113ce22801baef6626ad49358a3d014064be6c4
Parents: b4d7b38
Author: Billie Rinaldi billie.rina...@gmail.com
Authored: Thu Apr 23 06:50:34 2015 -0700
Committer: Billie Rinaldi billie.rina...@gmail.com
Committed: Thu Apr 23 07:49:25 2015 -0700

--
 .../1.6.1.2.2.0/configuration/client.xml| 24 
 .../ACCUMULO/1.6.1.2.2.0/metainfo.xml   |  5 
 .../package/scripts/accumulo_configuration.py   | 19 ++--
 3 files changed, 46 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7113ce22/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/client.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/client.xml
 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/client.xml
new file mode 100644
index 000..f1fa4de
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/client.xml
@@ -0,0 +1,24 @@
+?xml version=1.0?
+?xml-stylesheet type=text/xsl href=configuration.xsl?
+!--
+/**
+ * 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.
+ */
+--
+
+configuration
+/configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/7113ce22/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml
index 6604e53..7a6004c 100644
--- 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml
@@ -125,6 +125,11 @@
   fileNamelog4j.properties/fileName
   dictionaryNameaccumulo-log4j/dictionaryName
 /configFile
+configFile
+  typeproperties/type
+  fileNameclient.conf/fileName
+  dictionaryNameclient/dictionaryName
+/configFile
   /configFiles
 /component
   /components

http://git-wip-us.apache.org/repos/asf/ambari/blob/7113ce22/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py
 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py
index e4d8ed1..4652cc1 100644
--- 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py
+++ 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py
@@ -105,10 +105,21 @@ def setup_conf_dir(name=None): # 'master' or 'tserver' or 
'monitor' or 'gc' or '
 
   # create client.conf file
   configs = {}
+  if 'client' in params.config['configurations']:
+configs.update(params.config['configurations']['client'])
   configs[instance.name] = params.instance_name
   configs[instance.zookeeper.host] = 
params.config['configurations']['accumulo-site']['instance.zookeeper.host']
-  if 'instance.rpc.sasl.enabled' in 
params.config['configurations']['accumulo-site']:
-configs[instance.rpc.sasl.enabled] = 

[1/2] ambari git commit: AMBARI-10706. hiveserver2-site needs to be created on Ambari upgrade to 2.0.(vbrodetskyi)

2015-04-23 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk 64cae309c - c902a32b1


http://git-wip-us.apache.org/repos/asf/ambari/blob/c902a32b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.2.4.json
--
diff --git 
a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.2.4.json
 
b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.2.4.json
new file mode 100644
index 000..3816c48
--- /dev/null
+++ 
b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.2.4.json
@@ -0,0 +1,512 @@
+{
+  version: 1.0,
+  stacks: [
+{
+  name: HDP,
+  old-version: 2.1,
+  target-version: 2.2.4,
+  options: {
+config-types: {
+  capacity-scheduler: {
+merged-copy: yes
+  },
+ cluster-env: {
+merged-copy: yes
+  },
+ core-site: {
+merged-copy: yes
+  },
+ falcon-startup.properties: {
+merged-copy: yes
+  },
+ flume-env: {
+   merged-copy: yes
+ },
+ hadoop-env: {
+merged-copy: yes
+  },
+ hbase-env: {
+merged-copy: yes
+  },
+ hbase-site: {
+merged-copy: yes
+  },
+ hdfs-log4j: {
+merged-copy: yes
+  },
+ hdfs-site: {
+merged-copy: yes
+  },
+ hive-env: {
+merged-copy: yes
+  },
+ hive-site: {
+merged-copy: yes
+  },
+ mapred-env: {
+merged-copy: yes
+  },
+ mapred-site: {
+merged-copy: yes
+  },
+ oozie-env: {
+merged-copy: yes
+  },
+  oozie-site: {
+merged-copy: yes
+  },
+ storm-env: {
+merged-copy: yes
+  },
+ storm-site: {
+merged-copy: yes
+  },
+ tez-site: {
+merged-copy: yes
+  },
+ webhcat-log4j: {
+   merged-copy: yes
+ },
+ webhcat-site: {
+merged-copy: yes
+  },
+ yarn-site: {
+merged-copy: yes
+  }
+}
+  },
+  properties: {
+capacity-scheduler: {
+  yarn.scheduler.capacity.resource-calculator: 
org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator,
+  yarn.scheduler.capacity.root.accessible-node-labels: *,
+  
yarn.scheduler.capacity.root.accessible-node-labels.default.capacity: -1,
+  
yarn.scheduler.capacity.root.accessible-node-labels.default.maximum-capacity: 
-1,
+  yarn.scheduler.capacity.root.default-node-label-expression:  
+},
+   cluster-env: {
+  hadoop-streaming_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/mapreduce/,
+  hadoop-streaming_tar_source: 
/usr/hdp/current/hadoop-mapreduce-client/hadoop-streaming.jar,
+  hive_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/hive/,
+  hive_tar_source: /usr/hdp/current/hive-client/hive.tar.gz,
+  mapreduce_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/mapreduce/,
+  mapreduce_tar_source: 
/usr/hdp/current/hadoop-client/mapreduce.tar.gz,
+  pig_tar_destination_folder: hdfs:///hdp/apps/{{ hdp_stack_version 
}}/pig/,
+  pig_tar_source: /usr/hdp/current/pig-client/pig.tar.gz,
+  sqoop_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/sqoop/,
+  sqoop_tar_source: /usr/hdp/current/sqoop-client/sqoop.tar.gz,
+  tez_tar_destination_folder: hdfs:///hdp/apps/{{ hdp_stack_version 
}}/tez/,
+  tez_tar_source: /usr/hdp/current/tez-client/lib/tez.tar.gz,
+  smokeuser_principal_name: {remove: yes}
+},
+   core-site: {
+ hadoop.http.authentication.simple.anonymous.allowed: true,
+  hadoop.security.auth_to_local: \nDEFAULT
+   },
+   falcon-startup.properties: {
+ *.application.services: 
org.apache.falcon.security.AuthenticationInitializationService,\\\n  
org.apache.falcon.workflow.WorkflowJobEndNotificationService, \\\n  
org.apache.falcon.service.ProcessSubscriberService,\\\n  
org.apache.falcon.entity.store.ConfigurationStore,\\\n  
org.apache.falcon.rerun.service.RetryService,\\\n  
org.apache.falcon.rerun.service.LateRunService,\\\n  
org.apache.falcon.service.LogCleanupService,\\\n  
org.apache.falcon.metadata.MetadataMappingService,
+ *.falcon.enableTLS: false,
+ 

ambari git commit: AMBARI-10489. Blueprints support for Hive Server HA clusters. (rnettleton)

2015-04-23 Thread rnettleton
Repository: ambari
Updated Branches:
  refs/heads/trunk e8e7c827d - 727b76f0f


AMBARI-10489. Blueprints support for Hive Server HA clusters.  (rnettleton)


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

Branch: refs/heads/trunk
Commit: 727b76f0f8e5b7bf8f965adb531b0c08950834b3
Parents: e8e7c82
Author: Bob Nettleton rnettle...@hortonworks.com
Authored: Thu Apr 23 13:36:10 2015 -0400
Committer: Bob Nettleton rnettle...@hortonworks.com
Committed: Thu Apr 23 13:37:56 2015 -0400

--
 .../BlueprintConfigurationProcessor.java| 171 -
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   |   7 +
 .../BlueprintConfigurationProcessorTest.java| 361 ++-
 3 files changed, 523 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/727b76f0/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 cec93bf..9c3266a 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
@@ -22,6 +22,7 @@ package org.apache.ambari.server.controller.internal;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
@@ -343,6 +344,16 @@ public class BlueprintConfigurationProcessor {

configProperties.get(oozie-site).get(oozie.services.ext).contains(org.apache.oozie.service.ZKLocksService);
   }
 
+  /**
+   * Static convenience function to determine if HiveServer HA is enabled
+   * @param configProperties configuration properties for this cluster
+   * @return true if HiveServer HA is enabled
+   * false if HiveServer HA is not enabled
+   */
+  static boolean isHiveServerHAEnabled(MapString, MapString, String 
configProperties) {
+return configProperties.containsKey(hive-site)  
configProperties.get(hive-site).containsKey(hive.server2.support.dynamic.service.discovery)
+   
configProperties.get(hive-site).get(hive.server2.support.dynamic.service.discovery).equals(true);
+  }
 
   /**
* Convenience method to examine the current configuration, to determine
@@ -730,11 +741,26 @@ public class BlueprintConfigurationProcessor {
 
 if ((isOozieServerHAEnabled(properties))  
isComponentOozieServer()  (matchingGroups.size()  1)) {
   if (!origValue.contains(localhost)) {
-// if this Oozie property is a FQDN, then simply return i
+// if this Oozie property is a FQDN, then simply return it
+return origValue;
+  }
+}
+
+if ((isHiveServerHAEnabled(properties))  isComponentHiveServer() 
 (matchingGroups.size()  1)) {
+  if (!origValue.contains(localhost)) {
+// if this Hive property is a FQDN, then simply return it
+return origValue;
+  }
+}
+
+if ((isComponentHiveMetaStoreServer())  matchingGroups.size()  
1) {
+  if (!origValue.contains(localhost)) {
+// if this Hive MetaStore property is a FQDN, then simply 
return it
 return origValue;
   }
 }
 
+
 throw new IllegalArgumentException(Unable to update configuration 
property  + ' + propertyName + '+  with topology information.  +
   Component ' + component + ' is not mapped to any host group 
or is mapped to multiple groups.);
   }
@@ -787,6 +813,28 @@ public class BlueprintConfigurationProcessor {
 }
 
 /**
+ * Utility method to determine if the component associated with this 
updater
+ * instance is a Hive Server
+ *
+ * @return true if the component associated is a Hive Server
+ * false if the component is not a Hive Server
+ */
+private boolean isComponentHiveServer() {
+  return component.equals(HIVE_SERVER);
+}
+
+/**
+ * Utility method to determine if the component associated with this 
updater
+ * instance is a Hive MetaStore Server
+ *
+ * @return true if the component associated is a Hive MetaStore Server
+ *   

[1/2] ambari git commit: AMBARI-10674-2. Content shown in widgets must be confined to the widget space(XIWANG)

2015-04-23 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 2f25e3b12 - 638862c6d


AMBARI-10674-2. Content shown in widgets must be confined to the widget 
space(XIWANG)


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

Branch: refs/heads/trunk
Commit: 638862c6d4cd488d8047026ba6ddf284e85a426c
Parents: d3f08c9
Author: Xi Wang xiw...@apache.org
Authored: Thu Apr 23 11:22:11 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu Apr 23 11:23:31 2015 -0700

--
 ambari-web/app/styles/enhanced_service_dashboard.less | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/638862c6/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 184a493..182918f 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -82,13 +82,12 @@
   font-weight: bold;
   font-size: 35px;
   width: 95%;
-  position: absolute;
 }
 .template-widget,
 .number-widget {
   .frame;
   .content {
-padding-top: 70px;
+padding-top: 30px;
 height: 50px;
 overflow: hidden;
 text-overflow: ellipsis;



[2/2] ambari git commit: AMBARI-10678. Graphs in service dashboards are too small (smaller than cluster dashboard graphs)(xiwang)

2015-04-23 Thread xiwang
AMBARI-10678. Graphs in service dashboards are too small (smaller than cluster 
dashboard graphs)(xiwang)


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

Branch: refs/heads/trunk
Commit: d3f08c97e8de468e4405621d88d5e76fea169cab
Parents: 2f25e3b
Author: Xi Wang xiw...@apache.org
Authored: Wed Apr 22 18:52:10 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu Apr 23 11:23:31 2015 -0700

--
 .../app/styles/enhanced_service_dashboard.less  | 38 ++--
 .../views/common/widget/graph_widget_view.js|  1 +
 2 files changed, 28 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d3f08c97/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 b4acfa9..184a493 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -52,7 +52,7 @@
 #widget-preview {
   .frame {
 height: 150px;
-width: 90%;
+width: 93%;
   }
   .span2p4 {
 width: 19.3%;
@@ -67,10 +67,12 @@
   margin: 55px auto;
 }
 .title {
-  padding: 5px 0 0 1px;
+  padding: 4px 0 0 1px;
   font-weight: bold;
+  font-size: 13px;
+  line-height: 17px;
   text-align: left;
-  height: 45px;
+  height: 40px;
   overflow: hidden;
   text-overflow: ellipsis;
 }
@@ -95,14 +97,28 @@
 .graph-widget {
   .frame;
   .content {
-padding-top: 30px;
-  }
-  .chart-legend {
-min-width: 100%;
-padding: 5px;
-text-align: left;
-top: 95px;
-left: -15px;
+padding-top: 45px;
+width: 99%;
+  }
+  .screensaver{ // graph onload wait
+width: 90%;
+height: 100px;
+border: 1px solid #eee;
+background: url(/img/spinner.gif) no-repeat center center;
+  }
+  .chart-container{
+margin: -4px 8px 0px 8px;
+.chart-y-axis{
+  margin-top: 10px;
+}
+.chart-legend {
+  top: 110px;
+  left: 0px;
+  padding: 3px;
+  min-width: 100%;
+  text-align: left;
+  z-index: 3;
+}
   }
 }
 .gauge-widget {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3f08c97/ambari-web/app/views/common/widget/graph_widget_view.js
--
diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js 
b/ambari-web/app/views/common/widget/graph_widget_view.js
index d800a73..1f705fa 100644
--- a/ambari-web/app/views/common/widget/graph_widget_view.js
+++ b/ambari-web/app/views/common/widget/graph_widget_view.js
@@ -189,6 +189,7 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, {
   graphView: App.ChartLinearTimeView.extend({
 
 noTitleUnderGraph: true,
+inWidget: true,
 
 /**
  * graph height



[2/2] ambari git commit: AMBARI-10706. hiveserver2-site needs to be created on Ambari upgrade to 2.0.(vbrodetskyi)

2015-04-23 Thread vbrodetskyi
AMBARI-10706. hiveserver2-site needs to be created on Ambari upgrade to 
2.0.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: c902a32b11ad38ed4839720f410397d26b88312c
Parents: 64cae30
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Tue Apr 21 01:58:15 2015 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Tue Apr 21 01:58:15 2015 +0300

--
 .../catalog/UpgradeCatalog_2.0_to_2.2.4.json| 466 +
 .../catalog/UpgradeCatalog_2.1_to_2.2.4.json| 512 +++
 2 files changed, 978 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c902a32b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.0_to_2.2.4.json
--
diff --git 
a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.0_to_2.2.4.json
 
b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.0_to_2.2.4.json
new file mode 100755
index 000..bf5f146
--- /dev/null
+++ 
b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.0_to_2.2.4.json
@@ -0,0 +1,466 @@
+{
+version: 1.0,
+stacks: [
+{
+name: HDP,
+old-version: 2.0,
+target-version: 2.2.4,
+options: {
+config-types: {
+capacity-scheduler: {
+merged-copy: yes
+},
+cluster-env: {
+merged-copy: yes
+},
+core-site: {
+merged-copy: yes
+},
+flume-env: {
+merged-copy: yes
+},
+hadoop-env: {
+merged-copy: yes
+},
+hbase-env: {
+merged-copy: yes
+},
+hbase-site: {
+merged-copy: yes
+},
+hdfs-log4j: {
+merged-copy: yes
+},
+hdfs-site: {
+merged-copy: yes
+},
+hive-env: {
+merged-copy: yes
+},
+hive-site: {
+merged-copy: yes
+},
+mapred-env: {
+merged-copy: yes
+},
+mapred-site: {
+merged-copy: yes
+},
+oozie-env: {
+merged-copy: yes
+},
+oozie-site: {
+merged-copy: yes
+},
+webhcat-site: {
+merged-copy: yes
+},
+webhcat-log4j: {
+merged-copy: yes
+},
+yarn-site: {
+merged-copy: yes
+},
+pig-properties: {
+merged-copy: yes
+}
+}
+},
+properties: {
+pig-properties: {
+content: \n# Licensed to the Apache Software Foundation 
(ASF) under one\n# or more contributor license agreements.  See the NOTICE 
file\n# distributed with this work for additional information\n# regarding 
copyright ownership.  The ASF licenses this file\n# to you under the Apache 
License, Version 2.0 (the\n# \License\); you may not use this file except in 
compliance\n# with the License.  You may obtain a copy of the License at\n#\n#  
 http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable 
law or agreed to in writing,\n# software distributed under the License is 
distributed on an\n# \AS IS\ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 
ANY\n# KIND, either express or implied.  See the License for the\n# specific 
language governing permissions and limitations\n# under the License.\n\n# Pig 
default configuration file. All values can be overwritten by pig.properties and 
command line arguments.\n# see bin/pig -help\n\n# brief logging (no ti
 mestamps)\nbrief=false\n\n# debug level, INFO is default\ndebug=INFO\n\n# 
verbose print all log messages to screen (default to print only INFO and above 
to screen)\nverbose=false\n\n# exectype local|mapreduce, mapreduce is 

ambari git commit: AMBARI-10686. Ranger Admin Install fails with an Attribute Error (aonishuk)

2015-04-23 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk c902a32b1 - 8779baea9


AMBARI-10686. Ranger Admin Install fails with an Attribute Error (aonishuk)


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

Branch: refs/heads/trunk
Commit: 8779baea98e546fa120f8bc9c3eec367c7ba6423
Parents: c902a32
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Apr 23 19:59:15 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Apr 23 19:59:15 2015 +0300

--
 .../RANGER/0.4.0/package/scripts/setup_ranger.py | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8779baea/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
index 391df2a..cc85b90 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
@@ -83,18 +83,21 @@ def check_db_connnection():
   import params
 
   Logger.info('Checking DB connection')
-
+  env_dict = {}
   if params.db_flavor.lower() == 'mysql':
 cmd = format('{sql_command_invoker} -u {db_root_user} 
--password={db_root_password} -h {db_host}  -s -e select version();')
   elif params.db_flavor.lower() == 'oracle':
 cmd = format('{sql_command_invoker} 
{db_root_user}/{db_root_password}@{db_host} AS SYSDBA')
+env_dict = {'ORACLE_HOME':params.oracle_home, 
'LD_LIBRARY_PATH':params.oracle_home}
   elif params.db_flavor.lower() == 'postgres':
 cmd = 'true'
   elif params.db_flavor.lower() == 'sqlserver':
 cmd = 'true'
 
   try:
-Execute(cmd)
+Execute(cmd,
+  environment=env_dict,
+  logoutput=True)
   except Fail as ex:
-Logger.info(ex)
-raise Fail('Ranger Admin installation Failed! Ranger requires DB client 
installed on Ranger Host, DB administrative privileges configured for 
connectivity from the Ranger Admin host to the configured DB host/instance and 
the DB server up and running on the DB host.')
+Logger.error(str(ex))
+raise Fail('Ranger Database connection check failed')



ambari git commit: Ambari-10677. apt-get update command updates all list files even if it is expected to update only one (UT fixes)

2015-04-23 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 8779baea9 - 6fb7ee357


Ambari-10677. apt-get update command updates all list files even if it is 
expected to update only one (UT fixes)


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

Branch: refs/heads/trunk
Commit: 6fb7ee357210d69e48f072b6f12ea3a71d7f75cd
Parents: 8779bae
Author: Sumit Mohanty smoha...@hortonworks.com
Authored: Thu Apr 23 10:06:06 2015 -0700
Committer: Sumit Mohanty smoha...@hortonworks.com
Committed: Thu Apr 23 10:06:06 2015 -0700

--
 .../test/python/resource_management/TestRepositoryResource.py  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6fb7ee35/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
--
diff --git 
a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py 
b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
index 82a185a..6b94481 100644
--- a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
@@ -171,7 +171,7 @@ class TestRepositoryResource(TestCase):
   #'apt-get update -qq -o Dir::Etc::sourcelist=sources.list.d/HDP.list 
-o APT::Get::List-Cleanup=0')
   execute_command_item = execute_mock.call_args_list[0][0][0]
 
-  self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 
'update', '-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 
'APT::Get::List-Cleanup=0'])
+  self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 
'update', '-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 
'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0'])
   self.assertEqual(execute_command_item, 'apt-key adv --recv-keys 
--keyserver keyserver.ubuntu.com 123ABCD')
 
 @patch(resource_management.libraries.providers.repository.checked_call)
@@ -211,7 +211,7 @@ class TestRepositoryResource(TestCase):
   self.assertEqual(copy_item, call('/etc/apt/sources.list.d/HDP.list', 
content=StaticFile('/tmp/1.txt')))
   execute_command_item = execute_mock.call_args_list[0][0][0]
 
-  self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 
'update', '-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 
'APT::Get::List-Cleanup=0'])
+  self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 
'update', '-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 
'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0'])
   self.assertEqual(execute_command_item, 'apt-key adv --recv-keys 
--keyserver keyserver.ubuntu.com 123ABCD')
 
 @patch.object(tempfile, NamedTemporaryFile)
@@ -257,7 +257,7 @@ class TestRepositoryResource(TestCase):
   )
   
   self.assertEqual(str(file_mock.call_args), 
call('/etc/apt/sources.list.d/HDP.list', action='delete'))
-  self.assertEqual(execute_mock.call_args[0][0], ['apt-get', 'update', 
'-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 
'APT::Get::List-Cleanup=0'])
+  self.assertEqual(execute_mock.call_args[0][0], ['apt-get', 'update', 
'-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 
'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0'])
 
 @patch(os.path.isfile, new=MagicMock(return_value=False))
 @patch.object(System, os_family, new='ubuntu')



ambari git commit: Revert AMBARI-10686. Ranger Admin Install fails with an Attribute Error (aonishuk)

2015-04-23 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 6fb7ee357 - e8e7c827d


Revert AMBARI-10686. Ranger Admin Install fails with an Attribute Error 
(aonishuk)

This reverts commit 8779baea98e546fa120f8bc9c3eec367c7ba6423.


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

Branch: refs/heads/trunk
Commit: e8e7c827d33bea75bb3fdfd99dbcd5ca25f2d61a
Parents: 6fb7ee3
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Apr 23 20:13:31 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Apr 23 20:13:31 2015 +0300

--
 .../RANGER/0.4.0/package/scripts/setup_ranger.py | 11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e8e7c827/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
index cc85b90..391df2a 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
@@ -83,21 +83,18 @@ def check_db_connnection():
   import params
 
   Logger.info('Checking DB connection')
-  env_dict = {}
+
   if params.db_flavor.lower() == 'mysql':
 cmd = format('{sql_command_invoker} -u {db_root_user} 
--password={db_root_password} -h {db_host}  -s -e select version();')
   elif params.db_flavor.lower() == 'oracle':
 cmd = format('{sql_command_invoker} 
{db_root_user}/{db_root_password}@{db_host} AS SYSDBA')
-env_dict = {'ORACLE_HOME':params.oracle_home, 
'LD_LIBRARY_PATH':params.oracle_home}
   elif params.db_flavor.lower() == 'postgres':
 cmd = 'true'
   elif params.db_flavor.lower() == 'sqlserver':
 cmd = 'true'
 
   try:
-Execute(cmd,
-  environment=env_dict,
-  logoutput=True)
+Execute(cmd)
   except Fail as ex:
-Logger.error(str(ex))
-raise Fail('Ranger Database connection check failed')
+Logger.info(ex)
+raise Fail('Ranger Admin installation Failed! Ranger requires DB client 
installed on Ranger Host, DB administrative privileges configured for 
connectivity from the Ranger Admin host to the configured DB host/instance and 
the DB server up and running on the DB host.')



ambari git commit: Ambari-10680. Phoenix Query Server not supported in secure deployments (ndimiduk via smohanty)

2015-04-23 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 727b76f0f - 2f25e3b12


Ambari-10680. Phoenix Query Server not supported in secure deployments 
(ndimiduk via smohanty)


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

Branch: refs/heads/trunk
Commit: 2f25e3b1298391dcff9d5145a7ff8b039e6e58bb
Parents: 727b76f
Author: Sumit Mohanty smoha...@hortonworks.com
Authored: Thu Apr 23 11:17:47 2015 -0700
Committer: Sumit Mohanty smoha...@hortonworks.com
Committed: Thu Apr 23 11:17:47 2015 -0700

--
 .../HBASE/0.96.0.2.0/kerberos.json  | 26 
 .../0.96.0.2.0/package/scripts/params_linux.py  |  3 +++
 .../templates/hbase_queryserver_jaas.conf.j2| 26 
 .../python/stacks/2.0.6/configs/secured.json|  1 +
 .../python/stacks/2.3/configs/hbase_secure.json |  1 +
 5 files changed, 57 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2f25e3b1/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json
index 67664a9..125a9c9 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json
@@ -98,6 +98,32 @@
   }
 }
   ]
+},
+{
+  name: PHOENIX_QUERY_SERVER,
+  identities: [
+{
+  name: hbase_queryserver_hbase,
+  principal: {
+value: hbase/_HOST@${realm},
+type : service,
+configuration: 
hbase-site/phoenix.queryserver.kerberos.principal,
+local_username: ${hbase-env/hbase_user}
+  },
+  keytab: {
+file: ${keytab_dir}/hbase.service.keytab,
+owner: {
+  name: ${hbase-env/hbase_user},
+  access: r
+},
+group: {
+  name: ${cluster-env/user_group},
+  access: 
+},
+configuration: hbase-site/phoenix.queryserver.keytab.file
+  }
+}
+  ]
 }
   ]
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/2f25e3b1/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index 6a3a1a4..311819a 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -94,6 +94,7 @@ local_dir = substitute_vars(_local_dir_conf, 
config['configurations']['hbase-sit
 client_jaas_config_file = format({hbase_conf_dir}/hbase_client_jaas.conf)
 master_jaas_config_file = format({hbase_conf_dir}/hbase_master_jaas.conf)
 regionserver_jaas_config_file = 
format({hbase_conf_dir}/hbase_regionserver_jaas.conf)
+queryserver_jaas_config_file = 
format({hbase_conf_dir}/phoenix_queryserver_jaas.conf)
 
 ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_host', []) # 
is not passed when ganglia is not present
 ganglia_server_host = '' if len(ganglia_server_hosts) == 0 else 
ganglia_server_hosts[0]
@@ -123,9 +124,11 @@ if security_enabled:
   _hostname_lowercase = config['hostname'].lower()
   master_jaas_princ = 
config['configurations']['hbase-site']['hbase.master.kerberos.principal'].replace('_HOST',_hostname_lowercase)
   regionserver_jaas_princ = 
config['configurations']['hbase-site']['hbase.regionserver.kerberos.principal'].replace('_HOST',_hostname_lowercase)
+  queryserver_jaas_princ = 
config['configurations']['hbase-site']['phoenix.queryserver.kerberos.principal'].replace('_HOST',_hostname_lowercase)
 
 master_keytab_path = 
config['configurations']['hbase-site']['hbase.master.keytab.file']
 regionserver_keytab_path = 
config['configurations']['hbase-site']['hbase.regionserver.keytab.file']
+queryserver_keytab_path = 
config['configurations']['hbase-site']['phoenix.queryserver.keytab.file']
 smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
 

ambari git commit: AMBARI-10700 Exception while initialization of collectors (dsen)

2015-04-23 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk a2c86f2a2 - 9d46a9837


AMBARI-10700 Exception while initialization of collectors (dsen)


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

Branch: refs/heads/trunk
Commit: 9d46a9837da6dc5674880772c54367e539fe3963
Parents: a2c86f2
Author: Dmytro Sen d...@apache.org
Authored: Thu Apr 23 21:28:30 2015 +0300
Committer: Dmytro Sen d...@apache.org
Committed: Thu Apr 23 21:35:36 2015 +0300

--
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 30 +
 .../stacks/HDP/2.2/services/stack_advisor.py|  6 ++-
 .../stacks/2.0.6/common/test_stack_advisor.py   | 45 
 .../stacks/2.2/common/test_stack_advisor.py |  4 +-
 4 files changed, 82 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9d46a983/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 0b54b38..7892c02 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
@@ -324,6 +324,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 if siteProperties is not None:
   resultItems = method(siteProperties, 
recommendedDefaults[siteName][properties], configurations, services, hosts)
   items.extend(resultItems)
+self.validateMinMax(items, recommendedDefaults, configurations)
 return items
 
   def getServiceConfigurationValidators(self):
@@ -337,6 +338,35 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   ams-site: self.validateAmsSiteConfigurations},
 }
 
+  def validateMinMax(self, items, recommendedDefaults, configurations):
+
+# required for casting to the proper numeric type before comparison
+def convertToNumber(number):
+  try:
+return int(number)
+  except ValueError:
+return float(number)
+
+for configName in configurations:
+  validationItems = []
+  if configName in recommendedDefaults and property_attributes in 
recommendedDefaults[configName]:
+for propertyName in 
recommendedDefaults[configName][property_attributes]:
+  if propertyName in configurations[configName][properties]:
+if maximum in 
recommendedDefaults[configName][property_attributes][propertyName] and \
+propertyName in recommendedDefaults[configName][properties]:
+  userValue = 
convertToNumber(configurations[configName][properties][propertyName])
+  maxValue = 
convertToNumber(recommendedDefaults[configName][property_attributes][propertyName][maximum])
+  if userValue  maxValue:
+validationItems.extend([{config-name: propertyName, item: 
self.getWarnItem(Value is greater than the recommended maximum of {0} 
.format(maxValue))}])
+if minimum in 
recommendedDefaults[configName][property_attributes][propertyName] and \
+propertyName in 
recommendedDefaults[configName][properties]:
+  userValue = 
convertToNumber(configurations[configName][properties][propertyName])
+  minValue = 
convertToNumber(recommendedDefaults[configName][property_attributes][propertyName][minimum])
+  if userValue  minValue:
+validationItems.extend([{config-name: propertyName, item: 
self.getWarnItem(Value is less than the recommended minimum of {0} 
.format(minValue))}])
+  items.extend(self.toConfigurationValidationProblems(validationItems, 
configName))
+pass
+
   def validateAmsSiteConfigurations(self, properties, recommendedDefaults, 
configurations, services, hosts):
 validationItems = []
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9d46a983/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 1a8034d..ba05ffa 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -111,7 +111,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
   else:
 nn_max_heapsize = 

ambari git commit: AMBARI-10707. AMS does not work with NN HA in AMS distrbuted mode. (swagle)

2015-04-23 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 638862c6d - a2c86f2a2


AMBARI-10707. AMS does not work with NN HA in AMS distrbuted mode. (swagle)


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

Branch: refs/heads/trunk
Commit: a2c86f2a20a82fb78f07b4107bbac7ee40d94529
Parents: 638862c
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu Apr 23 11:22:52 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu Apr 23 11:34:34 2015 -0700

--
 .../AMBARI_METRICS/0.1.0/package/scripts/ams.py | 41 
 1 file changed, 41 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a2c86f2a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
index 68ee119..8cbbed2 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
@@ -72,7 +72,27 @@ def ams(name=None):
  owner=params.ams_user,
  content=InlineTemplate(params.ams_env_sh_template)
 )
+pass
+
+if params.is_hbase_distributed:
+  # Configuration needed to support NN HA
+  XmlConfig(hdfs-site.xml,
+conf_dir=params.ams_collector_conf_dir,
+configurations=params.config['configurations']['hdfs-site'],
+
configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
+owner=params.ams_user,
+group=params.user_group,
+mode=0644
+  )
 
+  XmlConfig(core-site.xml,
+conf_dir=params.ams_collector_conf_dir,
+configurations=params.config['configurations']['core-site'],
+
configuration_attributes=params.config['configuration_attributes']['core-site'],
+owner=params.ams_user,
+group=params.user_group,
+mode=0644
+  )
 pass
 
   elif name == 'monitor':
@@ -203,6 +223,27 @@ def ams(name=None):
   )
 pass
 
+if params.is_hbase_distributed:
+  # Configuration needed to support NN HA
+  XmlConfig(hdfs-site.xml,
+conf_dir=params.ams_collector_conf_dir,
+configurations=params.config['configurations']['hdfs-site'],
+
configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
+owner=params.ams_user,
+group=params.user_group,
+mode=0644
+  )
+
+  XmlConfig(core-site.xml,
+conf_dir=params.ams_collector_conf_dir,
+configurations=params.config['configurations']['core-site'],
+
configuration_attributes=params.config['configuration_attributes']['core-site'],
+owner=params.ams_user,
+group=params.user_group,
+mode=0644
+  )
+pass
+
   elif name == 'monitor':
 Directory(params.ams_monitor_conf_dir,
   owner=params.ams_user,



ambari git commit: AMBARI-10444. RU Hacks and Technical Debt - Unit Test for (pre|post)_rolling_restart across several services. Last patch (dlysnichenko)

2015-04-23 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk 9d46a9837 - a3cf2d39e


AMBARI-10444. RU Hacks and Technical Debt - Unit Test for 
(pre|post)_rolling_restart across several services. Last patch (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: a3cf2d39ef6cde2bb13ecbb6b252d033969ed48d
Parents: 9d46a98
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Thu Apr 23 22:04:07 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Thu Apr 23 22:04:07 2015 +0300

--
 .../libraries/functions/validate.py |  4 +-
 .../package/scripts/zookeeper_server.py |  6 +--
 .../python/stacks/2.0.6/HDFS/test_namenode.py   |  2 +-
 .../stacks/2.0.6/OOZIE/test_oozie_client.py | 16 +++
 .../stacks/2.0.6/OOZIE/test_oozie_server.py |  1 -
 .../python/stacks/2.0.6/PIG/test_pig_client.py  | 16 +++
 .../2.0.6/ZOOKEEPER/test_zookeeper_client.py| 18 
 .../2.0.6/ZOOKEEPER/test_zookeeper_server.py| 46 
 .../stacks/2.2/KAFKA/test_kafka_broker.py   | 17 
 .../python/stacks/2.2/KNOX/test_knox_gateway.py | 10 -
 .../stacks/2.3/MAHOUT/test_mahout_client.py | 15 +++
 11 files changed, 142 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a3cf2d39/ambari-common/src/main/python/resource_management/libraries/functions/validate.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py
index e56ec85..63196f7 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py
@@ -20,7 +20,7 @@ limitations under the License.
 import re
 
 from resource_management.libraries.functions.decorator import retry
-from resource_management.core.shell import call
+from resource_management.core import shell
 from resource_management.core.exceptions import Fail
 
 
@@ -31,6 +31,6 @@ def call_and_match_output(command, regex_expression, 
err_message):
   :param command: Command to call
   :param regex_expression: Regex expression to search in the output
   
-  code, out = call(command, logoutput=True)
+  code, out = shell.call(command, logoutput=True)
   if not (out and re.search(regex_expression, out, re.IGNORECASE)):
 raise Fail(err_message)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3cf2d39/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py
 
b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py
index fb8a641..1b81ff1 100644
--- 
a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py
+++ 
b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py
@@ -27,7 +27,7 @@ from resource_management.libraries.functions.version import 
compare_versions, fo
 from resource_management.libraries.functions.security_commons import 
build_expectations, \
   cached_kinit_executor, get_params_from_filesystem, 
validate_security_config_properties, \
   FILE_TYPE_JAAS_CONF
-from resource_management.core.shell import call
+from resource_management.core import shell
 from resource_management.core.logger import Logger
 from resource_management.core.resources.system import Execute
 from resource_management.libraries.functions.check_process_status import 
check_process_status
@@ -91,11 +91,11 @@ class ZookeeperServerLinux(ZookeeperServer):
 quorum_err_message = Failed to establish zookeeper quorum
 call_and_match_output(create_command, 'Created', quorum_err_message)
 call_and_match_output(list_command, r\[.*? + unique + .*?\], 
quorum_err_message)
-call(delete_command)
+shell.call(delete_command)
 
 if params.client_port:
   check_leader_command = format(echo stat | nc localhost {client_port} | 
grep Mode)
-  code, out = call(check_leader_command, logoutput=False)
+  code, out = shell.call(check_leader_command, logoutput=False)
   if code == 0 and out:
 Logger.info(out)
 


ambari git commit: AMBARI-10005. RU: desired stack must be cascaded during upgrade (ncole)

2015-04-23 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/trunk d8bff0381 - aa3bd6e2b


AMBARI-10005. RU: desired stack must be cascaded during upgrade (ncole)


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

Branch: refs/heads/trunk
Commit: aa3bd6e2b4e19182cc99d870c0f30648738e16b6
Parents: d8bff03
Author: Nate Cole nc...@hortonworks.com
Authored: Thu Apr 23 14:30:20 2015 -0400
Committer: Nate Cole nc...@hortonworks.com
Committed: Thu Apr 23 16:45:53 2015 -0400

--
 .../ambari/server/agent/HeartBeatHandler.java   |  1 +
 .../internal/UpgradeResourceProvider.java   | 76 +++-
 .../upgrades/FinalizeUpgradeAction.java |  8 ++-
 .../org/apache/ambari/server/state/Cluster.java | 12 +++-
 .../server/state/cluster/ClusterImpl.java   | 21 ++
 .../internal/UpgradeResourceProviderTest.java   | 52 +++---
 6 files changed, 126 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/aa3bd6e2/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
index 596525b..9bdc4b7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
@@ -772,6 +772,7 @@ public class HeartBeatHandler {
   final String previousVersion = scHost.getVersion();
   if (!StringUtils.equals(previousVersion, newVersion)) {
 scHost.setVersion(newVersion);
+scHost.setStackVersion(cluster.getDesiredStackVersion());
 if (previousVersion != null  
!previousVersion.equalsIgnoreCase(State.UNKNOWN.toString())) {
   scHost.setUpgradeState(UpgradeState.COMPLETE);
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/aa3bd6e2/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 82b7307..730fba5 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -581,7 +581,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 entity.setRequestId(req.getId());
 
 // !!! in case persist() starts creating tasks right away, square away the 
configs
-createConfigs(cluster, version);
+createConfigs(cluster, version, direction);
 
 req.persist();
 
@@ -597,7 +597,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
* @param version the version
* @throws AmbariException
*/
-  private void createConfigs(Cluster cluster, String version) throws 
AmbariException {
+  private void createConfigs(Cluster cluster, String version, Direction 
direction) throws AmbariException {
 RepositoryVersionEntity targetRve = 
s_repoVersionDAO.findMaxByVersion(version);
 if (null == targetRve) {
   LOG.info(Could not find version entity for {}; not setting new configs,
@@ -614,29 +614,16 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 
 ConfigHelper configHelper = getManagementController().getConfigHelper();
 
-MapString, MapString, String clusterConfigs = new HashMapString, 
MapString, String();
+MapString, MapString, String clusterConfigs = null;
 
-// !!! stack
-Setorg.apache.ambari.server.state.PropertyInfo pi = 
s_metaProvider.get().getStackProperties(newStack.getStackName(),
-newStack.getStackVersion());
+if (direction == Direction.UPGRADE) {
 
-for (PropertyInfo stackProperty : pi) {
-  String type = 
ConfigHelper.fileNameToConfigType(stackProperty.getFilename());
+  clusterConfigs = new HashMapString, MapString, String();
 
-  if (!clusterConfigs.containsKey(type)) {
-clusterConfigs.put(type, new HashMapString, String());
-  }
-
-  clusterConfigs.get(type).put(stackProperty.getName(),
-  stackProperty.getValue());
-}
-
-// !!! by service
-for (String serviceName : cluster.getServices().keySet()) {
-  pi = 

[2/2] ambari git commit: AMBARI-10702. Theme widgets should be merged from inherited theme (mpapirkovskyy via srimanth)

2015-04-23 Thread srimanth
AMBARI-10702. Theme widgets should be merged from inherited theme 
(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/d8bff038
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d8bff038
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d8bff038

Branch: refs/heads/trunk
Commit: d8bff0381cf307672652bb402292f91465783670
Parents: 8adb1b0
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Thu Apr 23 13:39:33 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu Apr 23 13:39:33 2015 -0700

--
 .../apache/ambari/server/stack/ThemeModule.java |  51 +-
 .../apache/ambari/server/state/ThemeInfo.java   |   8 +-
 .../server/state/theme/ConfigPlacement.java |  58 +++
 .../ambari/server/state/theme/Layout.java   |  83 
 .../ambari/server/state/theme/Placement.java|  88 
 .../ambari/server/state/theme/Section.java  | 183 
 .../ambari/server/state/theme/Subsection.java   | 126 +
 .../apache/ambari/server/state/theme/Tab.java   |  74 +++
 .../ambari/server/state/theme/TabLayout.java| 103 
 .../apache/ambari/server/state/theme/Theme.java |  79 
 .../server/state/theme/ThemeConfiguration.java  | 134 ++
 .../apache/ambari/server/state/theme/Unit.java  |  40 ++
 .../ambari/server/state/theme/Widget.java   |  52 ++
 .../ambari/server/state/theme/WidgetEntry.java  |  51 ++
 .../HDP/2.2/services/HBASE/themes/theme.json| 469 +--
 .../HDP/2.2/services/HDFS/themes/theme.json | 177 ---
 .../HDP/2.2/services/HIVE/themes/theme.json | 391 
 .../2.2/services/YARN/themes-mapred/theme.json  | 134 +++---
 .../HDP/2.2/services/YARN/themes/theme.json | 184 
 .../HDP/2.3/services/YARN/themes/theme.json | 148 +-
 .../ambari/server/stack/ThemeModuleTest.java|  64 +--
 .../src/test/resources/child-theme.json |  33 ++
 .../src/test/resources/parent-theme.json| 241 ++
 ambari-web/app/mappers/configs/themes_mapper.js |   4 +-
 24 files changed, 2057 insertions(+), 918 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d8bff038/ambari-server/src/main/java/org/apache/ambari/server/stack/ThemeModule.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/stack/ThemeModule.java 
b/ambari-server/src/main/java/org/apache/ambari/server/stack/ThemeModule.java
index 5b22dd9..85ce252 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/stack/ThemeModule.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/stack/ThemeModule.java
@@ -19,8 +19,8 @@ package org.apache.ambari.server.stack;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.state.ThemeInfo;
+import org.apache.ambari.server.state.theme.Theme;
 import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.type.TypeReference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -39,6 +39,8 @@ public class ThemeModule extends BaseModuleThemeModule, 
ThemeInfo implements V
   private static final Logger LOG = LoggerFactory.getLogger(ThemeModule.class);
   private static final ObjectMapper mapper = new ObjectMapper();
 
+  public static final String THEME_KEY = Theme;
+
   static {
   }
 
@@ -62,9 +64,9 @@ public class ThemeModule extends BaseModuleThemeModule, 
ThemeInfo implements V
 LOG.error(Theme file not found);
   }
   try {
-TypeReferenceHashMapString, Object typeRef = new 
TypeReferenceHashMapString, Object() {
-};
-MapString, Object map = mapper.readValue(reader, typeRef);
+Theme theme = mapper.readValue(reader, Theme.class);
+MapString, Theme map = new HashMapString, Theme();
+map.put(THEME_KEY, theme);
 moduleInfo.setThemeMap(map);
 LOG.debug(Loaded theme: {}, moduleInfo);
   } catch (IOException e) {
@@ -83,44 +85,15 @@ public class ThemeModule extends BaseModuleThemeModule, 
ThemeInfo implements V
   public void resolve(ThemeModule parent, MapString, StackModule allStacks, 
MapString, ServiceModule commonServices) throws AmbariException {
 ThemeInfo parentModuleInfo = parent.getModuleInfo();
 
-
-
 if (parent.getModuleInfo() != null  !moduleInfo.isDeleted()) {
-  moduleInfo.setThemeMap(mergedMap(parent.getModuleInfo().getThemeMap(), 
moduleInfo.getThemeMap()));
-}
-  }
-
-  @SuppressWarnings(unchecked)
-  private MapString, Object mergedMap(MapString, Object parent, 
MapString, Object child) {
-MapString, Object mergedMap = new HashMapString, Object();
-if (parent == null) {
-  mergedMap = child;
-}else if (child == null) {
-  mergedMap.putAll(parent);
-

[1/2] ambari git commit: AMBARI-10702. Theme widgets should be merged from inherited theme (mpapirkovskyy via srimanth)

2015-04-23 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 8adb1b0bf - d8bff0381


http://git-wip-us.apache.org/repos/asf/ambari/blob/d8bff038/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes-mapred/theme.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes-mapred/theme.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes-mapred/theme.json
index 97d05dc..c96d656 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes-mapred/theme.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes-mapred/theme.json
@@ -1,52 +1,50 @@
 {
-  Theme: {
-name: default,
-description: Default theme for MAPREDUCE service,
-configuration: {
-  layouts: [
-{
-  name: default,
-  tabs: [
-{
-  name: settings,
-  display-name: Settings,
-  layout: {
-tab-columns: 1,
-tab-rows: 1,
-sections: [
-  {
-name: section-mr-scheduler,
-display-name: MR Scheduler Defaults,
-row-index: 0,
-column-index: 0,
-row-span: 1,
-column-span: 2,
-section-columns: 2,
-section-rows: 1,
-subsections: [
-  {
-name: subsection-mr-scheduler-col1,
-row-index: 0,
-column-index: 0,
-row-span: 1,
-column-span: 1
-  },
-  {
-name: subsection-mr-scheduler-col2,
-row-index: 0,
-column-index: 1,
-row-span: 1,
-column-span: 1
-  }
-]
-  }
-]
-  }
+  name: default,
+  description: Default theme for MAPREDUCE service,
+  configuration: {
+layouts: [
+  {
+name: default,
+tabs: [
+  {
+name: settings,
+display-name: Settings,
+layout: {
+  tab-columns: 1,
+  tab-rows: 1,
+  sections: [
+{
+  name: section-mr-scheduler,
+  display-name: MR Scheduler Defaults,
+  row-index: 0,
+  column-index: 0,
+  row-span: 1,
+  column-span: 2,
+  section-columns: 2,
+  section-rows: 1,
+  subsections: [
+{
+  name: subsection-mr-scheduler-col1,
+  row-index: 0,
+  column-index: 0,
+  row-span: 1,
+  column-span: 1
+},
+{
+  name: subsection-mr-scheduler-col2,
+  row-index: 0,
+  column-index: 1,
+  row-span: 1,
+  column-span: 1
+}
+  ]
+}
+  ]
 }
-  ]
-}
-  ]
-},
+  }
+]
+  }
+],
 placement: {
   configuration-layout: default,
   configs: [
@@ -68,47 +66,47 @@
 }
   ]
 },
-widgets:[
+widgets: [
   {
-config:mapred-site/mapreduce.map.memory.mb,
-widget:{
-  type:slider,
-  units:[
+config: mapred-site/mapreduce.map.memory.mb,
+widget: {
+  type: slider,
+  units: [
 {
-  unit-name:GB
+  unit-name: GB
 }
   ]
 }
   },
   {
-config:mapred-site/mapreduce.reduce.memory.mb,
-widget:{
-  type:slider,
-  units:[
+config: mapred-site/mapreduce.reduce.memory.mb,
+widget: {
+  type: slider,
+  units: [
 {
-  unit-name:GB
+  unit-name: GB
 }
   ]
 }
   },
   {
-config:mapred-site/yarn.app.mapreduce.am.resource.mb,
-widget:{
-  type:slider,
-  units:[
+config: mapred-site/yarn.app.mapreduce.am.resource.mb,
+widget: {
+  type: slider,
+  units: [
 {
-  unit-name:GB
+  unit-name: GB
 }
   ]
 }
   },
   {
-config:mapred-site/mapreduce.task.io.sort.mb,
-widget:{
-  type:slider,
-  units:[
+config: mapred-site/mapreduce.task.io.sort.mb,
+widget: {
+  type: slider,
+   

ambari git commit: AMBARI-10710. Storm Rest API server will not start when used in conjunction with Ambari metrics on HDP 2.1. (swagle)

2015-04-23 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk aa3bd6e2b - d951909c1


AMBARI-10710. Storm Rest API server will not start when used in conjunction 
with Ambari metrics on HDP 2.1. (swagle)


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

Branch: refs/heads/trunk
Commit: d951909c1c491a23952ab505cd4812ee3f1f9669
Parents: aa3bd6e
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu Apr 23 13:40:08 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu Apr 23 13:49:17 2015 -0700

--
 .../STORM/0.9.1.2.1/package/templates/config.yaml.j2   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d951909c/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/config.yaml.j2
--
diff --git 
a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/config.yaml.j2
 
b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/config.yaml.j2
index af7d8e3..460e391 100644
--- 
a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/config.yaml.j2
+++ 
b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/config.yaml.j2
@@ -46,7 +46,7 @@ ganglia:
   #spoof: 192.168.1.1:storm
 {% endif %}
 
-{% if has_metric_collector %}
+{% if has_metric_collector and stack_is_hdp22_or_further %}
 enableGanglia: False
 
 ganglia:



[1/2] ambari git commit: AMBARI-10711. Empty graph widgets on HBase service page.

2015-04-23 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk d951909c1 - 0730247ee


http://git-wip-us.apache.org/repos/asf/ambari/blob/0730247e/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json
index 84efc2f..290ac73 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json
@@ -150,7142 +150,3067 @@
   pointInTime:true,
   temporal:true
 },
-metrics/hbase/regionserver/compactionTime_avg_time: {
-  metric: hbase.regionserver.compactionTime_avg_time,
-  pointInTime: true,
-  temporal: true
-},
-metrics/rpc/closeRegion_num_ops: {
-  metric: rpc.rpc.closeRegion_num_ops,
-  pointInTime: true,
-  temporal: true
-},
 metrics/hbase/regionserver/mutationsWithoutWALSize: {
   metric: regionserver.Server.mutationsWithoutWALSize,
   pointInTime: false,
   temporal: true
 },
-metrics/rpc/unassign_num_ops: {
-  metric: rpc.rpc.unassign_num_ops,
-  pointInTime: true,
+metrics/hbase/regionserver/slowAppendCount: {
+  metric: regionserver.Server.slowAppendCount,
+  pointInTime: false,
   temporal: true
 },
-metrics/rpc/modifyTable_num_ops: {
-  metric: rpc.rpc.modifyTable_num_ops,
+metrics/disk/part_max_used: {
+  metric: part_max_used,
   pointInTime: true,
   temporal: true
 },
-metrics/rpc/getProtocolVersion_avg_time: {
-  metric: rpc.rpc.getProtocolVersion_avg_time,
-  pointInTime: true,
+metrics/hbase/regionserver/blockCacheCount: {
+  metric: regionserver.Server.blockCacheCount,
+  pointInTime: false,
   temporal: true
 },
-metrics/rpc/getZooKeeper/aboveOneSec/_avg_time: {
-  metric: rpc.rpc.getZooKeeper.aboveOneSec._avg_time,
+metrics/ugi/loginSuccess_num_ops: {
+  metric: ugi.UgiMetrics.LoginSuccessNumOps,
   pointInTime: true,
   temporal: true
 },
-metrics/rpc/getClosestRowBefore_num_ops: {
-  metric: rpc.rpc.getClosestRowBefore_num_ops,
+metrics/jvm/memHeapCommittedM: {
+  metric: jvm.JvmMetrics.MemHeapCommittedM,
   pointInTime: true,
   temporal: true
 },
-metrics/hbase/regionserver/slowAppendCount: {
-  metric: regionserver.Server.slowAppendCount,
-  pointInTime: false,
-  temporal: true
-},
-metrics/rpc/getClosestRowBefore/aboveOneSec/_avg_time: {
-  metric: rpc.rpc.getClosestRowBefore.aboveOneSec._avg_time,
+metrics/jvm/threadsRunnable: {
+  metric: jvm.JvmMetrics.ThreadsRunnable,
   pointInTime: true,
   temporal: true
 },
-metrics/rpc/lockRow_num_ops: {
-  metric: rpc.rpc.lockRow_num_ops,
-  pointInTime: true,
+metrics/hbase/regionserver/deleteRequestLatency_min: {
+  metric: regionserver.Server.Delete_min,
+  pointInTime: false,
   temporal: true
 },
-metrics/rpc/flushRegion_avg_time: {
-  metric: rpc.rpc.flushRegion_avg_time,
+metrics/jvm/threadsNew: {
+  metric: jvm.JvmMetrics.ThreadsNew,
   pointInTime: true,
   temporal: true
 },
-metrics/rpc/stopMaster_num_ops: {
-  metric: rpc.rpc.stopMaster_num_ops,
+metrics/rpc/rpcAuthorizationFailures: {
+  metric: regionserver.RegionServer.authorizationFailures,
   pointInTime: true,
   temporal: true
 },
-metrics/rpc/openRegions/aboveOneSec/_num_ops: {
-  metric: rpc.rpc.openRegions.aboveOneSec._num_ops,
+metrics/rpc/RpcQueueTime_avg_time: {
+  metric: regionserver.RegionServer.QueueCallTime_median,
   pointInTime: true,
   temporal: true
 },
-metrics/rpc/balance_avg_time: {
-  metric: rpc.rpc.balance_avg_time,
+metrics/boottime: {
+  metric: boottime,
   pointInTime: true,
   temporal: true
 },
-metrics/disk/part_max_used: {
-  metric: 

[2/2] ambari git commit: AMBARI-10711. Empty graph widgets on HBase service page.

2015-04-23 Thread swagle
AMBARI-10711. Empty graph widgets on HBase service page.


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

Branch: refs/heads/trunk
Commit: 0730247ee4396bce0aa2fbb6bdb9f19287405d7d
Parents: d951909
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu Apr 23 14:19:28 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu Apr 23 14:19:28 2015 -0700

--
 .../HBASE/0.96.0.2.0/metrics.json   | 9107 +-
 1 file changed, 2406 insertions(+), 6701 deletions(-)
--




ambari git commit: AMBARI-10702. Theme widgets should be merged from inherited theme (mpapirkovskyy via srimanth) - UI test fixes

2015-04-23 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 0730247ee - 1256d0e36


AMBARI-10702. Theme widgets should be merged from inherited theme 
(mpapirkovskyy via srimanth) - UI test fixes


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

Branch: refs/heads/trunk
Commit: 1256d0e366f90be7219757b73acd25684b2a5b6b
Parents: 0730247
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Thu Apr 23 15:41:32 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu Apr 23 15:41:38 2015 -0700

--
 .../test/mappers/configs/themes_mapper_test.js  | 80 ++--
 1 file changed, 40 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1256d0e3/ambari-web/test/mappers/configs/themes_mapper_test.js
--
diff --git a/ambari-web/test/mappers/configs/themes_mapper_test.js 
b/ambari-web/test/mappers/configs/themes_mapper_test.js
index abe7751..7daaced 100644
--- a/ambari-web/test/mappers/configs/themes_mapper_test.js
+++ b/ambari-web/test/mappers/configs/themes_mapper_test.js
@@ -93,47 +93,47 @@ describe('App.themeMapper', function () {
   ]
 }
   ],
+  widgets: [
+  {
+config: c1/p1,
+widget: {
+  type: slider,
+  units: [
+{
+  unit-name: MB
+},
+{
+  unit-name: GB
+}
+]
+}
+  },
+  {
+config: c1/p2,
+widget: {
+  type: slider,
+  units: [
+{
+  unit-name: percent
+}
+]
+}
+  }
+  ],
+  placement: {
+configuration-layout: default,
+configs: [
+{
+  config: c1/p1,
+  subsection-name: subsection1
+},
+{
+  config: c1/p2,
+  subsection-name: subsection1
+}
+]
+  }
 },
-widgets: [
-  {
-config: c1/p1,
-widget: {
-  type: slider,
-  units: [
-{
-  unit-name: MB
-},
-{
-  unit-name: GB
-}
-  ]
-}
-  },
-  {
-config: c1/p2,
-widget: {
-  type: slider,
-  units: [
-{
-  unit-name: percent
-}
-  ]
-}
-  }
-],
-placement: {
-  configuration-layout: default,
-  configs: [
-{
-  config: c1/p1,
-  subsection-name: subsection1
-},
-{
-  config: c1/p2,
-  subsection-name: subsection1
-}
-  ]
-}
   }
 }
   }



ambari git commit: AMBARI-10675. Additional settings for enabling Phoenix 4.4+ in Ambari (Ted Yu via srimanth)

2015-04-23 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk a3cf2d39e - 8adb1b0bf


AMBARI-10675. Additional settings for enabling Phoenix 4.4+ in Ambari (Ted Yu 
via srimanth)


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

Branch: refs/heads/trunk
Commit: 8adb1b0bfa5bc1e4be54529aa05b6563cab06ac6
Parents: a3cf2d3
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Thu Apr 23 12:48:35 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu Apr 23 12:48:35 2015 -0700

--
 .../services/HBASE/configuration/hbase-site.xml | 22 
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8adb1b0b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml
index 43f872a..c92f76e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml
@@ -40,4 +40,26 @@
 value16030/value
 descriptionThe port for the HBase RegionServer web UI./description
   /property 
+  property
+namehbase.regionserver.rpc.scheduler.factory.class/name
+display-nameRegionServer RPC scheduler factory class/display-name
+valueorg.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory/value
+depends-on
+  property
+typehbase-env/type
+namephoenix_sql_enabled/name
+  /property
+/depends-on
+  /property
+  property
+namehbase.rpc.controllerfactory.class/name
+display-nameRPC controller factory class/display-name
+
valueorg.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory/value
+depends-on
+  property
+typehbase-env/type
+namephoenix_sql_enabled/name
+  /property
+/depends-on
+  /property
 /configuration



ambari git commit: AMBARI-10708. MapReduce slider max does not show on the right

2015-04-23 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 1256d0e36 - 909677516


AMBARI-10708. MapReduce slider max does not show on the right


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

Branch: refs/heads/trunk
Commit: 909677516ac97191646dfe081763dbfe7cb46e78
Parents: 1256d0e
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Thu Apr 23 16:00:44 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu Apr 23 16:08:23 2015 -0700

--
 .../widgets/slider_config_widget_view.js| 23 +---
 1 file changed, 20 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/90967751/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index eb7e313..408f199 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -309,7 +309,11 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   ticks_labels: ticksLabels,
   step: this.get('mirrorStep'),
   formatter: function(val) {
-return val + self.get('unitLabel');
+if (Em.isArray(val)) {
+  return val[0] + self.get('unitLabel');
+} else {
+  return val + self.get('unitLabel');
+}
   }
 });
 slider.on('change', function (obj) {
@@ -337,7 +341,7 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   });
   // create label for default value and align it
 
-defaultSliderTick.append('span{0}/span'.format(recommendedValueId 
+ this.get('unitLabel')));
+defaultSliderTick.append('span{0}/span'.format(recommendedValue + 
this.get('unitLabel')));
 defaultSliderTick.find('span').css('marginLeft', 
-defaultSliderTick.find('span').width()/2 + 'px');
 
   // if mirrored value was added need to hide the tick for it
@@ -401,6 +405,19 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   this.initSlider();
   this.toggleWidgetState();
 }
-  }
+  },
+
+  /**
+   * Workaround for bootstrap-slider widget that was initiated inside hidden 
container.
+   */
+  refreshSliderObserver: function() {
+var sliderTickLabel = this.$('.ui-slider-wrapper:eq(0) 
.slider-tick-label:first');
+var self = this;
+if (sliderTickLabel.width() == 0) {
+  Em.run.later('sync', function() {
+self.changeBoundariesOnce();
+  }, 10);
+}
+  }.observes('parentView.content.isActive')
 
 });



[2/3] ambari git commit: AMBARI-10679. Full Delete of Host : Switch config related tables to use host_id instead of host_name column (alejandro)

2015-04-23 Thread alejandro
http://git-wip-us.apache.org/repos/asf/ambari/blob/290276c6/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 0373aac..6249d2a 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
@@ -63,6 +63,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog 
{
   private static final String HOST_CONFIG_MAPPING_TABLE = hostconfigmapping;
   private static final String CONFIG_GROUP_HOST_MAPPING_TABLE = 
configgrouphostmapping;
   private static final String KERBEROS_PRINCIPAL_HOST_TABLE = 
kerberos_principal_host;
+  private static final String SERVICE_CONFIG_HOSTS_TABLE = 
serviceconfighosts;
   private static final String CLUSTER_HOST_MAPPING_TABLE = 
ClusterHostMapping;
   private static final String WIDGET_TABLE = widget;
   private static final String WIDGET_LAYOUT_TABLE = widget_layout;
@@ -254,10 +255,6 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
 
 // TODO, for now, these still point to the host_name and will be fixed one 
table at a time to point to the host id.
 // Re-add the FKs
-dbAccessor.addFKConstraint(HOST_CONFIG_MAPPING_TABLE, 
FK_hostconfmapping_host_name,
-host_name, HOSTS_TABLE, host_name, false);
-dbAccessor.addFKConstraint(CONFIG_GROUP_HOST_MAPPING_TABLE, 
FK_cghm_hname,
-host_name, HOSTS_TABLE, host_name, false);
 dbAccessor.addFKConstraint(KERBEROS_PRINCIPAL_HOST_TABLE, 
FK_krb_pr_host_host_name,
 host_name, HOSTS_TABLE, host_name, false);
 
@@ -265,22 +262,31 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
 // Add host_id to the host-related tables, and populate the host_id, one 
table at a time.
 // TODO, include other tables.
 String[] tablesToAddHostID = new String[] {
+CONFIG_GROUP_HOST_MAPPING_TABLE,
 CLUSTER_HOST_MAPPING_TABLE,
+HOST_CONFIG_MAPPING_TABLE,
 HOST_COMPONENT_STATE_TABLE,
 HOST_COMPONENT_DESIRED_STATE_TABLE,
 HOST_ROLE_COMMAND_TABLE,
 HOST_STATE_TABLE,
-HOST_VERSION_TABLE
+HOST_VERSION_TABLE,
+SERVICE_CONFIG_HOSTS_TABLE
 };
 
 for (String tableName : tablesToAddHostID) {
   dbAccessor.addColumn(tableName, new DBColumnInfo(HOST_ID_COL, 
Long.class, null, null, true));
-  dbAccessor.executeQuery(UPDATE  + tableName +  t SET host_id = 
(SELECT host_id FROM hosts h WHERE h.host_name = t.host_name) WHERE t.host_id 
IS NULL AND t.host_name IS NOT NULL);
 
-  // For legacy reasons, the hostrolecommand table will contain none for 
some records where the host_name was not important.
-  // These records were populated during Finalize in Rolling Upgrade, so 
they must be updated to use a valid host_name.
-  if (tableName == HOST_ROLE_COMMAND_TABLE  
StringUtils.isNotBlank(randomHostName)) {
-dbAccessor.executeQuery(UPDATE  + tableName +  t SET host_id = 
(SELECT host_id FROM hosts h WHERE h.host_name = ' + randomHostName + ') 
WHERE t.host_id IS NULL AND t.host_name = 'none');
+  // The column name is different for one table
+  String hostNameColumnName = tableName == SERVICE_CONFIG_HOSTS_TABLE ? 
hostname : host_name;
+
+  if (dbAccessor.tableHasData(tableName)) {
+dbAccessor.executeQuery(UPDATE  + tableName +  t SET host_id = 
(SELECT host_id FROM hosts h WHERE h.host_name = t. + hostNameColumnName + ) 
WHERE t.host_id IS NULL AND t. + hostNameColumnName +  IS NOT NULL);
+
+// For legacy reasons, the hostrolecommand table will contain none 
for some records where the host_name was not important.
+// These records were populated during Finalize in Rolling Upgrade, so 
they must be updated to use a valid host_name.
+if (tableName == HOST_ROLE_COMMAND_TABLE  
StringUtils.isNotBlank(randomHostName)) {
+  dbAccessor.executeQuery(UPDATE  + tableName +  t SET host_id = 
(SELECT host_id FROM hosts h WHERE h.host_name = ' + randomHostName + ') 
WHERE t.host_id IS NULL AND t.host_name = 'none');
+}
   }
 
   if (databaseType == Configuration.DatabaseType.DERBY) {
@@ -293,24 +299,33 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
 
 // These are the FKs that have already been corrected.
 // TODO, include other tables.
+dbAccessor.addFKConstraint(CONFIG_GROUP_HOST_MAPPING_TABLE, 
FK_cghm_host_id,
+host_id, HOSTS_TABLE, host_id, false);
 dbAccessor.addFKConstraint(CLUSTER_HOST_MAPPING_TABLE, 
FK_clusterhostmapping_host_id,
 host_id, HOSTS_TABLE, host_id, false);
+dbAccessor.addFKConstraint(HOST_CONFIG_MAPPING_TABLE, 

[3/3] ambari git commit: AMBARI-10679. Full Delete of Host : Switch config related tables to use host_id instead of host_name column (alejandro)

2015-04-23 Thread alejandro
AMBARI-10679. Full Delete of Host : Switch config related tables to use host_id 
instead of host_name column (alejandro)


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

Branch: refs/heads/trunk
Commit: 290276c62152f331e0859c1d81534cc160471327
Parents: 9096775
Author: Alejandro Fernandez afernan...@hortonworks.com
Authored: Wed Apr 22 19:06:43 2015 -0700
Committer: Alejandro Fernandez afernan...@hortonworks.com
Committed: Thu Apr 23 16:16:30 2015 -0700

--
 .../ServiceConfigVersionResponse.java   |  17 +-
 .../internal/ConfigGroupResourceProvider.java   |  35 ++-
 .../internal/UpgradeResourceProvider.java   |  25 ++-
 .../orm/cache/ConfigGroupHostMapping.java   |   4 +-
 .../orm/cache/ConfigGroupHostMappingImpl.java   |  43 ++--
 .../server/orm/cache/HostConfigMapping.java |   8 +-
 .../server/orm/cache/HostConfigMappingImpl.java |  54 ++---
 .../orm/dao/ConfigGroupHostMappingDAO.java  |  46 ++--
 .../server/orm/dao/HostConfigMappingDAO.java| 193 +
 .../apache/ambari/server/orm/dao/HostDAO.java   |  11 +
 .../entities/ConfigGroupHostMappingEntity.java  |  24 ++-
 .../ConfigGroupHostMappingEntityPK.java |  16 +-
 .../orm/entities/HostConfigMappingEntity.java   |  18 +-
 .../orm/entities/HostConfigMappingEntityPK.java |  20 +-
 .../orm/entities/ServiceConfigEntity.java   |  12 +-
 .../org/apache/ambari/server/state/Cluster.java |   6 +-
 .../apache/ambari/server/state/Clusters.java|  17 ++
 .../server/state/cluster/ClusterImpl.java   |  77 ---
 .../server/state/cluster/ClustersImpl.java  |  54 -
 .../server/state/configgroup/ConfigGroup.java   |   6 +-
 .../state/configgroup/ConfigGroupFactory.java   |   2 +-
 .../state/configgroup/ConfigGroupImpl.java  |  38 ++--
 .../ambari/server/state/host/HostImpl.java  |  31 ++-
 .../server/upgrade/UpgradeCatalog210.java   |  51 -
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |  27 +--
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |  25 +--
 .../resources/Ambari-DDL-Postgres-CREATE.sql|  25 +--
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |  25 +--
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |  21 +-
 .../AmbariManagementControllerTest.java |  10 +-
 .../ConfigGroupResourceProviderTest.java|  98 +++--
 .../server/orm/dao/ConfigGroupDAOTest.java  |  22 +-
 .../orm/dao/HostConfigMappingDAOTest.java   |  87 
 .../ambari/server/state/ConfigGroupTest.java|   9 +-
 .../ambari/server/state/ConfigHelperTest.java   |   6 +-
 .../ambari/server/state/UpgradeHelperTest.java  |   5 +-
 .../server/state/cluster/ClusterTest.java   |  97 ++---
 .../svccomphost/ServiceComponentHostTest.java   | 214 ++-
 .../ambari/server/upgrade/UpgradeTest.java  |  13 +-
 39 files changed, 867 insertions(+), 625 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/290276c6/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionResponse.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionResponse.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionResponse.java
index 9a07a29..c02bb6e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionResponse.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionResponse.java
@@ -21,6 +21,9 @@ package org.apache.ambari.server.controller;
 
 import java.util.List;
 
+import com.google.inject.Inject;
+import org.apache.ambari.server.StaticallyInject;
+import org.apache.ambari.server.orm.dao.HostDAO;
 import org.apache.ambari.server.orm.entities.ClusterEntity;
 import org.apache.ambari.server.orm.entities.ServiceConfigEntity;
 import org.apache.ambari.server.orm.entities.StackEntity;
@@ -28,6 +31,7 @@ import org.apache.ambari.server.state.StackId;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+@StaticallyInject
 public class ServiceConfigVersionResponse {
   @JsonProperty(cluster_name)
   @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@@ -72,15 +76,14 @@ public class ServiceConfigVersionResponse {
   @JsonProperty(hosts)
   private final ListString hosts;
 
+  @Inject
+  private static HostDAO hostDAO;
+
   /**
* Constructor.
*
-   * @param clusterName
-   * @param serviceName
-   * @param version
-   * @param isCurrent
-   * @param isCompatibleWithCurrentStack
-   * @param 

[1/3] ambari git commit: AMBARI-10679. Full Delete of Host : Switch config related tables to use host_id instead of host_name column (alejandro)

2015-04-23 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 909677516 - 290276c62


http://git-wip-us.apache.org/repos/asf/ambari/blob/290276c6/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
index fde1945..f6ab0ec 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
@@ -18,10 +18,13 @@
 
 package org.apache.ambari.server.state.svccomphost;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.persistence.EntityManager;
 
@@ -33,9 +36,11 @@ import 
org.apache.ambari.server.controller.ServiceComponentHostResponse;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
 import org.apache.ambari.server.orm.OrmTestHelper;
+import org.apache.ambari.server.orm.dao.ClusterDAO;
 import org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO;
 import org.apache.ambari.server.orm.dao.HostComponentStateDAO;
 import org.apache.ambari.server.orm.dao.HostDAO;
+import org.apache.ambari.server.orm.entities.ClusterEntity;
 import org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntity;
 import org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntityPK;
 import org.apache.ambari.server.orm.entities.HostComponentStateEntity;
@@ -102,32 +107,34 @@ public class ServiceComponentHostTest {
   @Inject
   private OrmTestHelper helper;
   @Inject
-  HostDAO hostDAO;
+  private ClusterDAO clusterDAO;
+  @Inject
+  private HostDAO hostDAO;
+
+  private String clusterName = c1;
+  private String hostName1 = h1;
+  private MapString, String hostAttributes = new HashMapString, String();
+
 
   @Before
   public void setup() throws Exception {
 injector = Guice.createInjector(new InMemoryDefaultTestModule());
 injector.getInstance(GuiceJpaInitializer.class);
 injector.injectMembers(this);
+
 StackId stackId = new StackId(HDP-0.1);
-clusters.addCluster(C1, stackId);
-clusters.addHost(h1);
-setOsFamily(clusters.getHost(h1), redhat, 5.9);
-clusters.getHost(h1).persist();
+createCluster(stackId, clusterName);
+hostAttributes.put(os_family, redhat);
+hostAttributes.put(os_release_version, 5.9);
 
-Cluster c1 = clusters.getCluster(C1);
+SetString hostNames = new HashSetString();
+hostNames.add(hostName1);
+addHostsToCluster(clusterName, hostAttributes, hostNames);
+
+Cluster c1 = clusters.getCluster(clusterName);
 helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
 c1.createClusterVersion(stackId, stackId.getStackVersion(), admin,
 RepositoryVersionState.UPGRADING);
-clusters.mapHostToCluster(h1,C1);
-  }
-
-  private void setOsFamily(Host host, String osFamily, String osVersion) {
-MapString, String hostAttributes = new HashMapString, String(2);
-hostAttributes.put(os_family, osFamily);
-hostAttributes.put(os_release_version, osVersion);
-
-host.setHostAttributes(hostAttributes);
   }
 
   @After
@@ -135,11 +142,35 @@ public class ServiceComponentHostTest {
 injector.getInstance(PersistService.class).stop();
   }
 
-  private ServiceComponentHost createNewServiceComponentHost(
+  private ClusterEntity createCluster(StackId stackId, String clusterName) 
throws AmbariException {
+clusters.addCluster(clusterName, stackId);
+ClusterEntity clusterEntity = clusterDAO.findByName(clusterName);
+Assert.assertNotNull(clusterEntity);
+return clusterEntity;
+  }
+
+  private void addHostsToCluster(String clusterName, MapString, String 
hostAttributes, SetString hostNames) throws AmbariException {
+ClusterEntity clusterEntity = clusterDAO.findByName(clusterName);
+
+ListHostEntity hostEntities = new ArrayListHostEntity();
+for (String hostName : hostNames) {
+  clusters.addHost(hostName);
+  Host host = clusters.getHost(hostName);
+  host.setHostAttributes(hostAttributes);
+  host.persist();
+}
+
+clusterEntity.setHostEntities(hostEntities);
+clusterDAO.merge(clusterEntity);
+
+clusters.mapHostsToCluster(hostNames, clusterName);
+  }
+
+  private ServiceComponentHost createNewServiceComponentHost(String 
clusterName,
   String svc,
   String svcComponent,
   String hostName, boolean isClient) throws AmbariException{
-Cluster c = clusters.getCluster(C1);
+Cluster c = clusters.getCluster(clusterName);
 

ambari git commit: AMBARI-10689 Create widget wizard- Add metric popup: UI changes. (atkach)

2015-04-23 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk c7df7bd0b - e5fb8d72c


AMBARI-10689 Create widget wizard- Add metric popup: UI changes. (atkach)


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

Branch: refs/heads/trunk
Commit: e5fb8d72c0b7a3aae5e36ebdb17a94bfb8587425
Parents: c7df7bd
Author: Andrii Tkach atk...@hortonworks.com
Authored: Thu Apr 23 14:40:49 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Thu Apr 23 16:58:55 2015 +0300

--
 .../templates/main/service/widgets/create/step2_add_metric.hbs  | 5 -
 .../app/views/main/service/widgets/create/expression_view.js| 1 +
 2 files changed, 1 insertion(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fb8d72/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
--
diff --git 
a/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs 
b/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
index be62e8b..503e45e 100644
--- a/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
+++ b/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
@@ -42,11 +42,6 @@
   /div
 /li
   {{/each}}
-  lia class=link href=# {{action showMore target=view}}{{t 
hostPopup.serviceInfo.showMore}}/a/li
-  li class=row-fluid
-button class=btn span4 offset1{{t common.cancel}}/button
-button class=btn btn-primary span4 apply-button{{t 
common.apply}}/button
-  /li
 /ul
   /div
 /div

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fb8d72/ambari-web/app/views/main/service/widgets/create/expression_view.js
--
diff --git 
a/ambari-web/app/views/main/service/widgets/create/expression_view.js 
b/ambari-web/app/views/main/service/widgets/create/expression_view.js
index 56ea96f..1899daa 100644
--- a/ambari-web/app/views/main/service/widgets/create/expression_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/expression_view.js
@@ -209,6 +209,7 @@ App.WidgetWizardExpressionView = Em.View.extend({
 selectComponents: function (event) {
   var component = this.get('componentMap').findProperty('serviceName', 
event.context.get('serviceName'))
 .get('components').findProperty('id', event.context.get('id'));
+  $('#add-metric-popup .component-select').removeClass('open');
 
   this.set('selectedComponent', component);
   this.set('parentView.selectedMetric', null);



ambari git commit: AMBARI-10294. Usability: bootstrapping hosts shows Preparing without any information and seems stuck (dlysnichenko)

2015-04-23 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk e5fb8d72c - b4d7b388b


AMBARI-10294. Usability: bootstrapping hosts shows Preparing without any 
information and seems stuck (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: b4d7b388b289cac955171914e8066152633ae0a5
Parents: e5fb8d7
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Thu Apr 23 17:04:01 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Thu Apr 23 17:04:57 2015 +0300

--
 .../server/bootstrap/BSHostStatusCollector.java |  3 +-
 .../ambari/server/bootstrap/BSRunner.java   | 70 +++-
 2 files changed, 39 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b4d7b388/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
index cf3ee64..661f284 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSHostStatusCollector.java
@@ -113,7 +113,8 @@ class BSHostStatusCollector {
   
   logString = sb.toString();
 } catch (IOException e) {
-  LOG.info(Error reading log file  + log);
+  LOG.info(Error reading log file  + log +
+  . Log file may be have not created yet);
 }
 finally {
   try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4d7b388/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
index fe873d7..0a55131 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
@@ -18,6 +18,7 @@
 package org.apache.ambari.server.bootstrap;
 
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.*;
@@ -25,7 +26,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
-import static 
org.apache.ambari.server.bootstrap.BSHostStatusCollector.doneFileFilter;
 
 import org.apache.ambari.server.bootstrap.BootStrapStatus.BSStat;
 import org.apache.commons.io.FileUtils;
@@ -152,6 +152,13 @@ class BSRunner extends Thread {
   @Override
   public void run() {
 String hostString = createHostString(sshHostInfo.getHosts());
+// Startup a scheduled executor service to look through the logs
+ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
+BSStatusCollector statusCollector = new BSStatusCollector();
+ScheduledFuture? handle = 
scheduler.scheduleWithFixedDelay(statusCollector,
+0, 10, TimeUnit.SECONDS);
+LOG.info(Kicking off the scheduler for polling on logs in  +
+this.requestIdDir);
 String user = sshHostInfo.getUser();
 String userRunAs = sshHostInfo.getUserRunAs();
 if (user == null || user.isEmpty()) {
@@ -251,14 +258,6 @@ class BSRunner extends Thread {
   stdErrWriter.close();
   }
 
-
-  // Startup a scheduled executor service to look through the logs
-  ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
-  BSStatusCollector statusCollector = new BSStatusCollector();
-  ScheduledFuture? handle = 
scheduler.scheduleWithFixedDelay(statusCollector,
-  0, 10, TimeUnit.SECONDS);
-  LOG.info(Kicking off the scheduler for polling on logs in  +
-  this.requestIdDir);
   try {
 String logInfoMessage = Bootstrap output, log=
   + bootStrapErrorFilePath +   + bootStrapOutputFilePath +  at 
 + this.ambariHostname;
@@ -272,34 +271,11 @@ class BSRunner extends Thread {
 } catch(IOException io) {
   LOG.info(Error in reading files , io);
 }
-PrintWriter setupAgentDoneWriter = null;
-PrintWriter setupAgentLogWriter  = null; 
-try {
-  if (exitCode != 0) {  
-for 

ambari git commit: AMBARI-8320. configs.sh doConfigFileUpdate fails when multiple occurrences of word properties found (dlysnichenko)

2015-04-23 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 138b8ec86 - c534b2727


AMBARI-8320. configs.sh doConfigFileUpdate fails when multiple occurrences of 
word properties found (dlysnichenko)


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

Branch: refs/heads/branch-2.0.maint
Commit: c534b2727804c812365891481f80428718601953
Parents: 138b8ec
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Tue Apr 21 21:36:54 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Thu Apr 23 12:23:58 2015 +0300

--
 ambari-server/src/main/resources/scripts/configs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c534b272/ambari-server/src/main/resources/scripts/configs.sh
--
diff --git a/ambari-server/src/main/resources/scripts/configs.sh 
b/ambari-server/src/main/resources/scripts/configs.sh
index 0c5cbc0..a32ff42 100755
--- a/ambari-server/src/main/resources/scripts/configs.sh
+++ b/ambari-server/src/main/resources/scripts/configs.sh
@@ -178,7 +178,7 @@ doConfigUpdate () {
 doConfigFileUpdate () {
   FILENAME=$1
   if [ -f $FILENAME ]; then
-if [ 1 == `grep -n properties $FILENAME | cut -d : -f 1` 
]; then
+if [ 1 == $(grep -En ^\properties\ $FILENAME | cut -d : -f 1) ]; then
   newTag=`date +%s%N`
   newTag=version${newTag}
   newProperties=`cat $FILENAME`;



ambari git commit: AMBARI-10687 Display stack version in config history UI. (ababiichuk)

2015-04-23 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk a0d3b5e86 - dcfe0d462


AMBARI-10687 Display stack version in config history UI. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: dcfe0d46233e2c4ef498c4646976a2e59860ddc8
Parents: a0d3b5e
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Thu Apr 23 13:21:39 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Thu Apr 23 13:21:39 2015 +0300

--
 .../0.96.0.2.0/configuration/hbase-site.xml |  6 +-
 .../HDP/2.2/services/HBASE/themes/theme.json|  2 +-
 .../data/configurations/service_versions.json   | 66 +---
 .../mappers/service_config_version_mapper.js|  5 +-
 .../models/configs/service_config_version.js|  1 +
 ambari-web/app/styles/config_history_flow.less  | 25 
 .../common/configs/config_history_flow.hbs  |  1 +
 .../common/configs/service_version_box.hbs  |  2 +
 ambari-web/app/utils/ajax/ajax.js   |  2 +-
 ambari-web/app/utils/config.js  |  4 +-
 .../widgets/toggle_config_widget_view.js|  6 +-
 11 files changed, 74 insertions(+), 46 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dcfe0d46/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
index 9e67bf6..3093a60 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
@@ -341,10 +341,12 @@
   typevalue-list/type
   entries
 entry
-  valuetrue/value
+  labelSimple/label
+  valuesimple/value
 /entry
 entry
-  valuefalse/value
+  labelKerberos/label
+  valuekerberos/value
 /entry
   /entries
   selection-cardinality1/selection-cardinality

http://git-wip-us.apache.org/repos/asf/ambari/blob/dcfe0d46/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
index e803292..d5917c0 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
@@ -381,7 +381,7 @@
   {
 config:hbase-site/hbase.security.authentication,
 widget:{
-  type:checkbox
+  type:toggle
 }
   },
   {

http://git-wip-us.apache.org/repos/asf/ambari/blob/dcfe0d46/ambari-web/app/assets/data/configurations/service_versions.json
--
diff --git a/ambari-web/app/assets/data/configurations/service_versions.json 
b/ambari-web/app/assets/data/configurations/service_versions.json
index 4628d4d..5b30903 100644
--- a/ambari-web/app/assets/data/configurations/service_versions.json
+++ b/ambari-web/app/assets/data/configurations/service_versions.json
@@ -7,7 +7,8 @@
   configurations : [
 {
   Config : {
-cluster_name : tdk
+cluster_name : tdk,
+stack_id: HDP-2.0.6
   },
   type : ganglia-env,
   tag : version1414410959005,
@@ -34,7 +35,8 @@
   service_config_version : 1,
   service_config_version_note : Initial configurations for Ganglia,
   service_name : GANGLIA,
-  user : admin
+  user : admin,
+  stack_id: HDP-2.0.6
 },
 {
   href : 
http://192.168.56.101:8080/api/v1/clusters/tdk/configurations/service_config_versions?service_name=HDFSservice_config_version=2;,
@@ -42,7 +44,8 @@
   configurations : [
 {
   Config : {
-cluster_name : tdk
+cluster_name : tdk,
+stack_id: HDP-2.0.6
   },
   type : core-site,
   tag : version1,
@@ -71,7 +74,8 @@
 },
 {
   Config : {
-cluster_name : tdk
+cluster_name : tdk,
+stack_id: HDP-2.0.6
   },
   type : hadoop-policy,
   tag : version1,
@@ -105,7 

ambari git commit: AMBARI-10682 Widget's min/max check errors should not stop from saving. (ababiichuk)

2015-04-23 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 4a9e9bd4a - 245b59972


AMBARI-10682 Widget's min/max check errors should not stop from saving. 
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: 245b59972a12d7ba6986e2c5c245d76f7aef09d9
Parents: 4a9e9bd
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Thu Apr 23 12:20:18 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Thu Apr 23 12:20:18 2015 +0300

--
 ambari-web/app/messages.js  |  3 +++
 .../app/templates/common/configs/widgets/controls.hbs   |  6 +-
 .../common/configs/widgets/slider_config_widget_view.js | 12 
 .../configs/widgets/time_interval_spinner_view.js   | 12 ++--
 .../configs/widgets/slider_config_widget_view_test.js   | 12 +---
 5 files changed, 31 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/245b5997/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 2416384..31aeb67 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2591,6 +2591,9 @@ Em.I18n.translations = {
   'config.group.save.confirmation.manage.button': 'Manage Hosts',
   'config.group.description.default': 'New configuration group created on {0}',
 
+  'config.warnMessage.outOfBoundaries.greater': 'Values greater than {0} are 
not recommended',
+  'config.warnMessage.outOfBoundaries.less': 'Values smaller than {0} are not 
recommended',
+
   'utils.ajax.errorMessage': 'Error message',
   'utils.ajax.defaultErrorPopupBody.message': 'received on {0} method for API: 
{1}',
   'utils.ajax.defaultErrorPopupBody.statusCode': '{0} status code'

http://git-wip-us.apache.org/repos/asf/ambari/blob/245b5997/ambari-web/app/templates/common/configs/widgets/controls.hbs
--
diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs 
b/ambari-web/app/templates/common/configs/widgets/controls.hbs
index 1780906..7da80e3 100644
--- a/ambari-web/app/templates/common/configs/widgets/controls.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs
@@ -69,7 +69,11 @@
 {{#if view.config.errorMessage}}
   p class=text-error{{view.config.errorMessage}}/p
   {{else}}
-  pnbsp;/p
+{{#if view.config.warnMessage}}
+  p class=text-warning{{view.config.warnMessage}}/p
+{{else}}
+  pnbsp;/p
+{{/if}}
 {{/if}}
 
 {{#if view.isComparison}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/245b5997/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index ba8a6fb..ba8a267 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -185,16 +185,20 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   parseFunction = this.get('mirrorValueParseFunction');
 if (validationFunction(mirrorValue)) {
   var parsed = parseFunction(mirrorValue);
-  if (parsed = min  parsed = max) {
+  if (parsed  max) {
+this.set('isMirrorValueValid', false);
+this.set('config.warnMessage', 
Em.I18n.t('config.warnMessage.outOfBoundaries.greater').format(max));
+  } else if (parsed  min) {
+this.set('isMirrorValueValid', false);
+this.set('config.warnMessage', 
Em.I18n.t('config.warnMessage.outOfBoundaries.less').format(min));
+  } else {
 this.set('isMirrorValueValid', true);
+this.set('config.warnMessage', '');
 this.set('config.errorMessage', '');
 this.set('config.value', '' + this.configValueByWidget(parsed));
 if (slider) {
   slider.setValue(parsed);
 }
-  } else {
-this.set('isMirrorValueValid', false);
-this.set('config.errorMessage', 'Invalid value');
   }
 } else {
   this.set('isMirrorValueValid', false);

http://git-wip-us.apache.org/repos/asf/ambari/blob/245b5997/ambari-web/app/views/common/configs/widgets/time_interval_spinner_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/time_interval_spinner_view.js 

ambari git commit: AMBARI-10690. Hbase Ranger plugin fails to install with non-root agent (aonishuk)

2015-04-23 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk dcfe0d462 - 8d8b5280d


AMBARI-10690. Hbase Ranger plugin fails to install with non-root agent 
(aonishuk)


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

Branch: refs/heads/trunk
Commit: 8d8b5280df608f8e218b7195880364097fa1d189
Parents: dcfe0d4
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Apr 23 13:55:43 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Apr 23 13:55:43 2015 +0300

--
 .../libraries/functions/ranger_functions.py |  27 ++-
 .../0.96.0.2.0/package/scripts/params_linux.py  | 116 +--
 .../package/scripts/setup_ranger_hbase.py   | 191 +++
 .../ranger-hbase-plugin-properties.xml  |  50 -
 .../stacks/2.0.6/configs/client-upgrade.json|  37 
 .../2.0.6/configs/default.hbasedecom.json   |  37 
 .../python/stacks/2.0.6/configs/default.json|  39 +++-
 .../python/stacks/2.0.6/configs/hbase-2.2.json  |  37 
 .../stacks/2.0.6/configs/hbase-check-2.2.json   |  40 +++-
 .../stacks/2.0.6/configs/hbase-preupgrade.json  |  63 +-
 .../stacks/2.0.6/configs/hbase-rs-2.2.json  |  37 
 .../python/stacks/2.0.6/configs/secured.json|  37 
 12 files changed, 480 insertions(+), 231 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8b5280/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
index 99b8c2c..e47f1dc 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
@@ -23,6 +23,7 @@ from StringIO import StringIO as BytesIO
 import json
 from resource_management.core.logger import Logger
 import urllib2, base64, httplib
+from resource_management import *
 
 
 class Rangeradmin:
@@ -73,7 +74,31 @@ class Rangeradmin:
 except httplib.BadStatusLine:
   Logger.error(Ranger Admin service is not reachable, please restart the 
service and then try again)
   return None
-
+
+
+
+  def create_ranger_repository(self, component, repo_name, repo_properties, 
+   ambari_ranger_admin, ambari_ranger_password,
+   admin_uname, admin_password, policy_user):
+response_code, response_recieved = 
self.check_ranger_login_urllib2(self.urlLogin, 'test:test')
+repo_data = json.dumps(repo_properties)
+
+if response_code is not None and response_code == 200:
+  ambari_ranger_admin, ambari_ranger_password = 
self.create_ambari_admin_user(ambari_ranger_admin, ambari_ranger_password, 
format({admin_uname}:{admin_password}))
+  ambari_username_password_for_ranger = ambari_ranger_admin + ':' + 
ambari_ranger_password
+  if ambari_ranger_admin != '' and ambari_ranger_password != '':
+repo = self.get_repository_by_name_urllib2(repo_name, component, 
'true', ambari_username_password_for_ranger)
+if repo and repo['name'] == repo_name:
+  Logger.info('{0} Repository exist'.format(component.title()))
+else:
+  response = self.create_repository_urllib2(repo_data, 
ambari_username_password_for_ranger, policy_user)
+  if response is not None:
+Logger.info('{0} Repository created in Ranger 
admin'.format(component.title()))
+  else:
+raise Fail('{0} Repository creation failed in Ranger 
admin'.format(component.title()))
+  else:
+raise Fail('Ambari admin username and password are blank ')
+  
   def create_repository_urllib2(self, data, usernamepassword, policy_user):
 try:
   searchRepoURL = self.urlReposPub

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8b5280/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index eafcd89..eb903f4 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ 

ambari git commit: AMBARI-10685 'dfs.datanode.failed.volumes.tolerated' has confusing ticks when range is 0-1. (ababiichuk)

2015-04-23 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 245b59972 - a0d3b5e86


AMBARI-10685 'dfs.datanode.failed.volumes.tolerated' has confusing ticks when 
range is 0-1. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: a0d3b5e865950f6f47914b69afcedf614587ca4b
Parents: 245b599
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Thu Apr 23 13:09:59 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Thu Apr 23 13:09:59 2015 +0300

--
 ambari-web/app/styles/widgets.less  |   2 +-
 .../widgets/slider_config_widget_view.js|  11 +-
 .../widgets/slider_config_widget_view_test.js   | 102 +++
 3 files changed, 111 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0d3b5e8/ambari-web/app/styles/widgets.less
--
diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index eefe6a5..a2525b9 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -105,7 +105,7 @@
   font-size: 10px;
   line-height: 14px;
   min-width: 30px;
-  z-index: 2;
+  z-index: 1;
   .tooltip-min,
   .tooltip-max {
 display: none;

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0d3b5e8/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index ba8a267..35ea78d 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -242,18 +242,23 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   ticks = [this.get('minMirrorValue')],
   ticksLabels = [],
   defaultValue = this.valueForTick(+this.get('widgetDefaultValue')),
+  range = this.get('maxMirrorValue') - this.get('minMirrorValue'),
+  // for little odd numbers in range 4..23 and widget type 'int' use 
always 4 ticks
+  isSmallInt = this.get('unitType') == 'int'  range  4  range  23  
range % 2 == 1,
   defaultValueMirroredId,
   defaultValueId;
 
 // ticks and labels
 for (var i = 1; i = 3; i++) {
-  var val = this.get('minMirrorValue') + (this.get('maxMirrorValue') - 
this.get('minMirrorValue')) * (i / 4);
+  var val = this.get('minMirrorValue') + range * (i / (isSmallInt ? 3 : 
4));
   // if value's type is float, ticks may be float too
   ticks.push(this.valueForTick(val));
 }
+
 ticks.push(this.get('maxMirrorValue'));
-ticks.forEach(function (tick, index) {
-  ticksLabels.push(index % 2 === 0 ? tick + ' ' + self.get('unitLabel') : 
'');
+ticks = ticks.uniq();
+ticks.forEach(function (tick, index, items) {
+  ticksLabels.push((items.length  5 || index % 2 === 0 || items.length - 
1 == index) ? tick + ' ' + self.get('unitLabel') : '');
 });
 
 // default-value marker should be added only if defaultValue is in range 
[min, max]

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0d3b5e8/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
--
diff --git 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
 
b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
index dd09a28..2a04136 100644
--- 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
+++ 
b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
@@ -222,6 +222,108 @@ describe('App.SliderConfigWidgetView', function () {
   ticks: [5, 16, 22, 28, 35, 39, 50],
   ticksLabels: ['5 ','', '', '28 ', '', '', '50 ']
 }
+  },
+  {
+viewSetup: {
+  minMirrorValue: 1,
+  maxMirrorValue: 2,
+  widgetDefaultValue: 2,
+  config: Em.Object.create({
+stackConfigProperty: Em.Object.create({
+  valueAttributes: { type: 'int', increment_step: 1 },
+  widget: { units: [ { 'unit-name': int}]}
+})
+  })
+},
+e: {
+  ticks: [1,2],
+  ticksLabels: ['1 ', '2 ']
+}
+  },
+  {
+viewSetup: {
+  minMirrorValue: 1,
+  maxMirrorValue: 3,
+  

ambari git commit: AMBARI-10692. Hdfs Ranger plugin fails to install with non-root agent (aonishuk)

2015-04-23 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk d3aada22d - 7e44537bd


AMBARI-10692. Hdfs Ranger plugin fails to install with non-root agent (aonishuk)


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

Branch: refs/heads/trunk
Commit: 7e44537bd9e7d84cb458d20bbf5e948f545dd1f3
Parents: d3aada2
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Apr 23 15:24:48 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Apr 23 15:24:48 2015 +0300

--
 .../0.96.0.2.0/package/scripts/params_linux.py  |   4 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   | 119 +++---
 .../package/scripts/setup_ranger_hdfs.py| 205 ++-
 .../ranger-hdfs-plugin-properties.xml   | 361 +++
 .../stacks/2.0.6/configs/altfs_plus_hdfs.json   |  29 ++
 .../stacks/2.0.6/configs/client-upgrade.json|  33 +-
 .../python/stacks/2.0.6/configs/default.json|  29 ++
 .../2.0.6/configs/default_no_install.json   |  29 ++
 .../default_update_exclude_file_only.json   |  29 ++
 .../2.0.6/configs/ha_bootstrap_active_node.json |  29 ++
 .../configs/ha_bootstrap_standby_node.json  |  29 ++
 .../python/stacks/2.0.6/configs/ha_default.json |  29 ++
 .../python/stacks/2.0.6/configs/ha_secured.json |  29 ++
 .../python/stacks/2.0.6/configs/nn_ru_lzo.json  |  29 ++
 .../2.0.6/configs/rebalancehdfs_default.json|  29 ++
 .../2.0.6/configs/rebalancehdfs_secured.json|  29 ++
 .../python/stacks/2.0.6/configs/secured.json|  29 ++
 .../src/test/python/stacks/utils/RMFTestCase.py |  33 +-
 18 files changed, 685 insertions(+), 418 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7e44537b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index eb903f4..6a3a1a4 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -205,8 +205,8 @@ hbase_zookeeper_property_clientPort = 
config['configurations']['hbase-site']['hb
 hbase_security_authentication = 
config['configurations']['hbase-site']['hbase.security.authentication']
 hadoop_security_authentication = 
config['configurations']['core-site']['hadoop.security.authentication']
 
-repo_config_username = 
default(/configurations/ranger-hbase-plugin-properties/REPOSITORY_CONFIG_USERNAME,
 hbase)
-repo_config_password = 
default(/configurations/ranger-hbase-plugin-properties/REPOSITORY_CONFIG_PASSWORD,
 hbase)
+repo_config_username = 
config['configurations']['ranger-hbase-plugin-properties']['REPOSITORY_CONFIG_USERNAME']
+repo_config_password = 
config['configurations']['ranger-hbase-plugin-properties']['REPOSITORY_CONFIG_PASSWORD']
 
 admin_uname = config['configurations']['ranger-env']['admin_username']
 admin_password = config['configurations']['ranger-env']['admin_password']

http://git-wip-us.apache.org/repos/asf/ambari/blob/7e44537b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
index 4e0bfed..0747b18 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
@@ -23,6 +23,7 @@ from resource_management.libraries.functions.default import 
default
 from resource_management import *
 import status_params
 import utils
+import json
 import os
 import itertools
 import re
@@ -335,77 +336,79 @@ if hdp_stack_version !=  and 
compare_versions(hdp_stack_version, '2.2') = 0:
 ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 #ranger hdfs properties
-policymgr_mgr_url = 
default(/configurations/admin-properties/policymgr_external_url, 
http://localhost:6080;)
-sql_connector_jar = 
default(/configurations/admin-properties/SQL_CONNECTOR_JAR, 
/usr/share/java/mysql-connector-java.jar)
-xa_audit_db_flavor = default(/configurations/admin-properties/DB_FLAVOR, 
MYSQL)

ambari git commit: AMBARI-10699 When changing stack on installer, step 7 fails with js errors. (ababiichuk)

2015-04-23 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk ce98754d5 - e585d2391


AMBARI-10699 When changing stack on installer, step 7 fails with js errors. 
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: e585d23917c84ab01ee1033fb52e861fe47ff362
Parents: ce98754
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Thu Apr 23 16:25:24 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Thu Apr 23 16:25:24 2015 +0300

--
 ambari-web/app/app.js | 10 ++
 ambari-web/app/controllers/main/service/add_controller.js |  2 +-
 ambari-web/app/controllers/main/service/info/configs.js   |  2 +-
 ambari-web/app/controllers/wizard.js  |  2 +-
 ambari-web/app/mixins/common/configs/enhanced_configs.js  |  4 ++--
 .../mixins/main/service/configs/preload_requests_chain.js |  2 +-
 .../app/views/common/configs/overriddenProperty_view.js   |  2 +-
 .../app/views/common/configs/service_config_view.js   |  4 ++--
 .../common/configs/service_configs_by_category_view.js|  2 +-
 ambari-web/app/views/common/controls_view.js  |  4 ++--
 10 files changed, 22 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e585d239/ambari-web/app/app.js
--
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 3e33f91..abb826b 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -183,6 +183,16 @@ module.exports = Em.Application.create({
   }.property('currentStackName'),
 
   /**
+   * when working with enhanced configs we should rely on stack version
+   * as version that is below 2.2 doesn't supports it
+   * even if flag codesupports.enhancedConfigscode is true
+   * @type {boolean}
+   */
+  isClusterSupportsEnhancedConfigs: function() {
+return this.get('isHadoop22Stack')  App.get('supports.enhancedConfigs')
+  }.property('isHadoop22Stack'),
+
+  /**
* If NameNode High Availability is enabled
* Based on codeclusterStatus.isInstalled/code, stack version, 
codeSNameNode/code availability
*

http://git-wip-us.apache.org/repos/asf/ambari/blob/e585d239/ambari-web/app/controllers/main/service/add_controller.js
--
diff --git a/ambari-web/app/controllers/main/service/add_controller.js 
b/ambari-web/app/controllers/main/service/add_controller.js
index e7a714c..5e5491e 100644
--- a/ambari-web/app/controllers/main/service/add_controller.js
+++ b/ambari-web/app/controllers/main/service/add_controller.js
@@ -115,7 +115,7 @@ App.AddServiceController = 
App.WizardController.extend(App.AddSecurityConfigs, {
   var self = this;
   var dfd = $.Deferred();
   this.loadKerberosDescriptorConfigs().done(function() {
-if (App.get('supports.enhancedConfigs')) {
+if (App.get('isClusterSupportsEnhancedConfigs')) {
   var serviceNames = App.StackService.find().filter(function(s) {
 return s.get('isSelected') || s.get('isInstalled');
   }).mapProperty('serviceName');

http://git-wip-us.apache.org/repos/asf/ambari/blob/e585d239/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index 336f951..de4e87e 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -338,7 +338,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
 console.log(TRACE: Loading configure for service);
 var serviceName = this.get('content.serviceName');
 this.clearStep();
-if (App.get('supports.enhancedConfigs')) {
+if (App.get('isClusterSupportsEnhancedConfigs')) {
   this.setDependentServices(serviceName);
   this.loadConfigTheme(serviceName).always(function() {
 App.themesMapper.generateAdvancedTabs([serviceName]);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e585d239/ambari-web/app/controllers/wizard.js
--
diff --git a/ambari-web/app/controllers/wizard.js 
b/ambari-web/app/controllers/wizard.js
index 5e30777..0730add 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -1234,7 +1234,7 @@ App.WizardController = 

ambari git commit: AMBARI-10695 Slider widget default/recommended value keeps changing as value is changed. (ababiichuk)

2015-04-23 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 7e44537bd - ce98754d5


AMBARI-10695 Slider widget default/recommended value keeps changing as value is 
changed. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: ce98754d5057fbcbe601c9a7aab4727d3b6169fc
Parents: 7e44537
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Thu Apr 23 15:26:29 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Thu Apr 23 15:26:29 2015 +0300

--
 .../mixins/common/configs/enhanced_configs.js   | 10 +++
 ambari-web/app/models/service_config.js |  7 ++
 ambari-web/app/utils/config.js  |  1 +
 .../widgets/slider_config_widget_view.js| 72 
 .../widgets/slider_config_widget_view_test.js   | 16 ++---
 5 files changed, 70 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ce98754d/ambari-web/app/mixins/common/configs/enhanced_configs.js
--
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js 
b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index 83edf45..7c78d0f 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -428,6 +428,16 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
   }
 
   /**
+   * saving recommended value to service config properties
+   * this value can be used as marker on slider widget
+   */
+  if (notDefaultGroup) {
+override  override.set('recommendedValue', recommendedValue);
+  } else {
+cp  cp.set('recommendedValue', recommendedValue);
+  }
+
+  /**
* clear _dependentPropertyValues from
* properties that wasn't changed while recommendations
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/ce98754d/ambari-web/app/models/service_config.js
--
diff --git a/ambari-web/app/models/service_config.js 
b/ambari-web/app/models/service_config.js
index 3af1b10..c47812c 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -211,6 +211,13 @@ App.ServiceConfigProperty = Em.Object.extend({
   hasInitialValue: false, //if true then property value is defined and saved 
to server
   isHiddenByFilter: false, //if true then hide this property (filtered out)
   rowStyleClass: null, // CSS-Class to be applied on the row showing this 
config
+
+  /**
+   * value that is returned from server as recommended
+   * @type {String}
+   */
+  recommendedValue: '',
+
   /**
* Usage example see on 
codeApp.ServiceConfigRadioButtons.handleDBConnectionProperty()/code
*

http://git-wip-us.apache.org/repos/asf/ambari/blob/ce98754d/ambari-web/app/utils/config.js
--
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index e3d784b..54a4609 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -735,6 +735,7 @@ App.config = Em.Object.create({
 recommendedDefaults[name] = defaults[name];
 config.set('value', defaults[name]);
 config.set('defaultValue', defaults[name]);
+config.set('recommendedValue', defaults[name]);
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ce98754d/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index 35ea78d..eb7e313 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -95,6 +95,15 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   }.property('config.defaultValue'),
 
   /**
+   * Default value of config property transformed according widget format
+   * @returns {Number}
+   */
+  widgetRecommendedValue: function() {
+var parseFunction = this.get('mirrorValueParseFunction');
+return 
parseFunction(this.widgetValueByConfigAttributes(this.get('config.recommendedValue')));
+  }.property('config.recommendedValue'),
+
+  /**
* unit type of widget
* @type {String}
*/
@@ -161,12 

ambari git commit: Ambari-10677. apt-get update command updates all list files even if it is expected to update only one

2015-04-23 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk e585d2391 - c7df7bd0b


Ambari-10677. apt-get update command updates all list files even if it is 
expected to update only one


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

Branch: refs/heads/trunk
Commit: c7df7bd0b977af5490bd9b60bad5fa78f8dadc2f
Parents: e585d23
Author: Sumit Mohanty smoha...@hortonworks.com
Authored: Thu Apr 23 06:48:50 2015 -0700
Committer: Sumit Mohanty smoha...@hortonworks.com
Committed: Thu Apr 23 06:48:50 2015 -0700

--
 .../python/resource_management/libraries/providers/repository.py   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c7df7bd0/ambari-common/src/main/python/resource_management/libraries/providers/repository.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/providers/repository.py
 
b/ambari-common/src/main/python/resource_management/libraries/providers/repository.py
index 94f057e..85ad83e 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/providers/repository.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/providers/repository.py
@@ -67,7 +67,7 @@ def get_repo_dir():
 class UbuntuRepositoryProvider(Provider):
   package_type = deb
   repo_dir = /etc/apt/sources.list.d
-  update_cmd = ['apt-get', 'update', '-qq', '-o', 
'Dir::Etc::sourcelist=sources.list.d/{repo_file_name}', '-o', 
'APT::Get::List-Cleanup=0']
+  update_cmd = ['apt-get', 'update', '-qq', '-o', 
'Dir::Etc::sourcelist=sources.list.d/{repo_file_name}', '-o', 
'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0']
   missing_pkey_regex = The following signatures couldn't be verified because 
the public key is not available: NO_PUBKEY ([A-Z0-9]+)
   add_pkey_cmd = apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 
{pkey}
 



ambari git commit: AMBARI-10683 HDFS Review - Need theme changes for configs. (ababiichuk)

2015-04-23 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 8d8b5280d - ec5de2712


AMBARI-10683 HDFS Review - Need theme changes for configs. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: ec5de27122290f3a37f15800d1f606d005b9f0bd
Parents: 8d8b528
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Thu Apr 23 14:18:05 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Thu Apr 23 14:19:56 2015 +0300

--
 .../HDP/2.2/services/HDFS/themes/theme.json | 111 ++-
 .../mixins/common/configs/enhanced_configs.js   |  28 +++--
 ambari-web/app/views/common/controls_view.js|  14 +--
 3 files changed, 33 insertions(+), 120 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ec5de271/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json
index 3d97149..bcffd0f 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json
@@ -11,8 +11,8 @@
   name: settings,
   display-name: Settings,
   layout: {
-tab-columns: 3,
-tab-rows: 2,
+tab-columns: 2,
+tab-rows: 1,
 sections: [
   {
 name: section-namenode,
@@ -20,8 +20,8 @@
 row-index: 0,
 column-index: 0,
 row-span: 1,
-column-span: 2,
-section-columns: 2,
+column-span: 1,
+section-columns: 1,
 section-rows: 1,
 subsections: [
   {
@@ -30,12 +30,6 @@
 column-index: 0,
 row-span: 1,
 column-span: 1
-  }, {
-name: subsection-namenode-col2,
-row-index: 0,
-column-index: 1,
-row-span: 1,
-column-span: 1
   }
 ]
   },
@@ -43,7 +37,7 @@
 name: section-datanode,
 display-name: DataNode,
 row-index: 0,
-column-index: 2,
+column-index: 1,
 row-span: 1,
 column-span: 1,
 section-columns: 1,
@@ -57,31 +51,6 @@
 column-span: 1
   }
 ]
-  },
-  {
-name: section-encryption,
-display-name: Encryption,
-row-index: 1,
-column-index: 0,
-row-span: 1,
-column-span: 2,
-section-columns: 2,
-section-rows: 1,
-subsections: [
-  {
-name: subsection-encryption-col1,
-row-index: 0,
-column-index: 0,
-row-span: 1,
-column-span: 1
-  }, {
-name: subsection-encryption-col2,
-row-index: 0,
-column-index: 1,
-row-span: 1,
-column-span: 1
-  }
-]
   }
 ]
   }
@@ -98,7 +67,7 @@
   subsection-name: subsection-namenode-col1
 },
 {
-  config: hdfs-site/dfs.namenode.safemode.threshold-pct,
+  config: hadoop-env/namenode_heapsize,
   subsection-name: subsection-namenode-col1
 },
 {
@@ -106,31 +75,15 @@
   subsection-name: subsection-namenode-col1
 },
 {
-  config: hadoop-env/namenode_opt_newsize,
+  config: hdfs-site/dfs.namenode.safemode.threshold-pct,
   subsection-name: subsection-namenode-col1
 },
 {
-  config: hadoop-env/namenode_opt_maxnewsize,
-  subsection-name: subsection-namenode-col2
-},
-{
-  

ambari git commit: AMBARI-10688 After Editing a Widget it fails to load due to JS error. (atkach)

2015-04-23 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk ec5de2712 - d3aada22d


AMBARI-10688 After Editing a Widget it fails to load due to JS error. (atkach)


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

Branch: refs/heads/trunk
Commit: d3aada22d2c010a4117dcae70b8bd649396d9d3e
Parents: ec5de27
Author: Andrii Tkach atk...@hortonworks.com
Authored: Thu Apr 23 13:11:24 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Thu Apr 23 14:39:11 2015 +0300

--
 .../main/service/widgets/create/step2_controller.js | 12 +---
 .../main/service/widgets/create/step3_controller.js |  6 +-
 .../service/widgets/create/wizard_controller.js | 10 +-
 .../main/service/widgets/create/expression_view.js  | 16 +++-
 4 files changed, 18 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d3aada22/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
index 54bb14f..3051ffd 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
@@ -294,11 +294,7 @@ App.WidgetWizardStep2Controller = Em.Controller.extend({
   value = '${';
   expression.data.forEach(function (element) {
 if (element.isMetric) {
-  metrics.push({
-name: element.name,
-componentName: element.componentName,
-serviceName: element.serviceName
-  });
+  metrics.push(element);
 }
 value += element.name;
   }, this);
@@ -430,7 +426,8 @@ App.WidgetWizardStep2Controller = Em.Controller.extend({
 name: str.trim(),
 isMetric: true,
 componentName: metric.component_name,
-serviceName: metric.service_name
+serviceName: metric.service_name,
+metricPath: metric.metric_path
   }));
   str = '';
 }
@@ -450,7 +447,8 @@ App.WidgetWizardStep2Controller = Em.Controller.extend({
 name: str.trim(),
 isMetric: true,
 componentName: metric.component_name,
-serviceName: metric.service_name
+serviceName: metric.service_name,
+metricPath: metric.metric_path
   }));
 }
 return data;

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3aada22/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
index b821cc4..852ab57 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
@@ -89,6 +89,9 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({
 this.set('widgetName', this.get('content.widgetDisplayName'));
 this.set('widgetDisplayName', this.get('content.widgetDisplayName'));
 this.set('widgetDescription', this.get('content.widgetDescription'));
+this.get('scopes').forEach(function (scope) {
+  scope.set('checked', scope.get('name').toUpperCase() == 
this.get('content.widgetScope'));
+}, this);
   },
 
   //TODO: Following computed property needs to be implemented. Next button 
should be enabled when there is no validation error and all required fields are 
filled
@@ -112,7 +115,8 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({
   return {
 name: metric.name,
 service_name: metric.serviceName,
-component_name: metric.componentName
+component_name: metric.componentName,
+metric_path: metric.metricPath
   }
 }),
 values: this.get('widgetValues'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3aada22/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
index 7cb2dc6..94fc565 100644
--- 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
+++ 

ambari git commit: AMBARI-10637: [WinTP2] SQLServer transaction deadlock causes deployment on Windows to be busted (jluniya)

2015-04-23 Thread jluniya
Repository: ambari
Updated Branches:
  refs/heads/trunk bc85c29e6 - 14cbdabe7


AMBARI-10637: [WinTP2] SQLServer transaction deadlock causes deployment on 
Windows to be busted (jluniya)


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

Branch: refs/heads/trunk
Commit: 14cbdabe7232bd2d020824a1bbed1f6f905a458b
Parents: bc85c29
Author: Jayush Luniya jlun...@hortonworks.com
Authored: Thu Apr 23 22:56:32 2015 -0700
Committer: Jayush Luniya jlun...@hortonworks.com
Committed: Thu Apr 23 22:56:32 2015 -0700

--
 .../apache/ambari/server/orm/entities/AlertCurrentEntity.java| 2 +-
 .../apache/ambari/server/orm/entities/AlertDefinitionEntity.java | 2 +-
 .../org/apache/ambari/server/orm/entities/AlertGroupEntity.java  | 2 +-
 .../apache/ambari/server/orm/entities/AlertHistoryEntity.java| 2 +-
 .../org/apache/ambari/server/orm/entities/AlertNoticeEntity.java | 2 +-
 .../org/apache/ambari/server/orm/entities/AlertTargetEntity.java | 2 +-
 .../apache/ambari/server/orm/entities/ClusterConfigEntity.java   | 1 -
 .../org/apache/ambari/server/orm/entities/ClusterEntity.java | 1 -
 .../apache/ambari/server/orm/entities/ClusterVersionEntity.java  | 1 -
 .../org/apache/ambari/server/orm/entities/ConfigGroupEntity.java | 1 -
 .../java/org/apache/ambari/server/orm/entities/GroupEntity.java  | 3 +--
 .../java/org/apache/ambari/server/orm/entities/HostEntity.java   | 1 -
 .../apache/ambari/server/orm/entities/HostRoleCommandEntity.java | 1 -
 .../org/apache/ambari/server/orm/entities/HostVersionEntity.java | 1 -
 .../org/apache/ambari/server/orm/entities/PermissionEntity.java  | 1 -
 .../apache/ambari/server/orm/entities/PrincipalTypeEntity.java   | 1 -
 .../org/apache/ambari/server/orm/entities/PrivilegeEntity.java   | 1 -
 .../ambari/server/orm/entities/RepositoryVersionEntity.java  | 3 +--
 .../ambari/server/orm/entities/RequestOperationLevelEntity.java  | 1 -
 .../ambari/server/orm/entities/RequestResourceFilterEntity.java  | 1 -
 .../apache/ambari/server/orm/entities/RequestScheduleEntity.java | 1 -
 .../org/apache/ambari/server/orm/entities/ResourceEntity.java| 1 -
 .../apache/ambari/server/orm/entities/ResourceTypeEntity.java| 1 -
 .../apache/ambari/server/orm/entities/ServiceConfigEntity.java   | 1 -
 .../java/org/apache/ambari/server/orm/entities/StackEntity.java  | 2 +-
 .../org/apache/ambari/server/orm/entities/UpgradeEntity.java | 2 +-
 .../apache/ambari/server/orm/entities/UpgradeGroupEntity.java| 2 +-
 .../org/apache/ambari/server/orm/entities/UpgradeItemEntity.java | 2 +-
 .../org/apache/ambari/server/orm/entities/ViewEntityEntity.java  | 4 ++--
 .../apache/ambari/server/orm/entities/ViewInstanceEntity.java| 1 -
 .../java/org/apache/ambari/server/orm/entities/WidgetEntity.java | 3 +--
 .../apache/ambari/server/orm/entities/WidgetLayoutEntity.java| 3 +--
 32 files changed, 16 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/14cbdabe/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
index 66aa119..26e0d00 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
@@ -44,7 +44,7 @@ import org.apache.ambari.server.state.MaintenanceState;
  */
 @Entity
 @Table(name = alert_current)
-@TableGenerator(name = alert_current_id_generator, table = 
ambari_sequences, pkColumnName = sequence_name, valueColumnName = 
sequence_value, pkColumnValue = alert_current_id_seq, initialValue = 0, 
allocationSize = 1)
+@TableGenerator(name = alert_current_id_generator, table = 
ambari_sequences, pkColumnName = sequence_name, valueColumnName = 
sequence_value, pkColumnValue = alert_current_id_seq, initialValue = 0)
 @NamedQueries({
 @NamedQuery(name = AlertCurrentEntity.findAll, query = SELECT alert 
FROM AlertCurrentEntity alert),
 @NamedQuery(name = AlertCurrentEntity.findByCluster, query = SELECT 
alert FROM AlertCurrentEntity alert WHERE alert.alertHistory.clusterId = 
:clusterId),

http://git-wip-us.apache.org/repos/asf/ambari/blob/14cbdabe/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
--
diff --git 

ambari git commit: AMBARI-10712: provide PHOENIX_QUERYSERVER_OPTS in hbase-env.sh (nick dimiduk via jluniya)

2015-04-23 Thread jluniya
Repository: ambari
Updated Branches:
  refs/heads/trunk 194e160e2 - da10b23eb


AMBARI-10712: provide PHOENIX_QUERYSERVER_OPTS in hbase-env.sh (nick dimiduk 
via jluniya)


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

Branch: refs/heads/trunk
Commit: da10b23eb3574ff1eb7cff84520d3b0be5483bac
Parents: 194e160
Author: Jayush Luniya jlun...@hortonworks.com
Authored: Thu Apr 23 19:11:40 2015 -0700
Committer: Jayush Luniya jlun...@hortonworks.com
Committed: Thu Apr 23 19:11:40 2015 -0700

--
 .../0.96.0.2.0/package/scripts/params_linux.py  |   2 +-
 .../services/HBASE/configuration/hbase-env.xml  | 100 +++
 .../python/stacks/2.0.6/configs/secured.json|   1 +
 .../python/stacks/2.3/configs/hbase_secure.json |   1 +
 4 files changed, 103 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/da10b23e/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index 311819a..a9e2da6 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -94,7 +94,7 @@ local_dir = substitute_vars(_local_dir_conf, 
config['configurations']['hbase-sit
 client_jaas_config_file = format({hbase_conf_dir}/hbase_client_jaas.conf)
 master_jaas_config_file = format({hbase_conf_dir}/hbase_master_jaas.conf)
 regionserver_jaas_config_file = 
format({hbase_conf_dir}/hbase_regionserver_jaas.conf)
-queryserver_jaas_config_file = 
format({hbase_conf_dir}/phoenix_queryserver_jaas.conf)
+queryserver_jaas_config_file = 
format({hbase_conf_dir}/hbase_queryserver_jaas.conf)
 
 ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_host', []) # 
is not passed when ganglia is not present
 ganglia_server_host = '' if len(ganglia_server_hosts) == 0 else 
ganglia_server_hosts[0]

http://git-wip-us.apache.org/repos/asf/ambari/blob/da10b23e/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-env.xml
new file mode 100644
index 000..74d1917
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-env.xml
@@ -0,0 +1,100 @@
+?xml version=1.0?
+?xml-stylesheet type=text/xsl href=configuration.xsl?
+!--
+/**
+ * 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.
+ */
+--
+
+configuration
+  !-- hbase-env.sh --
+  property
+namecontent/name
+descriptionThis is the jinja template for hbase-env.sh file/description
+value
+# Set environment variables here.
+
+# The java implementation to use. Java 1.6 required.
+export JAVA_HOME={{java64_home}}
+
+# HBase Configuration directory
+export HBASE_CONF_DIR=${HBASE_CONF_DIR:-{{hbase_conf_dir}}}
+
+# Extra Java CLASSPATH elements. Optional.
+export HBASE_CLASSPATH=${HBASE_CLASSPATH}
+
+
+# The maximum amount of heap to use, in MB. Default is 1000.
+# export HBASE_HEAPSIZE=1000
+
+# Extra Java runtime options.
+# Below are what we set by default. May only work with SUN JVM.
+# For more on why as well as other possible settings,
+# see http://wiki.apache.org/hadoop/PerformanceTuning
+export SERVER_GC_OPTS=-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:{{log_dir}}/gc.log-`date +'%Y%m%d%H%M'`
+# Uncomment below to enable java 

ambari git commit: AMBARI-10718. Widgets: ui changes v1(xiwang)

2015-04-23 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 290276c62 - 194e160e2


AMBARI-10718. Widgets: ui changes v1(xiwang)


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

Branch: refs/heads/trunk
Commit: 194e160e2014965cc11d216a18aec58834eae9ef
Parents: 290276c
Author: Xi Wang xiw...@apache.org
Authored: Thu Apr 23 18:46:54 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu Apr 23 18:47:01 2015 -0700

--
 .../controllers/main/service/info/summary.js| 76 +++-
 ambari-web/app/messages.js  | 10 +--
 .../app/styles/enhanced_service_dashboard.less  | 56 ---
 .../modal_popups/widget_browser_popup.hbs   | 32 -
 4 files changed, 75 insertions(+), 99 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/194e160e/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index 4d902a6..421206a 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -588,7 +588,6 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
* @return {App.ModalPopup}
*/
   goToWidgetsBrowser: function () {
-
 var self = this;
 
 return App.ModalPopup.show({
@@ -597,8 +596,6 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
   }.property(''),
 
   classNames: ['sixty-percent-width-modal', 'widgets-browser-popup'],
-  primary: Em.I18n.t('common.close'),
-  secondary: null,
   onPrimary: function () {
 this.hide();
 self.set('isAllSharedWidgetsLoaded', false);
@@ -608,8 +605,20 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
   },
   autoHeight: false,
   isHideBodyScroll: false,
-  bodyClass: Ember.View.extend({
+  footerClass: Ember.View.extend({
+template: Ember.Handlebars.compile('div class=modal-footer' +
+  'label id=footer-checkbox' +
+  '{{view Ember.Checkbox classNames=checkbox 
checkedBinding=view.parentView.isShowMineOnly}} nbsp;' +
+  '{{t dashboard.widgets.browser.footer.checkbox}}/label'+
+  'button class=btn btn-success {{action onPrimary 
target=view}}{{t common.close}}/button/div'),
+isShowMineOnly: false,
+onPrimary: function() {
+  this.get('parentView').onPrimary();
+}
 
+  }),
+  isShowMineOnly: false,
+  bodyClass: Ember.View.extend({
 templateName: 
require('templates/common/modal_popups/widget_browser_popup'),
 controller: self,
 willInsertElement: function () {
@@ -618,25 +627,24 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
 },
 
 isLoaded: function () {
-  return !!this.get('controller.isAllSharedWidgetsLoaded');
-}.property('controller.isAllSharedWidgetsLoaded'),
+  return !!(this.get('controller.isAllSharedWidgetsLoaded')  
this.get('controller.isMineWidgetsLoaded'));
+}.property('controller.isAllSharedWidgetsLoaded', 
'controller.isMineWidgetsLoaded'),
 
 isWidgetEmptyList: function () {
   return !this.get('filteredContent.length');
 }.property('filteredContent.length'),
 
-activeTab: 'shared',
 activeService: '',
 activeStatus: '',
 
 content: function () {
-  if (this.get('activeTab') == 'mine') {
+  if (this.get('parentView.isShowMineOnly')) {
 return this.get('controller.mineWidgets');
-  } else if (this.get('activeTab') == 'shared') {
-return this.get('controller.allSharedWidgets');
+  } else {
+return 
this.get('controller.mineWidgets').concat(this.get('controller.allSharedWidgets'));
   }
 }.property('controller.allSharedWidgets.length', 
'controller.isAllSharedWidgetsLoaded',
-  'controller.mineWidgets.length', 'controller.isMineWidgetsLoaded', 
'activeTab'),
+  'controller.mineWidgets.length', 'controller.isMineWidgetsLoaded', 
'parentView.isShowMineOnly'),
 
 /**
  * displaying content filtered by service name and status.
@@ -653,44 +661,6 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
 }.property('content', 'activeService', 'activeStatus'),
 
 /**
- * top tabs: Share / Mine
- */
-

ambari git commit: AMBARI-10716. Call to create widget or widget layout should return id. (Ivan via Jaimin)

2015-04-23 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk da10b23eb - bc85c29e6


AMBARI-10716. Call to create widget or widget layout should return id. (Ivan 
via Jaimin)


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

Branch: refs/heads/trunk
Commit: bc85c29e6cb5af051cd8cd8d2f2456848114104b
Parents: da10b23
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Thu Apr 23 19:56:06 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Thu Apr 23 19:56:14 2015 -0700

--
 .../internal/WidgetLayoutResourceProvider.java| 14 ++
 .../controller/internal/WidgetResourceProvider.java   | 14 ++
 .../internal/WidgetLayoutResourceProviderTest.java|  4 +++-
 .../internal/WidgetResourceProviderTest.java  |  4 +++-
 4 files changed, 26 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bc85c29e/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
index 8fa5bc6..68dc4e9 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
@@ -123,11 +123,13 @@ public class WidgetLayoutResourceProvider extends 
AbstractControllerResourceProv
   ResourceAlreadyExistsException,
   NoSuchParentResourceException {
 
+SetResource associatedResources = new HashSetResource();
+
 for (final MapString, Object properties : request.getProperties()) {
-  Void resources = createResources(new CommandVoid() {
+  WidgetLayoutEntity widgetLayoutEntity = createResources(new 
CommandWidgetLayoutEntity() {
 
 @Override
-public Void invoke() throws AmbariException {
+public WidgetLayoutEntity invoke() throws AmbariException {
   final String[] requiredProperties = {
   WIDGETLAYOUT_LAYOUT_NAME_PROPERTY_ID,
   WIDGETLAYOUT_SECTION_NAME_PROPERTY_ID,
@@ -177,12 +179,16 @@ public class WidgetLayoutResourceProvider extends 
AbstractControllerResourceProv
   widgetLayoutDAO.create(entity);
   notifyCreate(Type.WidgetLayout, request);
 
-  return null;
+  return entity;
 }
   });
+  Resource resource = new ResourceImpl(Type.WidgetLayout);
+  resource.setProperty(WIDGETLAYOUT_ID_PROPERTY_ID, 
widgetLayoutEntity.getId());
+  associatedResources.add(resource);
+
 }
 
-return getRequestStatus(null);
+return getRequestStatus(null, associatedResources);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc85c29e/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
index 27a7b11..48a0d67 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
@@ -131,11 +131,13 @@ public class WidgetResourceProvider extends 
AbstractControllerResourceProvider {
   ResourceAlreadyExistsException,
   NoSuchParentResourceException {
 
+SetResource associatedResources = new HashSetResource();
+
 for (final MapString, Object properties : request.getProperties()) {
-  createResources(new CommandVoid() {
+  WidgetEntity widgetEntity = createResources(new CommandWidgetEntity() {
 
 @Override
-public Void invoke() throws AmbariException {
+public WidgetEntity invoke() throws AmbariException {
   final String[] requiredProperties = {
   WIDGET_CLUSTER_NAME_PROPERTY_ID,
   WIDGET_WIDGET_NAME_PROPERTY_ID,
@@ -190,12 +192,16 @@ public class WidgetResourceProvider extends 
AbstractControllerResourceProvider {
 
   widgetDAO.create(entity);
   notifyCreate(Type.Widget, request);
-  return null;
+  return entity;
 }
   });
+  Resource resource = new