ambari git commit: AMBARI-11126 create widget wizard: Dismissing a wizard fails. (atkach)

2015-05-14 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk bfbb92003 - 2ce23cd4a


AMBARI-11126 create widget wizard: Dismissing a wizard fails. (atkach)


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

Branch: refs/heads/trunk
Commit: 2ce23cd4ab105dca1e43ee0b709c18447d3d6aa7
Parents: bfbb920
Author: Andrii Tkach atk...@hortonworks.com
Authored: Thu May 14 14:59:25 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Thu May 14 16:51:25 2015 +0300

--
 ambari-web/app/controllers/main/service/info/summary.js| 6 +-
 .../main/service/widgets/create/wizard_controller.js   | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2ce23cd4/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index 9455f36..137b5e4 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -580,7 +580,10 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
* create widget
*/
   createWidget: function () {
-App.router.send('addServiceWidget', 
this.get('activeWidgetLayout.widgets').objectAt(0));
+App.router.send('addServiceWidget', Em.Object.create({
+  layout: this.get('activeWidgetLayout'),
+  serviceName: this.get('content.serviceName')
+}));
   },
 
   /**
@@ -588,6 +591,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
* @param {App.Widget} content
*/
   editWidget: function (content) {
+content.set('serviceName', this.get('content.serviceName'));
 App.router.send('editServiceWidget', content);
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2ce23cd4/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
index e9f5abd..10c49db 100644
--- 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
+++ 
b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
@@ -354,8 +354,8 @@ App.WidgetWizardController = App.WizardController.extend({
 this.finish();
 this.get('popup').hide();
 var serviceName = this.get('content.widgetService');
-var service = App.Service.find().findProperty('serviceName', serviceName);
-App.router.transitionTo('main.services.service', service);
+var service = App.Service.find(serviceName);
+App.router.transitionTo('main.services.service.summary', service);
 if (!App.get('testMode')) {
   App.clusterStatus.setClusterStatus({
 clusterName: App.router.getClusterName(),



ambari git commit: AMBARI-11106 - Views : Disable redirect for null path info (tbeerbower)

2015-05-14 Thread tbeerbower
Repository: ambari
Updated Branches:
  refs/heads/trunk 2ce23cd4a - 1884cd12c


AMBARI-11106 - Views : Disable redirect for null path info (tbeerbower)


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

Branch: refs/heads/trunk
Commit: 1884cd12c8e60ba6ec519bd647b937431736d4aa
Parents: 2ce23cd
Author: tbeerbower tbeerbo...@hortonworks.com
Authored: Thu May 14 09:54:28 2015 -0400
Committer: tbeerbower tbeerbo...@hortonworks.com
Committed: Thu May 14 09:54:51 2015 -0400

--
 .../java/org/apache/ambari/server/controller/AmbariHandlerList.java | 1 +
 .../org/apache/ambari/server/controller/AmbariHandlerListTest.java  | 1 +
 2 files changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1884cd12/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 4207007..13fc832 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
@@ -236,6 +236,7 @@ public class AmbariHandlerList extends HandlerCollection 
implements ViewInstance
 webAppContext.setSessionHandler(new SharedSessionHandler(sessionManager));
 webAppContext.addFilter(new FilterHolder(persistFilter), /*, 1);
 webAppContext.addFilter(new FilterHolder(springSecurityFilter), /*, 1);
+webAppContext.setAllowNullPathInfo(true);
 
 return webAppContext;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1884cd12/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariHandlerListTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariHandlerListTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariHandlerListTest.java
index afad6ce..31a7a19 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariHandlerListTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariHandlerListTest.java
@@ -71,6 +71,7 @@ public class AmbariHandlerListTest {
 
 handler.addFilter(capture(persistFilterCapture), eq(/*), eq(1));
 handler.addFilter(capture(securityFilterCapture), eq(/*), eq(1));
+handler.setAllowNullPathInfo(true);
 
 replay(handler, server);
 



ambari git commit: AMBARI-11130. yarn.node-labels.manager-class still present during cluster deploy and on deployed cluster (aonishuk)

2015-05-14 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 1884cd12c - f9cefd231


AMBARI-11130. yarn.node-labels.manager-class still present during cluster 
deploy and on deployed cluster (aonishuk)


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

Branch: refs/heads/trunk
Commit: f9cefd23197d317b0ed06c8d04ae2eb3c1667149
Parents: 1884cd1
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu May 14 17:02:48 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu May 14 17:02:48 2015 +0300

--
 .../services/OOZIE/configuration/oozie-site.xml | 166 ---
 .../services/YARN/configuration/yarn-site.xml   |  29 
 2 files changed, 29 insertions(+), 166 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f9cefd23/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/configuration/oozie-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/configuration/oozie-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/configuration/oozie-site.xml
deleted file mode 100644
index dc95b6f..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/configuration/oozie-site.xml
+++ /dev/null
@@ -1,166 +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.
---
-
-configuration supports_final=true supports_do_not_extend=true
-
-  property
-nameoozie.authentication.kerberos.name.rules/name
-value
-  RULE:[2:$1@$0]([jt]t@.*TODO-KERBEROS-DOMAIN)s/.*/TODO-MAPREDUSER/
-  RULE:[2:$1@$0]([nd]n@.*TODO-KERBEROS-DOMAIN)s/.*/TODO-HDFSUSER/
-  RULE:[2:$1@$0](hm@.*TODO-KERBEROS-DOMAIN)s/.*/TODO-HBASE-USER/
-  RULE:[2:$1@$0](rs@.*TODO-KERBEROS-DOMAIN)s/.*/TODO-HBASE-USER/
-  DEFAULT
-/value
-descriptionThe mapping from kerberos principal names to local OS user 
names./description
-  /property
-
-  property
-nameoozie.authentication.type/name
-valuesimple/value
-description
-  Authentication used for Oozie HTTP endpoint, the supported values are: 
simple | kerberos |
-  #AUTHENTICATION_HANDLER_CLASSNAME#.
-/description
-  /property
-
-  property
-nameoozie.base.url/name
-valuehttp://localhost:11000/oozie/value
-descriptionBase Oozie URL./description
-  /property
-
-  property
-nameoozie.credentials.credentialclasses/name
-valuehcat=org.apache.oozie.action.hadoop.HCatCredentials/value
-description
-  Credential Class to be used for HCat.
-/description
-  /property
-
-  property
-nameoozie.service.AuthorizationService.authorization.enabled/name
-valuefalse/value
-description
-  Specifies whether security (user name/admin role) is enabled or not.
-  If disabled any user can manage Oozie system and manage any job.
-/description
-  /property
-
-  property
-nameoozie.service.HadoopAccessorService.hadoop.configurations/name
-value*=/etc/hadoop/conf/value
-description
-  Comma separated AUTHORITY=HADOOP_CONF_DIR, where AUTHORITY is the 
HOST:PORT of
-  the Hadoop service (JobTracker, HDFS). The wildcard '*' configuration is
-  used when there is no exact match for an authority. The HADOOP_CONF_DIR 
contains
-  the relevant Hadoop *-site.xml files. If the path is relative is looked 
within
-  the Oozie configuration directory; though the path can be absolute (i.e. 
to point
-  to Hadoop client conf/ directories in the local filesystem.
-/description
-  /property
-
-  property
-nameoozie.service.HadoopAccessorService.kerberos.enabled/name
-valuefalse/value
-description
-  Indicates if Oozie is configured to use Kerberos.
-/description
-  /property
-
-  property
-nameoozie.service.URIHandlerService.uri.handlers/name
-

ambari git commit: AMBARI-11123. Check Mahout fails on devdeploy test run after enabling security (aonishuk)

2015-05-14 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 1eb5445b8 - bfbb92003


AMBARI-11123. Check Mahout fails on devdeploy test run after enabling security 
(aonishuk)


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

Branch: refs/heads/trunk
Commit: bfbb92003a22c2307f4dc24afb40bd54f48e7c4b
Parents: 1eb5445
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu May 14 15:58:41 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu May 14 15:58:41 2015 +0300

--
 .../common-services/YARN/2.1.0.2.0/package/scripts/yarn.py  | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bfbb9200/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
index 1e75eb0..53bdba1 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
@@ -179,6 +179,7 @@ def yarn(name = None):
   params.HdfsResource(params.node_labels_dir,
type=directory,
action=create_on_execute,
+   change_permissions_for_parents=True,
owner=params.yarn_user,
group=params.user_group,
mode=0700



ambari git commit: AMBARI-11128. Add EWMA to yarn log4j appenders in Dal (aonishuk)

2015-05-14 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk b93f3aab2 - 1eb5445b8


AMBARI-11128. Add EWMA to yarn log4j appenders in Dal (aonishuk)


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

Branch: refs/heads/trunk
Commit: 1eb5445b8f3a53ec5ba20596c6633e34607b9c42
Parents: b93f3aa
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu May 14 15:42:06 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu May 14 15:42:06 2015 +0300

--
 .../services/YARN/configuration/yarn-env.xml| 116 +++
 1 file changed, 116 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1eb5445b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml
index 063e605..3f41771 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml
@@ -25,5 +25,121 @@
 valuetrue/value
 descriptionSet to false by default,  needs to be set to true in stacks 
that use Ranger Yarn Plugin/description
   /property
+  !-- yarn-env.sh --
+  property
+namecontent/name
+descriptionThis is the jinja template for yarn-env.sh file/description
+value
+  export HADOOP_YARN_HOME={{hadoop_yarn_home}}
+  export YARN_LOG_DIR={{yarn_log_dir_prefix}}/$USER
+  export YARN_PID_DIR={{yarn_pid_dir_prefix}}/$USER
+  export HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}
+  export JAVA_HOME={{java64_home}}
+
+  # User for YARN daemons
+  export HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn}
+
+  # resolve links - $0 may be a softlink
+  export YARN_CONF_DIR=${YARN_CONF_DIR:-$HADOOP_YARN_HOME/conf}
+
+  # some Java parameters
+  # export JAVA_HOME=/home/y/libexec/jdk1.6.0/
+  if [ $JAVA_HOME !=  ]; then
+  #echo run java in $JAVA_HOME
+  JAVA_HOME=$JAVA_HOME
+  fi
+
+  if [ $JAVA_HOME =  ]; then
+  echo Error: JAVA_HOME is not set.
+  exit 1
+  fi
+
+  JAVA=$JAVA_HOME/bin/java
+  JAVA_HEAP_MAX=-Xmx1000m
+
+  # For setting YARN specific HEAP sizes please use this
+  # Parameter and set appropriately
+  YARN_HEAPSIZE={{yarn_heapsize}}
+
+  # check envvars which might override default args
+  if [ $YARN_HEAPSIZE !=  ]; then
+  JAVA_HEAP_MAX=-Xmx$YARN_HEAPSIZEm
+  fi
+
+  # Resource Manager specific parameters
+
+  # Specify the max Heapsize for the ResourceManager using a numerical 
value
+  # in the scale of MB. For example, to specify an jvm option of 
-Xmx1000m, set
+  # the value to 1000.
+  # This value will be overridden by an Xmx setting specified in either 
YARN_OPTS
+  # and/or YARN_RESOURCEMANAGER_OPTS.
+  # If not specified, the default value will be picked from either 
YARN_HEAPMAX
+  # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
+  export YARN_RESOURCEMANAGER_HEAPSIZE={{resourcemanager_heapsize}}
+
+  # Specify the JVM options to be used when starting the ResourceManager.
+  # These options will be appended to the options specified as YARN_OPTS
+  # and therefore may override any similar flags set in YARN_OPTS
+  #export YARN_RESOURCEMANAGER_OPTS=
 
+  # Node Manager specific parameters
+
+  # Specify the max Heapsize for the NodeManager using a numerical value
+  # in the scale of MB. For example, to specify an jvm option of 
-Xmx1000m, set
+  # the value to 1000.
+  # This value will be overridden by an Xmx setting specified in either 
YARN_OPTS
+  # and/or YARN_NODEMANAGER_OPTS.
+  # If not specified, the default value will be picked from either 
YARN_HEAPMAX
+  # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
+  export YARN_NODEMANAGER_HEAPSIZE={{nodemanager_heapsize}}
+
+  # Specify the max Heapsize for the HistoryManager using a numerical value
+  # in the scale of MB. For example, to specify an jvm option of 
-Xmx1000m, set
+  # the value to 1024.
+  # This value will be overridden by an Xmx setting specified in either 
YARN_OPTS
+  # and/or YARN_HISTORYSERVER_OPTS.
+  # If not specified, the default value will be picked from either 
YARN_HEAPMAX
+  # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
+  

ambari git commit: AMBARI-11127. Failed to install Ranger KMS (akovalenko)

2015-05-14 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/trunk a8bbcc776 - b93f3aab2


AMBARI-11127. Failed to install Ranger KMS (akovalenko)


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

Branch: refs/heads/trunk
Commit: b93f3aab2fb505e046b0f7ea4fdf8d470e8778a8
Parents: a8bbcc7
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Thu May 14 15:28:10 2015 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Thu May 14 15:28:10 2015 +0300

--
 .../resources/common-services/RANGER_KMS/0.5.0.2.3/metainfo.xml  | 4 
 ambari-web/app/models/stack_service.js   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b93f3aab/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/metainfo.xml
index b5ae899..f956fed 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/metainfo.xml
@@ -75,6 +75,10 @@
 timeout300/timeout
   /commandScript
 
+  requiredServices
+serviceRANGER/service
+  /requiredServices
+  
 /service
   /services
 /metainfo

http://git-wip-us.apache.org/repos/asf/ambari/blob/b93f3aab/ambari-web/app/models/stack_service.js
--
diff --git a/ambari-web/app/models/stack_service.js 
b/ambari-web/app/models/stack_service.js
index 1485f07..dcdb60b 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -89,7 +89,7 @@ App.StackService = DS.Model.extend({
   skipServices.push('GANGLIA');
 }
 if(App.router.get('clusterInstallCompleted') != true){
-  skipServices.push('RANGER');
+  skipServices.push('RANGER', 'RANGER_KMS');
 }
 return skipServices.contains(this.get('serviceName'));
   }.property('serviceName'),



[1/3] ambari git commit: AMBARI-10924. Stack changes for supporting modifications done in Ranger for HDP 2.3 (Gautam Borad via alejandro)

2015-05-14 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 9c570b859 - e50a2ac31


http://git-wip-us.apache.org/repos/asf/ambari/blob/e50a2ac3/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/configuration/ranger-ugsync-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/configuration/ranger-ugsync-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/configuration/ranger-ugsync-site.xml
new file mode 100644
index 000..020c2b1
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/configuration/ranger-ugsync-site.xml
@@ -0,0 +1,281 @@
+?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.
+--
+
+configuration supports_final=true
+
+  property
+nameranger.usersync.port/name
+value5151/value
+description/description
+  /property
+
+  property
+nameranger.usersync.ssl/name
+valuetrue/value
+description/description
+  /property
+
+  property
+nameranger.usersync.keystore.file/name
+value./conf/cert/unixauthservice.jks/value
+description/description
+  /property
+
+  property
+nameranger.usersync.keystore.password/name
+valueUnIx529p/value
+property-typePASSWORD/property-type
+description/description
+  /property
+
+  property
+nameranger.usersync.truststore.file/name
+value./conf/cert/mytruststore.jks/value
+description/description
+  /property
+
+  property
+nameranger.usersync.truststore.password/name
+valuechangeit/value
+property-typePASSWORD/property-type
+description/description
+  /property
+
+  property
+nameranger.usersync.passwordvalidator.path/name
+value./native/credValidator.uexe/value
+description/description
+  /property
+
+  property
+nameranger.usersync.enabled/name
+valuetrue/value
+description/description
+  /property
+
+  property
+nameranger.usersync.sink.impl.class/name
+
valueorg.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder/value
+description/description
+  /property
+
+  property
+nameranger.usersync.policymanager.baseURL/name
+value{{ranger_external_url}}/value
+description/description
+  /property
+
+  property
+nameranger.usersync.policymanager.maxrecordsperapicall/name
+value1000/value
+description/description
+  /property
+
+  property
+nameranger.usersync.policymanager.mockrun/name
+valuefalse/value
+description/description
+  /property
+
+  property
+nameranger.usersync.unix.minUserId/name
+value500/value
+description/description
+  /property
+
+  property
+nameranger.usersync.sleeptimeinmillisbetweensynccycle/name
+value5/value
+description/description
+  /property
+
+  property
+nameranger.usersync.source.impl.class/name
+valueorg.apache.ranger.unixusersync.process.UnixUserGroupBuilder/value
+descriptionFor Ldap: 
org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder, For Unix: 
org.apache.ranger.unixusersync.process.UnixUserGroupBuilder, 
org.apache.ranger.unixusersync.process.FileSourceUserGroupBuilder/description
+  /property
+
+  property
+nameranger.usersync.filesource.file/name
+value/tmp/usergroup.txt/value
+description/tmp/usergroup.json or /tmp/usergroup.csv or 
/tmp/usergroup.txt/description
+  /property
+
+  property
+nameranger.usersync.filesource.text.delimiter/name
+value,/value
+description/description
+  /property
+
+  property
+nameranger.usersync.ldap.url/name
+valueldap://localhost:389/value
+description/description
+  /property
+
+  property
+nameranger.usersync.ldap.binddn/name
+valuecn=admin,dc=xasecure,dc=net/value
+description/description
+  /property
+
+  property
+nameranger.usersync.ldap.ldapbindpassword/name
+valueadmin321/value
+description/description
+  /property
+
+  property
+nameranger.usersync.ldap.bindalias/name
+valuetestldapalias/value
+description/description
+  /property
+
+  property
+nameranger.usersync.ldap.bindkeystore/name
+value-/value
+description/description
+  /property
+
+  property
+

[3/3] ambari git commit: AMBARI-10924. Stack changes for supporting modifications done in Ranger for HDP 2.3 (Gautam Borad via alejandro)

2015-05-14 Thread alejandro
AMBARI-10924. Stack changes for supporting modifications done in Ranger for HDP 
2.3 (Gautam Borad via alejandro)


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

Branch: refs/heads/trunk
Commit: e50a2ac31b28e90ba1cfee70bf337c65910b7ee7
Parents: 9c570b8
Author: Alejandro Fernandez afernan...@hortonworks.com
Authored: Thu May 14 10:30:50 2015 -0700
Committer: Alejandro Fernandez afernan...@hortonworks.com
Committed: Thu May 14 10:31:10 2015 -0700

--
 .../libraries/functions/setup_ranger_plugin.py  |   8 +-
 .../functions/setup_ranger_plugin_xml.py| 162 
 .../0.96.0.2.0/package/scripts/params_linux.py  |  33 +-
 .../package/scripts/setup_ranger_hbase.py   |  17 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |  30 +-
 .../package/scripts/setup_ranger_hdfs.py|  25 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |  29 +-
 .../package/scripts/setup_ranger_hive.py|  25 +-
 .../0.5.0.2.2/package/scripts/params_linux.py   |  23 +-
 .../package/scripts/setup_ranger_knox.py|  17 +-
 .../RANGER/0.4.0/configuration/ranger-env.xml   |  16 +-
 .../RANGER/0.4.0/package/scripts/params.py  |  42 +-
 .../0.4.0/package/scripts/ranger_admin.py   |  19 +-
 .../0.4.0/package/scripts/ranger_usersync.py|   8 +-
 .../0.4.0/package/scripts/setup_ranger.py   |   7 +
 .../0.4.0/package/scripts/setup_ranger_xml.py   | 195 +
 .../0.9.1.2.1/package/scripts/params_linux.py   |  26 +-
 .../package/scripts/setup_ranger_storm.py   |  25 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |  23 +-
 .../package/scripts/setup_ranger_yarn.py|  20 +-
 .../HBASE/configuration/ranger-hbase-audit.xml  | 270 
 .../ranger-hbase-plugin-properties.xml  | 130 +-
 .../ranger-hbase-policymgr-ssl.xml  |  59 +++
 .../configuration/ranger-hbase-security.xml |  64 +++
 .../HDFS/configuration/ranger-hdfs-audit.xml| 270 
 .../ranger-hdfs-plugin-properties.xml   | 125 +-
 .../configuration/ranger-hdfs-policymgr-ssl.xml |  59 +++
 .../HDFS/configuration/ranger-hdfs-security.xml |  64 +++
 .../HIVE/configuration/ranger-hive-audit.xml| 270 
 .../ranger-hive-plugin-properties.xml   | 130 +-
 .../configuration/ranger-hive-policymgr-ssl.xml |  59 +++
 .../HIVE/configuration/ranger-hive-security.xml |  65 +++
 .../KNOX/configuration/ranger-knox-audit.xml| 270 
 .../ranger-knox-plugin-properties.xml   | 125 +-
 .../configuration/ranger-knox-policymgr-ssl.xml |  59 +++
 .../KNOX/configuration/ranger-knox-security.xml |  59 +++
 .../RANGER/configuration/admin-properties.xml   |  60 ++-
 .../RANGER/configuration/ranger-admin-site.xml  | 227 ++
 .../RANGER/configuration/ranger-env.xml |  34 ++
 .../RANGER/configuration/ranger-site.xml|  66 +++
 .../RANGER/configuration/ranger-ugsync-site.xml | 281 +
 .../configuration/usersync-properties.xml   | 108 +
 .../stacks/HDP/2.3/services/RANGER/metainfo.xml |   8 +
 .../STORM/configuration/ranger-storm-audit.xml  | 270 
 .../ranger-storm-plugin-properties.xml  | 125 +-
 .../ranger-storm-policymgr-ssl.xml  |  59 +++
 .../configuration/ranger-storm-security.xml |  59 +++
 .../YARN/configuration/ranger-yarn-audit.xml| 270 
 .../configuration/ranger-yarn-policymgr-ssl.xml |  59 +++
 .../YARN/configuration/ranger-yarn-security.xml |  59 +++
 .../test/python/stacks/2.2/configs/default.json |   3 +-
 .../2.2/configs/ranger-admin-upgrade.json   |   4 +-
 .../2.2/configs/ranger-usersync-upgrade.json|   3 +-
 .../test/python/stacks/2.2/configs/secured.json |   3 +-
 .../test/python/stacks/2.3/configs/default.json |   5 +-
 ambari-web/app/data/HDP2.3/site_properties.js   | 414 ++-
 56 files changed, 4773 insertions(+), 172 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e50a2ac3/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py
index eb22926..35d4953 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py
@@ -20,9 +20,9 @@ limitations under the License.
 __all__ = [setup_ranger_plugin]

[2/3] ambari git commit: AMBARI-10924. Stack changes for supporting modifications done in Ranger for HDP 2.3 (Gautam Borad via alejandro)

2015-05-14 Thread alejandro
http://git-wip-us.apache.org/repos/asf/ambari/blob/e50a2ac3/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/ranger-hbase-audit.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/ranger-hbase-audit.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/ranger-hbase-audit.xml
new file mode 100644
index 000..d3b2248
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/ranger-hbase-audit.xml
@@ -0,0 +1,270 @@
+?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.
+ */
+--
+configuration
+
+  property
+namexasecure.audit.is.enabled/name
+valuetrue/value
+description/description
+  /property 
+  
+  property
+namexasecure.audit.db.is.enabled/name
+valuefalse/value
+description/description
+  /property 
+  
+  property
+namexasecure.audit.db.is.async/name
+valuetrue/value
+description/description
+  /property 
+  
+  property
+namexasecure.audit.db.async.max.queue.size/name
+value10240/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.db.async.max.flush.interval.ms/name
+value3/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.db.batch.size/name
+value100/value
+description/description
+  /property 
+
+  
+  property
+namexasecure.audit.jpa.javax.persistence.jdbc.url/name
+
valuejdbc:{{xa_audit_db_flavor}}://{{xa_db_host}}/{{xa_audit_db_name}}/value
+description/description
+  /property
+
+  property
+namexasecure.audit.jpa.javax.persistence.jdbc.user/name
+value{{xa_audit_db_user}}/value
+description/description
+  /property
+
+  property
+namexasecure.audit.jpa.javax.persistence.jdbc.password/name
+valuecrypted/value
+description/description
+  /property
+
+  property
+namexasecure.audit.jpa.javax.persistence.jdbc.driver/name
+valuecom.mysql.jdbc.Driver/value
+description/description
+  /property
+
+  property
+namexasecure.audit.credential.provider.file/name
+valuejceks://file/{{credential_file}}/value
+description/description
+  /property
+  
+  property
+namexasecure.audit.hdfs.is.enabled/name
+valuefalse/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.hdfs.is.async/name
+valuetrue/value
+description/description
+  /property 
+  
+  property
+namexasecure.audit.hdfs.async.max.queue.size/name
+value1048576/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.hdfs.async.max.flush.interval.ms/name
+value3/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.hdfs.config.encoding/name
+value/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.hdfs.config.destination.directory/name
+
valuehdfs://NAMENODE_HOST:8020/ranger/audit/%app-type%/%time:MMdd%/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.hdfs.config.destination.file/name
+value%hostname%-audit.log/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.hdfs.config.destination.flush.interval.seconds/name
+value900/value
+description/description
+  /property 
+
+  property
+
namexasecure.audit.hdfs.config.destination.rollover.interval.seconds/name
+value86400/value
+description/description
+  /property 
+
+  property
+
namexasecure.audit.hdfs.config.destination.open.retry.interval.seconds/name
+value60/value
+description/description
+  /property
+
+  property
+namexasecure.audit.hdfs.config.local.buffer.directory/name
+value/var/log/hbase/audit/%app-type%/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.hdfs.config.local.buffer.file/name
+value%time:MMdd-HHmm.ss%.log/value
+description/description
+  /property 
+
+  property
+namexasecure.audit.hdfs.config.local.buffer.file.buffer.size.bytes/name
+value8192/value
+

ambari git commit: AMBARI-11048 - Oozie Upgrade Pack For HDP-2.2 to HDP-2.3 (jonathanhurley)

2015-05-14 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk 8263f2f1b - f4a4d0d9a


AMBARI-11048 - Oozie Upgrade Pack For HDP-2.2 to HDP-2.3 (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: f4a4d0d9a224d1d679dbc21286eb57a3ecb129a9
Parents: 8263f2f
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Thu May 14 12:18:08 2015 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Thu May 14 13:40:40 2015 -0400

--
 .../internal/UpgradeResourceProvider.java   |   4 -
 .../serveraction/upgrades/ConfigureAction.java  |   4 +-
 .../package/alerts/alert_check_oozie_server.py  |  12 +-
 .../4.0.0.2.0/package/scripts/oozie_service.py  |  17 ++-
 .../OOZIE/5.0.0.2.3/configuration/oozie-env.xml | 142 +++
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml |  52 +--
 .../stacks/2.0.6/OOZIE/test_oozie_server.py |   4 +
 .../python/stacks/2.2/KNOX/test_knox_gateway.py |   2 +
 8 files changed, 216 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4a4d0d9/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index bdb2784..ca72934 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -1041,10 +1041,6 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 detail.append(String.format(/%s to %s, key, value));
   }
 
-  if (!transfers.isEmpty()) {
-detail.append(String.format(; transferring %d properties, 
transfers.size()));
-  }
-
   itemDetail = detail.toString();
 
   if (null != ct.summary) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4a4d0d9/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
index ce03861..645c4bb 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
@@ -209,7 +209,9 @@ public class ConfigureAction extends AbstractServerAction {
   changedValues = true;
 
   // append standard output
-  outputBuffer.append(MessageFormat.format(Copied {0}/{1}\n, 
configType, key));
+  outputBuffer.append(MessageFormat.format(Copied {0}/{1}\n, 
configType,
+  transfer.toKey));
+
 } else if (StringUtils.isNotBlank(transfer.defaultValue)) {
   newValues.put(transfer.toKey, transfer.defaultValue);
   changedValues = true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4a4d0d9/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
index c0dc18a..a4a24b7 100644
--- 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
+++ 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
@@ -39,6 +39,8 @@ OOZIE_URL_KEY = '{{oozie-site/oozie.base.url}}'
 SECURITY_ENABLED = '{{cluster-env/security_enabled}}'
 OOZIE_PRINCIPAL = '{{oozie-site/oozie.authentication.kerberos.principal}}'
 OOZIE_KEYTAB = '{{oozie-site/oozie.authentication.kerberos.keytab}}'
+OOZIE_CONF_DIR = '/usr/hdp/current/oozie-server/conf'
+OOZIE_CONF_DIR_LEGACY = '/etc/oozie/conf'
 
 class KerberosPropertiesNotFound(Exception): pass
 
@@ -107,7 +109,15 @@ def get_check_command(oozie_url, host_name, 
configurations):
 
   # kinit
   

ambari git commit: AMBARI-11138 Accumulo user doesn't appear on Misc configuration tab (billie)

2015-05-14 Thread billie
Repository: ambari
Updated Branches:
  refs/heads/trunk f4a4d0d9a - bd9672314


AMBARI-11138 Accumulo user doesn't appear on Misc configuration tab (billie)


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

Branch: refs/heads/trunk
Commit: bd9672314dd5989d2f3a860aacbcc0f90dd2e658
Parents: f4a4d0d
Author: Billie Rinaldi billie.rina...@gmail.com
Authored: Thu May 14 11:14:47 2015 -0700
Committer: Billie Rinaldi billie.rina...@gmail.com
Committed: Thu May 14 11:14:53 2015 -0700

--
 ambari-web/app/data/HDP2/site_properties.js | 11 ---
 1 file changed, 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bd967231/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 140e899..3dfd53d 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1932,17 +1932,6 @@ var hdp2properties = [
   },
   {
 id: site property,
-name: accumulo_user,
-displayName: Accumulo process user,
-displayType: user,
-isOverridable: false,
-isReconfigurable: false,
-serviceName: ACCUMULO,
-filename: accumulo-env.xml,
-category: General
-  },
-  {
-id: site property,
 name: accumulo_root_password,
 displayName: Accumulo root password,
 displayType: password,



ambari git commit: AMBARI-11139. NPE when setting desired config via REST API.(vbrodetskyi)

2015-05-14 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk e50a2ac31 - 8263f2f1b


AMBARI-11139. NPE when setting desired config via REST API.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 8263f2f1b5de393f2f3eeefb3fc1c4112f6da8d2
Parents: e50a2ac
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Sun May 10 19:14:26 2015 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Sun May 10 19:15:03 2015 +0300

--
 .../AmbariManagementControllerImpl.java  |  1 +
 .../AmbariManagementControllerTest.java  | 19 ---
 2 files changed, 17 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8263f2f1/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 09adf51..d1aebae 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -1282,6 +1282,7 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
   clusterConfigProperties = clusterConfig.getProperties();
 } else {
   isConfigurationCreationNeeded = true;
+  break;
 }
 if (requestConfigProperties == null || 
requestConfigProperties.isEmpty()) {
   Config existingConfig = cluster.getConfig(desiredConfig.getType(), 
desiredConfig.getVersionTag());

http://git-wip-us.apache.org/repos/asf/ambari/blob/8263f2f1/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 14dc186..00f9bed 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -5246,12 +5246,22 @@ public class AmbariManagementControllerTest {
 configs.put(a, b);
 MapString, String configs2 = new HashMapString, String();
 configs2.put(c, d);
+MapString, String configs3 = new HashMapString, String();
 
-ConfigurationRequest cr1,cr2,cr3;
+ConfigurationRequest cr1,cr2,cr3,cr4;
 cr1 = new ConfigurationRequest(clusterName, core-site,version1,
   configs, null);
 cr2 = new ConfigurationRequest(clusterName, hdfs-site,version1,
   configs, null);
+cr4 = new ConfigurationRequest(clusterName, kerberos-env, version1,
+  configs3, null);
+
+ConfigFactory cf = injector.getInstance(ConfigFactory.class);
+Config config1 = cf.createNew(cluster, kerberos-env,
+new HashMapString, String(), new HashMapString, 
MapString,String());
+config1.setTag(version1);
+
+cluster.addConfig(config1);
 
 ClusterRequest crReq = new ClusterRequest(cluster.getClusterId(), 
clusterName, null, null);
 crReq.setDesiredConfig(Collections.singletonList(cr1));
@@ -5259,12 +5269,15 @@ public class AmbariManagementControllerTest {
 crReq = new ClusterRequest(cluster.getClusterId(), clusterName, null, 
null);
 crReq.setDesiredConfig(Collections.singletonList(cr2));
 controller.updateClusters(Collections.singleton(crReq), null);
+crReq = new ClusterRequest(cluster.getClusterId(), clusterName, null, 
null);
+crReq.setDesiredConfig(Collections.singletonList(cr4));
+controller.updateClusters(Collections.singleton(crReq), null);
 
 // Install
 long requestId1 = installService(clusterName, serviceName1, true, false);
 
 ListStage stages = actionDB.getAllStages(requestId1);
-Assert.assertEquals(2, stages.get(0).getOrderedHostRoleCommands().get(0)
+Assert.assertEquals(3, stages.get(0).getOrderedHostRoleCommands().get(0)
   .getExecutionCommandWrapper().getExecutionCommand()
   .getConfigurationTags().size());
 
@@ -5320,7 +5333,7 @@ public class AmbariManagementControllerTest {
 Assert.assertNotNull(hdfsCmdHost2);
 ExecutionCommand execCmd = 

ambari git commit: AMBARI-11134. Set service states when provisioning cluster via blueprint

2015-05-14 Thread jspeidel
Repository: ambari
Updated Branches:
  refs/heads/trunk f9cefd231 - 9c570b859


AMBARI-11134. Set service states when provisioning cluster via blueprint


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

Branch: refs/heads/trunk
Commit: 9c570b859470e68427c399a870af426a3062ada9
Parents: f9cefd2
Author: John Speidel jspei...@hortonworks.com
Authored: Thu May 14 10:22:10 2015 -0400
Committer: John Speidel jspei...@hortonworks.com
Committed: Thu May 14 11:00:12 2015 -0400

--
 .../ambari/server/topology/AmbariContext.java   |  26 ++-
 .../ambari/server/topology/TopologyManager.java |  21 +-
 .../server/topology/AmbariContextTest.java  | 229 +++
 .../server/topology/TopologyManagerTest.java|   5 -
 4 files changed, 264 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9c570b85/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
index e6c43ef..0de4b00 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
@@ -51,6 +51,8 @@ import 
org.apache.ambari.server.controller.internal.HostResourceProvider;
 import org.apache.ambari.server.controller.internal.RequestImpl;
 import org.apache.ambari.server.controller.internal.ServiceResourceProvider;
 import org.apache.ambari.server.controller.internal.Stack;
+import org.apache.ambari.server.controller.predicate.EqualsPredicate;
+import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.utilities.ClusterControllerHelper;
 import org.apache.ambari.server.state.Cluster;
@@ -81,7 +83,7 @@ public class AmbariContext {
   private static HostResourceProvider hostResourceProvider;
   private static ServiceResourceProvider serviceResourceProvider;
   private static ComponentResourceProvider componentResourceProvider;
-  private HostComponentResourceProvider hostComponentResourceProvider;
+  private static HostComponentResourceProvider hostComponentResourceProvider;
 
   private final static Logger LOG = 
LoggerFactory.getLogger(TopologyManager.class);
 
@@ -158,7 +160,6 @@ public class AmbariContext {
   Cluster cluster = getController().getClusters().getCluster(clusterName);
   services.removeAll(cluster.getServices().keySet());
 } catch (AmbariException e) {
-  e.printStackTrace();
   throw new RuntimeException(Failed to persist service and component 
resources:  + e, e);
 }
 SetServiceRequest serviceRequests = new HashSetServiceRequest();
@@ -173,9 +174,28 @@ public class AmbariContext {
   getServiceResourceProvider().createServices(serviceRequests);
   getComponentResourceProvider().createComponents(componentRequests);
 } catch (AmbariException e) {
-  e.printStackTrace();
   throw new RuntimeException(Failed to persist service and component 
resources:  + e, e);
 }
+// set all services state to INSTALLED-STARTED
+// this is required so the user can start failed services at the service 
level
+MapString, Object installProps = new HashMapString, Object();
+
installProps.put(ServiceResourceProvider.SERVICE_SERVICE_STATE_PROPERTY_ID, 
INSTALLED);
+installProps.put(ServiceResourceProvider.SERVICE_CLUSTER_NAME_PROPERTY_ID, 
clusterName);
+MapString, Object startProps = new HashMapString, Object();
+startProps.put(ServiceResourceProvider.SERVICE_SERVICE_STATE_PROPERTY_ID, 
STARTED);
+startProps.put(ServiceResourceProvider.SERVICE_CLUSTER_NAME_PROPERTY_ID, 
clusterName);
+Predicate predicate = new EqualsPredicateString(
+ServiceResourceProvider.SERVICE_CLUSTER_NAME_PROPERTY_ID, clusterName);
+try {
+  getServiceResourceProvider().updateResources(
+  new RequestImpl(null, Collections.singleton(installProps), null, 
null), predicate);
+
+  getServiceResourceProvider().updateResources(
+  new RequestImpl(null, Collections.singleton(startProps), null, 
null), predicate);
+} catch (Exception e) {
+  // just log as this won't prevent cluster from being provisioned 
correctly
+  LOG.error(Unable to update state of services during cluster provision: 
 + e, e);
+}
   }
 
   public void createAmbariHostResources(String clusterName, String hostName, 

ambari git commit: AMBARI-11104. Upgrade 2.0.0-2.0.1 on oracle database failed (aonishuk)

2015-05-14 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint b1f340337 - ece8e1ab0


AMBARI-11104. Upgrade 2.0.0-2.0.1 on oracle database failed (aonishuk)


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

Branch: refs/heads/branch-2.0.maint
Commit: ece8e1ab0e78896c9153b356048cfe8fcf32343e
Parents: b1f3403
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu May 14 19:00:41 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu May 14 19:00:41 2015 +0300

--
 .../java/org/apache/ambari/server/orm/DBAccessorImpl.java   | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ece8e1ab/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
index b40ca27..f9e83b6 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
@@ -630,12 +630,19 @@ public class DBAccessorImpl implements DBAccessor {
   @Override
   public ListString getIndexesList(String tableName, boolean unique)
   throws SQLException{
+// Convert table names to uppercase, as Oracle is case sensitive.
+if (getDbType() == DbType.ORACLE) {
+ tableName = tableName.toUpperCase();
+}
 ResultSet rs = getDatabaseMetaData().getIndexInfo(null, null, tableName, 
unique, false);
 ListString index_list = new ArrayListString();
 if (rs != null){
   try{
 while (rs.next()) {
-  index_list.add(rs.getString(index_name));
+  String indexName = rs.getString(INDEX_NAME);
+  if (indexName != null) {  // hack for Oracle database, as she could 
return null values
+index_list.add(indexName);
+  }
 }
   }finally {
 rs.close();



ambari git commit: AMBARI-11119. DB Host property not visible during Ranger add Service wizard. (Rihard Zang via Jaimin)

2015-05-14 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk af675f47d - 9f93b027c


AMBARI-9. DB Host property not visible during Ranger add Service wizard. 
(Rihard Zang via Jaimin)


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

Branch: refs/heads/trunk
Commit: 9f93b027c82f6a421991033a8451221571ea3ded
Parents: af675f4
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Thu May 14 13:12:42 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Thu May 14 13:12:52 2015 -0700

--
 ambari-web/app/data/HDP2.3/site_properties.js | 15 ---
 1 file changed, 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9f93b027/ambari-web/app/data/HDP2.3/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2.3/site_properties.js 
b/ambari-web/app/data/HDP2.3/site_properties.js
index 4bf8078..9a3ad53 100644
--- a/ambari-web/app/data/HDP2.3/site_properties.js
+++ b/ambari-web/app/data/HDP2.3/site_properties.js
@@ -22,7 +22,6 @@ var hdp22properties = 
require('data/HDP2.2/site_properties').configProperties;
 
 var excludedConfigs = [
   'DB_FLAVOR',
-  'db_host',
   'SQL_COMMAND_INVOKER',
   'db_name',
   'db_root_user',
@@ -165,20 +164,6 @@ hdp23properties.push({
 category: DBSettings,
 index: 0
   },
-  {
-name: db_host,
-id: site property,
-displayName: Ranger DB host,
-defaultValue: ,
-isObserved: true,
-isReconfigurable: true,
-displayType: masterHost,
-isOverridable: false,
-isVisible: false,
-serviceName: RANGER,
-filename: admin-properties.xml,
-category: DBSettings
-  },
   / RANGER - HDFS Plugin 
***/
   {
 id: site property,



ambari git commit: AMBARI-11143. Upgrade 2.0.0 - 2.0.1 on ubuntu 12 - commands failures. (swagle)

2015-05-14 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 9f93b027c - f32be8ae9


AMBARI-11143. Upgrade 2.0.0 - 2.0.1 on ubuntu 12 - commands failures. (swagle)


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

Branch: refs/heads/trunk
Commit: f32be8ae93609a95b84ac364b8179ee802438de3
Parents: 9f93b02
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu May 14 13:56:58 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu May 14 13:56:58 2015 -0700

--
 .../src/main/package/deb/control/postinst  | 6 +-
 .../src/main/package/rpm/sink/postinstall.sh   | 6 +-
 2 files changed, 2 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f32be8ae/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst
--
diff --git 
a/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst 
b/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst
index e87b9f0..e75d557 100644
--- 
a/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst
+++ 
b/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst
@@ -32,9 +32,5 @@ LINKS=(${HADOOP_LINK_NAME} ${FLUME_LINK_NAME} 
${KAFKA_LINK_NAME})
 
 for index in ${!LINKS[*]}
 do
-  if [ -e ${LINKS[$index]} ]; then
-rm -f ${LINKS[$index]}
-  fi
-
-  ln -s ${JARS[$index]} ${LINKS[$index]}
+  rm -f ${LINKS[$index]} ; ln -s ${JARS[$index]} ${LINKS[$index]}
 done

http://git-wip-us.apache.org/repos/asf/ambari/blob/f32be8ae/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
--
diff --git 
a/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
 
b/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
index e87b9f0..e75d557 100644
--- 
a/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
+++ 
b/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
@@ -32,9 +32,5 @@ LINKS=(${HADOOP_LINK_NAME} ${FLUME_LINK_NAME} 
${KAFKA_LINK_NAME})
 
 for index in ${!LINKS[*]}
 do
-  if [ -e ${LINKS[$index]} ]; then
-rm -f ${LINKS[$index]}
-  fi
-
-  ln -s ${JARS[$index]} ${LINKS[$index]}
+  rm -f ${LINKS[$index]} ; ln -s ${JARS[$index]} ${LINKS[$index]}
 done



ambari git commit: AMBARI-11143. Upgrade 2.0.0 - 2.0.1 on ubuntu 12 - commands failures. (swagle)

2015-05-14 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint ece8e1ab0 - d09bf95e6


AMBARI-11143. Upgrade 2.0.0 - 2.0.1 on ubuntu 12 - commands failures. (swagle)


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

Branch: refs/heads/branch-2.0.maint
Commit: d09bf95e65d757ef38397fb12eebaed156df686a
Parents: ece8e1a
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu May 14 13:53:51 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu May 14 13:53:51 2015 -0700

--
 .../src/main/package/deb/control/postinst  | 6 +-
 .../src/main/package/rpm/sink/postinstall.sh   | 6 +-
 2 files changed, 2 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d09bf95e/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst
--
diff --git 
a/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst 
b/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst
index e87b9f0..e75d557 100644
--- 
a/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst
+++ 
b/ambari-metrics/ambari-metrics-assembly/src/main/package/deb/control/postinst
@@ -32,9 +32,5 @@ LINKS=(${HADOOP_LINK_NAME} ${FLUME_LINK_NAME} 
${KAFKA_LINK_NAME})
 
 for index in ${!LINKS[*]}
 do
-  if [ -e ${LINKS[$index]} ]; then
-rm -f ${LINKS[$index]}
-  fi
-
-  ln -s ${JARS[$index]} ${LINKS[$index]}
+  rm -f ${LINKS[$index]} ; ln -s ${JARS[$index]} ${LINKS[$index]}
 done

http://git-wip-us.apache.org/repos/asf/ambari/blob/d09bf95e/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
--
diff --git 
a/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
 
b/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
index e87b9f0..e75d557 100644
--- 
a/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
+++ 
b/ambari-metrics/ambari-metrics-assembly/src/main/package/rpm/sink/postinstall.sh
@@ -32,9 +32,5 @@ LINKS=(${HADOOP_LINK_NAME} ${FLUME_LINK_NAME} 
${KAFKA_LINK_NAME})
 
 for index in ${!LINKS[*]}
 do
-  if [ -e ${LINKS[$index]} ]; then
-rm -f ${LINKS[$index]}
-  fi
-
-  ln -s ${JARS[$index]} ${LINKS[$index]}
+  rm -f ${LINKS[$index]} ; ln -s ${JARS[$index]} ${LINKS[$index]}
 done



ambari git commit: AMBARI-11145. Admin View: About says Ambari 2.0.0, but it's 2.0.1. (yusaku)

2015-05-14 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint d09bf95e6 - f4777363e


AMBARI-11145. Admin View: About says Ambari 2.0.0, but it's 2.0.1. (yusaku)


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

Branch: refs/heads/branch-2.0.maint
Commit: f4777363eaac467533a4b76d84efa26ca0b35f8f
Parents: d09bf95
Author: Yusaku Sako yus...@hortonworks.com
Authored: Thu May 14 14:55:58 2015 -0700
Committer: Yusaku Sako yus...@hortonworks.com
Committed: Thu May 14 14:55:58 2015 -0700

--
 .../main/resources/ui/admin-web/app/views/modals/AboutModal.html   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4777363/ambari-admin/src/main/resources/ui/admin-web/app/views/modals/AboutModal.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/modals/AboutModal.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/modals/AboutModal.html
index 6dcdafa..ad170c6 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/modals/AboutModal.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/modals/AboutModal.html
@@ -28,7 +28,7 @@
   div class=projectApache Ambari/div
   br
   span id=i18n-33Version/span
-  script id=metamorph-199-start 
type=text/x-placeholder/script2.0.0script id=metamorph-199-end 
type=text/x-placeholder/script
+  script id=metamorph-199-start 
type=text/x-placeholder/script2.0.1script id=metamorph-199-end 
type=text/x-placeholder/script
   br
   br
   a href=http://ambari.apache.org/; target=_blankspan 
id=i18n-34Get involved!/span/a



ambari git commit: AMBARI-11149. Widgets: attempted to move/add/delete a widget causes exception.

2015-05-14 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 3d9072733 - 501afc0f5


AMBARI-11149. Widgets: attempted to move/add/delete a widget causes exception.


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

Branch: refs/heads/trunk
Commit: 501afc0f58c65eaeccf6c388ae6100c2c3d31048
Parents: 3d90727
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu May 14 16:07:19 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu May 14 16:07:19 2015 -0700

--
 .../internal/WidgetLayoutResourceProvider.java  |  9 
 .../entities/WidgetLayoutUserWidgetEntity.java  |  8 +++
 .../WidgetLayoutResourceProviderTest.java   | 23 
 3 files changed, 31 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/501afc0f/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
index 8f068d5..174a106 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
@@ -286,6 +286,15 @@ public class WidgetLayoutResourceProvider extends 
AbstractControllerResourceProv
 
   Set widgetsSet = (LinkedHashSet) 
propertyMap.get(WIDGETLAYOUT_WIDGETS_PROPERTY_ID);
 
+  //Remove old relations from widget entities
+  for (WidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntity : 
entity.getListWidgetLayoutUserWidgetEntity()) {
+
widgetLayoutUserWidgetEntity.getWidget().getListWidgetLayoutUserWidgetEntity()
+.remove(widgetLayoutUserWidgetEntity);
+widgetDAO.merge(widgetLayoutUserWidgetEntity.getWidget());
+  }
+  entity.setListWidgetLayoutUserWidgetEntity(new 
LinkedListWidgetLayoutUserWidgetEntity());
+  widgetLayoutDAO.merge(entity);
+
   ListWidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntityList 
= new LinkedListWidgetLayoutUserWidgetEntity();
   int order=0;
   for (Object widgetObject : widgetsSet) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/501afc0f/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
index 1d6e1b5..dbae31b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
@@ -17,6 +17,7 @@
  */
 package org.apache.ambari.server.orm.entities;
 
+import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
@@ -43,7 +44,7 @@ public class WidgetLayoutUserWidgetEntity {
   @JoinColumn(name = widget_layout_id, referencedColumnName = id)
   private WidgetLayoutEntity widgetLayout;
 
-  @ManyToOne
+  @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST, 
CascadeType.REFRESH})
   @JoinColumn(name = widget_id, referencedColumnName = id)
   private WidgetEntity widget;
 
@@ -97,10 +98,7 @@ public class WidgetLayoutUserWidgetEntity {
 
 WidgetLayoutUserWidgetEntity that = (WidgetLayoutUserWidgetEntity) o;
 
-if (widgetLayout.getId() != that.widgetLayout.getId()) return false;
-if (widget.getId() != that.widget.getId()) return false;
-
-return true;
+return (widgetLayout.equals(that.widgetLayout)  
widget.equals(that.widget));
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/501afc0f/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java
index 1a9e230..8184d34 100644
--- 

ambari git commit: AMBARI-10985. Undo action causing layout changes along with misc issues (Richard Zang via srimanth)

2015-05-14 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk f32be8ae9 - 3d9072733


AMBARI-10985. Undo action causing layout changes along with misc issues 
(Richard Zang via srimanth)


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

Branch: refs/heads/trunk
Commit: 3d9072733908c2d0d4910e0ebe833da320b4433d
Parents: f32be8a
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Thu May 14 15:49:11 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu May 14 15:49:11 2015 -0700

--
 ambari-web/app/styles/application.less  | 32 +++-
 ambari-web/app/styles/widgets.less  |  2 ++
 .../configs/service_config_layout_tab.hbs   |  9 --
 .../views/common/configs/service_config_view.js |  2 ++
 4 files changed, 29 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3d907273/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 806d356..a3d8483 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5662,7 +5662,7 @@ input[type=radio].align-checkbox, 
input[type=checkbox].align-checkbox {
   overflow: visible;
   height: 100%;
   padding: 18px;
-  border: 1px solid #aaa;
+  border: 1px solid #e4e4e4;
   vertical-align: top;
   h4 {
 margin: 0px;
@@ -5673,18 +5673,6 @@ input[type=radio].align-checkbox, 
input[type=checkbox].align-checkbox {
 font-size: 18px;
 font-weight: 400;
   }
-  .vertical-splitter-r {
-border-right: 2px solid #ccc; // vertical splitter
-padding-right: 20px;
-padding-left: 0px;
-  }
-
-  .vertical-splitter-l {
-border-left: 2px solid #ccc; // vertical splitter
-margin-left: -2px;
-padding-left: 20px;
-padding-right: 0px;
-  }
   div.with-border {
 border: 1px solid #aaa;
 padding: 10px;
@@ -5696,20 +5684,36 @@ input[type=radio].align-checkbox, 
input[type=checkbox].align-checkbox {
 height: ~calc(100% - 30px);
 border-collapse: separate;
 table-layout: fixed;
+@-moz-document url-prefix() { // for firefox only AMBARI-10985
+  .config-subsection {
+height: 100% !important;
+  }
+}
 .config-subsection {
   padding: 0px;
   vertical-align: top;
+  height: 0px; // td with height set allows inner div to have % 
height AMBARI-10985
+  .vertical-splitter-l {
+border-left: 1px solid #e4e4e4; // vertical splitter
+margin-left: -2px;
+padding-left: 20px;
+padding-right: 0px;
+height: 88%;
+  }
   .no-horizontal-splitter {
 border-bottom: none; // no horizontal splitter for subsection 
on the last row
   }
   .top-horizontal-splitter {
-border-top: 2px solid #ccc; // horizontal splitter
+border-top: 1px solid #e4e4e4; // horizontal splitter
 padding-top: 15px;
 padding-bottom: 15px;
   }
   .directories {
 min-width: 0px !important;
   }
+  .subsection-display-name {
+padding-top: 5px;
+  }
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d907273/ambari-web/app/styles/widgets.less
--
diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index d79ef07..b033d59 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -224,6 +224,8 @@
   }
   .slider-tick-label-container {
 margin-top: 0;
+position: relative;
+z-index: -1; // prevent it from covering up other widgets
   }
   .slider-tick-label {
 color: @slider-widget-tick-label-color;

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d907273/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
--
diff --git 
a/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs 

ambari git commit: AMBARI-11151. Install Customize Services page is prompting for passwords unnecessarily. (yusaku)

2015-05-14 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk 9bec90a6a - 9b1938fd6


AMBARI-11151. Install  Customize Services page is prompting for passwords 
unnecessarily. (yusaku)


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

Branch: refs/heads/trunk
Commit: 9b1938fd65f9d1a7642bdb56238f172d83f2c338
Parents: 9bec90a
Author: Yusaku Sako yus...@hortonworks.com
Authored: Thu May 14 16:58:02 2015 -0700
Committer: Yusaku Sako yus...@hortonworks.com
Committed: Thu May 14 17:00:23 2015 -0700

--
 ambari-web/app/data/HDP2.2/site_properties.js | 45 --
 1 file changed, 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9b1938fd/ambari-web/app/data/HDP2.2/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2.2/site_properties.js 
b/ambari-web/app/data/HDP2.2/site_properties.js
index 976fe21..22e9cac 100644
--- a/ambari-web/app/data/HDP2.2/site_properties.js
+++ b/ambari-web/app/data/HDP2.2/site_properties.js
@@ -148,15 +148,6 @@ hdp22properties.push(
   },
   {
 id: site property,
-name: REPOSITORY_CONFIG_PASSWORD,
-displayName: Ranger repository config password,
-displayType: password,
-filename: ranger-hdfs-plugin-properties.xml,
-category: Advanced ranger-hdfs-plugin-properties,
-serviceName: HDFS
-  },
-  {
-id: site property,
 name: REPOSITORY_CONFIG_USERNAME,
 displayName: Ranger repository config user,
 filename: ranger-hdfs-plugin-properties.xml,
@@ -206,15 +197,6 @@ hdp22properties.push(
   },
   {
 id: site property,
-name: REPOSITORY_CONFIG_PASSWORD,
-displayName: Ranger repository config password,
-displayType: password,
-filename: ranger-hive-plugin-properties.xml,
-category: Advanced ranger-hive-plugin-properties,
-serviceName: HIVE
-  },
-  {
-id: site property,
 name: REPOSITORY_CONFIG_USERNAME,
 displayName: Ranger repository config user,
 filename: ranger-hive-plugin-properties.xml,
@@ -274,15 +256,6 @@ hdp22properties.push(
   },
   {
 id: site property,
-name: REPOSITORY_CONFIG_PASSWORD,
-displayName: Ranger repository config password,
-displayType: password,
-filename: ranger-hbase-plugin-properties.xml,
-category: Advanced ranger-hbase-plugin-properties,
-serviceName: HBASE
-  },
-  {
-id: site property,
 name: REPOSITORY_CONFIG_USERNAME,
 displayName: Ranger repository config user,
 filename: ranger-hbase-plugin-properties.xml,
@@ -342,15 +315,6 @@ hdp22properties.push(
   },
   {
 id: site property,
-name: REPOSITORY_CONFIG_PASSWORD,
-displayName: Ranger repository config password,
-displayType: password,
-filename: ranger-storm-plugin-properties.xml,
-category: Advanced ranger-storm-plugin-properties,
-serviceName: STORM
-  },
-  {
-id: site property,
 name: REPOSITORY_CONFIG_USERNAME,
 displayName: Ranger repository config user,
 filename: ranger-storm-plugin-properties.xml,
@@ -400,15 +364,6 @@ hdp22properties.push(
   },
   {
 id: site property,
-name: REPOSITORY_CONFIG_PASSWORD,
-displayName: Ranger repository config password,
-displayType: password,
-filename: ranger-knox-plugin-properties.xml,
-category: Advanced ranger-knox-plugin-properties,
-serviceName: KNOX
-  },
-  {
-id: site property,
 name: REPOSITORY_CONFIG_USERNAME,
 displayName: Ranger repository config user,
 filename: ranger-knox-plugin-properties.xml,



ambari git commit: AMBARI-11141: Sample view for auto-cluster create that uses Ambari REST API

2015-05-14 Thread sposetti
Repository: ambari
Updated Branches:
  refs/heads/trunk 9b1938fd6 - 00bd07866


AMBARI-11141: Sample view for auto-cluster create that uses Ambari REST API

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

Branch: refs/heads/trunk
Commit: 00bd07866e558b97befda8296c40c7ac7c4d6a9a
Parents: 9b1938f
Author: sposetti compo...@yahoo.com
Authored: Thu May 14 20:36:13 2015 -0400
Committer: sposetti compo...@yahoo.com
Committed: Thu May 14 20:36:13 2015 -0400

--
 ambari-views/examples/README.md |   4 +-
 .../examples/auto-cluster-view/docs/index.md|  56 +
 ambari-views/examples/auto-cluster-view/pom.xml |  96 +++
 .../view/examples/AutoClusterService.java   | 116 +++
 .../src/main/resources/ui/index.html|  63 ++
 .../src/main/resources/view.xml |  62 ++
 6 files changed, 396 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/00bd0786/ambari-views/examples/README.md
--
diff --git a/ambari-views/examples/README.md b/ambari-views/examples/README.md
index ec1226e..650f650 100644
--- a/ambari-views/examples/README.md
+++ b/ambari-views/examples/README.md
@@ -23,12 +23,14 @@ See the documentation pages for the view examples.
 
 * [Hello World View](helloworld-view/docs/index.md) : Demonstrates the very 
basics of how to write and deploy a view in Ambari.
 * [Hello Servlet View](hello-servlet-view/docs/index.md) : Includes instance 
parameters and a servlet for a dynamic UI. 
+* [Hello Spring View](hello-spring-view/docs/index.md) : A very simple view 
example that uses Spring MVC.
 * [Favorite view](favorite-view/docs/index.md) : Exposes a simple resource to 
work with instance parameters and data.
 * [Calculator View](calculator-view/docs/index.md) : Includes a simple 
resource.
 * [Phone List View](phone-list-view/docs/index.md) : Demonstrates simple view 
persistence.
 * [Property View](property-view/docs/index.md) : Demonstrates view 
configuration property options.
 * [Property Validator View](property-validator-view/docs/index.md) : 
Demonstrates configuration property validator.
-* [Weather view](weather-view/docs/index.md)
+* [Weather view](weather-view/docs/index.md) : Demonstrates the the use of 
instance parameters, a servlet for a dynamic UI and a managed resource.
+* [Auto Cluster view](auto-cluster-view/docs/index.md) : Example view that can 
be auto-created and configured to leverage the Ambari REST APIs to access a 
cluster being managed by Ambari.
 
 Please also visit the [Apache Ambari Project](http://ambari.apache.org/) page 
for more information.
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/00bd0786/ambari-views/examples/auto-cluster-view/docs/index.md
--
diff --git a/ambari-views/examples/auto-cluster-view/docs/index.md 
b/ambari-views/examples/auto-cluster-view/docs/index.md
new file mode 100644
index 000..111962c
--- /dev/null
+++ b/ambari-views/examples/auto-cluster-view/docs/index.md
@@ -0,0 +1,56 @@
+!---
+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](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.
+--
+
+Auto Cluster View Example
+==
+
+Description
+-
+The Auto Cluster View is an example of a view that can be auto-created and 
configured to leverage
+the Ambari REST APIs to access a cluster being managed by Ambari.
+
+Build
+-
+
+The view can be built as a maven project.
+
+cd ambari-views/examples/auto-cluster-view
+mvn clean package
+
+The build will produce the view archive.
+
+ambari-views/examples/auto-cluster-view/target/auto-cluster-view-???.jar
+
+Deploy
+--
+
+Place the view archive on the Ambari Server and start to deploy.
+
+cp auto-cluster-view-???.jar /var/lib/ambari-server/resources/views/
+ambari-server start
+
+

[2/2] ambari git commit: AMBARI-11147. Widget browser: Button in the footer is not visible due to the increased height.(xiwang)

2015-05-14 Thread xiwang
AMBARI-11147. Widget browser: Button in the footer is not visible due to the 
increased height.(xiwang)


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

Branch: refs/heads/trunk
Commit: 546c919ae27c9bb108765645ac6443da15c28d01
Parents: 00bd078
Author: Xi Wang xiw...@apache.org
Authored: Thu May 14 15:57:20 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu May 14 17:40:50 2015 -0700

--
 .../app/styles/enhanced_service_dashboard.less  | 24 
 .../modal_popups/widget_browser_popup.hbs   |  2 +-
 2 files changed, 20 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/546c919a/ambari-web/app/styles/enhanced_service_dashboard.less
--
diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less 
b/ambari-web/app/styles/enhanced_service_dashboard.less
index 5ea0c08..4ca4b54 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -543,9 +543,12 @@
 
 .sixty-percent-width-modal.widgets-browser-popup {
   .modal {
-max-height: 703px;
+max-height: 600px;
+position: fixed;
 .modal-body {
-  min-height: 541px;
+  padding-top: 0px;
+  min-height: 290px;
+  max-height: 460px;
 }
   }
   
@@ -553,10 +556,14 @@
 min-width: 750px;
 max-width: 900px;
 #services-filter-bar {
-  padding: 0px 10px 0px 10px;
-  margin-bottom: 10px;
+  position: fixed;
+  padding: 10px 10px 5px 10px;
+  margin-bottom: 5px;
   border-bottom: transparent;
-  width: 80%;
+  background-color: white;
+  width: 56%;
+  z-index: 10;
+
   li  a {
 font-size: 14px;
 padding: 5px 5px;
@@ -566,7 +573,14 @@
 border-bottom: transparent;
   }
 }
+#create-widget-button {
+  position: fixed;
+  padding-top: 10px;
+  right: 23%;
+  z-index: 11;
+}
 #widgets-info {
+   padding-top: 40px;
   .widgets-info-container {
 .span6.widget-info-section {
   width: 44%;

http://git-wip-us.apache.org/repos/asf/ambari/blob/546c919a/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
--
diff --git 
a/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs 
b/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
index aa26488..3396cb6 100644
--- a/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
@@ -21,7 +21,7 @@
 div class=widget-browser-content
   !--Create new widget button--
   {{#isAccessible ADMIN}}
-div class=btn-group pull-right
+div class=btn-group pull-right id=create-widget-button
   button type=button class=btn btn-primary {{action 
createWidget target=view}} 
 i class=icon-plus/i nbsp; {{t dashboard.widgets.create}}
   /button



[1/2] ambari git commit: AMBARI-11152. Graph widget becomes unclickable after the description is shown on hover-wait.(XIWANG)

2015-05-14 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 00bd07866 - 77bb70603


AMBARI-11152. Graph widget becomes unclickable after the description is shown 
on hover-wait.(XIWANG)


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

Branch: refs/heads/trunk
Commit: 77bb70603d40461b12a57f27dc72ba4929f7898d
Parents: 546c919
Author: Xi Wang xiw...@apache.org
Authored: Thu May 14 17:40:25 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu May 14 17:40:50 2015 -0700

--
 ambari-web/app/templates/common/widget/graph_widget.hbs | 6 +-
 ambari-web/app/templates/main/charts/linear_time.hbs| 7 ++-
 ambari-web/app/views/common/widget/graph_widget_view.js | 3 +++
 3 files changed, 10 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/77bb7060/ambari-web/app/templates/common/widget/graph_widget.hbs
--
diff --git a/ambari-web/app/templates/common/widget/graph_widget.hbs 
b/ambari-web/app/templates/common/widget/graph_widget.hbs
index 209e7f8..dd5fd1d 100644
--- a/ambari-web/app/templates/common/widget/graph_widget.hbs
+++ b/ambari-web/app/templates/common/widget/graph_widget.hbs
@@ -31,11 +31,7 @@
   /a
 {{/isAccessible}}
 div class=content {{view view.graphView}}/div
-{{#if view.content.description}}
-  div class=hidden-description
-{{view.content.description}}
-  /div
-{{/if}}
+
   {{else}}
 div class=spinner/div
   {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/77bb7060/ambari-web/app/templates/main/charts/linear_time.hbs
--
diff --git a/ambari-web/app/templates/main/charts/linear_time.hbs 
b/ambari-web/app/templates/main/charts/linear_time.hbs
index eb36135..bcde4c4 100644
--- a/ambari-web/app/templates/main/charts/linear_time.hbs
+++ b/ambari-web/app/templates/main/charts/linear_time.hbs
@@ -28,6 +28,11 @@
   {{#unless view.noTitleUnderGraph}}
 div id={{unbound view.id}}-title 
class=chart-title{{view.title}}/div
   {{/unless}}
-
 /div
 
+{{#if view.description}}
+  div class=hidden-description {{action showGraphInPopup target=view}}
+{{view.description}}
+  /div
+{{/if}}
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/77bb7060/ambari-web/app/views/common/widget/graph_widget_view.js
--
diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js 
b/ambari-web/app/views/common/widget/graph_widget_view.js
index f135636..6c9b9b5 100644
--- a/ambari-web/app/views/common/widget/graph_widget_view.js
+++ b/ambari-web/app/views/common/widget/graph_widget_view.js
@@ -250,6 +250,9 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, {
 
 noTitleUnderGraph: true,
 inWidget: true,
+description: function () {
+  return this.get('parentView.content.description');
+}.property('parentView.content.description'),
 
 /**
  * set custom time range for graph widget



ambari git commit: AMBARI-11141: cleanup view.xml elements

2015-05-14 Thread sposetti
Repository: ambari
Updated Branches:
  refs/heads/trunk 77bb70603 - 9b6223b90


AMBARI-11141: cleanup view.xml elements


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

Branch: refs/heads/trunk
Commit: 9b6223b90f0ee5c174993cc8a9bfd17e836d907e
Parents: 77bb706
Author: sposetti compo...@yahoo.com
Authored: Thu May 14 22:30:13 2015 -0400
Committer: sposetti compo...@yahoo.com
Committed: Thu May 14 22:33:33 2015 -0400

--
 .../examples/auto-cluster-view/src/main/resources/view.xml   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9b6223b9/ambari-views/examples/auto-cluster-view/src/main/resources/view.xml
--
diff --git 
a/ambari-views/examples/auto-cluster-view/src/main/resources/view.xml 
b/ambari-views/examples/auto-cluster-view/src/main/resources/view.xml
index b7096ab..94ad0ed 100644
--- a/ambari-views/examples/auto-cluster-view/src/main/resources/view.xml
+++ b/ambari-views/examples/auto-cluster-view/src/main/resources/view.xml
@@ -25,24 +25,24 @@
 nameambari.server.url/name
 descriptionEnter Ambari Server Cluster URL/description
 placeholderhttp://ambari.server:8080/api/v1/clusters/c1/placeholder
-cluster-configfake/cluster-config
 default-valuetest/default-value
+cluster-configfake/cluster-config
 requiredtrue/required
   /parameter
   parameter
 nameambari.server.username/name
 descriptionEnter Ambari Server username/description
-cluster-configfake/cluster-config
 default-valuetest/default-value
+cluster-configfake/cluster-config
 requiredtrue/required
   /parameter
   parameter
 nameambari.server.password/name
 descriptionEnter Ambari Server password/description
-cluster-configfake/cluster-config
 default-valuetest/default-value
-maskedtrue/masked
+cluster-configfake/cluster-config
 requiredtrue/required
+maskedtrue/masked
   /parameter
   
   resource



ambari git commit: AMBARI-11004. HBaseHive services display passwords in plain text in Ambari 2.1 (akovalenko)

2015-05-14 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 1c4cca322 - a8bbcc776


AMBARI-11004. HBaseHive services display passwords in plain text in Ambari 2.1 
(akovalenko)


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

Branch: refs/heads/trunk
Commit: a8bbcc7766696b4e5cc241a83b158cc1b790ec2c
Parents: 1c4cca3
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Thu May 14 14:36:27 2015 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Thu May 14 14:36:27 2015 +0300

--
 .../0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml   | 5 -
 .../RANGER_KMS/0.5.0.2.3/configuration/kms-properties.xml   | 3 ++-
 .../HBASE/configuration/ranger-hbase-plugin-properties.xml  | 5 -
 .../HDFS/configuration/ranger-hdfs-plugin-properties.xml| 5 -
 .../HIVE/configuration/ranger-hive-plugin-properties.xml| 5 -
 .../STORM/configuration/ranger-storm-plugin-properties.xml  | 5 -
 .../YARN/configuration/ranger-yarn-plugin-properties.xml| 3 +++
 ambari-web/app/data/HDP2.2/site_properties.js   | 5 +
 8 files changed, 30 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a8bbcc77/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
index 50ea052..9f58e92 100644
--- 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
+++ 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
@@ -144,6 +144,7 @@
   property
 nameSSL_KEYSTORE_PASSWORD/name
 valuemyKeyFilePassword/value
+property-typePASSWORD/property-type
 description/description
   /property
 
@@ -156,6 +157,7 @@
   property
 nameSSL_TRUSTSTORE_PASSWORD/name
 valuechangeit/value
+property-typePASSWORD/property-type
 description/description
   /property
   
@@ -192,13 +194,14 @@
   property
 nameXAAUDIT.DB.PASSWORD/name
 value{{xa_audit_db_password}}/value
+property-typePASSWORD/property-type
 descriptionAudit database password/description
   /property
   
   property
 nameXAAUDIT.DB.HOSTNAME/name
 value{{xa_db_host}}/value
-descriptionAudit database password/description
+descriptionAudit database hostname/description
   /property
   
   property

http://git-wip-us.apache.org/repos/asf/ambari/blob/a8bbcc77/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-properties.xml
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-properties.xml
index 57ad221..fee9014 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-properties.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-properties.xml
@@ -92,6 +92,7 @@
   property
 nameKMS_MASTER_KEY_PASSWD/name
 valueStr0ngPassw0rd/value
+property-typePASSWORD/property-type
 description/description
   /property
 
@@ -266,4 +267,4 @@
 description/description
   /property 
 
-/configuration  
\ No newline at end of file
+/configuration
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/a8bbcc77/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/ranger-hbase-plugin-properties.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/ranger-hbase-plugin-properties.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/ranger-hbase-plugin-properties.xml
index f60d06f..89faba4 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/ranger-hbase-plugin-properties.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/ranger-hbase-plugin-properties.xml
@@ -138,6 +138,7 @@
   property
 nameSSL_KEYSTORE_PASSWORD/name
 valuemyKeyFilePassword/value
+

ambari git commit: AMBARI-11122. Create widget wizard: JMX metrics not shown for selection while adding metrics. (jaimin)

2015-05-14 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk c20250c5c - 8452f207d


AMBARI-11122. Create widget wizard: JMX metrics not shown for selection while 
adding metrics. (jaimin)


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

Branch: refs/heads/trunk
Commit: 8452f207d7b9343a162698f2a2b79bf2c512e9d3
Parents: c20250c
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Wed May 13 23:38:37 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Wed May 13 23:38:37 2015 -0700

--
 .../service/widgets/create/wizard_controller.js | 38 +++-
 .../service/widgets/create/expression_view.js   |  4 +--
 2 files changed, 24 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8452f207/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
index 940f7c8..e9f5abd 100644
--- 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
+++ 
b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
@@ -229,23 +229,29 @@ App.WidgetWizardController = App.WizardController.extend({
 var data = 
service.artifacts[0].artifact_data[service.StackServices.service_name];
 for (var componentName in data) {
   for (var level in data[componentName]) {
-metrics = data[componentName][level][0]['metrics']['default'];
-for (var widgetId in metrics) {
-  var metricObj = {
-widget_id: widgetId,
-point_in_time: metrics[widgetId].pointInTime,
-temporal: metrics[widgetId].temporal,
-name: metrics[widgetId].name,
-level: level.toUpperCase(),
-type: data[componentName][level][0][type].toUpperCase(),
-component_name: componentName,
-service_name: service.StackServices.service_name
-  };
-  result.push(metricObj);
-  if (metricObj.level === 'HOSTCOMPONENT') {
-self.insertHostComponentCriteria(metricObj);
+var metricTypes = data[componentName][level]; //Ganglia or JMX
+metricTypes.forEach(function (_metricType) {
+  metrics = _metricType['metrics']['default'];
+  var type = _metricType[type].toUpperCase();
+  if (!(type === 'JMX'  level.toUpperCase() === 'COMPONENT')) {
+for (var widgetId in metrics) {
+  var metricObj = {
+widget_id: widgetId,
+point_in_time: metrics[widgetId].pointInTime,
+temporal: metrics[widgetId].temporal,
+name: metrics[widgetId].name,
+level: level.toUpperCase(),
+type: type,
+component_name: componentName,
+service_name: service.StackServices.service_name
+  };
+  result.push(metricObj);
+  if (metricObj.level === 'HOSTCOMPONENT') {
+self.insertHostComponentCriteria(metricObj);
+  }
+}
   }
-}
+}, this);
   }
 }
   }, this);

http://git-wip-us.apache.org/repos/asf/ambari/blob/8452f207/ambari-web/app/views/main/service/widgets/create/expression_view.js
--
diff --git 
a/ambari-web/app/views/main/service/widgets/create/expression_view.js 
b/ambari-web/app/views/main/service/widgets/create/expression_view.js
index 2e6c572..5c12ca9 100644
--- a/ambari-web/app/views/main/service/widgets/create/expression_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/expression_view.js
@@ -171,8 +171,8 @@ App.AddMetricExpressionView = Em.View.extend({
   var filteredMetric = filteredComponentMetrics.findProperty('name', 
obj.selected);
   var selectedMetric =  Em.Object.create({
 name: obj.selected,
-componentName: self.get('selectedComponent.componentName'),
-serviceName: self.get('selectedComponent.serviceName'),
+componentName: self.get('currentSelectedComponent.componentName'),
+serviceName: self.get('currentSelectedComponent.serviceName'),
 metricPath: filteredMetric.widget_id,
 isMetric: true
   });



ambari git commit: AMBARI-11123. Check Mahout fails on devdeploy test run after enabling security (aonishuk)

2015-05-14 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 8452f207d - 81af756ad


AMBARI-11123. Check Mahout fails on devdeploy test run after enabling security 
(aonishuk)


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

Branch: refs/heads/trunk
Commit: 81af756ada66bd65b05b6e3443c2936a3ab8f9fb
Parents: 8452f20
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu May 14 12:22:19 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu May 14 12:22:19 2015 +0300

--
 .../MAHOUT/1.0.0.2.3/package/scripts/service_check.py |  4 
 .../python/stacks/2.3/MAHOUT/test_mahout_service_check.py | 10 ++
 2 files changed, 14 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/81af756a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/package/scripts/service_check.py
index da93c35..b7398d4 100644
--- 
a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/package/scripts/service_check.py
+++ 
b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/package/scripts/service_check.py
@@ -35,6 +35,10 @@ class MahoutServiceCheck(Script):
 mode = 0755
 )
 
+params.HdfsResource(format(/user/{smokeuser}/mahoutsmokeoutput),
+   action=delete_on_execute,
+   type=directory,
+)
 params.HdfsResource(format(/user/{smokeuser}/mahoutsmokeinput),
 action=create_on_execute,
 type=directory,

http://git-wip-us.apache.org/repos/asf/ambari/blob/81af756a/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py 
b/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
index 665119f..65b04f7 100644
--- 
a/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
+++ 
b/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
@@ -37,6 +37,16 @@ class TestMahoutClient(RMFTestCase):
 content = 'Test text which will be converted to sequence file.',
 mode = 0755,
 )
+self.assertResourceCalled('HdfsResource', 
'/user/ambari-qa/mahoutsmokeoutput',
+security_enabled = False,
+hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
+keytab = UnknownConfigurationMock(),
+kinit_path_local = '/usr/bin/kinit',
+user = 'hdfs',
+action = ['delete_on_execute'],
+hadoop_conf_dir = '/usr/hdp/current/hadoop-client/conf',
+type = 'directory',
+)
 self.assertResourceCalled('HdfsResource', 
'/user/ambari-qa/mahoutsmokeinput',
 security_enabled = False,
 hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',



ambari git commit: AMBARI-11124. PIG service check fails on enabling security (aonishuk)

2015-05-14 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 81af756ad - 630b501ef


AMBARI-11124. PIG service check fails on enabling security (aonishuk)


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

Branch: refs/heads/trunk
Commit: 630b501ef478d6b63226ae5b66768ac16692c3d8
Parents: 81af756
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu May 14 12:22:45 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu May 14 12:22:45 2015 +0300

--
 .../PIG/0.12.0.2.0/package/scripts/params_linux.py | 2 +-
 .../src/test/python/stacks/2.2/PIG/test_pig_service_check.py   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/630b501e/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/params_linux.py
index 5bcffc7..fc39bc6 100644
--- 
a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/params_linux.py
@@ -80,7 +80,7 @@ import functools
 #to create hdfs directory we need to call params.HdfsResource in code
 HdfsResource = functools.partial(
   HdfsResource,
-  user=hdfs_principal_name if security_enabled else hdfs_user,
+  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/630b501e/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py 
b/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
index b7968d2..039b14d 100644
--- a/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
@@ -61,7 +61,7 @@ class TestPigServiceCheck(RMFTestCase):
 hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
 keytab = '/etc/security/keytabs/hdfs.headless.keytab',
 kinit_path_local = '/usr/bin/kinit',
-user = 'h...@example.com',
+user = 'hdfs',
 action = ['execute'],
 hadoop_conf_dir = '/usr/hdp/current/hadoop-client/conf',
 )
@@ -111,7 +111,7 @@ class TestPigServiceCheck(RMFTestCase):
 keytab = '/etc/security/keytabs/hdfs.headless.keytab',
 source = '/usr/hdp/current/tez-client/lib/tez.tar.gz',
 kinit_path_local = '/usr/bin/kinit',
-user = 'h...@example.com',
+user = 'hdfs',
 owner = 'hdfs',
 group = 'hadoop',
 hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
@@ -123,7 +123,7 @@ class TestPigServiceCheck(RMFTestCase):
 hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
 keytab = '/etc/security/keytabs/hdfs.headless.keytab',
 kinit_path_local = '/usr/bin/kinit',
-user = 'h...@example.com',
+user = 'hdfs',
 action = ['execute'],
 hadoop_conf_dir = '/usr/hdp/current/hadoop-client/conf',
 )



ambari git commit: AMBARI-11030 Queue-specific metrics cannot be queried as time series data via Ambari API (additional patch) (dsen)

2015-05-14 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 630b501ef - 1c4cca322


AMBARI-11030 Queue-specific metrics cannot be queried as time series data via 
Ambari API (additional patch) (dsen)


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

Branch: refs/heads/trunk
Commit: 1c4cca32291c364f1132b82e51de435ec05fc954
Parents: 630b501
Author: Dmytro Sen d...@apache.org
Authored: Thu May 14 12:56:18 2015 +0300
Committer: Dmytro Sen d...@apache.org
Committed: Thu May 14 12:56:18 2015 +0300

--
 .../YARN/2.1.0.2.0/YARN_metrics.json| 260 +++
 1 file changed, 260 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1c4cca32/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
index 4226331..15f2026 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
@@ -1208,6 +1208,101 @@
   pointInTime: false,
   temporal: true
 },
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/ActiveApplications: {
+  metric: yarn.QueueMetrics.Queue=(.+).ActiveApplications,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/AMResourceLimitMB: {
+  metric: yarn.QueueMetrics.Queue=(.+).AMResourceLimitMB,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/AMResourceLimitVCores: {
+  metric: yarn.QueueMetrics.Queue=(.+).AMResourceLimitVCores,
+  pointInTime: false,
+  temporal: true
+},
+metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/ActiveUsers: {
+  metric: yarn.QueueMetrics.Queue=(.+).ActiveUsers,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/AggregateContainersAllocated:
 {
+  metric: 
yarn.QueueMetrics.Queue=(.+).AggregateContainersAllocated,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/AggregateContainersReleased:
 {
+  metric: 
yarn.QueueMetrics.Queue=(.+).AggregateContainersReleased,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/AllocatedVCores: {
+  metric: yarn.QueueMetrics.Queue=(.+).AllocatedVCores,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/AppAttemptFirstContainerAllocationDelayAvgTime:
 {
+  metric: 
yarn.QueueMetrics.Queue=(.+).AppAttemptFirstContainerAllocationDelayAvgTime,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/AppAttemptFirstContainerAllocationDelayNumOps:
 {
+  metric: 
yarn.QueueMetrics.Queue=(.+).AppAttemptFirstContainerAllocationDelayNumOps,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/AvailableVCores: {
+  metric: yarn.QueueMetrics.Queue=(.+).AvailableVCores,
+  pointInTime: false,
+  temporal: true
+},
+metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/PendingVCores: 
{
+  metric: yarn.QueueMetrics.Queue=(.+).PendingVCores,
+  pointInTime: false,
+  temporal: true
+},
+metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/ReservedMB: {
+  metric: yarn.QueueMetrics.Queue=(.+).ReservedMB,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/ReservedVCores: {
+  metric: yarn.QueueMetrics.Queue=(.+).ReservedVCores,
+  pointInTime: false,
+  temporal: true
+},
+
metrics/yarn/Queue/$1.replaceAll(\([.])\,\/\)/UsedAMResourceMB: {
+  metric: yarn.QueueMetrics.Queue=(.+).UsedAMResourceMB,
+  

ambari git commit: Revert AMBARI-11149. Widgets: attempted to move/add/delete a widget causes exception. Unit test failure.

2015-05-14 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 9b6223b90 - 94ba7c0f9


Revert AMBARI-11149. Widgets: attempted to move/add/delete a widget causes 
exception. Unit test failure.

This reverts commit 501afc0f58c65eaeccf6c388ae6100c2c3d31048.


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

Branch: refs/heads/trunk
Commit: 94ba7c0f9904e6c6834a36f8b4de982f86cc94c7
Parents: 9b6223b
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu May 14 19:56:31 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu May 14 19:58:10 2015 -0700

--
 .../internal/WidgetLayoutResourceProvider.java  |  9 
 .../entities/WidgetLayoutUserWidgetEntity.java  |  8 ---
 .../WidgetLayoutResourceProviderTest.java   | 23 
 3 files changed, 9 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/94ba7c0f/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
index 174a106..8f068d5 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
@@ -286,15 +286,6 @@ public class WidgetLayoutResourceProvider extends 
AbstractControllerResourceProv
 
   Set widgetsSet = (LinkedHashSet) 
propertyMap.get(WIDGETLAYOUT_WIDGETS_PROPERTY_ID);
 
-  //Remove old relations from widget entities
-  for (WidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntity : 
entity.getListWidgetLayoutUserWidgetEntity()) {
-
widgetLayoutUserWidgetEntity.getWidget().getListWidgetLayoutUserWidgetEntity()
-.remove(widgetLayoutUserWidgetEntity);
-widgetDAO.merge(widgetLayoutUserWidgetEntity.getWidget());
-  }
-  entity.setListWidgetLayoutUserWidgetEntity(new 
LinkedListWidgetLayoutUserWidgetEntity());
-  widgetLayoutDAO.merge(entity);
-
   ListWidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntityList 
= new LinkedListWidgetLayoutUserWidgetEntity();
   int order=0;
   for (Object widgetObject : widgetsSet) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/94ba7c0f/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
index dbae31b..1d6e1b5 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
@@ -17,7 +17,6 @@
  */
 package org.apache.ambari.server.orm.entities;
 
-import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
@@ -44,7 +43,7 @@ public class WidgetLayoutUserWidgetEntity {
   @JoinColumn(name = widget_layout_id, referencedColumnName = id)
   private WidgetLayoutEntity widgetLayout;
 
-  @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST, 
CascadeType.REFRESH})
+  @ManyToOne
   @JoinColumn(name = widget_id, referencedColumnName = id)
   private WidgetEntity widget;
 
@@ -98,7 +97,10 @@ public class WidgetLayoutUserWidgetEntity {
 
 WidgetLayoutUserWidgetEntity that = (WidgetLayoutUserWidgetEntity) o;
 
-return (widgetLayout.equals(that.widgetLayout)  
widget.equals(that.widget));
+if (widgetLayout.getId() != that.widgetLayout.getId()) return false;
+if (widget.getId() != that.widget.getId()) return false;
+
+return true;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/94ba7c0f/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java