git commit: AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and instances created - fixes (srimanth)

2014-09-16 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 63f5ed2cc - 127978c24


AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and 
instances created - fixes (srimanth)


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

Branch: refs/heads/trunk
Commit: 127978c2463d8cd8ad55d3ccee276cb350b02b9a
Parents: 63f5ed2
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Tue Sep 16 00:46:38 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Tue Sep 16 00:46:38 2014 -0700

--
 .../apache/ambari/view/slider/SliderAppsViewControllerImpl.java| 2 +-
 .../views/slider/src/main/resources/ui/app/styles/application.less | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/127978c2/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index cc35dec..04533ee 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -681,7 +681,7 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
   
   final ActionInstallPackageArgs installArgs = new 
ActionInstallPackageArgs();
   installArgs.name = appName;
-  installArgs.packageURI = getAppsFolderPath() + 
configs.get(application.def).getAsString();
+  installArgs.packageURI = getAppsFolderPath() + / + 
configs.get(application.def).getAsString();
   installArgs.replacePkg = true;
 
   return invokeSliderClientRunnable(new 
SliderClientContextRunnableString() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/127978c2/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index c193d3e..b934a20 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -38,7 +38,6 @@ a {
 
 #slider-apps-table  {
   .create-app {
-margin-top:27px;
 margin-bottom: 20px;
   }
 #slider-table {



git commit: AMBARI-7328 Config versions have wrong values after switching groups. (atkach)

2014-09-16 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk 127978c24 - bd04a28e1


AMBARI-7328 Config versions have wrong values after switching groups. (atkach)


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

Branch: refs/heads/trunk
Commit: bd04a28e14171f8d64fb6b62678a0a441f444005
Parents: 127978c
Author: atkach atk...@hortonworks.com
Authored: Tue Sep 16 14:30:45 2014 +0300
Committer: atkach atk...@hortonworks.com
Committed: Tue Sep 16 14:30:45 2014 +0300

--
 .../controllers/main/service/info/configs.js| 113 +--
 ambari-web/app/utils/ajax/ajax.js   |   9 ++
 .../views/common/configs/config_history_flow.js |   2 +-
 3 files changed, 86 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bd04a28e/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 2f79685..e10a0ba 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -48,8 +48,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   preSelectedConfigVersion: null,
   // contain Service Config Property, when user proceed from Select Config 
Group dialog
   overrideToAdd: null,
-  //latest version of service config versions
-  currentVersion: null,
+  //version of default config group, configs of which currently applied
+  currentDefaultVersion: null,
   //version selected to view
   selectedVersion: null,
   // file names of changed configs
@@ -58,8 +58,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   serviceConfigVersionNote: '',
   versionLoaded: false,
   isCurrentSelected: function () {
-return this.get('selectedVersion') === this.get('currentVersion');
-  }.property('selectedVersion', 'currentVersion'),
+return App.ServiceConfigVersion.find(this.get('content.serviceName') + _ 
+ this.get('selectedVersion')).get('isCurrent');
+  }.property('selectedVersion'),
   serviceConfigs: function () {
 return App.config.get('preDefinedServiceConfigs');
   }.property('App.config.preDefinedServiceConfigs'),
@@ -179,6 +179,16 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   }.property('propertyFilters', 'isCompareMode'),
 
   /**
+   * indicate wtether service config version belongs to default config group
+   * @method isVersionDefault
+   * @param version
+   * @return {Boolean}
+   */
+  isVersionDefault: function(version) {
+return version  version.get('groupId') == -1;
+  },
+
+  /**
* clear and set properties to default value
*/
   clearStep: function () {
@@ -290,41 +300,45 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
 
   /**
* load service config versions to model
-   * set currentVersion
+   * set currentDefaultVersion
* @param data
* @param opt
* @param params
*/
   loadServiceConfigVersionsSuccess: function (data, opt, params) {
 App.serviceConfigVersionsMapper.map(data);
+this.set('currentDefaultVersion', data.items.filterProperty('group_id', 
-1).findProperty('is_current').service_config_version);
 if (this.get('preSelectedConfigVersion')) {
-  this.set('currentVersion', this.get('preSelectedConfigVersion.version'));
+  this.loadSelectedVersion(this.get('preSelectedConfigVersion.version'));
 } else {
-  this.set('currentVersion', data.items.filterProperty('group_id', 
-1).findProperty('is_current').service_config_version);
+  this.loadSelectedVersion();
 }
-this.loadSelectedVersion();
   },
 
   /**
* get selected service config version
-   * In case selected version is undefined then take currentVersion
+   * In case selected version is undefined then take currentDefaultVersion
* @param version
*/
   loadSelectedVersion: function (version) {
 var self = this;
 this.set('versionLoaded', false);
-var groupName = 
App.ServiceConfigVersion.find(this.get('content.serviceName') + _ + 
version).get('groupName');
+version = version || this.get('currentDefaultVersion');
+var versionRecord = 
App.ServiceConfigVersion.find(this.get('content.serviceName') + _ + version);
+//version of non-default group require properties from current version of 
default group to correctly display page
+var versions = (this.isVersionDefault(versionRecord)) ? [version] : 
[this.get('currentDefaultVersion'), 

git commit: AMBARI-7316 - Alerts: Create Alert Notices For Incoming Alert State Changes (jonathanhurley)

2014-09-16 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev aaf051357 - 760bedfe3


AMBARI-7316 - Alerts: Create Alert Notices For Incoming Alert State Changes 
(jonathanhurley)


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

Branch: refs/heads/branch-alerts-dev
Commit: 760bedfe32f2a673a14cc14e7f2d41794ca3db98
Parents: aaf0513
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Mon Sep 15 14:04:42 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Mon Sep 15 14:04:42 2014 -0400

--
 .../ambari/server/agent/HeartBeatHandler.java   |  20 ++-
 .../server/controller/ControllerModule.java |  15 ++
 .../apache/ambari/server/events/AlertEvent.java |  58 +++
 .../server/events/AlertReceivedEvent.java   |  50 +++
 .../server/events/AlertStateChangeEvent.java|  85 +++
 .../events/listeners/AlertReceivedListener.java | 150 +++
 .../listeners/AlertStateChangedListener.java|  98 
 .../events/publishers/AlertEventPublisher.java  | 100 +
 .../ambari/server/orm/dao/AlertDispatchDAO.java |  22 +++
 .../server/orm/entities/AlertGroupEntity.java   |   7 +-
 .../org/apache/ambari/server/state/Alert.java   |  55 ---
 .../server/state/cluster/AlertDataManager.java  | 111 --
 .../server/orm/dao/AlertDispatchDAOTest.java|  29 
 .../state/cluster/AlertDataManagerTest.java | 129 
 14 files changed, 753 insertions(+), 176 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/760bedfe/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 492d832..a366301 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
@@ -39,6 +39,9 @@ import org.apache.ambari.server.actionmanager.HostRoleStatus;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.MaintenanceStateHelper;
+import org.apache.ambari.server.events.AlertEvent;
+import org.apache.ambari.server.events.AlertReceivedEvent;
+import org.apache.ambari.server.events.publishers.AlertEventPublisher;
 import org.apache.ambari.server.metadata.ActionMetadata;
 import org.apache.ambari.server.state.AgentVersion;
 import org.apache.ambari.server.state.Alert;
@@ -60,7 +63,6 @@ import org.apache.ambari.server.state.StackInfo;
 import org.apache.ambari.server.state.State;
 import org.apache.ambari.server.state.alert.AlertDefinition;
 import org.apache.ambari.server.state.alert.AlertDefinitionHash;
-import org.apache.ambari.server.state.cluster.AlertDataManager;
 import org.apache.ambari.server.state.fsm.InvalidStateTransitionException;
 import org.apache.ambari.server.state.host.HostHealthyHeartbeatEvent;
 import org.apache.ambari.server.state.host.HostRegistrationRequestEvent;
@@ -115,9 +117,12 @@ public class HeartBeatHandler {
 
   @Inject
   private AlertDefinitionHash alertDefinitionHash;
-  
+
+  /**
+   * Publishes {@link AlertEvent} instances.
+   */
   @Inject
-  private AlertDataManager alertManager;
+  private AlertEventPublisher alertEventPublisher;
 
   private MapString, Long hostResponseIds = new ConcurrentHashMapString, 
Long();
 
@@ -236,13 +241,16 @@ public class HeartBeatHandler {
 if (null == hostname || null == heartbeat) {
   return;
 }
-
+
 if (null != heartbeat.getAlerts()) {
   for (Alert alert : heartbeat.getAlerts()) {
-if (null == alert.getHost())
+if (null == alert.getHost()) {
   alert.setHost(hostname);
+}
+
 Cluster cluster = clusterFsm.getCluster(alert.getCluster());
-alertManager.add(cluster.getClusterId(), alert);
+AlertEvent event = new AlertReceivedEvent(cluster.getClusterId(), 
alert);
+alertEventPublisher.publish(event);
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/760bedfe/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
index 

[03/27] git commit: AMBARI-7303. Manage Ambari and Dashboard should NOT open in named tabs. (onechiporenko)

2014-09-16 Thread jonathanhurley
AMBARI-7303. Manage Ambari and Dashboard should NOT open in named tabs. 
(onechiporenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: ae0b1f36f32233810bda17bd16fccfe047ee0066
Parents: a96b3f8
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Mon Sep 15 13:56:31 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Mon Sep 15 13:56:31 2014 +0300

--
 .../src/main/resources/ui/admin-web/app/views/leftNavbar.html  | 2 +-
 ambari-web/app/templates/application.hbs   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ae0b1f36/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
index b1ab544..4da46d7 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
@@ -57,7 +57,7 @@
   li ng-class={active: isActive('clusters.manageAccess')}
 a 
href=#/clusters/{{cluster.Clusters.cluster_name}}/manageAccess 
class=permissionsPermissions/a
   /li
-  lia href=/#/main/dashboard class=gotodashboard 
target={{cluster.Clusters.cluster_name}}Go to Dashboard/a/li
+  lia href=/#/main/dashboard class=gotodashboardGo to 
Dashboard/a/li
 /ul
   /div
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae0b1f36/ambari-web/app/templates/application.hbs
--
diff --git a/ambari-web/app/templates/application.hbs 
b/ambari-web/app/templates/application.hbs
index 002c590..6401500 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -52,7 +52,7 @@
   ul class=dropdown-menu
   lia href= {{action showAboutPopup 
target=controller}}{{t app.aboutAmbari}}/a/li
   {{#if App.isAdmin}}{{#unless App.isOperator}}
-  lia href=/views/ADMIN_VIEW/1.0.0/INSTANCE/#/ 
target=adminconsole{{t app.manageAmbari}}/a/li
+  lia href=/views/ADMIN_VIEW/1.0.0/INSTANCE/#/{{t 
app.manageAmbari}}/a/li
   {{/unless}}{{/if}}
 {{#if isClusterDataLoaded}}
   {{#if App.isAdmin}}



[22/27] git commit: AMBARI-7299. Slider View: Update slider-core JAR to 0.51.0 version (srimanth)

2014-09-16 Thread jonathanhurley
AMBARI-7299. Slider View: Update slider-core JAR to 0.51.0 version (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: 26cd2f4b0f1e7ed23aab9fef3e6365bc4d91094e
Parents: f84ee8d
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Sun Sep 14 17:20:06 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon Sep 15 15:32:20 2014 -0700

--
 .../slider-core/0.41.0/slider-core-0.41.0.jar   | Bin 1125710 - 0 bytes
 .../slider-core/0.41.0/slider-core-0.41.0.pom   |  25 --
 .../slider-core/0.51.0/slider-core-0.51.0.jar   | Bin 0 - 1144236 bytes
 .../slider-core/0.51.0/slider-core-0.51.0.pom   |  25 ++
 .../slider/slider-core/maven-metadata-local.xml |   6 +-
 contrib/views/slider/lib/slider-agent.tar.gz| Bin 0 - 480985 bytes
 contrib/views/slider/pom.xml|   2 +-
 .../view/slider/SliderAppsResourceProvider.java |  15 +-
 .../view/slider/SliderAppsViewController.java   |   9 +-
 .../slider/SliderAppsViewControllerImpl.java| 324 ++-
 .../view/slider/rest/SliderAppsResource.java|   2 +-
 .../ambari/view/slider/rest/client/Metric.java  |   3 +
 12 files changed, 228 insertions(+), 183 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/26cd2f4b/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.jar
--
diff --git 
a/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.jar
 
b/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.jar
deleted file mode 100644
index a6e9063..000
Binary files 
a/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.jar
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/26cd2f4b/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.pom
--
diff --git 
a/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.pom
 
b/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.pom
deleted file mode 100644
index bdd574b..000
--- 
a/contrib/views/slider/lib/org/apache/slider/slider-core/0.41.0/slider-core-0.41.0.pom
+++ /dev/null
@@ -1,25 +0,0 @@
-?xml version=1.0 encoding=UTF-8?
-!--
-   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.
---
-project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd; 
xmlns=http://maven.apache.org/POM/4.0.0;
-xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
-  modelVersion4.0.0/modelVersion
-  groupIdorg.apache.slider/groupId
-  artifactIdslider-core/artifactId
-  version0.41.0/version
-  descriptionPOM was created from install:install-file/description
-/project

http://git-wip-us.apache.org/repos/asf/ambari/blob/26cd2f4b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.jar
--
diff --git 
a/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.jar
 
b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.jar
new file mode 100644
index 000..e7d7665
Binary files /dev/null and 
b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.jar
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/26cd2f4b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.pom
--
diff --git 
a/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.pom
 
b/contrib/views/slider/lib/org/apache/slider/slider-core/0.51.0/slider-core-0.51.0.pom
new file mode 100644

[11/27] git commit: AMBARI-7289 - Views : Delete view instance causes auto sign out

2014-09-16 Thread jonathanhurley
AMBARI-7289 - Views : Delete view instance causes auto sign out


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

Branch: refs/heads/branch-alerts-dev
Commit: 002a190fc42752c5a695f29bfc5fb5e1ecbf0052
Parents: 02e9fdb
Author: tbeerbower tbeerbo...@hortonworks.com
Authored: Fri Sep 12 17:54:33 2014 -0400
Committer: tbeerbower tbeerbo...@hortonworks.com
Committed: Mon Sep 15 13:19:43 2014 -0400

--
 .../server/controller/AmbariHandlerList.java| 33 +++-
 1 file changed, 32 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/002a190f/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java
index 6a831f8..da15a66 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java
@@ -32,6 +32,7 @@ import org.apache.ambari.view.SystemException;
 import org.apache.ambari.view.ViewContext;
 import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.SessionManager;
+import org.eclipse.jetty.server.session.SessionHandler;
 import org.eclipse.jetty.servlet.FilterHolder;
 import org.eclipse.jetty.webapp.WebAppContext;
 import org.springframework.web.context.WebApplicationContext;
@@ -91,7 +92,7 @@ public class AmbariHandlerList extends FailsafeHandlerList 
implements ViewInstan
 
context.setClassLoader(viewInstanceDefinition.getViewEntity().getClassLoader());
 context.setAttribute(ViewContext.CONTEXT_ATTRIBUTE, new 
ViewContextImpl(viewInstanceDefinition, viewRegistry));
 
-context.getSessionHandler().setSessionManager(sessionManager);
+context.setSessionHandler(new SharedSessionHandler(sessionManager));
 
context.getServletContext().setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
 springWebAppContext);
 context.addFilter(new FilterHolder(springSecurityFilter), /*, 1);
 
@@ -142,6 +143,7 @@ public class AmbariHandlerList extends FailsafeHandlerList 
implements ViewInstan
   public void removeViewInstance(ViewInstanceEntity viewInstanceDefinition) {
 Handler handler = handlerMap.get(viewInstanceDefinition);
 if (handler != null) {
+  handlerMap.remove(viewInstanceDefinition);
   removeHandler(handler);
 }
   }
@@ -181,4 +183,33 @@ public class AmbariHandlerList extends FailsafeHandlerList 
implements ViewInstan
  */
 public Handler create(ViewInstanceEntity viewInstanceDefinition, String 
webApp, String contextPath);
   }
+
+
+  // - inner class : SharedSessionHandler 
+
+  /**
+   * A session handler that shares its session manager with another app.
+   * This handler DOES NOT attempt stop the shared session manager.
+   */
+  private static class SharedSessionHandler extends SessionHandler {
+
+// - Constructors 
+
+/**
+ * Construct a SharedSessionHandler.
+ *
+ * @param manager  the shared session manager.
+ */
+public SharedSessionHandler(SessionManager manager) {
+  super(manager);
+}
+
+
+// - SessionHandler --
+
+@Override
+protected void doStop() throws Exception {
+  // do nothing...
+}
+  }
 }



[23/27] git commit: AMBARI-7190 - Views: attempting to access views during extraction throws exception (reopened)

2014-09-16 Thread jonathanhurley
AMBARI-7190 - Views: attempting to access views during extraction throws 
exception (reopened)


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

Branch: refs/heads/branch-alerts-dev
Commit: a412da83c531ab4c6b0034c4dc087c5b58dff74c
Parents: 26cd2f4
Author: tbeerbower tbeerbo...@hortonworks.com
Authored: Mon Sep 15 17:58:19 2014 -0400
Committer: tbeerbower tbeerbo...@hortonworks.com
Committed: Mon Sep 15 20:34:54 2014 -0400

--
 .../apache/ambari/server/view/ViewRegistry.java |  6 +++--
 .../ambari/server/view/ViewRegistryTest.java| 23 
 2 files changed, 27 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a412da83/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index 17d77a6..8f6774e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -261,8 +261,10 @@ public class ViewRegistry {
   public ViewEntity getDefinition(ResourceTypeEntity resourceTypeEntity) {
 
 for (ViewEntity viewEntity : viewDefinitions.values()) {
-  if (viewEntity.getResourceType().equals(resourceTypeEntity)) {
-return viewEntity;
+  if (viewEntity.isDeployed()) {
+if (viewEntity.getResourceType().equals(resourceTypeEntity)) {
+  return viewEntity;
+}
   }
 }
 return null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/a412da83/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
index 8e36dba..eba0c25 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
@@ -533,6 +533,29 @@ public class ViewRegistryTest {
   }
 
   @Test
+  public void testGetDefinition() throws Exception {
+ViewEntity viewDefinition = ViewEntityTest.getViewEntity();
+
+ViewRegistry registry = ViewRegistry.getInstance();
+
+ResourceTypeEntity resourceTypeEntity = new ResourceTypeEntity();
+resourceTypeEntity.setId(10);
+resourceTypeEntity.setName(viewDefinition.getName());
+
+viewDefinition.setResourceType(resourceTypeEntity);
+
+registry.addDefinition(viewDefinition);
+
+viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYING);
+
+Assert.assertNull(registry.getDefinition(resourceTypeEntity));
+
+viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYED);
+
+Assert.assertEquals(viewDefinition, 
registry.getDefinition(resourceTypeEntity));
+  }
+
+  @Test
   public void testAddGetInstanceDefinitions() throws Exception {
 ViewEntity viewDefinition = ViewEntityTest.getViewEntity();
 ViewInstanceEntity viewInstanceDefinition = 
ViewInstanceEntityTest.getViewInstanceEntity();



[26/27] git commit: AMBARI-7328 Config versions have wrong values after switching groups. (atkach)

2014-09-16 Thread jonathanhurley
AMBARI-7328 Config versions have wrong values after switching groups. (atkach)


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

Branch: refs/heads/branch-alerts-dev
Commit: bd04a28e14171f8d64fb6b62678a0a441f444005
Parents: 127978c
Author: atkach atk...@hortonworks.com
Authored: Tue Sep 16 14:30:45 2014 +0300
Committer: atkach atk...@hortonworks.com
Committed: Tue Sep 16 14:30:45 2014 +0300

--
 .../controllers/main/service/info/configs.js| 113 +--
 ambari-web/app/utils/ajax/ajax.js   |   9 ++
 .../views/common/configs/config_history_flow.js |   2 +-
 3 files changed, 86 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bd04a28e/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 2f79685..e10a0ba 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -48,8 +48,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   preSelectedConfigVersion: null,
   // contain Service Config Property, when user proceed from Select Config 
Group dialog
   overrideToAdd: null,
-  //latest version of service config versions
-  currentVersion: null,
+  //version of default config group, configs of which currently applied
+  currentDefaultVersion: null,
   //version selected to view
   selectedVersion: null,
   // file names of changed configs
@@ -58,8 +58,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   serviceConfigVersionNote: '',
   versionLoaded: false,
   isCurrentSelected: function () {
-return this.get('selectedVersion') === this.get('currentVersion');
-  }.property('selectedVersion', 'currentVersion'),
+return App.ServiceConfigVersion.find(this.get('content.serviceName') + _ 
+ this.get('selectedVersion')).get('isCurrent');
+  }.property('selectedVersion'),
   serviceConfigs: function () {
 return App.config.get('preDefinedServiceConfigs');
   }.property('App.config.preDefinedServiceConfigs'),
@@ -179,6 +179,16 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   }.property('propertyFilters', 'isCompareMode'),
 
   /**
+   * indicate wtether service config version belongs to default config group
+   * @method isVersionDefault
+   * @param version
+   * @return {Boolean}
+   */
+  isVersionDefault: function(version) {
+return version  version.get('groupId') == -1;
+  },
+
+  /**
* clear and set properties to default value
*/
   clearStep: function () {
@@ -290,41 +300,45 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
 
   /**
* load service config versions to model
-   * set currentVersion
+   * set currentDefaultVersion
* @param data
* @param opt
* @param params
*/
   loadServiceConfigVersionsSuccess: function (data, opt, params) {
 App.serviceConfigVersionsMapper.map(data);
+this.set('currentDefaultVersion', data.items.filterProperty('group_id', 
-1).findProperty('is_current').service_config_version);
 if (this.get('preSelectedConfigVersion')) {
-  this.set('currentVersion', this.get('preSelectedConfigVersion.version'));
+  this.loadSelectedVersion(this.get('preSelectedConfigVersion.version'));
 } else {
-  this.set('currentVersion', data.items.filterProperty('group_id', 
-1).findProperty('is_current').service_config_version);
+  this.loadSelectedVersion();
 }
-this.loadSelectedVersion();
   },
 
   /**
* get selected service config version
-   * In case selected version is undefined then take currentVersion
+   * In case selected version is undefined then take currentDefaultVersion
* @param version
*/
   loadSelectedVersion: function (version) {
 var self = this;
 this.set('versionLoaded', false);
-var groupName = 
App.ServiceConfigVersion.find(this.get('content.serviceName') + _ + 
version).get('groupName');
+version = version || this.get('currentDefaultVersion');
+var versionRecord = 
App.ServiceConfigVersion.find(this.get('content.serviceName') + _ + version);
+//version of non-default group require properties from current version of 
default group to correctly display page
+var versions = (this.isVersionDefault(versionRecord)) ? [version] : 
[this.get('currentDefaultVersion'), version];
 
-if (self.get('dataIsLoaded')  !(groupName  

[04/27] git commit: AMBARI-7304 Python TestExecuteHadoopResource test failures (dsen)

2014-09-16 Thread jonathanhurley
AMBARI-7304 Python TestExecuteHadoopResource test failures (dsen)


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

Branch: refs/heads/branch-alerts-dev
Commit: 258f454191ad88c0f2ade1c40fb233e0b09b4ebf
Parents: ae0b1f3
Author: Dmytro Sen d...@hortonworks.com
Authored: Mon Sep 15 14:28:33 2014 +0300
Committer: Dmytro Sen d...@hortonworks.com
Committed: Mon Sep 15 14:32:00 2014 +0300

--
 .../TestExecuteHadoopResource.py| 37 
 1 file changed, 31 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/258f4541/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py
--
diff --git 
a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py 
b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py
index e357390..28453a5 100644
--- 
a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py
+++ 
b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py
@@ -15,6 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 '''
+import os
 
 from unittest import TestCase
 from mock.mock import patch
@@ -38,7 +39,11 @@ class TestExecuteHadoopResource(TestCase):
   self.assertEqual(execute_mock.call_count, 1)
   self.assertEqual(execute_mock.call_args[0][0].command,'hadoop --config 
conf_dir command')
   self.assertEqual(execute_mock.call_args[0][0].arguments,
-   {'logoutput': True, 'tries': 1, 'user': 'user', 
'try_sleep': 0})
+   {'logoutput': True,
+'tries': 1,
+'user': 'user',
+'try_sleep': 0,
+'environment': {'PATH': os.environ['PATH']}})
 
 
   @patch(resource_management.core.providers.system.ExecuteProvider)
@@ -58,7 +63,11 @@ class TestExecuteHadoopResource(TestCase):
   self.assertEqual(execute_mock.call_count, 1)
   self.assertEqual(execute_mock.call_args[0][0].command,'hadoop --config 
conf_dir command')
   self.assertEqual(execute_mock.call_args[0][0].arguments,
-   {'logoutput': False, 'tries': 1, 'user': 'user', 
'try_sleep': 0})
+   {'logoutput': False,
+'tries': 1,
+'user': 'user',
+'try_sleep': 0,
+'environment': {'PATH': os.environ['PATH']}})
 
 
   @patch(resource_management.core.providers.system.ExecuteProvider)
@@ -83,7 +92,11 @@ class TestExecuteHadoopResource(TestCase):
   self.assertEqual(execute_mock.call_count, 1)
   self.assertEqual(execute_mock.call_args[0][0].command,'hadoop --config 
conf_dir command')
   self.assertEqual(execute_mock.call_args[0][0].arguments,
-   {'logoutput': True, 'tries': 2, 'user': 'user', 
'try_sleep': 2})
+   {'logoutput': True,
+'tries': 2,
+'user': 'user',
+'try_sleep': 2,
+'environment': {'PATH': os.environ['PATH']}})
 
 
   @patch(resource_management.core.providers.system.ExecuteProvider)
@@ -105,9 +118,17 @@ class TestExecuteHadoopResource(TestCase):
   self.assertEqual(execute_mock.call_args_list[1][0][0].command,
'hadoop --config conf_dir command2')
   self.assertEqual(execute_mock.call_args_list[0][0][0].arguments,
-   {'logoutput': False, 'tries': 1, 'user': 'user', 
'try_sleep': 0})
+   {'logoutput': False,
+'tries': 1,
+'user': 'user',
+'try_sleep': 0,
+'environment': {'PATH': os.environ['PATH']}})
   self.assertEqual(execute_mock.call_args_list[1][0][0].arguments,
-   {'logoutput': False, 'tries': 1, 'user': 'user', 
'try_sleep': 0})
+   {'logoutput': False,
+'tries': 1,
+'user': 'user',
+'try_sleep': 0,
+'environment': {'PATH': os.environ['PATH']}})
 
 
   @patch(resource_management.core.providers.system.ExecuteProvider)
@@ -156,7 +177,11 @@ class TestExecuteHadoopResource(TestCase):
   self.assertEqual(execute_mock.call_args_list[1][0][0].command,
'hadoop --config conf_dir 

[20/27] git commit: AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)

2014-09-16 Thread jonathanhurley
AMBARI-7296. HCatalog and WebHCat services should not be managed as separate 
service (should be part of Hive service) (jaimin)


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

Branch: refs/heads/branch-alerts-dev
Commit: 601014ed8b047c676ece41016a3278c19703794f
Parents: 610bb1e
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Mon Sep 15 12:12:17 2014 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Mon Sep 15 12:12:46 2014 -0700

--
 .../ambari_agent/TestActualConfigHandler.py |   6 +-
 .../test/python/ambari_agent/TestLiveStatus.py  |   4 +-
 ambari-server/docs/api/v1/services.md   |   7 -
 .../internal/BaseBlueprintProcessor.java|   2 +-
 .../ambari/server/metadata/ActionMetadata.java  |   1 -
 .../org/apache/ambari/server/state/Service.java |   8 +-
 .../server/upgrade/UpgradeCatalog170.java   | 190 +
 .../custom_actions/validate_configs.py  |   2 -
 .../stacks/HDP/1.3.2/role_command_order.json|   4 +-
 .../services/HIVE/configuration/webhcat-env.xml |  54 
 .../HIVE/configuration/webhcat-site.xml | 156 +++
 .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 154 ++-
 .../HIVE/package/files/templetonSmoke.sh|  96 +++
 .../services/HIVE/package/scripts/params.py |  31 ++-
 .../HIVE/package/scripts/service_check.py   |   2 +
 .../HIVE/package/scripts/status_params.py   |   3 +
 .../services/HIVE/package/scripts/webhcat.py| 107 
 .../HIVE/package/scripts/webhcat_server.py  |  53 
 .../HIVE/package/scripts/webhcat_service.py |  40 +++
 .../package/scripts/webhcat_service_check.py|  42 +++
 .../HDP/1.3.2/services/NAGIOS/metainfo.xml  |   2 +-
 .../templates/hadoop-servicegroups.cfg.j2   |   6 -
 .../package/templates/hadoop-services.cfg.j2|   2 +-
 .../WEBHCAT/configuration/webhcat-env.xml   |  54 
 .../WEBHCAT/configuration/webhcat-site.xml  | 156 ---
 .../HDP/1.3.2/services/WEBHCAT/metainfo.xml | 103 ---
 .../WEBHCAT/package/files/templetonSmoke.sh |  96 ---
 .../WEBHCAT/package/scripts/__init__.py |  20 --
 .../services/WEBHCAT/package/scripts/params.py  |  78 --
 .../WEBHCAT/package/scripts/service_check.py|  44 ---
 .../WEBHCAT/package/scripts/status_params.py|  26 --
 .../services/WEBHCAT/package/scripts/webhcat.py | 107 
 .../WEBHCAT/package/scripts/webhcat_server.py   |  53 
 .../WEBHCAT/package/scripts/webhcat_service.py  |  40 ---
 .../stacks/HDP/1.3/role_command_order.json  |   4 +-
 .../stacks/HDP/1.3/services/HIVE/metainfo.xml   |   5 -
 .../stacks/HDP/2.0.6/role_command_order.json|   4 +-
 .../services/HIVE/configuration/webhcat-env.xml |  54 
 .../HIVE/configuration/webhcat-site.xml | 138 ++
 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 165 ++-
 .../HIVE/package/files/templetonSmoke.sh|  96 +++
 .../services/HIVE/package/scripts/params.py |  44 ++-
 .../HIVE/package/scripts/service_check.py   |   2 +
 .../HIVE/package/scripts/status_params.py   |   1 +
 .../services/HIVE/package/scripts/webhcat.py| 112 
 .../HIVE/package/scripts/webhcat_server.py  |  53 
 .../HIVE/package/scripts/webhcat_service.py |  40 +++
 .../package/scripts/webhcat_service_check.py|  41 +++
 .../HDP/2.0.6/services/NAGIOS/metainfo.xml  |   2 +-
 .../templates/hadoop-servicegroups.cfg.j2   |   8 +-
 .../package/templates/hadoop-services.cfg.j2|   2 +-
 .../WEBHCAT/configuration/webhcat-env.xml   |  54 
 .../WEBHCAT/configuration/webhcat-site.xml  | 138 --
 .../HDP/2.0.6/services/WEBHCAT/metainfo.xml | 110 
 .../WEBHCAT/package/files/templetonSmoke.sh |  96 ---
 .../WEBHCAT/package/scripts/__init__.py |  20 --
 .../services/WEBHCAT/package/scripts/params.py  | 102 ---
 .../WEBHCAT/package/scripts/service_check.py|  45 ---
 .../WEBHCAT/package/scripts/status_params.py|  26 --
 .../services/WEBHCAT/package/scripts/webhcat.py | 112 
 .../WEBHCAT/package/scripts/webhcat_server.py   |  53 
 .../WEBHCAT/package/scripts/webhcat_service.py  |  40 ---
 .../HDP/2.1.GlusterFS/role_command_order.json   |   4 +-
 .../2.1.GlusterFS/services/HIVE/metainfo.xml| 100 ---
 .../WEBHCAT/configuration/webhcat-site.xml  | 143 --
 .../2.1.GlusterFS/services/WEBHCAT/metainfo.xml |  46 
 .../stacks/HDP/2.1/role_command_order.json  |   3 +-
 .../stacks/HDP/2.1/services/HIVE/metainfo.xml   |  62 -
 .../WEBHCAT/configuration/webhcat-site.xml  | 143 --
 .../HDP/2.1/services/WEBHCAT/metainfo.xml   |  47 
 

[13/27] git commit: AMBARI-7313. Services not starting up after enabling security.(vbrodetskyi)

2014-09-16 Thread jonathanhurley
AMBARI-7313. Services not starting up after enabling security.(vbrodetskyi)


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

Branch: refs/heads/branch-alerts-dev
Commit: bee1d09b0e82f8dea085b227528995dcf879dd23
Parents: 66048a0
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Mon Sep 15 20:40:52 2014 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Mon Sep 15 20:40:52 2014 +0300

--
 .../1.3.2/hooks/before-START/scripts/shared_initialization.py  | 3 ++-
 .../2.0.6/hooks/before-START/scripts/shared_initialization.py  | 3 ++-
 .../stacks/1.3.2/hooks/before-START/test_before_start.py   | 6 --
 .../stacks/2.0.6/hooks/before-START/test_before_start.py   | 6 --
 4 files changed, 12 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bee1d09b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py
index 669414c..60956b0 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/shared_initialization.py
@@ -39,7 +39,8 @@ def setup_hadoop():
 Directory(params.hdfs_log_dir_prefix,
   recursive=True,
   owner='root',
-  group='root'
+  group=params.user_group,
+  mode=0775
 )
 Directory(params.hadoop_pid_dir_prefix,
   recursive=True,

http://git-wip-us.apache.org/repos/asf/ambari/blob/bee1d09b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
index 0d00aca..3c77761 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
@@ -38,7 +38,8 @@ def setup_hadoop():
 Directory(params.hdfs_log_dir_prefix,
   recursive=True,
   owner='root',
-  group='root'
+  group=params.user_group,
+  mode=0775
 )
 Directory(params.hadoop_pid_dir_prefix,
   recursive=True,

http://git-wip-us.apache.org/repos/asf/ambari/blob/bee1d09b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py
--
diff --git 
a/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py
 
b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py
index 112b3e8..d569a95 100644
--- 
a/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py
+++ 
b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py
@@ -41,7 +41,8 @@ class TestHookBeforeStart(RMFTestCase):
   )
 self.assertResourceCalled('Directory', '/var/log/hadoop',
   owner = 'root',
-  group = 'root',
+  group = 'hadoop',
+  mode = 0775,
   recursive = True,
   )
 self.assertResourceCalled('Directory', '/var/run/hadoop',
@@ -99,7 +100,8 @@ class TestHookBeforeStart(RMFTestCase):
   )
 self.assertResourceCalled('Directory', '/var/log/hadoop',
   owner = 'root',
-  group = 'root',
+  group = 'hadoop',
+  mode = 0775,
   recursive = True,
   )
 self.assertResourceCalled('Directory', '/var/run/hadoop',

http://git-wip-us.apache.org/repos/asf/ambari/blob/bee1d09b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
--
diff --git 

[08/27] git commit: AMBARI-7312. Ambari namenode UI link checks deprecated property for ssl enabled hdfs for HDP 2.1.x. (Denys Buzhor via akovalenko)

2014-09-16 Thread jonathanhurley
AMBARI-7312. Ambari namenode UI link checks deprecated property for ssl enabled 
hdfs for HDP 2.1.x. (Denys Buzhor via akovalenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 8dd0e81d8c8c3d4bfb14a0b6e6f301d74c0eac72
Parents: e3dba26
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Mon Sep 15 19:06:50 2014 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Mon Sep 15 19:09:05 2014 +0300

--
 .../services/HDFS/configuration/core-site.xml |  9 +
 .../HDP/2.0.6/services/HDFS/configuration/core-site.xml   | 10 ++
 ambari-web/app/views/common/quick_view_link_view.js   |  6 +-
 3 files changed, 24 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8dd0e81d/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml
index e335fe2..e79b146 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml
@@ -164,4 +164,13 @@ DEFAULT
 /description
   /property
 
+  property
+namedfs.http.policy/name
+valueHTTP_ONLY/value
+description
+  Decide if HTTPS(SSL) is supported on HDFS This configures the HTTP 
endpoint for HDFS daemons:
+  The following values are supported: - HTTP_ONLY : Service is provided 
only on http - HTTPS_ONLY :
+  Service is provided only on https - HTTP_AND_HTTPS : Service is provided 
both on http and https
+/description
+  /property
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/8dd0e81d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml
index 52764ac..31254b6 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml
@@ -177,4 +177,14 @@ DEFAULT
 /description
   /property
 
+  property
+namedfs.http.policy/name
+valueHTTP_ONLY/value
+description
+  Decide if HTTPS(SSL) is supported on HDFS This configures the HTTP 
endpoint for HDFS daemons:
+  The following values are supported: - HTTP_ONLY : Service is provided 
only on http - HTTPS_ONLY :
+  Service is provided only on https - HTTP_AND_HTTPS : Service is provided 
both on http and https
+/description
+  /property
+
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/8dd0e81d/ambari-web/app/views/common/quick_view_link_view.js
--
diff --git a/ambari-web/app/views/common/quick_view_link_view.js 
b/ambari-web/app/views/common/quick_view_link_view.js
index a8b8a40..0304559 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -309,7 +309,11 @@ App.QuickViewLinks = Em.View.extend({
 var hadoopSslEnabled = false;
 if (configProperties  configProperties.length  0) {
   var site = configProperties.findProperty('type', 'core-site');
-  hadoopSslEnabled = (site  site.properties  
site.properties['hadoop.ssl.enabled'] == true);
+  if (parseInt(App.get('currentStackVersionNumber')[0])  1) {
+hadoopSslEnabled = (Em.get(site, 'properties')  
site.properties['dfs.http.policy'] === 'HTTPS_ONLY');
+  } else {
+hadoopSslEnabled = (Em.get(site, 'properties')   
site.properties['hadoop.ssl.enabled'] == true);
+  }
 }
 switch (service_id) {
   case GANGLIA:



[07/27] git commit: AMBARI-7310. Error message on ambari-server removal.(vbrodetskyi)

2014-09-16 Thread jonathanhurley
AMBARI-7310. Error message on ambari-server removal.(vbrodetskyi)


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

Branch: refs/heads/branch-alerts-dev
Commit: e3dba263475ab4a29c57ed041539eebbef8f16d7
Parents: 1719a5c
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Mon Sep 15 18:38:01 2014 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Mon Sep 15 18:38:01 2014 +0300

--
 ambari-agent/src/main/package/rpm/preremove.sh  | 2 +-
 ambari-server/src/main/package/rpm/preremove.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e3dba263/ambari-agent/src/main/package/rpm/preremove.sh
--
diff --git a/ambari-agent/src/main/package/rpm/preremove.sh 
b/ambari-agent/src/main/package/rpm/preremove.sh
index 5fb9be2..2078acd 100644
--- a/ambari-agent/src/main/package/rpm/preremove.sh
+++ b/ambari-agent/src/main/package/rpm/preremove.sh
@@ -29,7 +29,7 @@ if [ $1 -eq 0 ]; then  # Action is uninstall
   /var/lib/ambari-agent/install-helper.sh remove
 fi
 
-chkconfig --del ambari-agent
+chkconfig --list | grep ambari-server  chkconfig --del ambari-server
 fi
 
 exit 0

http://git-wip-us.apache.org/repos/asf/ambari/blob/e3dba263/ambari-server/src/main/package/rpm/preremove.sh
--
diff --git a/ambari-server/src/main/package/rpm/preremove.sh 
b/ambari-server/src/main/package/rpm/preremove.sh
index 073c07f..12b69b6 100644
--- a/ambari-server/src/main/package/rpm/preremove.sh
+++ b/ambari-server/src/main/package/rpm/preremove.sh
@@ -34,7 +34,7 @@ if [ $1 -eq 0 ]; then  # Action is uninstall
   /var/lib/ambari-server/install-helper.sh remove
 fi
 
-chkconfig --del ambari-server
+chkconfig --list | grep ambari-server  chkconfig --del ambari-server
 fi
 
 exit 0



[15/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)

2014-09-16 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-web/app/data/HDP2/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index edcb322..e2cb1cf 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1564,7 +1564,7 @@ module.exports =
   name: templeton.hive.archive,
   displayName: templeton.hive.archive,
   isRequired: false,
-  serviceName: WEBHCAT,
+  serviceName: HIVE,
   category: Advanced webhcat-site
 },
 {
@@ -1572,7 +1572,7 @@ module.exports =
   name: templeton.pig.archive,
   displayName: templeton.pig.archive,
   isRequired: false,
-  serviceName: WEBHCAT,
+  serviceName: HIVE,
   category: Advanced webhcat-site
 },
 {
@@ -1580,7 +1580,7 @@ module.exports =
   name: templeton.zookeeper.hosts,
   displayName: templeton.zookeeper.hosts,
   displayType: multiLine,
-  serviceName: WEBHCAT,
+  serviceName: HIVE,
   category: Advanced webhcat-site
 },
   
/**pig.properties*/
@@ -2585,7 +2585,7 @@ module.exports =
   filename: hive-env.xml,
   category: Advanced hive-env
 },
-  
/**WEBHCAT***/
+  
/**HIVE***/
 {
   id: puppet var,
   name: webhcatserver_host,
@@ -2597,7 +2597,7 @@ module.exports =
   isOverridable: false,
   isVisible: true,
   isRequiredByAgent: false,
-  serviceName: WEBHCAT,
+  serviceName: HIVE,
   filename: webhcat-env.xml,
   category: WEBHCAT_SERVER
 },
@@ -2611,7 +2611,7 @@ module.exports =
   displayType: directory,
   isOverridable: false,
   isVisible: true,
-  serviceName: WEBHCAT,
+  serviceName: HIVE,
   filename: webhcat-env.xml,
   category: Advanced webhcat-env
 },
@@ -2625,7 +2625,7 @@ module.exports =
   displayType: directory,
   isOverridable: false,
   isVisible: true,
-  serviceName: WEBHCAT,
+  serviceName: HIVE,
   filename: webhcat-env.xml,
   category: Advanced webhcat-env
 },
@@ -3334,7 +3334,7 @@ module.exports =
   filename: core-site.xml,
   serviceName: MISC,
   category: Users and Groups,
-  belongsToService: [HIVE, WEBHCAT, OOZIE, FALCON],
+  belongsToService: [HIVE, OOZIE, FALCON],
   index: 18
 },
 {
@@ -3442,9 +3442,9 @@ module.exports =
   isOverridable: false,
   isVisible: true,
   serviceName: MISC,
-  filename: hcatalog-env.xml,
+  filename: hive-env.xml,
   category: Users and Groups,
-  belongsToService: [HCATALOG],
+  belongsToService: [HIVE],
   index: 6
 },
 {
@@ -3460,7 +3460,7 @@ module.exports =
   serviceName: MISC,
   filename: webhcat-env.xml,
   category: Users and Groups,
-  belongsToService: [WEBHCAT],
+  belongsToService: [HIVE],
   index: 7
 },
 {

http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-web/app/data/secure_configs.js
--
diff --git a/ambari-web/app/data/secure_configs.js 
b/ambari-web/app/data/secure_configs.js
index c0b4dba..c6079c8 100644
--- a/ambari-web/app/data/secure_configs.js
+++ b/ambari-web/app/data/secure_configs.js
@@ -64,20 +64,11 @@ module.exports = [
 displayName: 'Hive',
 filename: 'hive-site',
 configCategories: [
-  App.ServiceConfigCategory.create({ name: 'Hive Metastore', displayName: 
'Hive Metastore and Hive Server 2'})
-],
-sites: ['hive-site'],
-configs: configProperties.filterProperty('serviceName', 'HIVE')
-  },
-  {
-serviceName: 'WEBHCAT',
-displayName: 'WebHCat',
-filename: 'webhcat-site',
-configCategories: [
+  App.ServiceConfigCategory.create({ name: 'Hive Metastore', displayName: 
'Hive Metastore and Hive Server 2'}),
   App.ServiceConfigCategory.create({ name: 'WebHCat Server', displayName : 
'WebHCat Server'})
 ],
-sites: ['webhcat-site'],
-configs: configProperties.filterProperty('serviceName', 'WEBHCAT')
+sites: ['hive-site','webhcat-site'],
+configs: configProperties.filterProperty('serviceName', 'HIVE')
   },
   {
 serviceName: 'HBASE',

http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-web/app/data/secure_mapping.js
--
diff --git a/ambari-web/app/data/secure_mapping.js 
b/ambari-web/app/data/secure_mapping.js
index cc6cc40..c4bd6a4 100644
--- a/ambari-web/app/data/secure_mapping.js
+++ b/ambari-web/app/data/secure_mapping.js
@@ -371,7 +371,7 @@ module.exports = [
 

[25/27] git commit: AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and instances created - fixes (srimanth)

2014-09-16 Thread jonathanhurley
AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and 
instances created - fixes (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: 127978c2463d8cd8ad55d3ccee276cb350b02b9a
Parents: 63f5ed2
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Tue Sep 16 00:46:38 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Tue Sep 16 00:46:38 2014 -0700

--
 .../apache/ambari/view/slider/SliderAppsViewControllerImpl.java| 2 +-
 .../views/slider/src/main/resources/ui/app/styles/application.less | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/127978c2/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index cc35dec..04533ee 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -681,7 +681,7 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
   
   final ActionInstallPackageArgs installArgs = new 
ActionInstallPackageArgs();
   installArgs.name = appName;
-  installArgs.packageURI = getAppsFolderPath() + 
configs.get(application.def).getAsString();
+  installArgs.packageURI = getAppsFolderPath() + / + 
configs.get(application.def).getAsString();
   installArgs.replacePkg = true;
 
   return invokeSliderClientRunnable(new 
SliderClientContextRunnableString() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/127978c2/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index c193d3e..b934a20 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -38,7 +38,6 @@ a {
 
 #slider-apps-table  {
   .create-app {
-margin-top:27px;
 margin-bottom: 20px;
   }
 #slider-table {



[12/27] git commit: AMBARI-7315.Wizards: Wrong behavior on fast clicking Next button. (akovalenko)

2014-09-16 Thread jonathanhurley
AMBARI-7315.Wizards: Wrong behavior on fast clicking Next button. (akovalenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 66048a0539b2239bf2aafdaf897f5afb45f71e5d
Parents: 002a190
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Mon Sep 15 20:30:35 2014 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Mon Sep 15 20:31:53 2014 +0300

--
 .../app/controllers/wizard/step5_controller.js  | 38 
 1 file changed, 24 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/66048a05/ambari-web/app/controllers/wizard/step5_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step5_controller.js 
b/ambari-web/app/controllers/wizard/step5_controller.js
index 258e856..68342c7 100644
--- a/ambari-web/app/controllers/wizard/step5_controller.js
+++ b/ambari-web/app/controllers/wizard/step5_controller.js
@@ -92,6 +92,12 @@ App.WizardStep5Controller = 
Em.Controller.extend(App.BlueprintMixin, {
   submitDisabled: false,
 
   /**
+   * Is Submit-click processing now
+   * @type {bool}
+   */
+  submitButtonClicked: false,
+
+  /**
* Trigger for executing host names check for components
* Should de triggered when host changed for some component and when new 
multiple component is added/removed
* @type {bool}
@@ -1075,30 +1081,34 @@ App.WizardStep5Controller = 
Em.Controller.extend(App.BlueprintMixin, {
 
   /**
* Submit button click handler
-   * @metohd submit
+   * @method submit
*/
   submit: function () {
 var self = this;
+if (!this.get('submitButtonClicked')) {
+  this.set('submitButtonClicked', true);
 
-var goNextStepIfValid = function() {
-  if (!self.get('submitDisabled')) {
-App.router.send('next');
-  }
-};
+  var goNextStepIfValid = function () {
+if (!self.get('submitDisabled')) {
+  App.router.send('next');
+}
+self.set('submitButtonClicked', false);
+  };
 
-if (App.get('supports.serverRecommendValidate')) {
-  self.recommendAndValidate(function() {
-self.showValidationIssuesAcceptBox(goNextStepIfValid);
-  });
-} else {
-  self.updateIsSubmitDisabled();
-  goNextStepIfValid();
+  if (App.get('supports.serverRecommendValidate')) {
+self.recommendAndValidate(function () {
+  self.showValidationIssuesAcceptBox(goNextStepIfValid);
+});
+  } else {
+self.updateIsSubmitDisabled();
+goNextStepIfValid();
+  }
 }
   },
 
   /**
* In case of any validation issues shows accept dialog box for user which 
allow cancel and fix issues or continue anyway
-   * @metohd submit
+   * @method showValidationIssuesAcceptBox
*/
   showValidationIssuesAcceptBox: function(callback) {
 var self = this;



[05/27] git commit: AMBARI-7305 Nimbus can not be started on CentOS5.9 (dsen)

2014-09-16 Thread jonathanhurley
AMBARI-7305 Nimbus can not be started on CentOS5.9 (dsen)


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

Branch: refs/heads/branch-alerts-dev
Commit: db9b7763f5f69b4a4d03352b668b980d2576f8b3
Parents: 258f454
Author: Dmytro Sen d...@hortonworks.com
Authored: Mon Sep 15 15:28:41 2014 +0300
Committer: Dmytro Sen d...@hortonworks.com
Committed: Mon Sep 15 15:28:41 2014 +0300

--
 .../stacks/HDP/2.1/services/STORM/configuration/storm-env.xml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/db9b7763/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml
index d3804ee..c663116 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml
@@ -48,7 +48,7 @@
 # Set Storm specific environment variables here.
 
 # The java implementation to use.
-export JAVA_HOME={{java_home}}
+export JAVA_HOME={{java64_home}}
 
 # export STORM_CONF_DIR=
 /value



[21/27] git commit: AMBARI-7319. Rebalance of HDFS is not working for HDP 1.3. (jaimin)

2014-09-16 Thread jonathanhurley
AMBARI-7319. Rebalance of HDFS is not working for HDP 1.3. (jaimin)


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

Branch: refs/heads/branch-alerts-dev
Commit: f84ee8dd7985224b6481a796c6102bb56e0251e8
Parents: 601014e
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Mon Sep 15 15:31:52 2014 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Mon Sep 15 15:31:52 2014 -0700

--
 ambari-web/app/views/main/service/item.js | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f84ee8dd/ambari-web/app/views/main/service/item.js
--
diff --git a/ambari-web/app/views/main/service/item.js 
b/ambari-web/app/views/main/service/item.js
index 2dda3c0..7a388fd 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -196,7 +196,10 @@ App.MainServiceItemView = Em.View.extend({
   }
   options.push(actionMap.TOGGLE_PASSIVE);
   var serviceName = service.get('serviceName');
-  if (serviceName === 'HDFS') {
+  var nnComponent = 
App.StackServiceComponent.find().findProperty('componentName','NAMENODE');
+  if (serviceName === 'HDFS'  nnComponent) {
+var namenodeCustomCommands = nnComponent.get('customCommands');
+if (namenodeCustomCommands  
namenodeCustomCommands.contains('REBALANCEHDFS'))
 options.push(actionMap.REBALANCE_HDFS);
   }
   self.addActionMap().filterProperty('service', 
serviceName).forEach(function(item) {



[14/27] git commit: AMBARI-7314 - Views : change view status names

2014-09-16 Thread jonathanhurley
AMBARI-7314 - Views : change view status names


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

Branch: refs/heads/branch-alerts-dev
Commit: 610bb1e7644112f159b15f9fc6f4e51a3350b406
Parents: bee1d09
Author: tbeerbower tbeerbo...@hortonworks.com
Authored: Mon Sep 15 14:31:16 2014 -0400
Committer: tbeerbower tbeerbo...@hortonworks.com
Committed: Mon Sep 15 15:10:31 2014 -0400

--
 .../AmbariPrivilegeResourceProvider.java|  2 +-
 .../internal/ViewInstanceResourceProvider.java  | 10 -
 .../ViewPermissionResourceProvider.java |  4 ++--
 .../internal/ViewPrivilegeResourceProvider.java |  8 +++
 .../ambari/server/orm/entities/ViewEntity.java  |  8 +++
 .../apache/ambari/server/view/ViewRegistry.java |  4 ++--
 .../AmbariPrivilegeResourceProviderTest.java|  2 +-
 .../ViewInstanceResourceProviderTest.java   | 10 -
 .../ViewPermissionResourceProviderTest.java |  4 ++--
 .../ViewPrivilegeResourceProviderTest.java  |  2 +-
 .../server/orm/entities/ViewEntityTest.java | 22 ++--
 .../ambari/server/view/ViewRegistryTest.java|  5 ++---
 .../org/apache/ambari/view/ViewDefinition.java  |  8 +++
 13 files changed, 44 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
index 85e5906..f4839e9 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
@@ -125,7 +125,7 @@ public class AmbariPrivilegeResourceProvider extends 
PrivilegeResourceProviderO
 //add view entities
 ViewRegistry viewRegistry = ViewRegistry.getInstance();
 for (ViewEntity viewEntity : viewRegistry.getDefinitions()) {
-  if (viewEntity.isLoaded()) {
+  if (viewEntity.isDeployed()) {
 for (ViewInstanceEntity viewInstanceEntity : 
viewEntity.getInstances()) {
   resourceEntities.put(viewInstanceEntity.getResource().getId(), 
viewInstanceEntity);
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/610bb1e7/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
index 09b63a4..9a48b41 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
@@ -146,7 +146,7 @@ public class ViewInstanceResourceProvider extends 
AbstractResourceProvider {
 
   for (ViewEntity viewDefinition : viewRegistry.getDefinitions()){
 // do not report instances for views that are not loaded.
-if (viewDefinition.isLoaded()){
+if (viewDefinition.isDeployed()){
   if (viewName == null || 
viewName.equals(viewDefinition.getCommonName())) {
 for (ViewInstanceEntity viewInstanceDefinition : 
viewRegistry.getInstanceDefinitions(viewDefinition)) {
   if (instanceName == null || 
instanceName.equals(viewInstanceDefinition.getName())) {
@@ -348,8 +348,8 @@ public class ViewInstanceResourceProvider extends 
AbstractResourceProvider {
 throw new IllegalStateException(The view  + viewName +  is not 
registered.);
   }
 
-  // the view must be in the LOADED state to create an instance
-  if (!view.isLoaded()) {
+  // the view must be in the DEPLOYED state to create an instance
+  if (!view.isDeployed()) {
 throw new IllegalStateException(The view  + viewName +  is not 
loaded.);
   }
 
@@ -393,8 +393,8 @@ public class ViewInstanceResourceProvider extends 
AbstractResourceProvider {
 SetViewInstanceEntity viewInstanceEntities = new 
HashSetViewInstanceEntity();
 
 for (ViewEntity viewEntity : viewRegistry.getDefinitions()){
-  

[18/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)

2014-09-16 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py
deleted file mode 100644
index c56ae5f..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py
+++ /dev/null
@@ -1,112 +0,0 @@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-License); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an AS IS BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Ambari Agent
-
-
-from resource_management import *
-import sys
-
-
-def webhcat():
-  import params
-
-  params.HdfsDirectory(params.webhcat_apps_dir,
-   action=create_delayed,
-   owner=params.webhcat_user,
-   mode=0755
-  )
-  if params.hcat_hdfs_user_dir != params.webhcat_hdfs_user_dir:
-params.HdfsDirectory(params.hcat_hdfs_user_dir,
- action=create_delayed,
- owner=params.hcat_user,
- mode=params.hcat_hdfs_user_mode
-)
-  params.HdfsDirectory(params.webhcat_hdfs_user_dir,
-   action=create_delayed,
-   owner=params.webhcat_user,
-   mode=params.webhcat_hdfs_user_mode
-  )
-  params.HdfsDirectory(None, action=create)
-
-  Directory(params.templeton_pid_dir,
-owner=params.webhcat_user,
-mode=0755,
-group=params.user_group,
-recursive=True)
-
-  Directory(params.templeton_log_dir,
-owner=params.webhcat_user,
-mode=0755,
-group=params.user_group,
-recursive=True)
-
-  Directory(params.config_dir,
-owner=params.webhcat_user,
-group=params.user_group)
-
-  XmlConfig(webhcat-site.xml,
-conf_dir=params.config_dir,
-configurations=params.config['configurations']['webhcat-site'],
-
configuration_attributes=params.config['configuration_attributes']['webhcat-site'],
-owner=params.webhcat_user,
-group=params.user_group,
-  )
-
-  File(format({config_dir}/webhcat-env.sh),
-   owner=params.webhcat_user,
-   group=params.user_group,
-   content=InlineTemplate(params.webhcat_env_sh_template)
-  )
-
-  if params.security_enabled:
-kinit_if_needed = format({kinit_path_local} -kt {hdfs_user_keytab} 
{hdfs_principal_name};)
-  else:
-kinit_if_needed = 
-
-  if kinit_if_needed:
-Execute(kinit_if_needed,
-user=params.webhcat_user,
-path='/bin'
-)
-
-  CopyFromLocal(params.hadoop_streeming_jars,
-owner=params.webhcat_user,
-mode=0755,
-dest_dir=params.webhcat_apps_dir,
-kinnit_if_needed=kinit_if_needed,
-hdfs_user=params.hdfs_user,
-hadoop_conf_dir=params.hadoop_conf_dir
-  )
-
-  CopyFromLocal('/usr/share/HDP-webhcat/pig.tar.gz',
-owner=params.webhcat_user,
-mode=0755,
-dest_dir=params.webhcat_apps_dir,
-kinnit_if_needed=kinit_if_needed,
-hdfs_user=params.hdfs_user,
-hadoop_conf_dir=params.hadoop_conf_dir
-  )
-
-  CopyFromLocal('/usr/share/HDP-webhcat/hive.tar.gz',
-owner=params.webhcat_user,
-mode=0755,
-dest_dir=params.webhcat_apps_dir,
-kinnit_if_needed=kinit_if_needed,
-hdfs_user=params.hdfs_user,
-hadoop_conf_dir=params.hadoop_conf_dir
-  )

http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py
deleted file mode 100644
index 2111fa4..000
--- 

[27/27] git commit: Merge branch 'trunk' into branch-alerts-dev

2014-09-16 Thread jonathanhurley
Merge branch 'trunk' into branch-alerts-dev

Conflicts:

ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java

ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java


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

Branch: refs/heads/branch-alerts-dev
Commit: 17b8e799048b96c7fb1074a21c52e2e7ecaaf607
Parents: 760bedf bd04a28
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Tue Sep 16 08:50:14 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Tue Sep 16 08:50:14 2014 -0400

--
 .../ui/admin-web/app/views/leftNavbar.html  |   2 +-
 ambari-agent/src/main/package/rpm/preremove.sh  |   2 +-
 .../ambari_agent/TestActualConfigHandler.py |   6 +-
 .../test/python/ambari_agent/TestLiveStatus.py  |   4 +-
 .../TestExecuteHadoopResource.py|  37 ++-
 ambari-server/docs/api/v1/services.md   |   7 -
 .../stackadvisor/StackAdvisorRunner.java|  10 +-
 .../server/controller/AmbariHandlerList.java|  33 +-
 .../AmbariPrivilegeResourceProvider.java|   2 +-
 .../internal/BaseBlueprintProcessor.java|   2 +-
 .../BlueprintConfigurationProcessor.java|  30 +-
 .../RecommendationResourceProvider.java |   6 +-
 .../internal/ValidationResourceProvider.java|   6 +-
 .../internal/ViewInstanceResourceProvider.java  |  10 +-
 .../ViewPermissionResourceProvider.java |   4 +-
 .../internal/ViewPrivilegeResourceProvider.java |   8 +-
 .../ambari/server/metadata/ActionMetadata.java  |   1 -
 .../ambari/server/orm/entities/ViewEntity.java  |   8 +-
 .../org/apache/ambari/server/state/Service.java |   8 +-
 .../server/upgrade/UpgradeCatalog170.java   | 142 +++-
 .../apache/ambari/server/view/ViewRegistry.java |  10 +-
 ambari-server/src/main/package/rpm/preremove.sh |   2 +-
 .../custom_actions/validate_configs.py  |   2 -
 .../scripts/shared_initialization.py|   3 +-
 .../stacks/HDP/1.3.2/role_command_order.json|   4 +-
 .../services/HIVE/configuration/webhcat-env.xml |  54 +++
 .../HIVE/configuration/webhcat-site.xml | 156 +
 .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 154 +
 .../HIVE/package/files/templetonSmoke.sh|  96 ++
 .../services/HIVE/package/scripts/params.py |  31 +-
 .../HIVE/package/scripts/service_check.py   |   2 +
 .../HIVE/package/scripts/status_params.py   |   3 +
 .../services/HIVE/package/scripts/webhcat.py| 107 ++
 .../HIVE/package/scripts/webhcat_server.py  |  53 +++
 .../HIVE/package/scripts/webhcat_service.py |  40 +++
 .../package/scripts/webhcat_service_check.py|  42 +++
 .../HDP/1.3.2/services/NAGIOS/metainfo.xml  |   2 +-
 .../templates/hadoop-servicegroups.cfg.j2   |   6 -
 .../package/templates/hadoop-services.cfg.j2|   2 +-
 .../WEBHCAT/configuration/webhcat-env.xml   |  54 ---
 .../WEBHCAT/configuration/webhcat-site.xml  | 156 -
 .../HDP/1.3.2/services/WEBHCAT/metainfo.xml | 103 --
 .../WEBHCAT/package/files/templetonSmoke.sh |  96 --
 .../WEBHCAT/package/scripts/__init__.py |  20 --
 .../services/WEBHCAT/package/scripts/params.py  |  78 -
 .../WEBHCAT/package/scripts/service_check.py|  44 ---
 .../WEBHCAT/package/scripts/status_params.py|  26 --
 .../services/WEBHCAT/package/scripts/webhcat.py | 107 --
 .../WEBHCAT/package/scripts/webhcat_server.py   |  53 ---
 .../WEBHCAT/package/scripts/webhcat_service.py  |  40 ---
 .../stacks/HDP/1.3/role_command_order.json  |   4 +-
 .../stacks/HDP/1.3/services/HIVE/metainfo.xml   |   5 -
 .../services/HDFS/configuration/core-site.xml   |   9 +
 .../scripts/shared_initialization.py|   3 +-
 .../stacks/HDP/2.0.6/role_command_order.json|   4 +-
 .../services/HDFS/configuration/core-site.xml   |  10 +
 .../services/HIVE/configuration/webhcat-env.xml |  54 +++
 .../HIVE/configuration/webhcat-site.xml | 138 
 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 165 +-
 .../HIVE/package/files/templetonSmoke.sh|  96 ++
 .../services/HIVE/package/scripts/params.py |  44 ++-
 .../HIVE/package/scripts/service_check.py   |   2 +
 .../HIVE/package/scripts/status_params.py   |   1 +
 .../services/HIVE/package/scripts/webhcat.py| 112 +++
 .../HIVE/package/scripts/webhcat_server.py  |  53 +++
 .../HIVE/package/scripts/webhcat_service.py |  40 +++
 .../package/scripts/webhcat_service_check.py|  41 +++
 .../HDP/2.0.6/services/NAGIOS/metainfo.xml  |   2 +-
 .../templates/hadoop-servicegroups.cfg.j2   |   8 +-
 

[16/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)

2014-09-16 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-web/app/assets/data/alerts/alerts.json
--
diff --git a/ambari-web/app/assets/data/alerts/alerts.json 
b/ambari-web/app/assets/data/alerts/alerts.json
index bcf804f..4ce39ea 100644
--- a/ambari-web/app/assets/data/alerts/alerts.json
+++ b/ambari-web/app/assets/data/alerts/alerts.json
@@ -5,7 +5,7 @@
   href : 
http://ec2-54-234-53-225.compute-1.amazonaws.com:8080/api/v1/clusters/test/hosts/ip-10-191-202-42.ec2.internal/host_components/NAGIOS_SERVER;,
   HostRoles : {
 cluster_name : test,
-nagios_alerts : {alerts:[{service_description:Ganglia [gmetad] 
Process 
down,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:1,plugin_output:TCP
 OK - 0.004 second response time on port 
8651,last_hard_state_change:1359058506,last_hard_state:0,last_time_ok:1359072006,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072006,service_type:GANGLIA},{service_description:Ganglia
 collector [gmond] Process down alert for 
hbasemaster,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:TCP
 OK - 0.009 second response time on port 
8663,last_hard_state_change:1359058517,last_hard_state:0,last_time_ok:1359072002,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072002,service_type:GANGLIA},{service_description:Ganglia
 collector [gmond] P
 rocess down alert for 
jobtracker,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:TCP
 OK - 0.009 second response time on port 
8662,last_hard_state_change:1359058528,last_hard_state:0,last_time_ok:1359072013,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072013,service_type:GANGLIA},{service_description:Ganglia
 collector [gmond] Process down alert for 
namenode,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:TCP
 OK - 0.004 second response time on port 
8661,last_hard_state_change:1359058540,last_hard_state:0,last_time_ok:1359072010,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072010,service_type:GANGLIA},{service_description:Ganglia
 collector [gmond] Process down alert for 
slaves,host_name:ip-10-191-202-42.e
 c2.internal,current_attempt:1,current_state:0,plugin_output:TCP OK 
- 0.009 second response time on port 
8660,last_hard_state_change:1359058551,last_hard_state:0,last_time_ok:1359072006,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072006,service_type:GANGLIA},{service_description:Percent
 region servers 
down,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:OK:
 total:lt;1gt;, 
affected:lt;0gt;,last_hard_state_change:1359058802,last_hard_state:0,last_time_ok:1359072002,last_time_warning:0,last_time_unknown:0,last_time_critical:1359058772,is_flapping:0,last_check:1359072002,service_type:HBASE},{service_description:HBase
 Web UI 
down,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:OK:
 Successfully accessed hbase Web UI,last_hard_state_change
 
:1359058574,last_hard_state:0,last_time_ok:1359072014,last_time_warning:1359058634,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072014,service_type:HBASE},{service_description:HBaseMaster
 CPU 
utilization,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:2
 CPU, average load 14.0% lt; 200% : 
OK,last_hard_state_change:1359058585,last_hard_state:0,last_time_ok:1359071785,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359071785,service_type:HBASE},{service_description:HBaseMaster
 Process 
down,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:TCP
 OK - 0.000 second response time on port 
6,last_hard_state_change:1359058596,last_hard_state:0,last_time_ok:1359071991,last_time_warning:0,last_time_unknown:0,last_time_crit
 
ical:1359058626,is_flapping:0,last_check:1359071991,service_type:HBASE},{service_description:Corrupt\\/Missing
 
blocks,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:OK:
 corrupt_blocks:lt;0gt;, missing_blocks:lt;0gt;, 
total_blocks:lt;249gt;,last_hard_state_change:1359058509,last_hard_state:0,last_time_ok:1359071949,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359071949,service_type:HDFS},{service_description:HDFS
 Capacity 
utilization,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:OK:
 DFSUsedGB:lt;0.1gt;, 

[10/27] git commit: AMBARI-7312. Ambari namenode UI link checks deprecated property for ssl enabled hdfs for HDP 2.1.x. Additional path. (Denys Buzhor via akovalenko)

2014-09-16 Thread jonathanhurley
AMBARI-7312. Ambari namenode UI link checks deprecated property for ssl enabled 
hdfs for HDP 2.1.x. Additional path. (Denys Buzhor via akovalenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 02e9fdbc1941c8ce5e2a5c373f86b68ac0d6b34d
Parents: 007288a
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Mon Sep 15 19:31:07 2014 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Mon Sep 15 19:33:51 2014 +0300

--
 ambari-web/app/views/common/quick_view_link_view.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/02e9fdbc/ambari-web/app/views/common/quick_view_link_view.js
--
diff --git a/ambari-web/app/views/common/quick_view_link_view.js 
b/ambari-web/app/views/common/quick_view_link_view.js
index 0304559..f941100 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -309,7 +309,7 @@ App.QuickViewLinks = Em.View.extend({
 var hadoopSslEnabled = false;
 if (configProperties  configProperties.length  0) {
   var site = configProperties.findProperty('type', 'core-site');
-  if (parseInt(App.get('currentStackVersionNumber')[0])  1) {
+  if (App.get('isHadoop2Stack')) {
 hadoopSslEnabled = (Em.get(site, 'properties')  
site.properties['dfs.http.policy'] === 'HTTPS_ONLY');
   } else {
 hadoopSslEnabled = (Em.get(site, 'properties')   
site.properties['hadoop.ssl.enabled'] == true);



[09/27] git commit: AMBARI-7307 Use fixed URL for repo for versioned RPMs. (dsen)

2014-09-16 Thread jonathanhurley
AMBARI-7307 Use fixed URL for repo for versioned RPMs. (dsen)


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

Branch: refs/heads/branch-alerts-dev
Commit: 007288a24bb3720117552d60a82beef7c6831263
Parents: 8dd0e81
Author: Dmytro Sen d...@hortonworks.com
Authored: Mon Sep 15 19:26:54 2014 +0300
Committer: Dmytro Sen d...@hortonworks.com
Committed: Mon Sep 15 19:26:54 2014 +0300

--
 .../services/OOZIE/package/scripts/params.py|  3 +-
 .../services/SQOOP/package/scripts/params.py| 12 --
 .../services/FALCON/package/scripts/params.py   |  9 +++--
 .../resources/stacks/HDP/2.2/repos/repoinfo.xml | 27 +++---
 .../stacks/HDP/2.2/services/FALCON/metainfo.xml | 12 +-
 .../stacks/HDP/2.2/services/FLUME/metainfo.xml  |  2 +-
 .../stacks/HDP/2.2/services/HBASE/metainfo.xml  |  2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |  2 +-
 .../services/HDFS/configuration/hdfs-site.xml   |  2 +-
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   |  4 +-
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   | 39 +++-
 .../services/OOZIE/configuration/oozie-site.xml |  2 +-
 .../stacks/HDP/2.2/services/OOZIE/metainfo.xml  | 27 +-
 .../stacks/HDP/2.2/services/PIG/metainfo.xml|  5 +--
 .../stacks/HDP/2.2/services/SQOOP/metainfo.xml  | 15 +++-
 .../stacks/HDP/2.2/services/STORM/metainfo.xml  | 12 +-
 .../stacks/HDP/2.2/services/TEZ/metainfo.xml|  2 +-
 .../WEBHCAT/configuration/webhcat-site.xml  | 10 ++---
 .../HDP/2.2/services/WEBHCAT/metainfo.xml   |  2 +-
 .../YARN/configuration-mapred/mapred-site.xml   |  2 +-
 .../services/YARN/configuration/yarn-site.xml   |  2 +-
 .../stacks/HDP/2.2/services/YARN/metainfo.xml   |  6 +--
 .../HDP/2.2/services/ZOOKEEPER/metainfo.xml |  2 +-
 23 files changed, 143 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/007288a2/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
index ac26ede..4bce882 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
@@ -34,15 +34,16 @@ if rpm_version is not None:
   hadoop_bin_dir = format(/usr/hdp/{rpm_version}/hadoop/bin)
   hadoop_lib_home = format(/usr/hdp/{rpm_version}/hadoop/lib)
   mapreduce_libs_path = format(/usr/hdp/{rpm_version}/hadoop-mapreduce/*)
+  conf_dir = format(/usr/hdp/{rpm_version}/oozie/conf)
 else:
   hadoop_conf_dir = /etc/hadoop/conf
   hadoop_bin_dir = /usr/bin
   hadoop_lib_home = /usr/lib/hadoop/lib
   mapreduce_libs_path = /usr/lib/hadoop-mapreduce/*
+  conf_dir = /etc/oozie/conf
 
 oozie_user = config['configurations']['oozie-env']['oozie_user']
 smokeuser = config['configurations']['cluster-env']['smokeuser']
-conf_dir = /etc/oozie/conf
 user_group = config['configurations']['cluster-env']['user_group']
 jdk_location = config['hostLevelParams']['jdk_location']
 check_db_connection_jar_name = DBConnectionVerification.jar

http://git-wip-us.apache.org/repos/asf/ambari/blob/007288a2/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
index 9170fdc..5784f9d 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
@@ -27,18 +27,22 @@ rpm_version = 
default(/configurations/hadoop-env/rpm_version, None)
 #hadoop params
 if rpm_version is not None:
   zoo_conf_dir = format('/usr/hdp/{rpm_version}/etc/zookeeper')
+  sqoop_conf_dir = format('/usr/hdp/{rpm_version}/sqoop/conf')
+  sqoop_lib = format('/usr/hdp/{rpm_version}/sqoop/lib')
+  hbase_home = format('/usr/hdp/{rpm_version}/hbase')
+  hive_home = format('/usr/hdp/{rpm_version}/hive')
 else:
   zoo_conf_dir = /etc/zookeeper
+  sqoop_conf_dir = /usr/lib/sqoop/conf
+  sqoop_lib = /usr/lib/sqoop/lib
+  hbase_home = /usr
+  hive_home = /usr
 
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 smokeuser 

[06/27] git commit: AMBARI-7266. Properly replace host names in Falcon properties during BP deployment.

2014-09-16 Thread jonathanhurley
AMBARI-7266.  Properly replace host names in Falcon properties during BP 
deployment.


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

Branch: refs/heads/branch-alerts-dev
Commit: 1719a5ce20ebc4f0b109e9c9e2ff1ba23c23e58a
Parents: db9b776
Author: Robert Nettleton rnettle...@hortonworks.com
Authored: Mon Sep 15 10:05:27 2014 -0400
Committer: John Speidel jspei...@hortonworks.com
Committed: Mon Sep 15 10:05:27 2014 -0400

--
 .../BlueprintConfigurationProcessor.java| 30 +++-
 .../BlueprintConfigurationProcessorTest.java| 21 ++
 2 files changed, 50 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1719a5ce/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 c246f83..c31a869 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
@@ -274,6 +274,17 @@ public class BlueprintConfigurationProcessor {
 return hosts;
   }
 
+
+  /**
+   * Provides package-level access to the map of single host topology updaters.
+   * This is useful for facilitating unit-testing of this class.
+   *
+   * @return the map of single host topology updaters
+   */
+  static MapString, MapString, PropertyUpdater 
getSingleHostTopologyUpdaters() {
+return singleHostTopologyUpdaters;
+  }
+
   /**
* Provides functionality to update a property value.
*/
@@ -296,7 +307,7 @@ public class BlueprintConfigurationProcessor {
* Topology based updater which replaces the original host name of a 
property with the host name
* which runs the associated (master) component in the new cluster.
*/
-  private static class SingleHostTopologyUpdater implements PropertyUpdater {
+  static class SingleHostTopologyUpdater implements PropertyUpdater {
 /**
  * Component name
  */
@@ -341,6 +352,16 @@ public class BlueprintConfigurationProcessor {
 }
   }
 }
+
+/**
+ * Provides access to the name of the component associated
+ *   with this updater instance.
+ *
+ * @return component name for this updater
+ */
+public String getComponentName() {
+  return this.component;
+}
   }
 
   /**
@@ -603,6 +624,8 @@ public class BlueprintConfigurationProcessor {
 MapString, PropertyUpdater hiveSiteMap = new HashMapString, 
PropertyUpdater();
 MapString, PropertyUpdater oozieSiteMap = new HashMapString, 
PropertyUpdater();
 MapString, PropertyUpdater stormSiteMap = new HashMapString, 
PropertyUpdater();
+MapString, PropertyUpdater falconStartupPropertiesMap = new 
HashMapString, PropertyUpdater();
+
 
 MapString, PropertyUpdater mapredEnvMap = new HashMapString, 
PropertyUpdater();
 MapString, PropertyUpdater hadoopEnvMap = new HashMapString, 
PropertyUpdater();
@@ -623,6 +646,7 @@ public class BlueprintConfigurationProcessor {
 singleHostTopologyUpdaters.put(hive-site, hiveSiteMap);
 singleHostTopologyUpdaters.put(oozie-site, oozieSiteMap);
 singleHostTopologyUpdaters.put(storm-site, stormSiteMap);
+singleHostTopologyUpdaters.put(falcon-startup.properties, 
falconStartupPropertiesMap);
 
 mPropertyUpdaters.put(hadoop-env, hadoopEnvMap);
 mPropertyUpdaters.put(hbase-env, hbaseEnvMap);
@@ -686,6 +710,10 @@ public class BlueprintConfigurationProcessor {
 multiStormSiteMap.put(storm.zookeeper.servers,
 new YamlMultiValuePropertyDecorator(new 
MultipleHostTopologyUpdater(ZOOKEEPER_SERVER)));
 
+// FALCON
+falconStartupPropertiesMap.put(*.broker.url, new 
SingleHostTopologyUpdater(FALCON_SERVER));
+
+
 // Required due to AMBARI-4933.  These no longer seem to be required as 
the default values in the stack
 // are now correct but are left here in case an existing blueprint still 
contains an old value.
 hadoopEnvMap.put(namenode_heapsize, new MPropertyUpdater());

http://git-wip-us.apache.org/repos/asf/ambari/blob/1719a5ce/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
--
diff --git 

[24/27] git commit: AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and instances created (srimanth)

2014-09-16 Thread jonathanhurley
AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and 
instances created (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: 63f5ed2cc25f495cf216a350b32f45132adc0725
Parents: a412da8
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Mon Sep 15 20:48:07 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon Sep 15 20:48:12 2014 -0700

--
 contrib/views/slider/pom.xml | 8 
 .../ambari/view/slider/SliderAppsViewControllerImpl.java | 7 +++
 .../slider/src/main/resources/ui/app/models/slider_app.js| 2 +-
 3 files changed, 16 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/63f5ed2c/contrib/views/slider/pom.xml
--
diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml
index cfb0abc..82d27bb 100644
--- a/contrib/views/slider/pom.xml
+++ b/contrib/views/slider/pom.xml
@@ -549,6 +549,14 @@
filteringfalse/filtering
directorytarget/lib/directory
/resource
+   resource
+   targetPathWEB-INF/lib/targetPath
+   filteringtrue/filtering
+   directorylib/directory
+   includes
+   includeslider-agent.tar.gz/include
+   /includes
+   /resource
/resources
pluginManagement
plugins

http://git-wip-us.apache.org/repos/asf/ambari/blob/63f5ed2c/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index c4871f2..cc35dec 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -57,6 +57,7 @@ import org.apache.slider.client.SliderClient;
 import org.apache.slider.common.SliderKeys;
 import org.apache.slider.common.params.ActionCreateArgs;
 import org.apache.slider.common.params.ActionFreezeArgs;
+import org.apache.slider.common.params.ActionInstallPackageArgs;
 import org.apache.slider.common.params.ActionThawArgs;
 import org.apache.slider.common.tools.SliderFileSystem;
 import org.apache.slider.core.exceptions.SliderException;
@@ -678,9 +679,15 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
   createArgs.image = new Path(hdfsLocation
   + /user/yarn/agent/slider-agent.tar.gz);
   
+  final ActionInstallPackageArgs installArgs = new 
ActionInstallPackageArgs();
+  installArgs.name = appName;
+  installArgs.packageURI = getAppsFolderPath() + 
configs.get(application.def).getAsString();
+  installArgs.replacePkg = true;
+
   return invokeSliderClientRunnable(new 
SliderClientContextRunnableString() {
 @Override
 public String run(SliderClient sliderClient) throws YarnException, 
IOException, InterruptedException {
+  sliderClient.actionInstallPkg(installArgs);
   sliderClient.actionCreate(appName, createArgs);
   ApplicationId applicationId = sliderClient.applicationId;
   if (applicationId != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/63f5ed2c/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js 
b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
index 3710877..7408911 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
@@ -114,7 +114,7 @@ App.SliderApp = DS.Model.extend({
   showMetrics: function() {
 var global = this.get('configs')['global'];
 //check whether slider has GANGLIA configured if not metrics should be 
hidden
-if (!(global['ganglia_server_host']  global['ganglia_server_id']  
global['ganglia_server_port'])) {
+if 

[01/27] git commit: AMBARI-7290. Usability: show 'Restart Required' bar on Summary tab.(xiwang)

2014-09-16 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev 760bedfe3 - 17b8e7990


AMBARI-7290. Usability: show 'Restart Required' bar on Summary tab.(xiwang)


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

Branch: refs/heads/branch-alerts-dev
Commit: 1dcb9dc62e59f5320940dcc3188398d15b706d33
Parents: 3355733
Author: Xi Wang xiw...@apache.org
Authored: Fri Sep 12 17:28:47 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Fri Sep 12 17:28:54 2014 -0700

--
 .../controllers/main/service/info/configs.js|  9 +--
 ambari-web/app/styles/application.less  | 14 +
 .../app/templates/main/service/info/configs.hbs |  2 +-
 .../app/templates/main/service/info/summary.hbs | 26 +++-
 .../app/views/main/service/info/summary.js  | 62 
 5 files changed, 107 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1dcb9dc6/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 2280d01..cea4630 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -2328,9 +2328,10 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
* trigger showItemsShouldBeRestarted popup with hosts that requires resetart
* @method showHostsShouldBeRestarted
*/
-  showHostsShouldBeRestarted: function () {
+  showHostsShouldBeRestarted: function (restartRequiredHostsAndComponents) {
 var hosts = [];
-for (var hostName in 
this.get('content.restartRequiredHostsAndComponents')) {
+var rhc = this.get('content.restartRequiredHostsAndComponents') || 
restartRequiredHostsAndComponents;
+for (var hostName in rhc) {
   hosts.push(hostName);
 }
 var hostsText = hosts.length == 1 ? Em.I18n.t('common.host') : 
Em.I18n.t('common.hosts');
@@ -2342,8 +2343,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
* trigger showItemsShouldBeRestarted popup with components that requires 
resetart
* @method showComponentsShouldBeRestarted
*/
-  showComponentsShouldBeRestarted: function () {
-var rhc = this.get('content.restartRequiredHostsAndComponents');
+  showComponentsShouldBeRestarted: function 
(restartRequiredHostsAndComponents) {
+var rhc = this.get('content.restartRequiredHostsAndComponents') || 
restartRequiredHostsAndComponents;
 var hostsComponets = [];
 var componentsObject = {};
 for (var hostName in rhc) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1dcb9dc6/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index e4b455e..7a4138c 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -1066,6 +1066,19 @@ h1 {
   padding: 8px 0;
 }
 
+#summary-restart-bar {
+  margin-top: 20px;
+  .alert{
+.icon-refresh{
+  margin-left:10px;
+  color: #fdb82f;
+}
+  }
+  .dropdown-menu  li  a:hover {
+text-shadow: none;
+  }
+}
+
 #serviceConfig {
   margin-top: 20px;
   .alert{
@@ -5597,6 +5610,7 @@ ul.inline li {
 width:757px!important
   }
 
+
   .assign-masters {
 .host-assignments {
   margin-left: 0;

http://git-wip-us.apache.org/repos/asf/ambari/blob/1dcb9dc6/ambari-web/app/templates/main/service/info/configs.hbs
--
diff --git a/ambari-web/app/templates/main/service/info/configs.hbs 
b/ambari-web/app/templates/main/service/info/configs.hbs
index 5335bca..b4ec65c 100644
--- a/ambari-web/app/templates/main/service/info/configs.hbs
+++ b/ambari-web/app/templates/main/service/info/configs.hbs
@@ -23,7 +23,7 @@
 {{#if App.isAdmin}}
   div
 div class=alert alert-warning clearfix
-  i class=icon-refresh/i {{{view.needToRestartMessage}}} {{t 
services.service.config.restartService.needToRestart}}  a href=# {{action 
showComponentsShouldBeRestarted target=controller}}{{view.componentsCount}} 
{{pluralize view.componentsCount singular=t:common.component 
plural=t:common.components}}/a {{t on}} a href=# {{action 
showHostsShouldBeRestarted target=controller}}{{view.hostsCount}} 
{{pluralize view.hostsCount singular=t:common.host 
plural=t:common.hosts}}/a
+  i class=icon-refresh/i 

[19/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)

2014-09-16 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
deleted file mode 100644
index 174c92c..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
+++ /dev/null
@@ -1,78 +0,0 @@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-License); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an AS IS BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Ambari Agent
-
-
-
-from resource_management import *
-import status_params
-
-# server configurations
-config = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-
-hcat_user = config['configurations']['hive-env']['hcat_user']
-webhcat_user = config['configurations']['hive-env']['webhcat_user']
-webhcat_env_sh_template = config['configurations']['webhcat-env']['content']
-
-config_dir = '/etc/hcatalog/conf'
-
-templeton_log_dir = config['configurations']['hive-env']['hcat_log_dir']
-templeton_pid_dir = status_params.templeton_pid_dir
-
-pid_file = status_params.pid_file
-
-hadoop_conf_dir = 
config['configurations']['webhcat-site']['templeton.hadoop.conf.dir']
-templeton_jar = config['configurations']['webhcat-site']['templeton.jar']
-
-hadoop_home = '/usr'
-user_group = config['configurations']['cluster-env']['user_group']
-
-webhcat_server_host = config['clusterHostInfo']['webhcat_server_host']
-
-webhcat_apps_dir = /apps/webhcat
-smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
-smokeuser = config['configurations']['cluster-env']['smokeuser']
-security_enabled = config['configurations']['cluster-env']['security_enabled']
-kinit_path_local = functions.get_kinit_path([/usr/bin, /usr/kerberos/bin, 
/usr/sbin])
-
-#hdfs directories
-webhcat_apps_dir = /apps/webhcat
-hcat_hdfs_user_dir = format(/user/{hcat_user})
-hcat_hdfs_user_mode = 0755
-webhcat_hdfs_user_dir = format(/user/{webhcat_user})
-webhcat_hdfs_user_mode = 0755
-#for create_hdfs_directory
-hostname = config[hostname]
-security_param = true if security_enabled else false
-hadoop_conf_dir = /etc/hadoop/conf
-hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
-hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
-hdfs_principal_name = 
config['configurations']['hadoop-env']['hdfs_principal_name']
-kinit_path_local = functions.get_kinit_path([/usr/bin, /usr/kerberos/bin, 
/usr/sbin])
-import functools
-#create partial functions with common arguments for every HdfsDirectory call
-#to create hdfs directory we need to call params.HdfsDirectory in code
-HdfsDirectory = functools.partial(
-  HdfsDirectory,
-  conf_dir=hadoop_conf_dir,
-  hdfs_user=hdfs_user,
-  security_enabled = security_enabled,
-  keytab = hdfs_user_keytab,
-  kinit_path_local = kinit_path_local
-)

http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
deleted file mode 100644
index b6101ac..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
+++ /dev/null
@@ -1,44 +0,0 @@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-License); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an AS IS BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 

[17/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)

2014-09-16 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_webhcat_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_webhcat_server.py 
b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_webhcat_server.py
new file mode 100644
index 000..75496c2
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_webhcat_server.py
@@ -0,0 +1,258 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+License); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an AS IS BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+from mock.mock import MagicMock, patch
+from stacks.utils.RMFTestCase import *
+
+class TestWebHCatServer(RMFTestCase):
+
+  def test_configure_default(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = configure,
+   config_file=default.json
+)
+self.assert_configure_default()
+self.assertNoMoreResources()
+
+  def test_start_default(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = start,
+   config_file=default.json
+)
+
+self.assert_configure_default()
+self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
/usr/lib/hcatalog/sbin/webhcat_server.sh start',
+  not_if = 'ls /var/run/webhcat/webhcat.pid 
/dev/null 21  ps `cat /var/run/webhcat/webhcat.pid` /dev/null 21',
+  user = 'hcat'
+)
+self.assertNoMoreResources()
+
+  def test_stop_default(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = stop,
+   config_file=default.json
+)
+
+self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
/usr/lib/hcatalog/sbin/webhcat_server.sh stop',
+  user = 'hcat',
+  )
+self.assertResourceCalled('Execute', 'rm -f /var/run/webhcat/webhcat.pid')
+self.assertNoMoreResources()
+
+def test_configure_secured(self):
+  
self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+ classname = WebHCatServer,
+ command = configure,
+ config_file=secured.json
+  )
+
+  self.assert_configure_secured()
+  self.assertNoMoreResources()
+
+  def test_start_secured(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = start,
+   config_file=secured.json
+)
+
+self.assert_configure_secured()
+self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
/usr/lib/hcatalog/sbin/webhcat_server.sh start',
+  not_if = 'ls /var/run/webhcat/webhcat.pid 
/dev/null 21  ps `cat /var/run/webhcat/webhcat.pid` /dev/null 21',
+  user = 'hcat'
+)
+self.assertNoMoreResources()
+
+  def test_stop_secured(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = stop,
+   config_file=secured.json
+)
+
+self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
/usr/lib/hcatalog/sbin/webhcat_server.sh stop',
+  user = 'hcat',
+  )
+self.assertResourceCalled('Execute', 'rm -f /var/run/webhcat/webhcat.pid')
+self.assertNoMoreResources()
+
+  def assert_configure_default(self):
+self.assertResourceCalled('HdfsDirectory', '/user/hcat',
+  security_enabled = False,
+  keytab = UnknownConfigurationMock(),
+  conf_dir = '/etc/hadoop/conf',
+  hdfs_user = 'hdfs',
+  kinit_path_local = /usr/bin/kinit,
+  

git commit: AMBARI-7330. Add HiveServer2 dynamic service discovery configs to Ambari (aonishuk)

2014-09-16 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk f8aa99b34 - a8fb52f33


AMBARI-7330. Add HiveServer2 dynamic service discovery configs to Ambari 
(aonishuk)


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

Branch: refs/heads/trunk
Commit: a8fb52f33c3137313b8651590b828e1cad3da7ff
Parents: f8aa99b
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Tue Sep 16 16:48:03 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Tue Sep 16 16:48:03 2014 +0300

--
 .../services/HIVE/configuration/hive-site.xml| 19 +++
 .../services/HIVE/configuration/hive-site.xml| 19 +++
 .../services/HIVE/configuration/hive-site.xml| 19 +++
 .../services/HIVE/configuration/hive-site.xml| 19 +++
 ambari-web/app/data/HDP2/site_properties.js  |  9 +
 ambari-web/app/data/site_properties.js   |  9 +
 6 files changed, 94 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a8fb52f3/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
index 8206a6a..524a27b 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
@@ -257,4 +257,23 @@ limitations under the License.
 /description
   /property
 
+  property
+namehive.server2.support.dynamic.service.discovery/name
+valuefalse/value
+descriptionWhether HiveServer2 supports dynamic service discovery for its
+  clients. To support this, each instance of HiveServer2 currently uses
+  ZooKeeper to register itself, when it is brought up. JDBC/ODBC clients
+  should use the ZooKeeper ensemble: hive.zookeeper.quorum in their
+  connection string.
+/description
+  /property
+
+  property
+namehive.server2.zookeeper.namespace/name
+valuehiveserver2/value
+descriptionThe parent node in ZooKeeper used by HiveServer2 when
+  supporting dynamic service discovery.
+/description
+  /property
+
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/a8fb52f3/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
index 9057fbe..e64e6a0 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
@@ -309,4 +309,23 @@ limitations under the License.
 /description
   /property
 
+  property
+namehive.server2.support.dynamic.service.discovery/name
+valuefalse/value
+descriptionWhether HiveServer2 supports dynamic service discovery for its
+  clients. To support this, each instance of HiveServer2 currently uses
+  ZooKeeper to register itself, when it is brought up. JDBC/ODBC clients
+  should use the ZooKeeper ensemble: hive.zookeeper.quorum in their
+  connection string.
+/description
+  /property
+
+  property
+namehive.server2.zookeeper.namespace/name
+valuehiveserver2/value
+descriptionThe parent node in ZooKeeper used by HiveServer2 when
+  supporting dynamic service discovery.
+/description
+  /property
+
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/a8fb52f3/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
index 8b4f065..ad1df07 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
@@ -480,4 +480,23 @@ limitations under the License.
 /description
   /property
 
+  

git commit: AMBARI-7332 Setting final flag and not saving allows you to navigate away. (Max Shepel via atkach)

2014-09-16 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk a8fb52f33 - 6b2dd66f2


AMBARI-7332 Setting final flag and not saving allows you to navigate away. (Max 
Shepel via atkach)


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

Branch: refs/heads/trunk
Commit: 6b2dd66f2d70b7b7d84ab0ce64292384d1753988
Parents: a8fb52f
Author: atkach atk...@hortonworks.com
Authored: Tue Sep 16 16:49:17 2014 +0300
Committer: atkach atk...@hortonworks.com
Committed: Tue Sep 16 16:51:26 2014 +0300

--
 ambari-web/app/controllers/main/service/info/configs.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6b2dd66f/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 e10a0ba..e7ee933 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -248,7 +248,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
 }
 var hash = {};
 this.get('stepConfigs')[0].configs.forEach(function (config) {
-  hash[config.get('name')] = {value: config.get('value'), overrides: []};
+  hash[config.get('name')] = {value: config.get('value'), overrides: [], 
isFinal: config.get('isFinal')};
   if (!config.get('overrides')) return;
   if (!config.get('overrides.length')) return;
 



git commit: AMBARI-7317. Add exclusive flag to custom command/custom action requests (dlysnichenko)

2014-09-16 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk 6b2dd66f2 - 645772647


AMBARI-7317. Add exclusive flag to custom command/custom action requests 
(dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 645772647867574620d453ca8b8bb7693a1910eb
Parents: 6b2dd66
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Thu Sep 11 15:08:58 2014 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Tue Sep 16 16:59:21 2014 +0300

--
 .../server/actionmanager/ActionScheduler.java   |  26 +-
 .../ambari/server/actionmanager/Request.java|  23 +-
 .../server/controller/ExecuteActionRequest.java |  20 +-
 .../controller/MaintenanceStateHelper.java  |   2 +-
 .../internal/RequestResourceProvider.java   |  12 +-
 .../server/orm/entities/RequestEntity.java  |  12 +
 .../server/upgrade/UpgradeCatalog170.java   |   4 +
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |   2 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |   2 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql|   2 +-
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |   2 +-
 .../src/main/resources/properties.json  |   1 +
 .../actionmanager/TestActionDBAccessorImpl.java |   2 +-
 .../actionmanager/TestActionScheduler.java  | 264 ++-
 .../AmbariCustomCommandExecutionHelperTest.java |   2 +-
 .../AmbariManagementControllerTest.java |  86 +++---
 .../BackgroundCustomCommandExecutionTest.java   |   2 +-
 17 files changed, 396 insertions(+), 68 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/64577264/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
index 0385686..81fee75 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
@@ -217,15 +217,27 @@ class ActionScheduler implements Runnable {
   }
   int i_stage = 0;
   
-  
   stages = filterParallelPerHostStages(stages);
-  
+
+  boolean exclusiveRequestIsGoing = false;
+  // This loop greatly depends on the fact that order of stages in
+  // a list does not change between invocations
   for (Stage s : stages) {
 // Check if we can process this stage in parallel with another stages
 i_stage ++;
-
 long requestId = s.getRequestId();
 LOG.debug(== STAGE_i =  + i_stage + (requestId= + requestId + 
,StageId= + s.getStageId() + ));
+Request request = db.getRequest(requestId);
+
+if (request.isExclusive()) {
+  if (runningRequestIds.size()  0 ) {
+// As a result, we will wait until any previous stages are finished
+LOG.debug(Stage requires exclusive execution, but other requests 
are already executing. Stopping for now);
+break;
+  }
+  exclusiveRequestIsGoing = true;
+}
+
 if (runningRequestIds.contains(requestId)) {
   // We don't want to process different stages from the same request 
in parallel
   LOG.debug(== We don't want to process different stages from the 
same request in parallel );
@@ -238,8 +250,6 @@ class ActionScheduler implements Runnable {
   }
 }
 
-
-
 // Commands that will be scheduled in current scheduler wakeup
 ListExecutionCommand commandsToSchedule = new 
ArrayListExecutionCommand();
 MapString, RoleStats roleStats = processInProgressStage(s, 
commandsToSchedule);
@@ -344,6 +354,12 @@ class ActionScheduler implements Runnable {
 if (! configuration.getParallelStageExecution()) { // If disabled
   return;
 }
+
+if (exclusiveRequestIsGoing) {
+  // As a result, we will prevent any further stages from being 
executed
+  LOG.debug(Stage requires exclusive execution, skipping all 
executing any further stages);
+  break;
+}
   }
 
   requestsInProgress.retainAll(runningRequestIds);

http://git-wip-us.apache.org/repos/asf/ambari/blob/64577264/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Request.java
--
diff --git 

git commit: AMBARI-7306. Can't save notes for config groups. (mpapirkovskyy)

2014-09-16 Thread mpapirkovskyy
Repository: ambari
Updated Branches:
  refs/heads/trunk 645772647 - 56e022e55


AMBARI-7306. Can't save notes for config groups. (mpapirkovskyy)


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

Branch: refs/heads/trunk
Commit: 56e022e554f6775c2bce683cb28d28b5744eec07
Parents: 6457726
Author: Myroslav Papirkovskyy mpapyrkovs...@hortonworks.com
Authored: Mon Sep 15 19:33:02 2014 +0300
Committer: Myroslav Papirkovskyy mpapyrkovs...@hortonworks.com
Committed: Tue Sep 16 18:07:16 2014 +0300

--
 .../internal/ConfigGroupResourceProvider.java   | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/56e022e5/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
index 6e13d9c..46e9016 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
@@ -211,6 +211,20 @@ public class ConfigGroupResourceProvider extends
 return getRequestStatus(null);
   }
 
+  @Override
+  public SetString checkPropertyIds(SetString propertyIds) {
+//allow providing service_config_version_note, but we should not return it 
for config group
+SetString unsupportedPropertyIds = super.checkPropertyIds(propertyIds);
+for (IteratorString iterator = unsupportedPropertyIds.iterator(); 
iterator.hasNext(); ) {
+  String next = iterator.next();
+  next = PropertyHelper.getPropertyName(next);
+  if (next.equals(service_config_version_note) || 
next.equals(/service_config_version_note)) {
+iterator.remove();
+  }
+}
+return unsupportedPropertyIds;
+  }
+
   /**
* Create configuration group resources based on set of config group 
requests.
*
@@ -477,7 +491,8 @@ public class ConfigGroupResourceProvider extends
   configGroup.persist();
   cluster.addConfigGroup(configGroup);
   if (serviceName != null) {
-cluster.createServiceConfigVersion(serviceName, 
getManagementController().getAuthName(), null, configGroup);
+cluster.createServiceConfigVersion(serviceName, 
getManagementController().getAuthName(),
+  request.getServiceConfigVersionNote(), configGroup);
   } else {
 LOG.warn(Could not determine service name for config group {}, 
service config version not created,
 configGroup.getId());
@@ -569,7 +584,8 @@ public class ConfigGroupResourceProvider extends
 
   configGroup.persist();
   if (serviceName != null) {
-cluster.createServiceConfigVersion(serviceName, 
getManagementController().getAuthName(), null, configGroup);
+cluster.createServiceConfigVersion(serviceName, 
getManagementController().getAuthName(),
+  request.getServiceConfigVersionNote(), configGroup);
   } else {
 LOG.warn(Could not determine service name for config group {}, 
service config version not created,
 configGroup.getId());



[2/3] git commit: AMBARI-7334. Slider View: Show view name along with hover of view properties. (onechiporenko)

2014-09-16 Thread onechiporenko
AMBARI-7334. Slider View: Show view name along with hover of view properties. 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 42a5a33497e432f3d7f258f7070eeeaf20beb2a8
Parents: 460ae9e
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Tue Sep 16 18:01:26 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Tue Sep 16 18:01:26 2014 +0300

--
 .../ui/app/controllers/slider_controller.js | 104 +
 .../src/main/resources/ui/app/initialize.js |  31 +++--
 .../ui/app/mappers/application_status.js| 115 ---
 .../resources/ui/app/styles/application.less|   8 ++
 .../resources/ui/app/templates/application.hbs  |   4 +-
 .../ui/app/templates/slider_title_tooltip.hbs   |  27 +
 .../src/main/resources/ui/app/translations.js   |   2 +-
 .../resources/ui/app/views/application_view.js  |  64 +++
 8 files changed, 207 insertions(+), 148 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/42a5a334/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 8283de1..a5eec96 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -29,29 +29,36 @@
  * If Slider-properties exists:
  *  - Load cluster name
  *  - Load hostNames
+ * After whole data has been loaded set codeApp.sliderConfigs/code and 
enable/disable Slider
  * @type {Ember.Controller}
  */
-App.SliderController = Ember.Controller.extend({
+App.SliderController = Ember.Controller.extend(App.RunPeriodically, {
 
   /**
-   *  Load resources on controller initialization
-   * @method initResources
+   * Map for Slider-errors
+   * If some config is empty, service isn't installed
+   * @type {object}
*/
-  initResources: function () {
-this.getParametersFromViewProperties();
+  serviceConfigMap: {
+HDFS: 'hdfsAddress',
+YARN: 'yarnResourceManager',
+ZOOKEEPER: 'zookeeperQuorum'
   },
 
   /**
* List of Slider-properties mapped from Ambari-configs
+   * Key-names used in Slider-Title-Popup, so don't change it pls
* @type {Em.Object}
*/
   initialValuesToLoad: Em.Object.create({
 ambariAddress: null,
 clusterName: null,
 hdfsAddress: null,
-yarnRMAddress: null,
-yarnRMSchedulerAddress: null,
-zookeeperQuorum: null
+yarnResourceManager: null,
+yarnResourceManagerScheduler: null,
+zookeeperQuorum: null,
+gangliaServer: null,
+gangliaClusters: null
   }),
 
   /**
@@ -61,6 +68,14 @@ App.SliderController = Ember.Controller.extend({
   zookeeperHosts: [],
 
   /**
+   *  Load resources on controller initialization
+   * @method initResources
+   */
+  initResources: function () {
+this.getParametersFromViewProperties();
+  },
+
+  /**
* Get Slider properties from View-parameters (set in the Ambari Admin View)
* If parameters can't be found, use Ambari-configs to populate Slider 
properties
* @returns {$.ajax}
@@ -71,20 +86,44 @@ App.SliderController = Ember.Controller.extend({
   name: 'slider.getViewParams',
   sender: this,
   success: 'getParametersFromViewPropertiesSuccessCallback',
-  error: 'getClusterName'
+  error: 'getParametersFromViewPropertiesErrorCallback'
 });
   },
 
   /**
* Check if Slider-properties exist
+   * If exist - set Slider properties using view-configs
* If not - get Ambari configs to populate Slider properties
* @param {object} data
* @method getParametersFromViewPropertiesSuccessCallback
*/
   getParametersFromViewPropertiesSuccessCallback: function(data) {
 var properties = Em.get(data, 'ViewInstanceInfo.properties'),
-  loadConfigs = Em.isNone(properties);
-  this.getClusterName(loadConfigs);
+  initialValuesToLoad = this.get('initialValuesToLoad');
+if (Em.isEmpty(properties)) {
+  this.getClusterName();
+}
+else {
+  initialValuesToLoad.setProperties({
+ambariAddress: location.protocol + // + document.location.host,
+hdfsAddress: properties['hdfs.address'],
+yarnResourceManager: properties['yarn.resourcemanager.address'],
+yarnResourceManagerScheduler: 
properties['yarn.resourcemanager.scheduler.address'],
+zookeeperQuorum: 

[1/3] git commit: AMBARI-7281. Slider View: App summary details shown differently than Ambari service summary. (onechiporenko)

2014-09-16 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 56e022e55 - 2ab5badc1


AMBARI-7281. Slider View: App summary details shown differently than Ambari 
service summary. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 460ae9ed3026b0a6c9ec1ce0cb42394afe028087
Parents: 6457726
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Tue Sep 16 13:10:14 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Tue Sep 16 17:37:40 2014 +0300

--
 .../resources/ui/app/models/slider_app_component.js | 10 +-
 .../src/main/resources/ui/app/styles/application.less   | 12 
 .../resources/ui/app/templates/slider_app/summary.hbs   |  2 +-
 3 files changed, 22 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/460ae9ed/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js 
b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
index 8f4f584..2e999c1 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
@@ -36,7 +36,15 @@ App.SliderAppComponent = DS.Model.extend({
   /**
* @type {App.SliderApp}
*/
-  appId: DS.belongsTo('sliderApp')
+  appId: DS.belongsTo('sliderApp'),
+
+  /**
+   * Is component running (used in the templates)
+   * @type {bool}
+   */
+  isRunning: function() {
+return this.get('status') === 'Running';
+  }.property('status')
 
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/460ae9ed/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index b934a20..33f 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -555,6 +555,18 @@ a {
   text-align: right;
 }
   }
+  .panel-components {
+.status {
+  display: inline-block;
+  width: 25px;
+}
+.icon-ok-sign {
+  color: #5ab400;
+}
+.icon-warning-sign {
+  color: #ff;
+}
+  }
   .panel-link {
 margin-top: -5px;
 margin-right: -7px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/460ae9ed/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
index 5cb2cd1..68d47b4 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
+++ 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
@@ -58,7 +58,7 @@
 tbody
   {{#each controller.model.components}}
   tr
-td{{componentName}}/td
+tdspan {{bind-attr 
class=isRunning:icon-ok-sign:icon-warning-sign :status}}/span 
{{componentName}}/td
 td{{host}}/td
   /tr
   {{/each}}



[3/3] git commit: Merge remote-tracking branch 'origin/trunk' into origin-trunk

2014-09-16 Thread onechiporenko
Merge remote-tracking branch 'origin/trunk' into origin-trunk


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

Branch: refs/heads/trunk
Commit: 2ab5badc1ab721840f1fd92545dd5887677c6877
Parents: 42a5a33 56e022e
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Tue Sep 16 18:22:41 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Tue Sep 16 18:22:41 2014 +0300

--
 .../internal/ConfigGroupResourceProvider.java   | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)
--




git commit: AMBARI-7335. Remove ambari-common/src/main/python/ambari_jinja2/ext/jinja.el from Ambari. (aonishuk)

2014-09-16 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 2ab5badc1 - ef6ecf86c


AMBARI-7335. Remove ambari-common/src/main/python/ambari_jinja2/ext/jinja.el 
from Ambari. (aonishuk)


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

Branch: refs/heads/trunk
Commit: ef6ecf86c4fe7ca6246a567f6390cb189ae733ed
Parents: 2ab5bad
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Tue Sep 16 18:56:06 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Tue Sep 16 18:56:06 2014 +0300

--
 .../src/main/python/ambari_jinja2/ext/jinja.el  | 213 ---
 1 file changed, 213 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ef6ecf86/ambari-common/src/main/python/ambari_jinja2/ext/jinja.el
--
diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/jinja.el 
b/ambari-common/src/main/python/ambari_jinja2/ext/jinja.el
deleted file mode 100644
index da4800a..000
--- a/ambari-common/src/main/python/ambari_jinja2/ext/jinja.el
+++ /dev/null
@@ -1,213 +0,0 @@
-;;; jinja.el --- Jinja mode highlighting
-;;
-;; Author: Georg Brandl
-;; Copyright: (c) 2009 by the Jinja Team
-;; Last modified: 2008-05-22 23:04 by gbr
-;;
-;;
-;;
-;;; Commentary:
-;;
-;; Mostly ripped off django-mode by Lennart Borgman.
-;;
-;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;
-;;
-;;; Code:
-
-(defconst jinja-font-lock-keywords
-  (list
-;   (cons (rx {% comment %} (submatch (0+ anything))
-; {% endcomment %}) (list 1 font-lock-comment-face))
-   '({# ?\\(.*?\\) ?#} . (1 font-lock-comment-face))
-   '({%-?\\|-?%}\\|{{\\|}} . font-lock-preprocessor-face)
-   '({#\\|#} . font-lock-comment-delimiter-face)
-   ;; first word in a block is a command
-   '({%-?[ \t\n]*\\([a-zA-Z_]+\\) . (1 font-lock-keyword-face))
-   ;; variables
-   '(\\({{ ?\\)\\([^|]*?\\)\\(|.*?\\)? ?}} . (1 
font-lock-variable-name-face))
-   ;; keywords and builtins
-   (cons (rx word-start
- (or in as recursive not and or if else
- import with without context)
- word-end)
- font-lock-keyword-face)
-   (cons (rx word-start
- (or true false none loop self super)
- word-end)
- font-lock-builtin-face)
-   ;; tests
-   '(\\(is\\)[ \t]*\\(not\\)[ \t]*\\([a-zA-Z_]+\\)
- (1 font-lock-keyword-face) (2 font-lock-keyword-face)
- (3 font-lock-function-name-face))
-   ;; builtin filters
-   (cons (rx
-  | (* space)
-  (submatch
-   (or abs batch capitalize capture center count default
-   dformat dictsort e escape filesizeformat first
-   float format getattribute getitem groupby indent
-   int join jsonencode last length lower markdown
-   pprint random replace reverse round rst slice
-   sort string striptags sum textile title trim
-   truncate upper urlencode urlize wordcount wordwrap
-   xmlattr)))
- (list 1 font-lock-builtin-face))
-   )
-   Minimal highlighting expressions for Jinja mode)
-
-(define-derived-mode jinja-mode nil Jinja
-  Simple Jinja mode for use with `mumamo-mode'.
-This mode only provides syntax highlighting.
-  ;;(set (make-local-variable 'comment-start) {#)
-  ;;(set (make-local-variable 'comment-end)   #})
-  (setq font-lock-defaults '(jinja-font-lock-keywords)))
-
-;; mumamo stuff
-
-(when (require 'mumamo nil t)
-
-  (defun mumamo-chunk-jinja3(pos min max)
-Find {# ... #}.  Return range and `jinja-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX.
-(mumamo-find-possible-chunk pos min max
-'mumamo-search-bw-exc-start-jinja3
-

git commit: AMBARI-7322. Admin View: update landing page content.(xiwang)

2014-09-16 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk f92c28ed8 - 4770717db


AMBARI-7322. Admin View: update landing page content.(xiwang)


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

Branch: refs/heads/trunk
Commit: 4770717db7e11d904aa59c7acbdaead2060720d4
Parents: f92c28e
Author: Xi Wang xiw...@apache.org
Authored: Mon Sep 15 18:18:55 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Tue Sep 16 10:43:02 2014 -0700

--
 .../app/scripts/controllers/mainCtrl.js | 13 +-
 .../resources/ui/admin-web/app/styles/main.css  | 42 +++-
 .../resources/ui/admin-web/app/views/main.html  | 41 ++-
 3 files changed, 92 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4770717d/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
index 6f68831..797ecb2 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-.controller('MainCtrl',['$scope', 'Auth', 'uiAlert', '$modal', 
function($scope, Auth, uiAlert, $modal) {
+.controller('MainCtrl',['$scope', 'Auth', 'uiAlert', '$modal', 'Cluster', 
function($scope, Auth, uiAlert, $modal, Cluster) {
   $scope.signOut = function() {
 Auth.signout().then(function() {
  window.location.pathname = ''; // Change location hard, because Angular 
works only with relative urls
@@ -39,4 +39,15 @@ angular.module('ambariAdminConsole')
   };
 
   $scope.currentUser = Auth.getCurrentUser();
+
+  $scope.cluster = null;
+  $scope.isLoaded = null;
+
+  Cluster.getStatus().then(function(cluster) {
+$scope.cluster = cluster;
+$scope.isLoaded = true;
+  }).catch(function(data) {
+  uiAlert.danger(data.status, data.message);
+  });
+
 }]);

http://git-wip-us.apache.org/repos/asf/ambari/blob/4770717d/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css 
b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index 3d5628a..9b41f63 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -211,12 +211,49 @@
 }
 .mainpage .panel-body{
   padding: 20px;
-  height: 560px;
+  height: 620px;
 }
 .mainpage h1{
   font-size: 24px;
   margin-top: 10px;
 }
+.mainpage .panel-body #main-operations-boxes {
+  padding: 10px;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail{
+  display: block;
+  height: 230px;
+  padding: 8px;
+  background-color: #ee;
+  margin-bottom: 20px;
+  margin-left: 20px;
+  margin-right: 10px;
+  border: none;
+  border-radius: 0px;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail .title,
+.mainpage .panel-body #main-operations-boxes .thumbnail .description,
+.mainpage .panel-body #main-operations-boxes .thumbnail .buttons {
+  text-align: center;
+  line-height: 1.5;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail .buttons .btn{
+  width: 200px;
+  margin: 5px;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail .buttons 
.btn.userslist-button,
+.mainpage .panel-body #main-operations-boxes .thumbnail .buttons 
.btn.groupslist-button {
+  width: 100px;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail .glyphicon {
+  font-size: 50px;
+  text-align: center;
+  display: block;
+  line-height: 1.5;
+}
+.mainpage .panel-body #main-operations-boxes .col-sm-5 {
+  width: 43.5%;
+}
 
 .views-list-table .panel{
   border-radius: 0;
@@ -488,6 +525,9 @@
   .container{
 width: 1170px;
   }
+  .mainpage .panel-body #main-operations-boxes .col-sm-5 {
+width: 44%;
+  }
 }
 
 ul.nav li  a{

http://git-wip-us.apache.org/repos/asf/ambari/blob/4770717d/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
index a66eaf4..7785d2f 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
+++ 

[3/3] git commit: AMBARI-7341 Restart all command for services does not work. (ababiichuk)

2014-09-16 Thread ababiichuk
AMBARI-7341 Restart all command for services does not work. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 246ae7239c5a6046a474ce37f310f69b20ee4883
Parents: 34ffd77
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Tue Sep 16 20:48:47 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Tue Sep 16 20:49:02 2014 +0300

--
 ambari-web/app/utils/batch_scheduled_requests.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/246ae723/ambari-web/app/utils/batch_scheduled_requests.js
--
diff --git a/ambari-web/app/utils/batch_scheduled_requests.js 
b/ambari-web/app/utils/batch_scheduled_requests.js
index 52bf0d8..7cafdd3 100644
--- a/ambari-web/app/utils/batch_scheduled_requests.js
+++ b/ambari-web/app/utils/batch_scheduled_requests.js
@@ -68,6 +68,8 @@ module.exports = {
* Facade-function for restarting host components of specific service
* @param {String} serviceName for which service hostComponents should be 
restarted
* @param {bool} staleConfigsOnly restart only hostComponents with 
codestaleConfig/code true
+   * @param {Object} query
+   * @param {bool} runMmOperation
*/
   restartAllServiceHostComponents: function(serviceName, staleConfigsOnly, 
query, runMmOperation) {
 var self = this;
@@ -77,7 +79,7 @@ module.exports = {
   this.turnOnOffPassiveRequest('ON', 
Em.I18n.t('passiveState.turnOnFor').format(serviceName), serviceName);
 }
 this.getComponentsFromServer({
-  services: services,
+  services: [serviceName],
   staleConfigs: staleConfigsOnly ? staleConfigsOnly : null,
   passiveState: 'OFF',
   displayParams: ['host_components/HostRoles/component_name']



[2/3] git commit: AMBARI-7308 Configs: changes to host config group are not saving notes. (ababiichuk)

2014-09-16 Thread ababiichuk
AMBARI-7308 Configs: changes to host config group are not saving notes. 
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: f53e654513c7c0be09b62f748599c804bd18385e
Parents: 4770717
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Mon Sep 15 17:16:26 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Tue Sep 16 20:49:01 2014 +0300

--
 ambari-web/app/controllers/main/service/info/configs.js | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f53e6545/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 e7ee933..9fcdaaa 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -1282,6 +1282,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   tag: selectedConfigGroup.get('service.id'),
   description: selectedConfigGroup.get('description'),
   hosts: groupHosts,
+  service_config_version_note: this.get('serviceConfigVersionNote'),
   desired_configs: this.buildGroupDesiredConfigs(overridenConfigs)
 }
   }, true);



git commit: AMBARI-7340. Webhcat and hcat services are shown in 2.0 stack as separate (aonishuk)

2014-09-16 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 246ae7239 - db62322f4


AMBARI-7340. Webhcat and hcat services are shown in 2.0 stack as separate 
(aonishuk)


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

Branch: refs/heads/trunk
Commit: db62322f4b16be65ea59577e43a3740c5b408199
Parents: 246ae72
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Tue Sep 16 21:39:20 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Tue Sep 16 21:39:20 2014 +0300

--
 .../stacks/HDP/2.0/role_command_order.json  |  2 +-
 .../stacks/HDP/2.0/services/HIVE/metainfo.xml   |  4 ---
 .../HDP/2.0/services/WEBHCAT/metainfo.xml   | 26 
 3 files changed, 1 insertion(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/db62322f/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json
index e90617e..9c5db5c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json
@@ -23,7 +23,7 @@
 OOZIE_SERVICE_CHECK-SERVICE_CHECK: [OOZIE_SERVER-START, 
MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK],
 WEBHCAT_SERVICE_CHECK-SERVICE_CHECK: [WEBHCAT_SERVER-START],
 HBASE_SERVICE_CHECK-SERVICE_CHECK: [HBASE_MASTER-START, 
HBASE_REGIONSERVER-START],
-HIVE_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START, 
HIVE_METASTORE-START],
+HIVE_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START, 
HIVE_METASTORE-START, WEBHCAT_SERVER-START],
 HCAT_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START],
 PIG_SERVICE_CHECK-SERVICE_CHECK: [RESOURCEMANAGER-START, 
NODEMANAGER-START],
 SQOOP_SERVICE_CHECK-SERVICE_CHECK: [RESOURCEMANAGER-START, 
NODEMANAGER-START],

http://git-wip-us.apache.org/repos/asf/ambari/blob/db62322f/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml
index bed0ee4..b24dada 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml
@@ -22,9 +22,5 @@
   nameHIVE/name
   version0.12.0.2.0/version
 /service
-service
-  nameHCATALOG/name
-  version0.12.0.2.0/version
-/service
   /services
 /metainfo

http://git-wip-us.apache.org/repos/asf/ambari/blob/db62322f/ambari-server/src/main/resources/stacks/HDP/2.0/services/WEBHCAT/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0/services/WEBHCAT/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.0/services/WEBHCAT/metainfo.xml
deleted file mode 100644
index 89c52c0..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0/services/WEBHCAT/metainfo.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-?xml version=1.0?
-!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the License); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an AS IS BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
---
-metainfo
-  schemaVersion2.0/schemaVersion
-  services
-service
-  nameWEBHCAT/name
-  version0.12.0.2.0/version
-/service
-  /services
-/metainfo



[1/2] AMBARI-7327. After NameNode HA is enabled UI doesn't load (aonishuk)

2014-09-16 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk db62322f4 - ceee5bfed


http://git-wip-us.apache.org/repos/asf/ambari/blob/ceee5bfe/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/metrics.json
--
diff --git 
a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/metrics.json 
b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/metrics.json
deleted file mode 100644
index 2d3be9f..000
--- 
a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/metrics.json
+++ /dev/null
@@ -1,7840 +0,0 @@
-{
-  NAMENODE: {
-Component: [
-  {
-type: ganglia,
-metrics: {
-  metrics/dfs/FSNamesystem/TotalLoad: {
-metric: dfs.FSNamesystem.TotalLoad,
-pointInTime: false,
-temporal: true
-  },
-  metrics/dfs/FSNamesystem/BlockCapacity: {
-metric: dfs.FSNamesystem.BlockCapacity,
-pointInTime: false,
-temporal: true
-  },
-  metrics/dfs/FSNamesystem/CapacityTotal: {
-metric: dfs.FSNamesystem.CapacityTotal,
-pointInTime: false,
-temporal: true
-  },
-  metrics/dfs/FSNamesystem/CapacityUsed: {
-metric: dfs.FSNamesystem.CapacityUsed,
-pointInTime: false,
-temporal: true
-  },
-  metrics/dfs/FSNamesystem/CapacityRemaining: {
-metric: dfs.FSNamesystem.CapacityRemaining,
-pointInTime: false,
-temporal: true
-  },
-  metrics/dfs/FSNamesystem/CapacityNonDFSUsed: {
-metric: dfs.FSNamesystem.CapacityUsedNonDFS,
-pointInTime: false,
-temporal: true
-  },   
-  metrics/dfs/namenode/GetListingOps: {
-metric: dfs.namenode.GetListingOps,
-pointInTime: false,
-temporal: true
-  },
-  metrics/dfs/namenode/FilesAppended: {
-metric: dfs.namenode.FilesAppended,
-pointInTime: true,
-temporal: true
-  },
-  metrics/rpcdetailed/getProtocolVersion_num_ops: {
-metric: rpcdetailed.rpcdetailed.getProtocolVersion_num_ops,
-pointInTime: false,
-temporal: true
-  },
-  metrics/rpcdetailed/fsync_avg_time: {
-metric: rpcdetailed.rpcdetailed.FsyncAvgTime,
-pointInTime: false,
-temporal: true
-  },
-  metrics/ugi/loginSuccess_avg_time: {
-metric: ugi.UgiMetrics.LoginSuccessAvgTime,
-pointInTime: false,
-temporal: true
-  },
-  metrics/load/load_one: {
-metric: load_one,
-pointInTime: true,
-temporal: true
-  },
-  metrics/rpcdetailed/renewLease_num_ops: {
-metric: rpcdetailed.rpcdetailed.RenewLeaseNumOps,
-pointInTime: true,
-temporal: true
-  },
-  metrics/rpcdetailed/getFileInfo_avg_time: {
-metric: rpcdetailed.rpcdetailed.GetFileInfoAvgTime,
-pointInTime: false,
-temporal: true
-  },
-  metrics/jvm/memNonHeapUsedM: {
-metric: jvm.JvmMetrics.MemNonHeapUsedM,
-pointInTime: false,
-temporal: true
-  },
-  metrics/rpcdetailed/complete_avg_time: {
-metric: rpcdetailed.rpcdetailed.CompleteAvgTime,
-pointInTime: false,
-temporal: true
-  },
-  metrics/rpcdetailed/setPermission_num_ops: {
-metric: rpcdetailed.rpcdetailed.SetPermissionNumOps,
-pointInTime: true,
-temporal: true
-  },
-  metrics/dfs/FSNamesystem/CapacityTotalGB: {
-metric: dfs.FSNamesystem.CapacityTotalGB,
-pointInTime: false,
-temporal: true
-  },
-  metrics/rpcdetailed/setOwner_num_ops: {
-metric: rpcdetailed.rpcdetailed.SetOwnerNumOps,
-pointInTime: true,
-temporal: true
-  },
-  metrics/rpcdetailed/getBlockLocations_num_ops: {
-metric: rpcdetailed.rpcdetailed.GetBlockLocationsNumOps,
-pointInTime: false,
-temporal: true
-  },
-  metrics/process/proc_run: {
-metric: proc_run,
-pointInTime: true,
-temporal: true
-  },
-  metrics/dfs/FSNamesystem/CapacityUsedGB: {
-metric: dfs.FSNamesystem.CapacityUsedGB,
-pointInTime: false,
-temporal: true
-  },
-  metrics/dfs/namenode/AddBlockOps: {
-metric: dfs.namenode.AddBlockOps,
-pointInTime: false,
-temporal: true
-  },
-  metrics/memory/swap_total: {
-metric: swap_total,
-pointInTime: true,
- 

git commit: AMBARI-7225 deploy of 2.1.GlusterFS stack errors with: org.apache.ambari.server.controller.spi.SystemException: An internal system exception occurred: Configuration with tag 'version1' exi

2014-09-16 Thread eboyd
Repository: ambari
Updated Branches:
  refs/heads/trunk ceee5bfed - b1336f395


AMBARI-7225 deploy of 2.1.GlusterFS stack errors with:  
org.apache.ambari.server.controller.spi.SystemException: An internal system 
exception occurred: Configuration with tag 'version1' exists for 'core-site'
(Scott Creeley via eboyd)


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

Branch: refs/heads/trunk
Commit: b1336f395a93549b8e0591ff1e67a924aef6cfba
Parents: ceee5bf
Author: Erin A Boyd eb...@redhat.com
Authored: Tue Sep 16 14:42:35 2014 -0400
Committer: root r...@ambari.rhs
Committed: Tue Sep 16 14:43:40 2014 -0400

--
 .../GLUSTERFS/configuration/hadoop-env.xml  |  2 ++
 .../services/YARN/configuration/core-site.xml   | 20 
 2 files changed, 2 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b1336f39/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
index 6b00199..6c6d4c1 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
@@ -81,11 +81,13 @@
 valuehdfs/value
 descriptionUser to run HDFS as/description
   /property
+  !--
   property
 nameuser_group/name
 valuehadoop/value
 descriptionProxy user group./description
   /property
+  --
 !-- hadoop-env.sh --
   property
 namecontent/name

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1336f39/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/configuration/core-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/configuration/core-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/configuration/core-site.xml
deleted file mode 100644
index 60f01ad..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/configuration/core-site.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-?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 supports_final=true
-/configuration



[1/2] git commit: AMBARI-7342. Slider View: Action dialogs do not look the same as Ambari dialogs (alexantonenko)

2014-09-16 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk b1336f395 - fe890e9a9


AMBARI-7342. Slider View: Action dialogs do not look the same as Ambari dialogs 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: e24eb5bc1c08b156fad8e3c202520dd5ca11b390
Parents: b1336f3
Author: Alex Antonenko hiv...@gmail.com
Authored: Tue Sep 16 21:49:20 2014 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Tue Sep 16 22:15:58 2014 +0300

--
 .../ui/app/controllers/slider_app_controller.js | 15 ++-
 .../resources/ui/app/styles/application.less| 99 
 2 files changed, 109 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e24eb5bc/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index e78a1b3..6558e87 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -319,12 +319,17 @@ App.SliderAppController = Ember.ObjectController.extend({
 openModal: function(option) {
   this.set('currentAction', option.action);
   if (option.confirm) {
-Bootstrap.ModalManager.confirm(
-  this,
+Bootstrap.ModalManager.open(
+  confirm-modal,
   Ember.I18n.t('common.confirmation'),
-  Ember.I18n.t('question.sure'),
-  Ember.I18n.t('yes'),
-  Ember.I18n.t('no')
+  Ember.View.extend({
+template: Ember.Handlebars.compile('{{t question.sure}}')
+  }),
+  [
+Ember.Object.create({title: Em.I18n.t('common.cancel'), 
clicked:modalCanceled, dismiss: 'modal'}),
+Ember.Object.create({title: Em.I18n.t('ok'), 
clicked:modalConfirmed, type:'success'})
+  ],
+  this
 );
   }
   else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e24eb5bc/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 241a52d..90f10d7 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -753,4 +753,103 @@ a {
   .row {
 .table-row();
   }
+}
+
+.modal-header {
+  padding: 9px 15px;
+  border-bottom: 1px solid #eee;
+}
+.modal-title {
+  line-height: 30px;
+  font-size: 24px;
+  font-family: inherit;
+  font-weight: bold;
+  color: inherit;
+  text-rendering: optimizelegibility;
+}
+.modal-body{
+  padding: 15px;
+}
+.modal-footer {
+  margin-top: 0px;
+  padding: 14px 15px 15px;
+  margin-bottom: 0;
+  text-align: right;
+  background-color: #f5f5f5;
+  border-top: 1px solid #ddd;
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+  -webkit-box-shadow: inset 0 1px 0 #ff;
+  -moz-box-shadow: inset 0 1px 0 #ff;
+  box-shadow: inset 0 1px 0 #ff;
+
+  .btn{
+display: inline-block;
+padding: 4px 14px;
+margin-bottom: 0;
+font-size: 14px;
+line-height: 20px;
+color: #33;
+text-align: center;
+text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+vertical-align: middle;
+cursor: pointer;
+background-color: #f5f5f5;
+background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff), 
to(#e6e6e6));
+background-image: -webkit-linear-gradient(top, #ff, #e6e6e6);
+background-image: -o-linear-gradient(top, #ff, #e6e6e6);
+background-image: linear-gradient(to bottom, #ff, #e6e6e6);
+background-image: -moz-linear-gradient(top, #ff, #e6e6e6);
+background-repeat: repeat-x;
+border: 1px solid #bb;
+border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+border-bottom-color: #a2a2a2;
+-webkit-border-radius: 4px;
+-moz-border-radius: 4px;
+border-radius: 4px;
+filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px 
rgba(0, 0, 0, 0.05);
+-moz-box-shadow: inset 0 

[2/2] git commit: AMBARI-7343. Slider View: Flex app action should not have a confirmation dialog (alexantonenko)

2014-09-16 Thread alexantonenko
AMBARI-7343. Slider View: Flex app action should not have a confirmation dialog 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: fe890e9a98d3a2899ede69e07b61592b006a1503
Parents: e24eb5b
Author: Alex Antonenko hiv...@gmail.com
Authored: Tue Sep 16 22:14:35 2014 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Tue Sep 16 22:16:00 2014 +0300

--
 .../src/main/resources/ui/app/controllers/slider_app_controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fe890e9a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index 6558e87..2779a57 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -46,7 +46,7 @@ App.SliderAppController = Ember.ObjectController.extend({
   actions.push({
 title: 'Flex',
 action: 'flex',
-confirm: true
+confirm: false
   });
 }
 if ('FROZEN' === status) {



git commit: AMBARI-7336 - Alerts: Create Default AlertGroup When Service Is Installed (jonathanhurley)

2014-09-16 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev 17b8e7990 - b7ae2d74a


AMBARI-7336 - Alerts: Create Default AlertGroup When Service Is Installed 
(jonathanhurley)


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

Branch: refs/heads/branch-alerts-dev
Commit: b7ae2d74adcd07759b2308bc2a7b0f8115480a7e
Parents: 17b8e79
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Tue Sep 16 12:26:36 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Tue Sep 16 12:26:36 2014 -0400

--
 .../server/controller/ControllerModule.java |   2 +
 .../apache/ambari/server/events/AlertEvent.java |   2 +-
 .../ambari/server/events/AmbariEvent.java   |  75 ++
 .../ambari/server/events/ServiceEvent.java  |  75 ++
 .../server/events/ServiceInstalledEvent.java|  52 +++
 .../events/listeners/AlertReceivedListener.java |   4 +-
 .../listeners/AlertServiceStateListener.java| 147 +++
 .../listeners/AlertStateChangedListener.java|   2 +
 .../events/publishers/AlertEventPublisher.java  |   8 +-
 .../events/publishers/AmbariEventPublisher.java |  66 +
 .../apache/ambari/server/state/ServiceImpl.java |  49 ++-
 .../state/alerts/AlertEventPublisherTest.java   | 132 +
 12 files changed, 572 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7ae2d74/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
index 8413762..349e465 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
@@ -52,6 +52,7 @@ import 
org.apache.ambari.server.controller.internal.MemberResourceProvider;
 import org.apache.ambari.server.controller.internal.ServiceResourceProvider;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
 import org.apache.ambari.server.events.listeners.AlertReceivedListener;
+import org.apache.ambari.server.events.listeners.AlertServiceStateListener;
 import org.apache.ambari.server.events.listeners.AlertStateChangedListener;
 import org.apache.ambari.server.orm.DBAccessor;
 import org.apache.ambari.server.orm.DBAccessorImpl;
@@ -313,5 +314,6 @@ public class ControllerModule extends AbstractModule {
 // them as eager singletons to have them register with the eventbus
 bind(AlertReceivedListener.class).asEagerSingleton();
 bind(AlertStateChangedListener.class).asEagerSingleton();
+bind(AlertServiceStateListener.class).asEagerSingleton();
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7ae2d74/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java
index a75477d..767cb6b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java
@@ -20,7 +20,7 @@ package org.apache.ambari.server.events;
 import org.apache.ambari.server.state.Alert;
 
 /**
- * The {@link AlertEvent} class the base for all events related to alerts.
+ * The {@link AlertEvent} class is the base for all events related to alerts.
  */
 public abstract class AlertEvent {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7ae2d74/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
new file mode 100644
index 000..dda18c7
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
@@ -0,0 +1,75 @@
+/**
+ * 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 

git commit: AMBARI-7345 - Views : Exception from ambari-server startup, extract views

2014-09-16 Thread tbeerbower
Repository: ambari
Updated Branches:
  refs/heads/trunk e83ab259c - 19533465d


AMBARI-7345 - Views : Exception from ambari-server startup, extract views


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

Branch: refs/heads/trunk
Commit: 19533465d6ccc4c57d00ed8c9af7815f32b2cead
Parents: e83ab25
Author: tbeerbower tbeerbo...@hortonworks.com
Authored: Tue Sep 16 17:41:13 2014 -0400
Committer: tbeerbower tbeerbo...@hortonworks.com
Committed: Tue Sep 16 19:06:18 2014 -0400

--
 .../apache/ambari/server/view/ViewRegistry.java | 67 +--
 ambari-server/src/main/python/ambari-server.py  | 42 +++--
 .../ambari/server/view/ViewRegistryTest.java| 90 
 .../view/configuration/ViewConfigTest.java  |  1 +
 4 files changed, 186 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/19533465/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index 8f6774e..5e652a1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -28,7 +28,6 @@ import 
org.apache.ambari.server.api.resources.ViewExternalSubResourceDefinition;
 import org.apache.ambari.server.api.services.ViewExternalSubResourceService;
 import org.apache.ambari.server.api.services.ViewSubResourceService;
 import org.apache.ambari.server.configuration.Configuration;
-import org.apache.ambari.server.controller.ControllerModule;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.dao.MemberDAO;
 import org.apache.ambari.server.orm.dao.PrivilegeDAO;
@@ -101,6 +100,7 @@ public class ViewRegistry {
* Constants
*/
   private static final String EXTRACTED_ARCHIVES_DIR = work;
+  private static final String EXTRACT_COMMAND = extract;
 
   /**
* Thread pool
@@ -219,15 +219,31 @@ public class ViewRegistry {
* Registry main method.
*
* @param args  the command line arguments
-   *
-   * @throws Exception if the registry command can not be completed
*/
-  public static void main(String[] args) throws Exception {
+  public static void main(String[] args) {
+
+if (args.length = 2) {
+  String archivePath = args[1];
+
+  try {
+Injector injector = Guice.createInjector();
 
-Injector injector = Guice.createInjector(new ControllerModule());
-initInstance(injector.getInstance(ViewRegistry.class));
+ViewExtractor  extractor  = 
injector.getInstance(ViewExtractor.class);
+ViewArchiveUtility archiveUtility = 
injector.getInstance(ViewArchiveUtility.class);
+Configuration  configuration  = 
injector.getInstance(Configuration.class);
 
-singleton.readViewArchives(true, false);
+if (args[0].equals(EXTRACT_COMMAND)) {
+  if (extractViewArchive(archivePath, extractor, archiveUtility, 
configuration, true)) {
+System.exit(0);
+  }
+}
+  } catch (Exception e) {
+String msg = Caught exception extracting view archive  + archivePath 
+ .;
+LOG.error(msg, e);
+System.exit(2);
+  }
+}
+System.exit(1);
   }
 
   /**
@@ -1229,6 +1245,43 @@ public class ViewRegistry {
 }
   }
 
+  // extract the view archive for the given path.
+  protected static boolean extractViewArchive(String archivePath,
+ViewExtractor extractor,
+ViewArchiveUtility archiveUtility,
+Configuration configuration,
+boolean systemOnly ) throws 
Exception {
+
+File viewDir = configuration.getViewsDir();
+
+String extractedArchivesPath = viewDir.getAbsolutePath() +
+File.separator + EXTRACTED_ARCHIVES_DIR;
+
+if (extractor.ensureExtractedArchiveDirectory(extractedArchivesPath)) {
+
+  File archiveFile = archiveUtility.getFile(archivePath);
+
+  ViewConfig viewConfig = 
archiveUtility.getViewConfigFromArchive(archiveFile);
+
+  String commonName = viewConfig.getName();
+  String version= viewConfig.getVersion();
+  String viewName   = ViewEntity.getViewName(commonName, version);
+
+  String extractedArchiveDirPath = extractedArchivesPath + File.separator 
+ viewName;
+  File