[1/2] ambari git commit: AMBARI-10896. Ambari should skip pre-creation of scratch dir if its under /tmp

2015-05-04 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 0e849f6d4 - 64b8e235a


http://git-wip-us.apache.org/repos/asf/ambari/blob/64b8e235/ambari-server/src/test/python/stacks/2.0.6/configs/default_hive_nn_ha_2.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/configs/default_hive_nn_ha_2.json 
b/ambari-server/src/test/python/stacks/2.0.6/configs/default_hive_nn_ha_2.json
new file mode 100644
index 000..4465ca7
--- /dev/null
+++ 
b/ambari-server/src/test/python/stacks/2.0.6/configs/default_hive_nn_ha_2.json
@@ -0,0 +1,668 @@
+{
+roleCommand: SERVICE_CHECK, 
+clusterName: c1, 
+hostname: c6401.ambari.apache.org, 
+hostLevelParams: {
+jdk_location: http://c6401.ambari.apache.org:8080/resources/;, 
+ambari_db_rca_password: mapred, 
+ambari_db_rca_url: 
jdbc:postgresql://c6401.ambari.apache.org/ambarirca,
+repo_info: 
[{\baseUrl\:\http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0\,\osType\:\centos6\,\repoId\:\HDP-2.0._\,\repoName\:\HDP\,\defaultBaseUrl\:\http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0\}];,
+jce_name: UnlimitedJCEPolicyJDK7.zip, 
+stack_version: 2.0,
+stack_name: HDP, 
+ambari_db_rca_driver: org.postgresql.Driver, 
+jdk_name: jdk-7u67-linux-x64.tar.gz,
+ambari_db_rca_username: mapred, 
+java_home: /usr/jdk64/jdk1.7.0_45,
+java_version: 8,
+db_name: ambari,
+group_list: [\hadoop\,\nobody\,\users\],
+user_list: 
[\hive\,\oozie\,\nobody\,\ambari-qa\,\flume\,\hdfs\,\storm\,\mapred\,\hbase\,\tez\,\zookeeper\,\falcon\,\sqoop\,\yarn\,\hcat\],
+host_sys_prepped: true,
+package_list: [{\name\:\mysql-server\}]
+}, 
+commandType: EXECUTION_COMMAND, 
+roleParams: {}, 
+serviceName: HIVE,
+role: HIVE_SERVER,
+commandParams: {
+command_timeout: 300, 
+service_package_folder: OOZIE,
+script_type: PYTHON,
+script: scripts/service_check.py,
+excluded_hosts: host1,host2,
+mark_draining_only : false,
+update_exclude_file_only : false,
+xml_configs_list:[{hdfs-site.xml:hdfs-site}],
+
env_configs_list:[{hadoop-env.sh:hadoop-env},{log4j.properties:hdfs-log4j,yarn-log4j}],
+
properties_configs_list:[{runtime.properties:falcon-runtime.properties},{startup.properties:falcon-startup.properties}],
+output_file:HDFS_CLIENT-configs.tar.gz,
+refresh_topology: True
+},
+taskId: 152, 
+public_hostname: c6401.ambari.apache.org, 
+configurations: {
+mapred-site: {
+mapreduce.jobhistory.address: c6402.ambari.apache.org:10020,
+mapreduce.cluster.administrators:  hadoop,
+mapreduce.reduce.input.buffer.percent: 0.0,
+mapreduce.output.fileoutputformat.compress: false,
+mapreduce.framework.name: yarn,
+mapreduce.map.speculative: false,
+mapreduce.reduce.shuffle.merge.percent: 0.66,
+yarn.app.mapreduce.am.resource.mb: 683,
+mapreduce.map.java.opts: -Xmx273m,
+mapreduce.application.classpath: 
$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*,$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*,
+mapreduce.job.reduce.slowstart.completedmaps: 0.05,
+mapreduce.output.fileoutputformat.compress.type: BLOCK,
+mapreduce.reduce.speculative: false,
+mapreduce.reduce.java.opts: -Xmx546m,
+mapreduce.am.max-attempts: 2,
+yarn.app.mapreduce.am.admin-command-opts: 
-Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN,
+mapreduce.reduce.log.level: INFO,
+mapreduce.map.sort.spill.percent: 0.7,
+mapreduce.task.timeout: 30,
+mapreduce.map.memory.mb: 341,
+mapreduce.task.io.sort.factor: 100,
+mapreduce.jobhistory.intermediate-done-dir: /mr-history/tmp,
+mapreduce.reduce.memory.mb: 683,
+yarn.app.mapreduce.am.log.level: INFO,
+mapreduce.map.log.level: INFO,
+mapreduce.shuffle.port: 13562,
+mapreduce.admin.user.env: 
LD_LIBRARY_PATH=/usr/lib/hadoop/lib/native:/usr/lib/hadoop/lib/native/`$JAVA_HOME/bin/java
 -d32 -version amp;gt; /dev/null;if [ $? -eq 0 ]; then echo Linux-i386-32; 
else echo Linux-amd64-64;fi`,
+mapreduce.map.output.compress: false,
+yarn.app.mapreduce.am.staging-dir: /user,
+mapreduce.reduce.shuffle.parallelcopies: 30,
+mapreduce.reduce.shuffle.input.buffer.percent: 0.7,
+mapreduce.jobhistory.webapp.address: 
c6402.ambari.apache.org:19888,
+mapreduce.jobhistory.done-dir: /mr-history/done,
+mapreduce.admin.reduce.child.java.opts: 
-Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN,
+

[2/2] ambari git commit: AMBARI-10896. Ambari should skip pre-creation of scratch dir if its under /tmp

2015-05-04 Thread smohanty
AMBARI-10896. Ambari should skip pre-creation of scratch dir if its under /tmp


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

Branch: refs/heads/trunk
Commit: 64b8e235a6a65bc38aa2e5f2049319cd14d6845f
Parents: 0e849f6
Author: Sumit Mohanty smoha...@hortonworks.com
Authored: Mon May 4 08:20:02 2015 -0500
Committer: Sumit Mohanty smoha...@hortonworks.com
Committed: Mon May 4 08:20:02 2015 -0500

--
 .../HIVE/0.12.0.2.0/package/scripts/hive.py |  18 +-
 .../stacks/2.0.6/HIVE/test_hive_server.py   | 101 ++-
 .../2.0.6/configs/default_hive_nn_ha.json   | 666 ++
 .../2.0.6/configs/default_hive_nn_ha_2.json | 668 +++
 4 files changed, 1434 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/64b8e235/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
index 4df6014..19852f5 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
@@ -24,6 +24,7 @@ import sys
 import os
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from ambari_commons import OSConst
+from urlparse import urlparse
 
 
 @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
@@ -288,10 +289,15 @@ def jdbc_connector():
 # recursive directory creation will be a prerequisite as 'hive' user cannot 
write on the root of the HDFS
 def setup_custom_scratchdir():
   import params
-  if not is_empty(params.hive_exec_scratchdir) and not 
params.hive_exec_scratchdir.startswith(/tmp): # If this property is custom 
and not a variation of the writable temp dir
-params.HdfsDirectory(params.hive_exec_scratchdir,
- action=create_delayed,
- owner=params.hive_user,
- group=params.hdfs_user,
- mode=0777) # Hive expects this dir to be writeable by 
everyone as it is used as a temp dir
+  # If this property is custom and not a variation of the writable temp dir
+  if is_empty(params.hive_exec_scratchdir):
+return
+  parsed = urlparse(params.hive_exec_scratchdir)
+  if parsed.path.startswith(/tmp):
+return
+  params.HdfsDirectory(params.hive_exec_scratchdir,
+   action=create_delayed,
+   owner=params.hive_user,
+   group=params.hdfs_user,
+   mode=0777) # Hive expects this dir to be writeable by 
everyone as it is used as a temp dir
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/64b8e235/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py 
b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
index fc9ba66..60fda00 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
@@ -115,6 +115,79 @@ class TestHiveServer(RMFTestCase):
 self.assertTrue(s.close.called)
 self.assertFalse(get_tar_mock.called)
 
+  @patch.object(dynamic_variable_interpretation, 
_get_tar_source_and_dest_folder)
+  @patch(socket.socket)
+  def test_start_default_alt_tmp(self, socket_mock, get_tar_mock):
+s = socket_mock.return_value
+
+self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + 
/scripts/hive_server.py,
+   classname = HiveServer,
+   command = start,
+   config_file=default_hive_nn_ha.json,
+   hdp_stack_version = self.STACK_VERSION,
+   target = RMFTestCase.TARGET_COMMON_SERVICES
+)
+
+get_tar_mock.return_value = (a, b)
+self.assert_configure_default(no_tmp=True)
+
+self.assertResourceCalled('Execute', 'hive --config /etc/hive/conf.server 
--service metatool -updateLocation hdfs://c6401.ambari.apache.org:8020 OK.',
+  environment = {'PATH': 
'/bin:/usr/lib/hive/bin:/usr/bin'},
+  user = 'hive',
+  )
+self.assertResourceCalled('Execute', '/tmp/start_hiveserver2_script 
/var/log/hive/hive-server2.out 

ambari git commit: AMBARI-10903. Ambari metrics build issues due to incorrect order in pom file. (swagle)

2015-05-04 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 64b8e235a - 2a4b6


AMBARI-10903. Ambari metrics build issues due to incorrect order in pom file. 
(swagle)


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

Branch: refs/heads/trunk
Commit: 2a4b6a68b8afa88572be1f73bc5bf6f35759
Parents: 64b8e23
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Mon May 4 12:16:45 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Mon May 4 12:16:45 2015 -0700

--
 pom.xml | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2a4b6444/pom.xml
--
diff --git a/pom.xml b/pom.xml
index eb9b587..3f7b95d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -415,11 +415,11 @@
 moduleambari-views/module
 moduleambari-admin/module
 modulecontrib/views/module
+moduleambari-metrics/ambari-metrics-common/module
 moduleambari-server/module
 moduleambari-agent/module
 moduleambari-client/module
 moduleambari-shell/module
-moduleambari-metrics/ambari-metrics-common/module
   /modules
 /profile
 profile
@@ -428,11 +428,11 @@
 moduleambari-project/module
 moduleambari-views/module
 moduleambari-admin/module
+moduleambari-metrics/ambari-metrics-common/module
 moduleambari-server/module
 moduleambari-agent/module
 moduleambari-client/module
 moduleambari-shell/module
-moduleambari-metrics/ambari-metrics-common/module
   /modules
 /profile
 profile
@@ -447,11 +447,11 @@
 moduleambari-project/module
 moduleambari-views/module
 moduleambari-admin/module
+moduleambari-metrics/ambari-metrics-common/module
 moduleambari-server/module
 moduleambari-agent/module
 moduleambari-client/module
 moduleambari-shell/module
-moduleambari-metrics/ambari-metrics-common/module
   /modules
 /profile
 profile
@@ -473,11 +473,11 @@
 moduleambari-views/module
 moduleambari-admin/module
 modulecontrib/ambari-scom/metrics-sink/module
+moduleambari-metrics/ambari-metrics-common/module
 moduleambari-server/module
 moduleambari-agent/module
 moduleambari-client/module
 moduleambari-shell/module
-moduleambari-metrics/ambari-metrics-common/module
   /modules
 /profile
 profile



[2/2] ambari git commit: AMBARI-10904. Provide a configurable timeout setting on MetricsTimelineSink.emitMetrics. (swagle)

2015-05-04 Thread swagle
AMBARI-10904. Provide a configurable timeout setting on 
MetricsTimelineSink.emitMetrics. (swagle)


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

Branch: refs/heads/trunk
Commit: 5226ae1be4ceafb0ca4544a48d69c85edbc4a410
Parents: 0c39d4e
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Mon May 4 18:06:44 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Mon May 4 18:06:44 2015 -0700

--
 .../timeline/AbstractTimelineMetricsSink.java   | 11 +++-
 .../cache/HandleConnectExceptionTest.java   |  6 ++
 .../sink/flume/FlumeTimelineMetricsSink.java| 13 +++--
 .../timeline/HadoopTimelineMetricsSink.java |  8 +++
 .../kafka/KafkaTimelineMetricsReporter.java | 60 +++-
 .../storm/StormTimelineMetricsReporter.java |  9 +++
 .../sink/storm/StormTimelineMetricsSink.java| 14 -
 7 files changed, 85 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5226ae1b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
--
diff --git 
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
index fd4cacd..4b93f50 100644
--- 
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
+++ 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
@@ -17,26 +17,28 @@
  */
 package org.apache.hadoop.metrics2.sink.timeline;
 
-import java.io.IOException;
-import java.net.ConnectException;
-
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.commons.httpclient.params.HttpMethodParams;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.codehaus.jackson.map.AnnotationIntrospector;
 import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 import org.codehaus.jackson.xc.JaxbAnnotationIntrospector;
+import java.io.IOException;
+import java.net.ConnectException;
 
 public abstract class AbstractTimelineMetricsSink {
   public static final String TAGS_FOR_PREFIX_PROPERTY_PREFIX = 
tagsForPrefix.;
   public static final String MAX_METRIC_ROW_CACHE_SIZE = maxRowCacheSize;
   public static final String METRICS_SEND_INTERVAL = sendInterval;
+  public static final String METRICS_POST_TIMEOUT_SECONDS = timeout;
   public static final String COLLECTOR_HOST_PROPERTY = collector;
   public static final String COLLECTOR_PORT_PROPERTY = port;
 
+  protected static final int DEFAULT_POST_TIMEOUT_SECONDS = 10;
   protected final Log LOG;
   private HttpClient httpClient = new HttpClient();
 
@@ -63,6 +65,7 @@ public abstract class AbstractTimelineMetricsSink {
 
   PostMethod postMethod = new PostMethod(connectUrl);
   postMethod.setRequestEntity(requestEntity);
+  postMethod.setParameter(HttpMethodParams.SO_TIMEOUT, 
String.valueOf(getTimeoutSeconds() * 1000));
   int statusCode = httpClient.executeMethod(postMethod);
   if (statusCode != 200) {
 LOG.info(Unable to POST metrics to collector,  + connectUrl);
@@ -79,4 +82,6 @@ public abstract class AbstractTimelineMetricsSink {
   }
 
   abstract protected String getCollectorUri();
+
+  abstract protected int getTimeoutSeconds();
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5226ae1b/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
--
diff --git 
a/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
 
b/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
index 2786e3c..4f9b93e 100644
--- 
a/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
+++ 
b/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
@@ -68,6 +68,12 @@ public class HandleConnectExceptionTest {
 

[1/2] ambari git commit: AMBARI-10918. Ambari with DB as oracle is failing to deploy. (swagle)

2015-05-04 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk ce3e14370 - 5226ae1be


AMBARI-10918. Ambari with DB as oracle is failing to deploy. (swagle)


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

Branch: refs/heads/trunk
Commit: 0c39d4ef5343c8fb055cd2581538ae26d9a77fba
Parents: ce3e143
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Mon May 4 17:52:40 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Mon May 4 17:52:40 2015 -0700

--
 .../ambari/server/orm/dao/ServiceConfigDAO.java  |  7 ---
 .../ambari/server/orm/entities/WidgetEntity.java | 15 ---
 .../ambari/server/upgrade/UpgradeCatalog210.java |  6 +++---
 .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql   |  4 ++--
 .../src/main/resources/Ambari-DDL-Oracle-CREATE.sql  |  4 ++--
 .../main/resources/Ambari-DDL-Postgres-CREATE.sql|  4 ++--
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql  |  4 ++--
 7 files changed, 27 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0c39d4ef/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
index 8f8e196..db0817b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
@@ -18,6 +18,7 @@
 
 package org.apache.ambari.server.orm.dao;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -212,13 +213,13 @@ public class ServiceConfigDAO {
*/
   @RequiresSession
   public Long findNextServiceConfigVersion(long clusterId, String serviceName) 
{
-TypedQueryLong query = entityManagerProvider.get().createNamedQuery(
-ServiceConfigEntity.findNextServiceConfigVersion, Long.class);
+TypedQueryNumber query = entityManagerProvider.get().createNamedQuery(
+ServiceConfigEntity.findNextServiceConfigVersion, Number.class);
 
 query.setParameter(clusterId, clusterId);
 query.setParameter(serviceName, serviceName);
 
-return daoUtils.selectSingle(query);
+return daoUtils.selectSingle(query).longValue();
   }
 
   @Transactional

http://git-wip-us.apache.org/repos/asf/ambari/blob/0c39d4ef/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetEntity.java
index 397d845..b65a87b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetEntity.java
@@ -17,13 +17,16 @@
  */
 package org.apache.ambari.server.orm.entities;
 
+import javax.persistence.Basic;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.JoinColumn;
+import javax.persistence.Lob;
 import javax.persistence.ManyToOne;
 import javax.persistence.NamedQueries;
 import javax.persistence.NamedQuery;
@@ -67,7 +70,9 @@ public class WidgetEntity {
   @Column(name = widget_type, nullable = false, length = 255)
   private String widgetType;
 
-  @Column(name = metrics, length = 32672)
+  @Lob
+  @Basic(fetch = FetchType.LAZY)
+  @Column(name = metrics)
   private String metrics;
 
   @Column(name = time_created, nullable = false, length = 255)
@@ -85,10 +90,14 @@ public class WidgetEntity {
   @Column(name = scope, length = 255)
   private String scope;
 
-  @Column(name = widget_values, length = 4000)
+  @Lob
+  @Basic(fetch = FetchType.LAZY)
+  @Column(name = widget_values)
   private String widgetValues;
 
-  @Column(name = properties, length = 4000)
+  @Lob
+  @Basic(fetch = FetchType.LAZY)
+  @Column(name = properties)
   private String properties;
 
   @Column(name = cluster_id, nullable = false)

http://git-wip-us.apache.org/repos/asf/ambari/blob/0c39d4ef/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java

ambari git commit: AMBARI-10868. 'hive.server2.authentication' should add additional configs in response - default values (mpapirkovskyy via srimanth)

2015-05-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 7dd2041be - a3b691482


AMBARI-10868. 'hive.server2.authentication' should add additional configs in 
response - default values (mpapirkovskyy via srimanth)


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

Branch: refs/heads/trunk
Commit: a3b691482c4f72729421654963d462a11011db15
Parents: 7dd2041
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Mon May 4 19:01:48 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon May 4 19:01:48 2015 -0700

--
 .../HDP/2.2/services/HIVE/configuration/hive-site.xml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a3b69148/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
index 6a53e23..0da7b1c 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
@@ -1629,7 +1629,7 @@ limitations under the License.
 
   property
 namehive.server2.authentication.ldap.url/name
-value/value
+value /value
 depends-on
   property
 typehive-site/type
@@ -1649,7 +1649,7 @@ limitations under the License.
   /property
   property
 namehive.server2.authentication.kerberos.keytab/name
-value/value
+value /value
 depends-on
   property
 typehive-site/type
@@ -1659,7 +1659,7 @@ limitations under the License.
   /property
   property
 namehive.server2.authentication.kerberos.principal/name
-value/value
+value /value
 depends-on
   property
 typehive-site/type
@@ -1669,7 +1669,7 @@ limitations under the License.
   /property
   property
 namehive.server2.authentication.pam.services/name
-value/value
+value /value
 depends-on
   property
 typehive-site/type
@@ -1679,7 +1679,7 @@ limitations under the License.
   /property
   property
 namehive.server2.custom.authentication.class/name
-value/value
+value /value
 depends-on
   property
 typehive-site/type



ambari git commit: AMBARI-10906. Show Phoenix Query Servers link and status in HBase summary panel (alexantonenko)

2015-05-04 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk a3b691482 - 326d5928c


AMBARI-10906. Show Phoenix Query Servers link and status in HBase summary panel 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: 326d5928cf546557597fc3c787dd945e3bd950bd
Parents: a3b6914
Author: Alex Antonenko hiv...@gmail.com
Authored: Tue May 5 07:58:16 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Tue May 5 07:58:26 2015 +0300

--
 .../app/mappers/components_state_mapper.js  |  5 
 .../app/mappers/service_metrics_mapper.js   |  5 +++-
 ambari-web/app/messages.js  |  3 +++
 ambari-web/app/models/service/hbase.js  |  3 +++
 .../templates/main/service/services/hbase.hbs   | 15 
 .../app/views/main/service/services/hbase.js| 24 +++-
 6 files changed, 53 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/mappers/components_state_mapper.js
--
diff --git a/ambari-web/app/mappers/components_state_mapper.js 
b/ambari-web/app/mappers/components_state_mapper.js
index ee3bccf..1359dc3 100644
--- a/ambari-web/app/mappers/components_state_mapper.js
+++ b/ambari-web/app/mappers/components_state_mapper.js
@@ -63,6 +63,11 @@ App.componentsStateMapper = App.QuickDataMapper.create({
   region_servers_installed: 'INSTALLED_PATH',
   region_servers_total: 'TOTAL_PATH'
 },
+'PHOENIX_QUERY_SERVER': {
+  phoenix_servers_started: 'STARTED_PATH',
+  phoenix_servers_installed: 'INSTALLED_PATH',
+  phoenix_servers_total: 'TOTAL_PATH'
+},
 'GANGLIA_MONITOR': {
   ganglia_monitors_started: 'STARTED_PATH',
   ganglia_monitors_installed: 'INSTALLED_PATH',

http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/mappers/service_metrics_mapper.js
--
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js 
b/ambari-web/app/mappers/service_metrics_mapper.js
index f6e0756..9be798a 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -112,7 +112,10 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
 heap_memory_max: 'masterComponent.ServiceComponentInfo.HeapMemoryMax',
 region_servers_started: 'region_servers_started',
 region_servers_installed: 'region_servers_installed',
-region_servers_total: 'region_servers_total'
+region_servers_total: 'region_servers_total',
+phoenix_servers_started: 'phoenix_servers_started',
+phoenix_servers_installed: 'phoenix_servers_installed',
+phoenix_servers_total: 'phoenix_servers_total'
   },
   stormConfig: {
 total_tasks: 'restApiComponent.tasksTotal',

http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 652c415..f999a2c 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1442,6 +1442,7 @@ Em.I18n.translations = {
   'services.service.summary.nodeManagersLive':'NodeManagers Live',
   'services.service.summary.TrackersLive':'Trackers Live',
   'services.service.summary.RegionServersLIVE':'RegionServers Live',
+  'services.service.summary.PhoenixServersLIVE':'Phoenix Query servers Live',
   'services.service.summary.GangliaMonitorsLIVE':'Ganglia Monitors Live',
   'services.service.summary.SupervisorsLIVE':'Supervisors Live',
   'services.service.summary.nameNode':'NameNode Web UI',
@@ -2409,6 +2410,8 @@ Em.I18n.translations = {
   'dashboard.services.hbase.averageLoadPerServer':'{0} regions per 
RegionServer',
   'dashboard.services.hbase.regionServers':'RegionServers',
   'dashboard.services.hbase.regionServersSummary':'{0} live / {1} total',
+  'dashboard.services.hbase.phoenixServers':'Phoenix Query Servers',
+  'dashboard.services.hbase.phoenixServersSummary':'{0} live / {1} total',
   'dashboard.services.hbase.chart.label':'Request Count',
   'dashboard.services.hbase.version':'Version',
   'dashboard.services.hbase.masterWebUI':'Master Web UI',

http://git-wip-us.apache.org/repos/asf/ambari/blob/326d5928/ambari-web/app/models/service/hbase.js
--
diff --git a/ambari-web/app/models/service/hbase.js 
b/ambari-web/app/models/service/hbase.js
index 6955f22..662577f 100644
--- 

ambari git commit: AMBARI-10917. Editing enhanced-config in textfield not accepting values in between steps (onechiporenko via srimanth)

2015-05-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 0ebdf4e66 - ce3e14370


AMBARI-10917. Editing enhanced-config in textfield not accepting values in 
between steps (onechiporenko via srimanth)


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

Branch: refs/heads/trunk
Commit: ce3e14370e23204c3da0486489cce860232a89aa
Parents: 0ebdf4e
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Mon May 4 16:54:35 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon May 4 16:54:35 2015 -0700

--
 .../widgets/slider_config_widget_view.js|  5 -
 .../widgets/slider_config_widget_view_test.js   | 20 ++--
 2 files changed, 10 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ce3e1437/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index 71f510e..603e847 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -374,8 +374,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
 var sliderTicks = this.$('.ui-slider-wrapper:eq(0) .slider-tick');
 
 if (recommendedValueId) {
-  var defaultSliderTick = sliderTicks.eq(recommendedValueId);
-
   
sliderTicks.eq(recommendedValueId).addClass('slider-tick-default').on('mousedown',
 function(e) {
 if (self.get('disabled')) return false;
 self.setValue(self.get('config.recommendedValue'));
@@ -475,9 +473,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
 var max = 
this.get('parseFunction')(this.get('config.stackConfigProperty.valueAttributes.maximum'));
 if (configValue  max) return false;
   }
-  if 
(this.get('config.stackConfigProperty.valueAttributes.increment_step')) {
-if (configValue % 
this.get('parseFunction')(this.get('config.stackConfigProperty.valueAttributes.increment_step'))
 != 0) return false;
-  }
   return true;
 }
 return false;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ce3e1437/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
--
diff --git 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
 
b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
index d96743a..fba4493 100644
--- 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
+++ 
b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
@@ -350,15 +350,15 @@ describe('App.SliderConfigWidgetView', function () {
 sinon.stub(this.view, '$')
   .withArgs('input.slider-input').returns([])
   .withArgs('.ui-slider-wrapper:eq(0) .slider-tick').returns({
-eq: function() {return this;},
-addClass: function() {return this;},
-on: function() {return this;},
-append: function() {return this;},
-find: function() {return this;},
-css: function() {return this;},
+eq: Em.K,
+addClass: Em.K,
+on: Em.K,
+append: Em.K,
+find: Em.K,
+css: Em.K,
 width: function() {},
-last: function() { return this;},
-hide: function() { return this;}
+last: Em.K,
+hide: Em.K
   });
 this.view.willInsertElement();
 this.view.initSlider();
@@ -411,10 +411,10 @@ describe('App.SliderConfigWidgetView', function () {
   expect(viewInt.isValueCompatibleWithWidget()).to.be.false;
 });
 
-it ('fail: wrong step', function() {
+it ('ok for wrong step', function() {
   viewInt.set('config.stackConfigProperty', stackConfigProperty);
   viewInt.set('config.value', '3');
-  expect(viewInt.isValueCompatibleWithWidget()).to.be.false;
+  expect(viewInt.isValueCompatibleWithWidget()).to.be.true;
 });
 
 it ('ok', function() {



ambari git commit: AMBARI-10876. Original configs are editable while override processing (Richard Zang via srimanth)

2015-05-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 996fe - 002d9c286


AMBARI-10876. Original configs are editable while override processing (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/002d9c28
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/002d9c28
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/002d9c28

Branch: refs/heads/trunk
Commit: 002d9c286d46f131b963613223ed15f189cf810f
Parents: 996
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Mon May 4 15:32:30 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon May 4 15:32:30 2015 -0700

--
 ambari-web/app/templates/common/configs/widgets/controls.hbs  | 2 +-
 .../app/views/common/configs/widgets/config_widget_view.js| 7 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/002d9c28/ambari-web/app/templates/common/configs/widgets/controls.hbs
--
diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs 
b/ambari-web/app/templates/common/configs/widgets/controls.hbs
index 268ab26..1ac8678 100644
--- a/ambari-web/app/templates/common/configs/widgets/controls.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs
@@ -31,7 +31,7 @@
   /a
 {{/if}}
   {{/if}}
-  {{#if view.supportSwitchToCheckBox}}
+  {{#if view.showPencil}}
 a href=#
   {{bindAttr class=:icon-pencil :widget-action 
:widget-action-switch-view view.isHover::hide view.showAsTextBox::active}}
   {{action toggleWidgetView target=view}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/002d9c28/ambari-web/app/views/common/configs/widgets/config_widget_view.js
--
diff --git a/ambari-web/app/views/common/configs/widgets/config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
index bfa64a2..a6d2960 100644
--- a/ambari-web/app/views/common/configs/widgets/config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
@@ -89,6 +89,13 @@ App.ConfigWidgetView = 
Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
   supportSwitchToCheckBox: false,
 
   /**
+   * @type {boolean}
+   */
+  showPencil: function () {
+return this.get('supportSwitchToCheckBox')  !this.get('disabled');
+  }.property('supportSwitchToCheckBox', 'disabled'),
+
+  /**
* Alias to codeconfig.isOriginalSCP/code
* Should be used in the templates
* Don't use original codeconfig.isOriginalSCP/code in the 
widget-templates!!!



ambari git commit: AMBARI-10915. Widgets: UI changes v3c.(xiwang)

2015-05-04 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 46e2bb361 - 1f1a9c792


AMBARI-10915. Widgets: UI changes v3c.(xiwang)


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

Branch: refs/heads/trunk
Commit: 1f1a9c792e9cdabf306e92cb1e8eb2898868d59d
Parents: 46e2bb3
Author: Xi Wang xiw...@apache.org
Authored: Mon May 4 15:48:00 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Mon May 4 16:18:20 2015 -0700

--
 .../controllers/main/service/info/summary.js| 34 ++-
 .../service/widgets/create/step3_controller.js  | 39 +
 .../main/service/widgets/edit_controller.js | 37 
 ambari-web/app/messages.js  |  4 ++
 .../app/mixins/common/widgets/widget_mixin.js   | 59 +++-
 ambari-web/app/routes/edit_widget.js|  8 +--
 .../app/styles/enhanced_service_dashboard.less  |  3 +
 .../main/service/widgets/create/step3.hbs   |  9 ++-
 8 files changed, 169 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f1a9c79/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 528abb8..58c0605 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -543,23 +543,31 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
   },
 
   /**
-   * unshare widgets, on click handler for Unshare
-   */
-  unshareWidget: function (event) {
-var widget = event.context;
-var widgetName = widget.widgetName;
-//todo unshare current widget
-
-  },
-
-  /**
* Share widgets, on click handler for Share
*/
   shareWidget: function (event) {
 var widget = event.context;
-var widgetName = widget.widgetName;
-// todo share current widget
-
+var self = this;
+var bodyMessage = Em.Object.create({
+  confirmMsg: 
Em.I18n.t('dashboard.widgets.browser.action.share.confirmation'),
+  confirmButton: Em.I18n.t('dashboard.widgets.browser.action.share')
+});
+return App.showConfirmationFeedBackPopup(function (query) {
+  return App.ajax.send({
+name: 'widgets.wizard.edit',
+sender: self,
+data: {
+  data: {
+WidgetInfo: {
+  widget_name: widget.get(widgetName),
+  scope: CLUSTER
+}
+  },
+  widgetId: widget.get(id)
+},
+success: 'updateWidgetBrowser'
+  });
+}, bodyMessage);
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f1a9c79/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
index 283d5f1..4aff9cf 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
@@ -21,6 +21,10 @@ var App = require('app');
 App.WidgetWizardStep3Controller = Em.Controller.extend({
   name: widgetWizardStep3Controller,
 
+  isEditController: function () {
+return this.get('content.controllerName') == 'widgetEditController';
+  }.property('content.controllerName'),
+
   /**
* @type {string}
*/
@@ -37,12 +41,32 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({
   isSharedChecked: false,
 
   /**
+   * @type {boolean}
+   */
+  isSharedCheckboxDisabled: false,
+
+  /**
* @type {string}
*/
   widgetScope: function () {
 return this.get('isSharedChecked')? 'Cluster': 'User';
   }.property('isSharedChecked'),
 
+  showConfirmationOnSharing: function () {
+var self = this;
+if(this.get('isSharedChecked')) {
+  var bodyMessage = Em.Object.create({
+confirmMsg: 
Em.I18n.t('dashboard.widgets.browser.action.share.confirmation'),
+confirmButton: Em.I18n.t('dashboard.widgets.browser.action.share')
+  });
+  return App.showConfirmationFeedBackPopup(function (query) {
+self.set('isSharedChecked', true);
+  }, bodyMessage, function (query) {
+self.set('isSharedChecked', false);
+  });
+}
+  },
+
   /**
* @type {string}
*/
@@ -75,6 +99,10 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({
 this.set('widgetName', 

ambari git commit: AMBARI-10868. 'hive.server2.authentication' should add additional configs in response (mpapirkovskyy via srimanth)

2015-05-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 061d062c4 - 996fe


AMBARI-10868. 'hive.server2.authentication' should add additional configs in 
response (mpapirkovskyy via srimanth)


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

Branch: refs/heads/trunk
Commit: 996fe96cd693a95a805996b02adcda08a9f5
Parents: 061d062
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Mon May 4 15:20:03 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon May 4 15:20:09 2015 -0700

--
 .../services/HIVE/configuration/hive-site.xml   | 62 
 .../stacks/HDP/2.2/services/stack_advisor.py| 33 +++
 .../configs/widgets/combo_config_widget_view.js |  5 +-
 3 files changed, 99 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/996f/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
index 38bef72..6a53e23 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
@@ -1626,4 +1626,66 @@ limitations under the License.
   selection-cardinality1/selection-cardinality
 /value-attributes
   /property
+
+  property
+namehive.server2.authentication.ldap.url/name
+value/value
+depends-on
+  property
+typehive-site/type
+namehive.server2.authentication/name
+  /property
+/depends-on
+  /property
+  property
+namehive.server2.authentication.ldap.baseDN/name
+value /value
+depends-on
+  property
+typehive-site/type
+namehive.server2.authentication/name
+  /property
+/depends-on
+  /property
+  property
+namehive.server2.authentication.kerberos.keytab/name
+value/value
+depends-on
+  property
+typehive-site/type
+namehive.server2.authentication/name
+  /property
+/depends-on
+  /property
+  property
+namehive.server2.authentication.kerberos.principal/name
+value/value
+depends-on
+  property
+typehive-site/type
+namehive.server2.authentication/name
+  /property
+/depends-on
+  /property
+  property
+namehive.server2.authentication.pam.services/name
+value/value
+depends-on
+  property
+typehive-site/type
+namehive.server2.authentication/name
+  /property
+/depends-on
+  /property
+  property
+namehive.server2.custom.authentication.class/name
+value/value
+depends-on
+  property
+typehive-site/type
+namehive.server2.authentication/name
+  /property
+/depends-on
+  /property
+
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/996f/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 272475d..1854946 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -213,6 +213,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 putHiveServerProperty = self.putProperty(configurations, 
hiveserver2-site, services)
 putHiveEnvProperty = self.putProperty(configurations, hive-env, services)
 putHiveSiteProperty = self.putProperty(configurations, hive-site, 
services)
+putHiveSitePropertyAttribute = self.putPropertyAttribute(configurations, 
hive-site)
 
 servicesList = [service[StackServices][service_name] for service in 
services[services]]
 if 'ranger-hive-plugin-properties' in services['configurations'] and 
('ranger-hive-plugin-enabled' in 
services['configurations']['ranger-hive-plugin-properties']['properties']):
@@ -366,6 +367,38 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 putHiveServerProperty(hive.server2.enable.doAs, true)
 putHiveSiteProperty(hive.server2.use.SSL, false)
 
+#Hive authentication
+hive_server2_auth = None
+if hive-site in services[configurations] and 
hive.server2.authentication in 
services[configurations][hive-site][properties]:
+  

ambari git commit: AMBARI-10868. 'hive.server2.authentication' should add additional configs in response - test fixes (mpapirkovskyy via srimanth)

2015-05-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 002d9c286 - 46e2bb361


AMBARI-10868. 'hive.server2.authentication' should add additional configs in 
response - test fixes (mpapirkovskyy via srimanth)


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

Branch: refs/heads/trunk
Commit: 46e2bb3616fc6882317a582813a6e55dcc11af9d
Parents: 002d9c2
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Mon May 4 15:56:33 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon May 4 15:56:33 2015 -0700

--
 .../src/test/python/stacks/2.2/common/test_stack_advisor.py  | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/46e2bb36/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py 
b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index bfc35f9..bd13a11 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -907,6 +907,14 @@ class TestHDP22StackAdvisor(TestCase):
   'hive.txn.manager': 
'org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager',
   'hive.vectorized.execution.enabled': 'true',
   'hive.vectorized.execution.reduce.enabled': 'false'
+},
+   'property_attributes': {
+ 'hive.server2.authentication.pam.services': {'delete': 'true'}, 
+ 'hive.server2.custom.authentication.class': {'delete': 'true'}, 
+ 'hive.server2.authentication.ldap.baseDN': {'delete': 'true'}, 
+ 'hive.server2.authentication.kerberos.principal': {'delete': 'true'}, 
+ 'hive.server2.authentication.kerberos.keytab': {'delete': 'true'}, 
+ 'hive.server2.authentication.ldap.url': {'delete': 'true'}
 }
   },
   'hiveserver2-site': {



ambari git commit: AMBARI-10916. Recommended value is greater then maximum for yarn.nodemanager.resource.memory-mb (dsen via srimanth)

2015-05-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 1f1a9c792 - 0ebdf4e66


AMBARI-10916. Recommended value is greater then maximum for 
yarn.nodemanager.resource.memory-mb (dsen via srimanth)


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

Branch: refs/heads/trunk
Commit: 0ebdf4e660bf7ff97b623e2bbca76055e3c9956b
Parents: 1f1a9c7
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Mon May 4 16:22:55 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon May 4 16:25:02 2015 -0700

--
 .../main/resources/stacks/HDP/2.0.6/services/stack_advisor.py   | 5 -
 .../src/main/resources/stacks/HDP/2.2/services/stack_advisor.py | 5 -
 2 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebdf4e6/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index d56b201..c67c39d 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -123,7 +123,10 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   def recommendYARNConfigurations(self, configurations, clusterData, services, 
hosts):
 putYarnProperty = self.putProperty(configurations, yarn-site, services)
 putYarnEnvProperty = self.putProperty(configurations, yarn-env, services)
-putYarnProperty('yarn.nodemanager.resource.memory-mb', 
int(round(clusterData['containers'] * clusterData['ramPerContainer'])))
+nodemanagerMinRam = 1048576 # 1TB in mb
+for nodemanager in self.getHostsWithComponent(YARN, NODEMANAGER, 
services, hosts):
+  nodemanagerMinRam = min(nodemanager[Hosts][total_mem]/1024, 
nodemanagerMinRam)
+putYarnProperty('yarn.nodemanager.resource.memory-mb', 
int(round(min(clusterData['containers'] * clusterData['ramPerContainer'], 
nodemanagerMinRam
 putYarnProperty('yarn.scheduler.minimum-allocation-mb', 
int(clusterData['ramPerContainer']))
 putYarnProperty('yarn.scheduler.maximum-allocation-mb', 
int(configurations[yarn-site][properties][yarn.nodemanager.resource.memory-mb]))
 putYarnEnvProperty('min_user_id', self.get_system_min_uid())

http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebdf4e6/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 1854946..6eea9b7 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -516,10 +516,13 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
   def recommendMapReduce2Configurations(self, configurations, clusterData, 
services, hosts):
 self.recommendYARNConfigurations(configurations, clusterData, services, 
hosts)
 putMapredProperty = self.putProperty(configurations, mapred-site, 
services)
+nodemanagerMinRam = 1048576 # 1TB in mb
+for nodemanager in self.getHostsWithComponent(YARN, NODEMANAGER, 
services, hosts):
+  nodemanagerMinRam = min(nodemanager[Hosts][total_mem]/1024, 
nodemanagerMinRam)
 putMapredProperty('yarn.app.mapreduce.am.resource.mb', 
configurations[yarn-site][properties][yarn.scheduler.minimum-allocation-mb])
 putMapredProperty('yarn.app.mapreduce.am.command-opts', -Xmx + 
str(int(0.8 * 
int(configurations[mapred-site][properties][yarn.app.mapreduce.am.resource.mb])))
 + m +  -Dhdp.version=${hdp.version})
 putMapredProperty('mapreduce.map.memory.mb', 
int(configurations[yarn-site][properties][yarn.scheduler.minimum-allocation-mb]))
-putMapredProperty('mapreduce.reduce.memory.mb', 
int(2*int(configurations[yarn-site][properties][yarn.scheduler.minimum-allocation-mb])))
+putMapredProperty('mapreduce.reduce.memory.mb', 
min(2*int(configurations[yarn-site][properties][yarn.scheduler.minimum-allocation-mb]),
 int(nodemanagerMinRam)))
 putMapredProperty('mapreduce.map.java.opts', -Xmx + 
str(int(0.8*int(configurations[mapred-site][properties][mapreduce.map.memory.mb])))
 + m)
 putMapredProperty('mapreduce.reduce.java.opts', -Xmx + 
str(int(0.8*int(configurations[mapred-site][properties][mapreduce.reduce.memory.mb])))
 + m)
 

ambari git commit: AMBARI-10903. Ambari metrics build issues due to incorrect order in pom file. Remove specific module dep. (swagle)

2015-05-04 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 2a4b6 - 061d062c4


AMBARI-10903. Ambari metrics build issues due to incorrect order in pom file. 
Remove specific module dep. (swagle)


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

Branch: refs/heads/trunk
Commit: 061d062c41200537a26a7c1d676963017f44d926
Parents: 2a4b644
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Mon May 4 12:57:51 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Mon May 4 12:57:51 2015 -0700

--
 pom.xml | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/061d062c/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 3f7b95d..d9600a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -415,7 +415,7 @@
 moduleambari-views/module
 moduleambari-admin/module
 modulecontrib/views/module
-moduleambari-metrics/ambari-metrics-common/module
+moduleambari-metrics/module
 moduleambari-server/module
 moduleambari-agent/module
 moduleambari-client/module
@@ -428,7 +428,7 @@
 moduleambari-project/module
 moduleambari-views/module
 moduleambari-admin/module
-moduleambari-metrics/ambari-metrics-common/module
+moduleambari-metrics/module
 moduleambari-server/module
 moduleambari-agent/module
 moduleambari-client/module
@@ -447,7 +447,7 @@
 moduleambari-project/module
 moduleambari-views/module
 moduleambari-admin/module
-moduleambari-metrics/ambari-metrics-common/module
+moduleambari-metrics/module
 moduleambari-server/module
 moduleambari-agent/module
 moduleambari-client/module
@@ -473,7 +473,7 @@
 moduleambari-views/module
 moduleambari-admin/module
 modulecontrib/ambari-scom/metrics-sink/module
-moduleambari-metrics/ambari-metrics-common/module
+moduleambari-metrics/module
 moduleambari-server/module
 moduleambari-agent/module
 moduleambari-client/module



ambari git commit: AMBARI-10922. Change checkboxes to toggles in HBase configs (srimanth)

2015-05-04 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 5226ae1be - 7dd2041be


AMBARI-10922. Change checkboxes to toggles in HBase configs (srimanth)


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

Branch: refs/heads/trunk
Commit: 7dd2041bed8f287d8df50413cc4ea79116614913
Parents: 5226ae1
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Mon May 4 18:43:08 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon May 4 18:43:13 2015 -0700

--
 .../0.96.0.2.0/configuration/hbase-site.xml |  2 ++
 .../services/HBASE/configuration/hbase-env.xml  |  2 ++
 .../services/HBASE/configuration/hbase-site.xml | 20 
 .../HDP/2.2/services/HBASE/themes/theme.json|  4 ++--
 4 files changed, 26 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7dd2041b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
index 3093a60..bd6b72e 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
@@ -364,9 +364,11 @@
   entries
 entry
   valuetrue/value
+  labelEnabled/label
 /entry
 entry
   valuefalse/value
+  labelDisabled/label
 /entry
   /entries
   selection-cardinality1/selection-cardinality

http://git-wip-us.apache.org/repos/asf/ambari/blob/7dd2041b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-env.xml
index 0120e82..0e21eb0 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-env.xml
@@ -66,9 +66,11 @@ and the -Xmn ratio (hbase_regionserver_xmn_ratio) exceeds 
this value.
   entries
 entry
   valuetrue/value
+  labelEnabled/label
 /entry
 entry
   valuefalse/value
+  labelDisabled/label
 /entry
   /entries
   selection-cardinality1/selection-cardinality

http://git-wip-us.apache.org/repos/asf/ambari/blob/7dd2041b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
index ea24813..13b91ed 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
@@ -117,4 +117,24 @@
   /property
 /depends-on
   /property
+  property
+namehbase.regionserver.rpc.scheduler.factory.class/name
+value /value
+depends-on
+  property
+typehbase-env/type
+namephoenix_sql_enabled/name
+  /property
+/depends-on
+  /property
+  property
+namehbase.rpc.controllerfactory.class/name
+value /value
+depends-on
+  property
+typehbase-env/type
+namephoenix_sql_enabled/name
+  /property
+/depends-on
+  /property
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/7dd2041b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
index f62300d..dc2e5a8 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
@@ -385,13 +385,13 @@
   {
 config: hbase-site/hbase.security.authorization,
 widget: {
-