[1/2] ambari git commit: AMBARI-13772. Autocomplete display glitches (Pallav Kulshreshtha via srimanth)

2015-11-06 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 7536e0ecf -> 939f643dc


AMBARI-13772. Autocomplete display glitches (Pallav Kulshreshtha via srimanth)


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

Branch: refs/heads/branch-2.1
Commit: 6f65812c9e4b9a12f5a77bffe60e7812d7eb
Parents: 7536e0e
Author: Srimanth Gunturi 
Authored: Fri Nov 6 16:11:32 2015 -0800
Committer: Srimanth Gunturi 
Committed: Fri Nov 6 16:11:32 2015 -0800

--
 .../views/hive/src/main/resources/ui/hive-web/app/styles/app.scss   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6f65812c/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
index bf271c4..7e23d46 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
@@ -358,6 +358,7 @@ body {
 
 .CodeMirror-hints {
   min-width: 200px;
+  z-index: 100;
 }
 
 .spinner {



[2/2] ambari git commit: AMBARI-13775. If the window gets "too narrow" the query window gets pushed down (Pallav Kulshreshtha via srimanth)

2015-11-06 Thread srimanth
AMBARI-13775. If the window gets "too narrow" the query window gets pushed down 
(Pallav Kulshreshtha via srimanth)


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

Branch: refs/heads/branch-2.1
Commit: 939f643dca76b987f8f268601d7e3a5a2162973d
Parents: 6f65812
Author: Srimanth Gunturi 
Authored: Fri Nov 6 16:18:15 2015 -0800
Committer: Srimanth Gunturi 
Committed: Fri Nov 6 16:18:15 2015 -0800

--
 .../hive/src/main/resources/ui/hive-web/app/templates/index.hbs  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/939f643d/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs
index 81d6ecf..a06c330 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs
@@ -18,11 +18,11 @@
 
 
   
-
+
   {{render 'databases'}}
 
 
-
+
   {{#panel-widget headingTranslation="titles.query.editor" 
classNames="query-editor-panel" iconActions=queryPanelActions}}
 {{render 'open-queries'}}
 



ambari git commit: AMBARI-13747. Hive View : Add Database/Table creation from File. (Nitiraj Singh Rathore via yusaku)

2015-11-06 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 939f643dc -> 47305


AMBARI-13747. Hive View : Add Database/Table creation from File. (Nitiraj Singh 
Rathore  via yusaku)


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

Branch: refs/heads/branch-2.1
Commit: 4730522d33a6dff3402c6b8700d4532fdd5c
Parents: 939f643
Author: Yusaku Sako 
Authored: Fri Nov 6 16:50:15 2015 -0800
Committer: Yusaku Sako 
Committed: Fri Nov 6 16:50:57 2015 -0800

--
 .../view/hive/client/ColumnDescription.java |  18 ++
 .../view/hive/client/ConnectionFactory.java |  19 +-
 .../org/apache/ambari/view/hive/client/Row.java |  24 ++
 .../view/hive/resources/uploads/CSVParser.java  | 185 
 .../uploads/ColumnDescriptionImpl.java  |  95 ++
 .../view/hive/resources/uploads/DataParser.java |  63 
 .../view/hive/resources/uploads/IParser.java|  37 +++
 .../hive/resources/uploads/ParseOptions.java|  46 +++
 .../view/hive/resources/uploads/ParseUtils.java | 103 +++
 .../hive/resources/uploads/QueryGenerator.java  |  66 +
 .../view/hive/resources/uploads/TableInfo.java  |  62 
 .../hive/resources/uploads/UploadService.java   | 296 +++
 .../ui/hive-web/app/adapters/file-upload.js |  31 ++
 .../ui/hive-web/app/adapters/upload-table.js|  76 +
 .../ui/hive-web/app/components/file-upload.js   |  25 ++
 .../ui/hive-web/app/components/navbar-widget.js |   5 +-
 .../ui/hive-web/app/controllers/upload-table.js | 261 
 .../ui/hive-web/app/initializers/i18n.js|   7 +-
 .../main/resources/ui/hive-web/app/router.js|   1 +
 .../resources/ui/hive-web/app/styles/app.scss   |   3 +-
 .../ui/hive-web/app/templates/upload-table.hbs  |  92 ++
 .../ui/hive-web/app/utils/constants.js  |   1 +
 .../src/main/resources/ui/hive-web/bower.json   |   1 +
 .../src/main/resources/ui/hive-web/package.json |   1 +
 contrib/views/hive/src/main/resources/view.xml  |   6 +
 .../hive/resources/upload/DataParserTest.java   |  65 
 26 files changed, 1584 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4730/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
index d7ea560..a25571f 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
@@ -19,6 +19,24 @@
 package org.apache.ambari.view.hive.client;
 
 public interface ColumnDescription {
+  enum DataTypes {
+TINYINT, //
+SMALLINT, //
+INT, //
+BIGINT, //
+BOOLEAN, //
+FLOAT, //
+DOUBLE, //
+STRING, //
+BINARY, // -- (Note: Available in Hive 0.8.0 and later)
+TIMESTAMP, // -- (Note: Available in Hive 0.8.0 and later)
+DECIMAL, // -- (Note: Available in Hive 0.11.0 and later)
+// DECIMAL,(precision, scale)  -- (Note: Available in Hive 0.13.0 and 
later) Not included.
+DATE, // -- (Note: Available in Hive 0.12.0 and later)
+VARCHAR, // -- (Note: Available in Hive 0.12.0 and later)
+CHAR, // -- (Note: Available in Hive 0.13.0 and later)
+  }
+
   public abstract String getName();
   public abstract void setName(String name);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4730/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
index 82ac1f5..1442748 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
@@ -24,10 +24,11 @@ import 
org.apache.ambari.view.hive.utils.ServiceFormattedException;
 import org.apache.ambari.view.utils.UserLocalFactory;
 import org.apache.ambari.view.utils.ambari.AmbariApi;
 import org.apache.ambari.view.utils.ambari.AmbariApiException;
+import org.apache.ambari.view.utils.hdfs.HdfsApi;
+import org.apache.ambari.view.utils.hdfs.HdfsUtil;
 import org.slf4j.Logger;
 

ambari git commit: AMBARI-13747. Hive View : Add Database/Table creation from File. (Nitiraj Singh Rathore via yusaku)

2015-11-06 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk 810a32abb -> 079293935


AMBARI-13747. Hive View : Add Database/Table creation from File. (Nitiraj Singh 
Rathore  via yusaku)


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

Branch: refs/heads/trunk
Commit: 079293935aed3650f5240c1b2dc2975d2875b82f
Parents: 810a32a
Author: Yusaku Sako 
Authored: Fri Nov 6 16:50:15 2015 -0800
Committer: Yusaku Sako 
Committed: Fri Nov 6 16:50:15 2015 -0800

--
 .../view/hive/client/ColumnDescription.java |  18 ++
 .../view/hive/client/ConnectionFactory.java |  19 +-
 .../org/apache/ambari/view/hive/client/Row.java |  24 ++
 .../view/hive/resources/uploads/CSVParser.java  | 185 
 .../uploads/ColumnDescriptionImpl.java  |  95 ++
 .../view/hive/resources/uploads/DataParser.java |  63 
 .../view/hive/resources/uploads/IParser.java|  37 +++
 .../hive/resources/uploads/ParseOptions.java|  46 +++
 .../view/hive/resources/uploads/ParseUtils.java | 103 +++
 .../hive/resources/uploads/QueryGenerator.java  |  66 +
 .../view/hive/resources/uploads/TableInfo.java  |  62 
 .../hive/resources/uploads/UploadService.java   | 296 +++
 .../ui/hive-web/app/adapters/file-upload.js |  31 ++
 .../ui/hive-web/app/adapters/upload-table.js|  76 +
 .../ui/hive-web/app/components/file-upload.js   |  25 ++
 .../ui/hive-web/app/components/navbar-widget.js |   5 +-
 .../ui/hive-web/app/controllers/upload-table.js | 261 
 .../ui/hive-web/app/initializers/i18n.js|   7 +-
 .../main/resources/ui/hive-web/app/router.js|   1 +
 .../resources/ui/hive-web/app/styles/app.scss   |   3 +-
 .../ui/hive-web/app/templates/upload-table.hbs  |  92 ++
 .../ui/hive-web/app/utils/constants.js  |   1 +
 .../src/main/resources/ui/hive-web/bower.json   |   1 +
 .../src/main/resources/ui/hive-web/package.json |   1 +
 contrib/views/hive/src/main/resources/view.xml  |   6 +
 .../hive/resources/upload/DataParserTest.java   |  65 
 26 files changed, 1584 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/07929393/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
index d7ea560..a25571f 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ColumnDescription.java
@@ -19,6 +19,24 @@
 package org.apache.ambari.view.hive.client;
 
 public interface ColumnDescription {
+  enum DataTypes {
+TINYINT, //
+SMALLINT, //
+INT, //
+BIGINT, //
+BOOLEAN, //
+FLOAT, //
+DOUBLE, //
+STRING, //
+BINARY, // -- (Note: Available in Hive 0.8.0 and later)
+TIMESTAMP, // -- (Note: Available in Hive 0.8.0 and later)
+DECIMAL, // -- (Note: Available in Hive 0.11.0 and later)
+// DECIMAL,(precision, scale)  -- (Note: Available in Hive 0.13.0 and 
later) Not included.
+DATE, // -- (Note: Available in Hive 0.12.0 and later)
+VARCHAR, // -- (Note: Available in Hive 0.12.0 and later)
+CHAR, // -- (Note: Available in Hive 0.13.0 and later)
+  }
+
   public abstract String getName();
   public abstract void setName(String name);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/07929393/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
index 82ac1f5..1442748 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/ConnectionFactory.java
@@ -24,10 +24,11 @@ import 
org.apache.ambari.view.hive.utils.ServiceFormattedException;
 import org.apache.ambari.view.utils.UserLocalFactory;
 import org.apache.ambari.view.utils.ambari.AmbariApi;
 import org.apache.ambari.view.utils.ambari.AmbariApiException;
+import org.apache.ambari.view.utils.hdfs.HdfsApi;
+import org.apache.ambari.view.utils.hdfs.HdfsUtil;
 import org.slf4j.Logger;
 import 

[1/3] ambari git commit: Revert "AMBARI-13725: HAWQ and PXF to support 3 digit versioning instead of 4. (jaoki)" Reverted due to rat check failures. This reverts commit 5dac27bef4a89a049c7e77f49828a20

2015-11-06 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk 6e8760d32 -> 810a32abb


http://git-wip-us.apache.org/repos/asf/ambari/blob/810a32ab/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py
deleted file mode 100644
index dd0031c..000
--- 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-
-from resource_management import Script
-
-from resource_management.libraries.resources.xml_config import XmlConfig
-from resource_management.core.resources.accounts import User
-from resource_management.core.resources.system import Directory, File, Execute
-from resource_management.core.source import Template
-
-
-
-class Pxf(Script):
-  """
-  Contains the interface definitions for methods like install,
-  start, stop, status, etc. for the PXF
-  """
-
-  def install(self, env):
-self.install_packages(env)
-self.configure(env)
-
-
-  def configure(self, env):
-import params
-env.set_params(params)
-self.__setup_user_group()
-self.__generate_config_files()
-# pxf-service init exits safely when it is already initialized
-self.__execute_service_command("init")
-
-
-  def start(self, env):
-self.configure(env)
-self.__grant_permissions()
-self.__execute_service_command("restart")
-
-
-  def stop(self, env):
-self.__execute_service_command("stop")
-
-
-  def status(self, env):
-try:
-  self.__execute_service_command("status")
-except Exception:
-  raise ComponentIsNotRunning()
-
-
-  def __execute_service_command(self, command):
-import params
-Execute("service {0} {1}".format(params.pxf_service_name, command),
-  timeout=params.default_exec_timeout,
-  logoutput=True)
-
-
-  def __setup_user_group(self):
-"""
-Creates PXF user with the required groups and bash as default shell
-"""
-import params
-User(params.pxf_user,
- groups=[params.hdfs_superuser_group, params.user_group, 
params.tomcat_group],
- shell="/bin/bash")
-
-
-  def __generate_config_files(self):
-"""
-Generates pxf-env.sh file from jinja template and sets the classpath for 
HDP
-"""
-import params
-import shutil
-
-hdp_stack = "HDP"
-
-# Create file pxf-env.sh from jinja template
-File("{0}/pxf-env.sh".format(params.pxf_conf_dir),
- content = Template("pxf-env.j2"))
-
-# Classpath is set for PHD by default. If stack is HDP, set classpath for 
HDP
-if(params.stack_name == hdp_stack):
-  shutil.copy2("{0}/pxf-privatehdp.classpath".format(params.pxf_conf_dir),
-   "{0}/pxf-private.classpath".format(params.pxf_conf_dir))
-
-XmlConfig("pxf-site.xml",
-  conf_dir=params.pxf_conf_dir,
-  configurations=params.config['configurations']['pxf-site'],
-  
configuration_attributes=params.config['configuration_attributes']['pxf-site'])
-
-
-  def __grant_permissions(self):
-"""
-Grants permission to pxf:pxf for PXF instance directory
-"""
-import params
-Directory(params.pxf_instance_dir,
-  owner=params.pxf_user,
-  group=params.pxf_group,
-  recursive=True)
-
-
-if __name__ == "__main__":
-  Pxf().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/810a32ab/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/templates/pxf-env.j2
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/templates/pxf-env.j2
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/templates/pxf-env.j2
deleted file mode 100644
index 03f2420..000
--- 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/templates/pxf-env.j2
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-#Licensed to the Apache Software 

ambari git commit: AMBARI-13766. Inappropriate scaling in query history "filter by duration" (Pallav Kulshreshtha via srimanth)

2015-11-06 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 5dac27bef -> d0883c589


AMBARI-13766. Inappropriate scaling in query history "filter by duration" 
(Pallav Kulshreshtha via srimanth)


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

Branch: refs/heads/trunk
Commit: d0883c5894ec8ca7a48f5b8de1e5a851ecadbd6a
Parents: 5dac27b
Author: Srimanth Gunturi 
Authored: Fri Nov 6 16:05:01 2015 -0800
Committer: Srimanth Gunturi 
Committed: Fri Nov 6 16:05:56 2015 -0800

--
 .../app/components/number-range-widget.js   |  7 ++
 .../components/number-range-widget.hbs  |  4 ++--
 .../ui/hive-web/app/utils/functions.js  | 24 
 3 files changed, 33 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0883c58/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
index 80489dc..7c5f69c 100644
--- 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
+++ 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
@@ -17,6 +17,7 @@
  */
 
 import Ember from 'ember';
+import utils from 'hive/utils/functions';
 
 export default Ember.Component.extend({
   didInsertElement: function () {
@@ -26,6 +27,9 @@ export default Ember.Component.extend({
 if (!numberRange.get('from') && !numberRange.get('to')) {
   numberRange.set('from', numberRange.get('min'));
   numberRange.set('to', numberRange.get('max'));
+  
numberRange.set('fromDuration',utils.secondsToHHMMSS(numberRange.get('min')));
+  
numberRange.set('toDuration',utils.secondsToHHMMSS(numberRange.get('max')));
+
 }
 
 this.$('.slider').slider({
@@ -38,6 +42,9 @@ export default Ember.Component.extend({
   slide: function (event, ui) {
 numberRange.set('from', ui.values[0]);
 numberRange.set('to', ui.values[1]);
+numberRange.set('fromDuration', utils.secondsToHHMMSS(ui.values[0]));
+numberRange.set('toDuration', utils.secondsToHHMMSS(ui.values[1]));
+
   },
 
   change: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d0883c58/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
index 279ec07..da99e9c 100644
--- 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
+++ 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
@@ -18,6 +18,6 @@
 
 
 
-  {{numberRange.from}}
-  {{numberRange.to}}{{numberRange.units}}
+  {{numberRange.fromDuration}}
+  {{numberRange.toDuration}}
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d0883c58/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
index 73dbc8c..91e1a1c 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
@@ -78,6 +78,30 @@ export default Ember.Object.create({
   }
 }
 return array;
+  },
+
+  /**
+   * Convert number of seconds into time object HH MM SS
+   *
+   * @param integer secs Number of seconds to convert
+   * @return object
+  */
+  secondsToHHMMSS: function (secs)
+   {
+var hours = Math.floor(secs / (60 * 60));
+
+var divisor_for_minutes = secs % (60 * 60);
+var minutes = Math.floor(divisor_for_minutes / 60);
+
+var divisor_for_seconds = divisor_for_minutes % 60;
+var seconds = Math.ceil(divisor_for_seconds);
+
+var obj = {
+  "h": hours,
+  "m": minutes,
+  "s": seconds
+};
+return  ((obj.h > 0) ? obj.h + ' hr ' : '') + ((obj.m > 0) ? obj.m + ' min 
' : '') + ((obj.s >= 0) ? obj.m + ' sec ' : '');
   }
 
 });



[2/3] ambari git commit: Revert "AMBARI-13725: HAWQ and PXF to support 3 digit versioning instead of 4. (jaoki)" Reverted due to rat check failures. This reverts commit 5dac27bef4a89a049c7e77f49828a20

2015-11-06 Thread yusaku
http://git-wip-us.apache.org/repos/asf/ambari/blob/810a32ab/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
deleted file mode 100644
index 41b10dc..000
--- 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
-  
-hawq_master_address_host
-HAWQ Master
-localhost
-The host name of HAWQ master.
-  
-
-  
-hawq_standby_address_host
-HAWQ Standby Master
-localhost
-The host name of HAWQ standby.
-  
-
-  
-hawq_master_address_port
-HAWQ Master Port
-5432
-The port of HAWQ master.
-  
-
-  
-hawq_segment_address_port
-HAWQ Segment Port
-4
-The port of HAWQ segment.
-  
-
-  
-hawq_dfs_url
-HAWQ DFS URL
-localhost:8020/hawq_default
-URL for accessing HDFS.
-  
-
-  
-hawq_master_directory
-HAWQ Master Directory
-/data/hawq/master
-The directory of HAWQ master.
-  
-
-  
-hawq_segment_directory
-HAWQ Segment Directory
-/data/hawq/segment
-The directory of HAWQ segment.
-   
-
-  
-hawq_master_temp_directory
-HAWQ Master Temp Directory
-/tmp
-The temporary directory reserved for HAWQ 
master.
-  
-
-  
-hawq_segment_temp_directory
-HAWQ Segment Temp Directory
-/tmp
-The temporary directory reserved for HAWQ 
segment.
-  
-
-  
-  
-hawq_global_rm_type
-none
-The resource manager type to start for allocating resource. 
-  'none' means HAWQ resource manager exclusively uses whole
-  cluster; 'yarn' means HAWQ resource manager contacts YARN
-  resource manager to negotiate resource.
-
-  
-
-  
-hawq_rm_memory_limit_perseg
-64GB
-The limit of memory usage in a HAWQ segment when 
-  hawq_global_rm_type is set 'none'.
-
-  
-
-  
-hawq_rm_nvcore_limit_perseg
-16
-The limit of virtual core usage in a HAWQ segment when 
-  hawq_global_rm_type is set 'none'.
-
-  
-
-  
-hawq_rm_yarn_address
-localhost:8032
-The address of YARN resource manager server.
-  
-
-  
-hawq_rm_yarn_scheduler_address
-localhost:8030
-The address of YARN scheduler server.
-  
-
-  
-hawq_rm_yarn_queue_name
-default
-The YARN queue name to register HAWQ resource 
manager.
-  
-
-  
-hawq_rm_yarn_app_name
-hawq
-The application name to register HAWQ resource manager in 
YARN.
-  
-
-  
-hawq_re_cpu_enable
-false
-  
-
-  
-hawq_re_cgroup_mount_point
-/sys/fs/cgroup
-  
-
-  
-hawq_re_cgroup_hierarchy_name
-hadoop-yarn
-  
-
-  
-hawq_re_cleanup_period
-180
-  
-
-  
-hawq_re_cpu_weight
-1024.0
-  
-
-  
-hawq_re_vcore_pcore_ratio
-1.0
-  
-
-  
-hawq_resourcemanager_master_address_domainsocket_port
-5436
-  
-
-  
-hawq_rm_master_port
-5437
-  
-
-  
-hawq_rm_segment_port
-5438
-  
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/810a32ab/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml
 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml
deleted file mode 100644
index 32ae5a5..000
--- 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-
-  
-kernel.shmmax
-5
-Maximum size in bytes of a single shared memory segment that 
a Linux process can allocate in its
-  virtual address space
-
-  false
-  true
-
-  
-
-  
-kernel.shmmni
-4096
-System wide maximum number of shared memory 
segments
-
-  false
-  true
-
-  
-
-  
-kernel.shmall
-40
-Total amount of shared memory pages that can be used system 
wide
-
-  false
-  true
-
-  
-
-  
-kernel.sem
-250 512000 100 2048
-Parameter to define semaphore related values
-
-  false
-  true
-
-  
-
-  
-kernel.sysrq
-1
-Enable(1)/Disable(0) functions of sysrq
-
-  false
-  true
-
-  
-
-  
-kernel.core_uses_pid
-1
-Enable appending process id to the name of core dump file. 
Ex: core.PID
-
-  false
-  true
-
-  
-
-  
-kernel.msgmnb
-65536
-Default maximum size of a message in bytes
-
-  false
-  true
-
-  
-
-  
-kernel.msgmax
-65536
-Default maxmimum size of a mesage queue
-
-  false
-  true
-
-  
-
-  
-

[3/3] ambari git commit: Revert "AMBARI-13725: HAWQ and PXF to support 3 digit versioning instead of 4. (jaoki)" Reverted due to rat check failures. This reverts commit 5dac27bef4a89a049c7e77f49828a20

2015-11-06 Thread yusaku
Revert "AMBARI-13725: HAWQ and PXF to support 3 digit versioning instead of 4. 
(jaoki)"
Reverted due to rat check failures.
This reverts commit 5dac27bef4a89a049c7e77f49828a20370d0b518.


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

Branch: refs/heads/trunk
Commit: 810a32abbdae394fbe8f6f9263e70ec172ae8dfa
Parents: 6e8760d
Author: Yusaku Sako 
Authored: Fri Nov 6 16:47:11 2015 -0800
Committer: Yusaku Sako 
Committed: Fri Nov 6 16:47:11 2015 -0800

--
 .../HAWQ/2.0.0.0/configuration/gpcheck-env.xml  |  86 ++
 .../2.0.0.0/configuration/hawq-limits-env.xml   |  46 +++
 .../HAWQ/2.0.0.0/configuration/hawq-site.xml| 178 
 .../2.0.0.0/configuration/hawq-sysctl-env.xml   | 247 
 .../common-services/HAWQ/2.0.0.0/metainfo.xml   | 129 +
 .../HAWQ/2.0.0.0/package/scripts/common.py  | 283 +++
 .../HAWQ/2.0.0.0/package/scripts/constants.py   |  61 
 .../HAWQ/2.0.0.0/package/scripts/hawqmaster.py  |  55 
 .../HAWQ/2.0.0.0/package/scripts/hawqsegment.py | 102 +++
 .../HAWQ/2.0.0.0/package/scripts/hawqstandby.py |  58 
 .../HAWQ/2.0.0.0/package/scripts/hawqstatus.py  |  64 +
 .../2.0.0.0/package/scripts/master_helper.py| 194 +
 .../HAWQ/2.0.0.0/package/scripts/params.py  |  92 ++
 .../2.0.0.0/package/scripts/service_check.py| 102 +++
 .../HAWQ/2.0.0.0/package/scripts/utils.py   | 108 +++
 .../2.0.0.0/package/templates/hawq-hosts.j2 |   5 +
 .../package/templates/hawq-profile.sh.j2|   8 +
 .../HAWQ/2.0.0.0/package/templates/slaves.j2|   3 +
 .../HAWQ/2.0.0/configuration/gpcheck-env.xml|  86 --
 .../2.0.0/configuration/hawq-limits-env.xml |  46 ---
 .../HAWQ/2.0.0/configuration/hawq-site.xml  | 178 
 .../2.0.0/configuration/hawq-sysctl-env.xml | 247 
 .../common-services/HAWQ/2.0.0/metainfo.xml | 129 -
 .../HAWQ/2.0.0/package/scripts/common.py| 283 ---
 .../HAWQ/2.0.0/package/scripts/constants.py |  61 
 .../HAWQ/2.0.0/package/scripts/hawqmaster.py|  55 
 .../HAWQ/2.0.0/package/scripts/hawqsegment.py   | 102 ---
 .../HAWQ/2.0.0/package/scripts/hawqstandby.py   |  58 
 .../HAWQ/2.0.0/package/scripts/hawqstatus.py|  64 -
 .../HAWQ/2.0.0/package/scripts/master_helper.py | 194 -
 .../HAWQ/2.0.0/package/scripts/params.py|  92 --
 .../HAWQ/2.0.0/package/scripts/service_check.py | 102 ---
 .../HAWQ/2.0.0/package/scripts/utils.py | 108 ---
 .../HAWQ/2.0.0/package/templates/hawq-hosts.j2  |   5 -
 .../2.0.0/package/templates/hawq-profile.sh.j2  |   8 -
 .../HAWQ/2.0.0/package/templates/slaves.j2  |   3 -
 .../PXF/3.0.0.0/configuration/pxf-site.xml  |  19 ++
 .../common-services/PXF/3.0.0.0/metainfo.xml|  71 +
 .../PXF/3.0.0.0/package/scripts/params.py   |  42 +++
 .../PXF/3.0.0.0/package/scripts/pxf.py  | 120 
 .../PXF/3.0.0.0/package/templates/pxf-env.j2|  34 +++
 .../PXF/3.0.0/configuration/pxf-site.xml|  19 --
 .../common-services/PXF/3.0.0/metainfo.xml  |  71 -
 .../PXF/3.0.0/package/scripts/params.py |  42 ---
 .../PXF/3.0.0/package/scripts/pxf.py| 120 
 .../PXF/3.0.0/package/templates/pxf-env.j2  |  34 ---
 46 files changed, 2107 insertions(+), 2107 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/810a32ab/ambari-server/src/main/resources/common-services/HAWQ/2.0.0.0/configuration/gpcheck-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0.0/configuration/gpcheck-env.xml
 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0.0/configuration/gpcheck-env.xml
new file mode 100755
index 000..a61a34f
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0.0/configuration/gpcheck-env.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+  
+
+  content
+  Content
+  Contents of the configuration file 
/usr/local/hawq/etc/gpcheck.cnf. This file is used by 'hawq check' command, 
which can be run manually by gpadmin user on the HAWQ master host. This command 
validates the system parameters and HDFS parameters mentioned in this file to 
ensure optimal HAWQ operation.
+
+[global]
+configfile_version = 4
+
+[linux.mount]
+mount.points = /
+
+[linux.sysctl]
+sysctl.kernel.shmmax = 5
+sysctl.kernel.shmmni = 4096
+sysctl.kernel.shmall = 40
+sysctl.kernel.sem = 250 512000 100 2048

ambari git commit: AMBARI-13766. Inappropriate scaling in query history "filter by duration" (Pallav Kulshreshtha via srimanth)

2015-11-06 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 4fe63f735 -> 7536e0ecf


AMBARI-13766. Inappropriate scaling in query history "filter by duration" 
(Pallav Kulshreshtha via srimanth)


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

Branch: refs/heads/branch-2.1
Commit: 7536e0ecfaccff6dd43f3935c6ca7565922ef086
Parents: 4fe63f7
Author: Srimanth Gunturi 
Authored: Fri Nov 6 16:05:01 2015 -0800
Committer: Srimanth Gunturi 
Committed: Fri Nov 6 16:05:01 2015 -0800

--
 .../app/components/number-range-widget.js   |  7 ++
 .../components/number-range-widget.hbs  |  4 ++--
 .../ui/hive-web/app/utils/functions.js  | 24 
 3 files changed, 33 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7536e0ec/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
index 80489dc..7c5f69c 100644
--- 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
+++ 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/number-range-widget.js
@@ -17,6 +17,7 @@
  */
 
 import Ember from 'ember';
+import utils from 'hive/utils/functions';
 
 export default Ember.Component.extend({
   didInsertElement: function () {
@@ -26,6 +27,9 @@ export default Ember.Component.extend({
 if (!numberRange.get('from') && !numberRange.get('to')) {
   numberRange.set('from', numberRange.get('min'));
   numberRange.set('to', numberRange.get('max'));
+  
numberRange.set('fromDuration',utils.secondsToHHMMSS(numberRange.get('min')));
+  
numberRange.set('toDuration',utils.secondsToHHMMSS(numberRange.get('max')));
+
 }
 
 this.$('.slider').slider({
@@ -38,6 +42,9 @@ export default Ember.Component.extend({
   slide: function (event, ui) {
 numberRange.set('from', ui.values[0]);
 numberRange.set('to', ui.values[1]);
+numberRange.set('fromDuration', utils.secondsToHHMMSS(ui.values[0]));
+numberRange.set('toDuration', utils.secondsToHHMMSS(ui.values[1]));
+
   },
 
   change: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7536e0ec/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
index 279ec07..da99e9c 100644
--- 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
+++ 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/number-range-widget.hbs
@@ -18,6 +18,6 @@
 
 
 
-  {{numberRange.from}}
-  {{numberRange.to}}{{numberRange.units}}
+  {{numberRange.fromDuration}}
+  {{numberRange.toDuration}}
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/7536e0ec/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
index 73dbc8c..91e1a1c 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
@@ -78,6 +78,30 @@ export default Ember.Object.create({
   }
 }
 return array;
+  },
+
+  /**
+   * Convert number of seconds into time object HH MM SS
+   *
+   * @param integer secs Number of seconds to convert
+   * @return object
+  */
+  secondsToHHMMSS: function (secs)
+   {
+var hours = Math.floor(secs / (60 * 60));
+
+var divisor_for_minutes = secs % (60 * 60);
+var minutes = Math.floor(divisor_for_minutes / 60);
+
+var divisor_for_seconds = divisor_for_minutes % 60;
+var seconds = Math.ceil(divisor_for_seconds);
+
+var obj = {
+  "h": hours,
+  "m": minutes,
+  "s": seconds
+};
+return  ((obj.h > 0) ? obj.h + ' hr ' : '') + ((obj.m > 0) ? obj.m + ' min 
' : '') + ((obj.s >= 0) ? obj.m + ' sec ' : '');
   }
 
 });



[1/2] ambari git commit: AMBARI-13775. If the window gets "too narrow" the query window gets pushed down (Pallav Kulshreshtha via srimanth)

2015-11-06 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk d0883c589 -> 6e8760d32


AMBARI-13775. If the window gets "too narrow" the query window gets pushed down 
(Pallav Kulshreshtha via srimanth)


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

Branch: refs/heads/trunk
Commit: 147796127ba74d784e8f116f5fd5adf69e059b3d
Parents: d0883c5
Author: Srimanth Gunturi 
Authored: Fri Nov 6 16:18:15 2015 -0800
Committer: Srimanth Gunturi 
Committed: Fri Nov 6 16:19:39 2015 -0800

--
 .../hive/src/main/resources/ui/hive-web/app/templates/index.hbs  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/14779612/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs
index 81d6ecf..a06c330 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/index.hbs
@@ -18,11 +18,11 @@
 
 
   
-
+
   {{render 'databases'}}
 
 
-
+
   {{#panel-widget headingTranslation="titles.query.editor" 
classNames="query-editor-panel" iconActions=queryPanelActions}}
 {{render 'open-queries'}}
 



[2/2] ambari git commit: AMBARI-13772. Autocomplete display glitches (Pallav Kulshreshtha via srimanth)

2015-11-06 Thread srimanth
AMBARI-13772. Autocomplete display glitches (Pallav Kulshreshtha via srimanth)


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

Branch: refs/heads/trunk
Commit: 6e8760d328f23d3fd4b7dfc5e1c6f300ec9f55f6
Parents: 1477961
Author: Srimanth Gunturi 
Authored: Fri Nov 6 16:11:32 2015 -0800
Committer: Srimanth Gunturi 
Committed: Fri Nov 6 16:19:48 2015 -0800

--
 .../views/hive/src/main/resources/ui/hive-web/app/styles/app.scss   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6e8760d3/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
index bf271c4..7e23d46 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
@@ -358,6 +358,7 @@ body {
 
 .CodeMirror-hints {
   min-width: 200px;
+  z-index: 100;
 }
 
 .spinner {



ambari git commit: AMBARI-13749. Hive server 2 fails to start in kerberized environment.(vbrodetskyi)

2015-11-06 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 d37f881e5 -> 64bd2ec1a


AMBARI-13749. Hive server 2 fails to start in kerberized 
environment.(vbrodetskyi)


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

Branch: refs/heads/branch-2.1
Commit: 64bd2ec1a7303ed0f526ca0921714881ec8f2eb8
Parents: d37f881
Author: Vitaly Brodetskyi 
Authored: Fri Nov 6 12:34:01 2015 +0200
Committer: Vitaly Brodetskyi 
Committed: Fri Nov 6 12:34:01 2015 +0200

--
 .../HIVE/0.12.0.2.0/package/scripts/hive_service.py   |  5 +
 .../src/test/python/stacks/2.0.6/HIVE/test_hive_server.py | 10 +-
 .../src/test/python/stacks/2.0.6/configs/secured.json |  3 ++-
 3 files changed, 16 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/64bd2ec1/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
index 456c018..cda869e 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
@@ -59,6 +59,11 @@ def hive_service(name, action='start', upgrade_type=None):
 pid_file = format("{hive_pid_dir}/{hive_pid}")
 cmd = format("{start_hiveserver2_path} {hive_log_dir}/hive-server2.out 
{hive_log_dir}/hive-server2.log {pid_file} {hive_server_conf_dir} 
{hive_log_dir}")
 
+if params.security_enabled and params.current_version != None and 
(params.current_version.startswith("2.2.4") or
+  params.current_version.startswith("2.2.3")):
+  hive_kinit_cmd = format("{kinit_path_local} -kt {hive_server2_keytab} 
{hive_principal}; ")
+  Execute(hive_kinit_cmd, user=params.hive_user)
+
   pid_expression = "`" + as_user(format("cat {pid_file}"), 
user=params.hive_user) + "`"
   process_id_exists_command = format("ls {pid_file} >/dev/null 2>&1 && ps -p 
{pid_expression} >/dev/null 2>&1")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/64bd2ec1/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 ed20c96..8aa2b53 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
@@ -273,6 +273,10 @@ class TestHiveServer(RMFTestCase):
 )
 
 self.assert_configure_secured()
+self.assertResourceCalled('Execute',
+  '/usr/bin/kinit -kt 
/etc/security/keytabs/hive.service.keytab 
hive/c6401.ambari.apache@example.com; ',
+  user = 'hive',
+  )
 self.assertResourceCalled('Execute', '/tmp/start_hiveserver2_script 
/var/log/hive/hive-server2.out /var/log/hive/hive-server2.log 
/var/run/hive/hive-server.pid /etc/hive/conf.server /var/log/hive',
 environment = {'HADOOP_HOME': '/usr',
'HIVE_BIN': 'hive',
@@ -302,7 +306,11 @@ class TestHiveServer(RMFTestCase):
hdp_stack_version = self.STACK_VERSION,
target = RMFTestCase.TARGET_COMMON_SERVICES
 )
-
+self.assertResourceCalled('Execute',
+  '/usr/bin/kinit -kt 
/etc/security/keytabs/hive.service.keytab 
hive/c6401.ambari.apache@example.com; ',
+  user = 'hive',
+  )
+
 self.assertResourceCalled('Execute', "ambari-sudo.sh kill `ambari-sudo.sh 
su hive -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]cat 
/var/run/hive/hive-server.pid'`",
 not_if = "! (ls /var/run/hive/hive-server.pid >/dev/null 2>&1 && ps -p 
`ambari-sudo.sh su hive -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]cat 
/var/run/hive/hive-server.pid'` >/dev/null 2>&1)",
 )

http://git-wip-us.apache.org/repos/asf/ambari/blob/64bd2ec1/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
--
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json 

ambari git commit: AMBARI-13762. Some time zones are absent (onechiporenko)

2015-11-06 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 64bd2ec1a -> a2a633b39


AMBARI-13762. Some time zones are absent (onechiporenko)


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

Branch: refs/heads/branch-2.1
Commit: a2a633b39fab5bc49148e4ccd9a9bcbc3f2caad4
Parents: 64bd2ec
Author: Oleg Nechiporenko 
Authored: Fri Nov 6 12:17:05 2015 +0200
Committer: Oleg Nechiporenko 
Committed: Fri Nov 6 12:35:18 2015 +0200

--
 .../moment-timezone-with-data-2010-2020.js  | 54 +++-
 1 file changed, 40 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a2a633b3/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
--
diff --git a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js 
b/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
index 5d4a1d1..bc67cef 100644
--- a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
+++ b/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
@@ -421,7 +421,7 @@
}
 
loadData({
-   "version": "2015d",
+   "version": "2015g",
"zones": [
"Africa/Abidjan|GMT|0|0|",
"Africa/Addis_Ababa|EAT|-30|0|",
@@ -429,34 +429,50 @@
"Africa/Bangui|WAT|-10|0|",
"Africa/Blantyre|CAT|-20|0|",
"Africa/Cairo|EET EEST|-20 -30|010101010|1Cby0 Fb0 c10 
8n0 8Nd0 gL0 e10 mn0",
-   "Africa/Casablanca|WET WEST|0 
-10|01010101010101010101010101010101010101010|1Cco0 Db0 1zd0 Lz0 1Nf0 wM0 co0 
go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uo0 e00 DA0 11A0 rA0 e00 Jc0 WM0 m00 
gM0 M00 WM0 jc0 e00 RA0 11A0 dA0 e00 Uo0 11A0 800 gM0 Xc0",
+   "Africa/Casablanca|WET WEST|0 
-10|01010101010101010101010101010101010101010|1Cco0 Db0 1zd0 Lz0 1Nf0 wM0 co0 
go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 
gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0",
"Africa/Ceuta|CET CEST|-10 
-20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 
11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
"Africa/Johannesburg|SAST|-20|0|",
"Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 
1o00",
+   "Africa/Windhoek|WAST WAT|-20 
-10|01010101010101010101010|1C1c0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 
1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0",
"America/Adak|HST HDT|a0 
90|01010101010101010101010|1BR00 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
"America/Anchorage|AKST AKDT|90 
80|01010101010101010101010|1BQX0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
"America/Anguilla|AST|40|0|",
+   "America/Araguaina|BRT BRST|30 20|010|1IdD0 Lz0",
"America/Argentina/Buenos_Aires|ART|30|0|",
+   "America/Asuncion|PYST PYT|30 
40|01010101010101010101010|1C430 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 
17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0",
"America/Atikokan|EST|50|0|",
+   "America/Bahia|BRT BRST|30 20|010|1FJf0 Rb0",
+   "America/Bahia_Banderas|MST CDT CST|70 50 
60|01212121212121212121212|1C1l0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 
14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0",
+   "America/Belem|BRT|30|0|",
"America/Belize|CST|60|0|",
"America/Boa_Vista|AMT|40|0|",
"America/Bogota|COT|50|0|",
"America/Boise|MST MDT|70 
60|01010101010101010101010|1BQV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
+   "America/Campo_Grande|AMST AMT|30 
40|01010101010101010101010|1BIr0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 
1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10",
"America/Cancun|CST CDT EST|60 50 50|010101010102|1C1k0 
1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0",
"America/Caracas|VET|4u|0|",
+   "America/Cayman|EST EDT|50 40|01010101010|1Qtj0 1zb0 
Op0 1zb0 

ambari git commit: AMBARI-13762. Some time zones are absent (onechiporenko)

2015-11-06 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk d01a143ff -> 02e113d09


AMBARI-13762. Some time zones are absent (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 02e113d09735ec2cf42bb078d9837032eca09c39
Parents: d01a143
Author: Oleg Nechiporenko 
Authored: Fri Nov 6 12:17:05 2015 +0200
Committer: Oleg Nechiporenko 
Committed: Fri Nov 6 12:37:35 2015 +0200

--
 .../moment-timezone-with-data-2010-2020.js  | 54 +++-
 1 file changed, 40 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/02e113d0/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
--
diff --git a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js 
b/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
index 5d4a1d1..bc67cef 100644
--- a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
+++ b/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
@@ -421,7 +421,7 @@
}
 
loadData({
-   "version": "2015d",
+   "version": "2015g",
"zones": [
"Africa/Abidjan|GMT|0|0|",
"Africa/Addis_Ababa|EAT|-30|0|",
@@ -429,34 +429,50 @@
"Africa/Bangui|WAT|-10|0|",
"Africa/Blantyre|CAT|-20|0|",
"Africa/Cairo|EET EEST|-20 -30|010101010|1Cby0 Fb0 c10 
8n0 8Nd0 gL0 e10 mn0",
-   "Africa/Casablanca|WET WEST|0 
-10|01010101010101010101010101010101010101010|1Cco0 Db0 1zd0 Lz0 1Nf0 wM0 co0 
go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uo0 e00 DA0 11A0 rA0 e00 Jc0 WM0 m00 
gM0 M00 WM0 jc0 e00 RA0 11A0 dA0 e00 Uo0 11A0 800 gM0 Xc0",
+   "Africa/Casablanca|WET WEST|0 
-10|01010101010101010101010101010101010101010|1Cco0 Db0 1zd0 Lz0 1Nf0 wM0 co0 
go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 
gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0",
"Africa/Ceuta|CET CEST|-10 
-20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 
11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
"Africa/Johannesburg|SAST|-20|0|",
"Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 
1o00",
+   "Africa/Windhoek|WAST WAT|-20 
-10|01010101010101010101010|1C1c0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 
1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0",
"America/Adak|HST HDT|a0 
90|01010101010101010101010|1BR00 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
"America/Anchorage|AKST AKDT|90 
80|01010101010101010101010|1BQX0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
"America/Anguilla|AST|40|0|",
+   "America/Araguaina|BRT BRST|30 20|010|1IdD0 Lz0",
"America/Argentina/Buenos_Aires|ART|30|0|",
+   "America/Asuncion|PYST PYT|30 
40|01010101010101010101010|1C430 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 
17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0",
"America/Atikokan|EST|50|0|",
+   "America/Bahia|BRT BRST|30 20|010|1FJf0 Rb0",
+   "America/Bahia_Banderas|MST CDT CST|70 50 
60|01212121212121212121212|1C1l0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 
14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0",
+   "America/Belem|BRT|30|0|",
"America/Belize|CST|60|0|",
"America/Boa_Vista|AMT|40|0|",
"America/Bogota|COT|50|0|",
"America/Boise|MST MDT|70 
60|01010101010101010101010|1BQV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
+   "America/Campo_Grande|AMST AMT|30 
40|01010101010101010101010|1BIr0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 
1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10",
"America/Cancun|CST CDT EST|60 50 50|010101010102|1C1k0 
1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0",
"America/Caracas|VET|4u|0|",
+   "America/Cayman|EST EDT|50 40|01010101010|1Qtj0 1zb0 
Op0 1zb0 Op0 1zb0 

ambari git commit: AMBARI-13749. Hive server 2 fails to start in kerberized environment.(vbrodetskyi)

2015-11-06 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk 02e113d09 -> 223feece1


AMBARI-13749. Hive server 2 fails to start in kerberized 
environment.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 223feece188581a696f66dba0b32824bc5675272
Parents: 02e113d
Author: Vitaly Brodetskyi 
Authored: Fri Nov 6 12:37:47 2015 +0200
Committer: Vitaly Brodetskyi 
Committed: Fri Nov 6 12:38:44 2015 +0200

--
 .../HIVE/0.12.0.2.0/package/scripts/hive_service.py   |  5 +
 .../src/test/python/stacks/2.0.6/HIVE/test_hive_server.py | 10 +-
 .../src/test/python/stacks/2.0.6/configs/secured.json |  3 ++-
 3 files changed, 16 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/223feece/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
index 456c018..cda869e 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
@@ -59,6 +59,11 @@ def hive_service(name, action='start', upgrade_type=None):
 pid_file = format("{hive_pid_dir}/{hive_pid}")
 cmd = format("{start_hiveserver2_path} {hive_log_dir}/hive-server2.out 
{hive_log_dir}/hive-server2.log {pid_file} {hive_server_conf_dir} 
{hive_log_dir}")
 
+if params.security_enabled and params.current_version != None and 
(params.current_version.startswith("2.2.4") or
+  params.current_version.startswith("2.2.3")):
+  hive_kinit_cmd = format("{kinit_path_local} -kt {hive_server2_keytab} 
{hive_principal}; ")
+  Execute(hive_kinit_cmd, user=params.hive_user)
+
   pid_expression = "`" + as_user(format("cat {pid_file}"), 
user=params.hive_user) + "`"
   process_id_exists_command = format("ls {pid_file} >/dev/null 2>&1 && ps -p 
{pid_expression} >/dev/null 2>&1")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/223feece/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 51bc3a2..76850bb 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
@@ -273,6 +273,10 @@ class TestHiveServer(RMFTestCase):
 )
 
 self.assert_configure_secured()
+self.assertResourceCalled('Execute',
+  '/usr/bin/kinit -kt 
/etc/security/keytabs/hive.service.keytab 
hive/c6401.ambari.apache@example.com; ',
+  user = 'hive',
+  )
 self.assertResourceCalled('Execute', '/tmp/start_hiveserver2_script 
/var/log/hive/hive-server2.out /var/log/hive/hive-server2.log 
/var/run/hive/hive-server.pid /etc/hive/conf.server /var/log/hive',
 environment = {'HADOOP_HOME': '/usr',
'HIVE_BIN': 'hive',
@@ -302,7 +306,11 @@ class TestHiveServer(RMFTestCase):
hdp_stack_version = self.STACK_VERSION,
target = RMFTestCase.TARGET_COMMON_SERVICES
 )
-
+self.assertResourceCalled('Execute',
+  '/usr/bin/kinit -kt 
/etc/security/keytabs/hive.service.keytab 
hive/c6401.ambari.apache@example.com; ',
+  user = 'hive',
+  )
+
 self.assertResourceCalled('Execute', "ambari-sudo.sh kill `ambari-sudo.sh 
su hive -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]cat 
/var/run/hive/hive-server.pid'`",
 not_if = "! (ls /var/run/hive/hive-server.pid >/dev/null 2>&1 && ps -p 
`ambari-sudo.sh su hive -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]cat 
/var/run/hive/hive-server.pid'` >/dev/null 2>&1)",
 )

http://git-wip-us.apache.org/repos/asf/ambari/blob/223feece/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
--
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json 
b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json

[2/2] ambari git commit: AMBARI-13761. RU: SUSE new stack install failed (aonishuk)

2015-11-06 Thread aonishuk
AMBARI-13761. RU: SUSE new stack install failed (aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: 44608b299cd3541fd6b518789632b2a75318347a
Parents: a2a633b
Author: Andrew Onishuk 
Authored: Fri Nov 6 12:49:20 2015 +0200
Committer: Andrew Onishuk 
Committed: Fri Nov 6 12:49:20 2015 +0200

--
 .../custom_actions/scripts/install_packages.py  | 28 +++-
 .../configs/install_packages_config.json|  9 +++
 2 files changed, 36 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/44608b29/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
--
diff --git 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
index dd43c8f..8fc9ab7 100644
--- 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
+++ 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
@@ -300,7 +300,8 @@ class InstallPackages(Script):
   allInstalledPackages(packages_installed_before)
   packages_installed_before = [package[0] for package in 
packages_installed_before]
   packages_were_checked = True
-  for package in package_list:
+  filtered_package_list = self.filter_package_list(package_list)
+  for package in filtered_package_list:
 name = self.format_package_name(package['name'], 
self.repository_version)
 Package(name,
 use_repos=list(self.current_repo_files) if 
OSCheck.is_ubuntu_family() else self.current_repositories,
@@ -383,6 +384,31 @@ class InstallPackages(Script):
   def abort_handler(self, signum, frame):
 Logger.error("Caught signal {0}, will handle it gracefully. Compute the 
actual version if possible before exiting.".format(signum))
 self.check_partial_install()
+
+  def filter_package_list(self, package_list):
+"""
+Note: that we have skipUpgrade option in metainfo.xml to filter packages,
+so use this method only if, for some reason the metainfo option cannot be 
used.
+
+Here we filter packages that are managed with custom logic in package
+scripts. Usually this packages come from system repositories, and either
+ are not available when we restrict repository list, or should not be
+installed on host at all.
+:param package_list: original list
+:return: filtered package_list
+"""
+filtered_package_list = []
+for package in package_list:
+  skip_package = False
+  
+  # skip upgrade for hadooplzo* versioned package, only if lzo is disabled 
+  io_compression_codecs = 
default("/configurations/core-site/io.compression.codecs", None)
+  if not io_compression_codecs or "com.hadoop.compression.lzo" not in 
io_compression_codecs:
+skip_package = package['name'].startswith('hadooplzo')
+
+  if not skip_package:
+filtered_package_list.append(package)
+return filtered_package_list
 
 
 if __name__ == "__main__":

http://git-wip-us.apache.org/repos/asf/ambari/blob/44608b29/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
--
diff --git 
a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
 
b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
index 6ecf8d8..50e327a 100644
--- 
a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
+++ 
b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
@@ -82,5 +82,14 @@
 "hs_host": [
 "0b3.vm"
 ]
+},
+"configurations": {
+"cluster-env": {
+"repo_suse_rhel_template": "[{{repo_id}}]\nname={{repo_id}}\n{% if 
mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif 
%}\n\npath=/\nenabled=1\ngpgcheck=0", 
+"repo_ubuntu_template": "{{package_type}} {{base_url}} 
{{components}}"
+},
+"core-site": {
+"io.compression.codecs": "com.hadoop.compression.lzo"
+}
 }
 }



[1/2] ambari git commit: AMBARI-13761. RU: SUSE new stack install failed (aonishuk)

2015-11-06 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 a2a633b39 -> 44608b299
  refs/heads/trunk 223feece1 -> 18274ea01


AMBARI-13761. RU: SUSE new stack install failed (aonishuk)


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

Branch: refs/heads/trunk
Commit: 18274ea01379527fceb8ee8fe6120dd262544f44
Parents: 223feec
Author: Andrew Onishuk 
Authored: Fri Nov 6 12:49:17 2015 +0200
Committer: Andrew Onishuk 
Committed: Fri Nov 6 12:49:17 2015 +0200

--
 .../custom_actions/scripts/install_packages.py  | 28 +++-
 .../configs/install_packages_config.json|  9 +++
 2 files changed, 36 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/18274ea0/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
--
diff --git 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
index bec1c39..1dfaa54 100644
--- 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
+++ 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
@@ -291,7 +291,8 @@ class InstallPackages(Script):
   allInstalledPackages(packages_installed_before)
   packages_installed_before = [package[0] for package in 
packages_installed_before]
   packages_were_checked = True
-  for package in package_list:
+  filtered_package_list = self.filter_package_list(package_list)
+  for package in filtered_package_list:
 name = self.format_package_name(package['name'], 
self.repository_version)
 Package(name,
 use_repos=list(self.current_repo_files) if 
OSCheck.is_ubuntu_family() else self.current_repositories,
@@ -374,6 +375,31 @@ class InstallPackages(Script):
   def abort_handler(self, signum, frame):
 Logger.error("Caught signal {0}, will handle it gracefully. Compute the 
actual version if possible before exiting.".format(signum))
 self.check_partial_install()
+
+  def filter_package_list(self, package_list):
+"""
+Note: that we have skipUpgrade option in metainfo.xml to filter packages,
+so use this method only if, for some reason the metainfo option cannot be 
used.
+
+Here we filter packages that are managed with custom logic in package
+scripts. Usually this packages come from system repositories, and either
+ are not available when we restrict repository list, or should not be
+installed on host at all.
+:param package_list: original list
+:return: filtered package_list
+"""
+filtered_package_list = []
+for package in package_list:
+  skip_package = False
+  
+  # skip upgrade for hadooplzo* versioned package, only if lzo is disabled 
+  io_compression_codecs = 
default("/configurations/core-site/io.compression.codecs", None)
+  if not io_compression_codecs or "com.hadoop.compression.lzo" not in 
io_compression_codecs:
+skip_package = package['name'].startswith('hadooplzo')
+
+  if not skip_package:
+filtered_package_list.append(package)
+return filtered_package_list
 
 
 if __name__ == "__main__":

http://git-wip-us.apache.org/repos/asf/ambari/blob/18274ea0/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
--
diff --git 
a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
 
b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
index 6ecf8d8..50e327a 100644
--- 
a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
+++ 
b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
@@ -82,5 +82,14 @@
 "hs_host": [
 "0b3.vm"
 ]
+},
+"configurations": {
+"cluster-env": {
+"repo_suse_rhel_template": "[{{repo_id}}]\nname={{repo_id}}\n{% if 
mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif 
%}\n\npath=/\nenabled=1\ngpgcheck=0", 
+"repo_ubuntu_template": "{{package_type}} {{base_url}} 
{{components}}"
+},
+"core-site": {
+"io.compression.codecs": "com.hadoop.compression.lzo"
+}
 }
 }



[1/2] ambari git commit: AMBARI-13764. Hbase become stopped by itself (Upgrade from 2.1.1 to 2.1.3.0) (dlysnichenko)

2015-11-06 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 44608b299 -> 3dcc26a59
  refs/heads/trunk 18274ea01 -> 1469a0e62


AMBARI-13764. Hbase become stopped by itself (Upgrade from 2.1.1 to 2.1.3.0) 
(dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 1469a0e6236e680b6ac1b18cd8250bc904c20eb7
Parents: 18274ea
Author: Lisnichenko Dmitro 
Authored: Fri Nov 6 14:29:08 2015 +0200
Committer: Lisnichenko Dmitro 
Committed: Fri Nov 6 14:29:08 2015 +0200

--
 .../0.96.0.2.0/package/scripts/hbase_service.py |  3 ++-
 .../python/stacks/2.0.6/HBASE/test_hbase_master.py  | 14 +++---
 .../stacks/2.0.6/HBASE/test_hbase_regionserver.py   | 16 
 3 files changed, 17 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1469a0e6/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
index 95cd49d..f322aa4 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
@@ -29,7 +29,8 @@ def hbase_service(
 role = name
 cmd = format("{daemon_script} --config {hbase_conf_dir}")
 pid_file = format("{pid_dir}/hbase-{hbase_user}-{role}.pid")
-no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps -p `cat 
{pid_file}` >/dev/null 2>&1")
+pid_expression = as_sudo(["cat", pid_file])
+no_op_test = as_sudo(["test", "-f", pid_file]) + format(" && ps -p 
`{pid_expression}` >/dev/null 2>&1")
 
 if action == 'start':
   daemon_cmd = format("{cmd} start {role}")

http://git-wip-us.apache.org/repos/asf/ambari/blob/1469a0e6/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py 
b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
index e002008..7ec706f 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
@@ -78,7 +78,7 @@ class TestHBaseMaster(RMFTestCase):
 
 self.assert_configure_default()
 self.assertResourceCalled('Execute', '/usr/lib/hbase/bin/hbase-daemon.sh 
--config /etc/hbase/conf start master',
-  not_if = 'ls /var/run/hbase/hbase-hbase-master.pid >/dev/null 2>&1 && ps 
-p `cat /var/run/hbase/hbase-hbase-master.pid` >/dev/null 2>&1',
+  not_if = 'ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hbase/hbase-hbase-master.pid && ps -p `ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E cat /var/run/hbase/hbase-hbase-master.pid` 
>/dev/null 2>&1',
   user = 'hbase'
 )
 self.assertNoMoreResources()
@@ -93,8 +93,8 @@ class TestHBaseMaster(RMFTestCase):
 )
 
 self.assertResourceCalled('Execute', '/usr/lib/hbase/bin/hbase-daemon.sh 
--config /etc/hbase/conf stop master',
-only_if = 'ls /var/run/hbase/hbase-hbase-master.pid >/dev/null 2>&1 && 
ps -p `cat /var/run/hbase/hbase-hbase-master.pid` >/dev/null 2>&1',
-on_timeout = '! ( ls /var/run/hbase/hbase-hbase-master.pid >/dev/null 
2>&1 && ps -p `cat /var/run/hbase/hbase-hbase-master.pid` >/dev/null 2>&1 ) || 
ambari-sudo.sh -H -E kill -9 `cat /var/run/hbase/hbase-hbase-master.pid`',
+only_if = 'ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hbase/hbase-hbase-master.pid && ps -p `ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E cat /var/run/hbase/hbase-hbase-master.pid` 
>/dev/null 2>&1',
+on_timeout = '! ( ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hbase/hbase-hbase-master.pid && ps -p `ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E cat /var/run/hbase/hbase-hbase-master.pid` 
>/dev/null 2>&1 ) || ambari-sudo.sh -H -E kill -9 `cat 
/var/run/hbase/hbase-hbase-master.pid`',
 timeout = 30,
 user = 'hbase',
 )
@@ -177,7 +177,7 @@ class TestHBaseMaster(RMFTestCase):
 
 self.assert_configure_secured()
 self.assertResourceCalled('Execute', '/usr/lib/hbase/bin/hbase-daemon.sh 
--config /etc/hbase/conf start master',
-  not_if = 'ls 

ambari git commit: AMBARI-13779. UI hangs due to JS error at Configure Kerberos page on Enable Kerberos wizard. (jaimin)

2015-11-06 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk 62ff7acfe -> beb5c49d3


AMBARI-13779. UI hangs due to JS error at Configure Kerberos page on Enable 
Kerberos wizard. (jaimin)


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

Branch: refs/heads/trunk
Commit: beb5c49d3adefc9b484e225acf85e93257e5b423
Parents: 62ff7ac
Author: Jaimin Jetly 
Authored: Fri Nov 6 10:47:13 2015 -0800
Committer: Jaimin Jetly 
Committed: Fri Nov 6 10:47:13 2015 -0800

--
 .../app/models/configs/objects/service_config_property.js | 10 --
 .../configs/objects/service_config_property_test.js   |  8 
 2 files changed, 16 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/beb5c49d/ambari-web/app/models/configs/objects/service_config_property.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js 
b/ambari-web/app/models/configs/objects/service_config_property.js
index b4756c1..c078a9e 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -497,8 +497,14 @@ App.ServiceConfigProperty = Em.Object.extend({
 var description = this.get('description');
 var displayType = this.get('displayType');
 var additionalDescription = 
Em.I18n.t('services.service.config.password.additionalDescription');
-if ('password' === displayType && 
!description.contains(additionalDescription)) {
-  description += '' + additionalDescription;
+if ('password' === displayType) {
+  if (description) {
+if (!description.contains(additionalDescription)) {
+  description += '' + additionalDescription;
+}
+  } else {
+description = additionalDescription;
+  }
 }
 this.set('description', description);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/beb5c49d/ambari-web/test/models/configs/objects/service_config_property_test.js
--
diff --git 
a/ambari-web/test/models/configs/objects/service_config_property_test.js 
b/ambari-web/test/models/configs/objects/service_config_property_test.js
index f640a78..026006a 100644
--- a/ambari-web/test/models/configs/objects/service_config_property_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_property_test.js
@@ -508,6 +508,14 @@ describe('App.ServiceConfigProperty', function () {
   expect(subd).to.not.contain(extraMessage);
 });
 
+it('should add extra-message to the description if description is not 
defined', function () {
+
+  serviceConfigProperty.set('description', undefined);
+  var extraMessage = 
Em.I18n.t('services.service.config.password.additionalDescription');
+  serviceConfigProperty.updateDescription();
+  
expect(serviceConfigProperty.get('description')).to.contain(extraMessage);
+});
+
   });
 
 });



ambari git commit: AMBARI-13779. UI hangs due to JS error at Configure Kerberos page on Enable Kerberos wizard. (jaimin)

2015-11-06 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 4f542b50d -> 90c324355


AMBARI-13779. UI hangs due to JS error at Configure Kerberos page on Enable 
Kerberos wizard. (jaimin)


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

Branch: refs/heads/branch-2.1
Commit: 90c3243550481b81cc89866dc3069fede2461bd9
Parents: 4f542b5
Author: Jaimin Jetly 
Authored: Fri Nov 6 10:47:13 2015 -0800
Committer: Jaimin Jetly 
Committed: Fri Nov 6 10:48:40 2015 -0800

--
 .../app/models/configs/objects/service_config_property.js | 10 --
 .../configs/objects/service_config_property_test.js   |  8 
 2 files changed, 16 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/90c32435/ambari-web/app/models/configs/objects/service_config_property.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js 
b/ambari-web/app/models/configs/objects/service_config_property.js
index 6f814e7..4b5bfd9 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -615,8 +615,14 @@ App.ServiceConfigProperty = Em.Object.extend({
 var description = this.get('description');
 var displayType = this.get('displayType');
 var additionalDescription = 
Em.I18n.t('services.service.config.password.additionalDescription');
-if ('password' === displayType && 
!description.contains(additionalDescription)) {
-  description += '' + additionalDescription;
+if ('password' === displayType) {
+  if (description) {
+if (!description.contains(additionalDescription)) {
+  description += '' + additionalDescription;
+}
+  } else {
+description = additionalDescription;
+  }
 }
 this.set('description', description);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/90c32435/ambari-web/test/models/configs/objects/service_config_property_test.js
--
diff --git 
a/ambari-web/test/models/configs/objects/service_config_property_test.js 
b/ambari-web/test/models/configs/objects/service_config_property_test.js
index c8ab65c..bda01a4 100644
--- a/ambari-web/test/models/configs/objects/service_config_property_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_property_test.js
@@ -679,6 +679,14 @@ describe('App.ServiceConfigProperty', function () {
   expect(subd).to.not.contain(extraMessage);
 });
 
+it('should add extra-message to the description if description is not 
defined', function () {
+
+  serviceConfigProperty.set('description', undefined);
+  var extraMessage = 
Em.I18n.t('services.service.config.password.additionalDescription');
+  serviceConfigProperty.updateDescription();
+  
expect(serviceConfigProperty.get('description')).to.contain(extraMessage);
+});
+
   });
 
 });



ambari git commit: AMBARI-13770. Infinite spinner in Host Metrics block if Ambari Metrics is not installed

2015-11-06 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 6b3599a00 -> 1317c8f17


AMBARI-13770. Infinite spinner in Host Metrics block if Ambari Metrics is not 
installed


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

Branch: refs/heads/trunk
Commit: 1317c8f173b008aa33be902b95e4a8d0970c9c4b
Parents: 6b3599a
Author: Alex Antonenko 
Authored: Fri Nov 6 16:41:06 2015 +0200
Committer: Alex Antonenko 
Committed: Fri Nov 6 16:44:05 2015 +0200

--
 ambari-web/app/assets/test/tests.js |   1 +
 ambari-web/app/views/main/host/metrics/disk.js  |   5 +-
 .../test/views/main/host/metrics/disk_test.js   | 129 +++
 3 files changed, 133 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1317c8f1/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index 517a411..805d565 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -252,6 +252,7 @@ var files = [
   'test/views/main/host/details/host_component_views/nodemanager_view_test',
   'test/views/main/host/details/host_component_views/regionserver_view_test',
   'test/views/main/host/details/host_component_views/tasktracker_view_test',
+  'test/views/main/host/metrics/disk_test',
   'test/views/main/charts/heatmap_test',
   'test/views/main/charts/heatmap/heatmap_host_test',
   'test/views/main/service/item_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/1317c8f1/ambari-web/app/views/main/host/metrics/disk.js
--
diff --git a/ambari-web/app/views/main/host/metrics/disk.js 
b/ambari-web/app/views/main/host/metrics/disk.js
index fce239d..b20578b 100644
--- a/ambari-web/app/views/main/host/metrics/disk.js
+++ b/ambari-web/app/views/main/host/metrics/disk.js
@@ -52,8 +52,9 @@ App.ChartHostMetricsDisk = App.ChartLinearTimeView.extend({
   },
 
   getData: function (jsonData) {
-if (jsonData.metrics.part_max_used) {
-  jsonData.metrics.disk.part_max_used = jsonData.metrics.part_max_used;
+var partMaxUsed = Em.get(jsonData, 'metrics.part_max_used');
+if (!Em.isNone(partMaxUsed) && Em.get(jsonData, 
this.get('seriesTemplate.path'))) {
+  Em.set(jsonData, this.get('seriesTemplate.path') + '.part_max_used', 
partMaxUsed);
 }
 return this._super(jsonData);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1317c8f1/ambari-web/test/views/main/host/metrics/disk_test.js
--
diff --git a/ambari-web/test/views/main/host/metrics/disk_test.js 
b/ambari-web/test/views/main/host/metrics/disk_test.js
new file mode 100644
index 000..7757458
--- /dev/null
+++ b/ambari-web/test/views/main/host/metrics/disk_test.js
@@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+require('views/main/host/metrics/disk');
+
+describe('App.ChartHostMetricsDisk', function () {
+
+  var view;
+
+  beforeEach(function () {
+view = App.ChartHostMetricsDisk.create();
+  });
+
+  describe('#getData', function () {
+
+var cases = [
+  {
+data: {},
+result: {},
+title: 'no metrics data'
+  },
+  {
+data: {
+  metrics: null
+},
+result: {
+  metrics: null
+},
+title: 'malformed metrics data'
+  },
+  {
+data: {
+  metrics: {}
+},
+result: {
+  metrics: {}
+},
+title: 'no metrics data'
+  },
+  {
+data: {
+  metrics: {
+part_max_used: 0,
+disk: {}
+  }
+},
+result: {
+  metrics: 

ambari git commit: AMBARI-13770. Infinite spinner in Host Metrics block if Ambari Metrics is not installed

2015-11-06 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 b85e7d3be -> 2e00358cb


AMBARI-13770. Infinite spinner in Host Metrics block if Ambari Metrics is not 
installed


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

Branch: refs/heads/branch-2.1
Commit: 2e00358cb658a10cf11402a34462da2e11f4db96
Parents: b85e7d3
Author: Alex Antonenko 
Authored: Fri Nov 6 16:41:06 2015 +0200
Committer: Alex Antonenko 
Committed: Fri Nov 6 16:43:40 2015 +0200

--
 ambari-web/app/assets/test/tests.js |   1 +
 ambari-web/app/views/main/host/metrics/disk.js  |   5 +-
 .../test/views/main/host/metrics/disk_test.js   | 129 +++
 3 files changed, 133 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2e00358c/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index ad5e9ec..c2c6c30 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -249,6 +249,7 @@ var files = ['test/init_model_test',
   'test/views/main/host/details/host_component_views/nodemanager_view_test',
   'test/views/main/host/details/host_component_views/regionserver_view_test',
   'test/views/main/host/details/host_component_views/tasktracker_view_test',
+  'test/views/main/host/metrics/disk_test',
   'test/views/main/charts/heatmap_test',
   'test/views/main/charts/heatmap/heatmap_host_test',
   'test/views/main/service/item_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/2e00358c/ambari-web/app/views/main/host/metrics/disk.js
--
diff --git a/ambari-web/app/views/main/host/metrics/disk.js 
b/ambari-web/app/views/main/host/metrics/disk.js
index fce239d..b20578b 100644
--- a/ambari-web/app/views/main/host/metrics/disk.js
+++ b/ambari-web/app/views/main/host/metrics/disk.js
@@ -52,8 +52,9 @@ App.ChartHostMetricsDisk = App.ChartLinearTimeView.extend({
   },
 
   getData: function (jsonData) {
-if (jsonData.metrics.part_max_used) {
-  jsonData.metrics.disk.part_max_used = jsonData.metrics.part_max_used;
+var partMaxUsed = Em.get(jsonData, 'metrics.part_max_used');
+if (!Em.isNone(partMaxUsed) && Em.get(jsonData, 
this.get('seriesTemplate.path'))) {
+  Em.set(jsonData, this.get('seriesTemplate.path') + '.part_max_used', 
partMaxUsed);
 }
 return this._super(jsonData);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/2e00358c/ambari-web/test/views/main/host/metrics/disk_test.js
--
diff --git a/ambari-web/test/views/main/host/metrics/disk_test.js 
b/ambari-web/test/views/main/host/metrics/disk_test.js
new file mode 100644
index 000..7757458
--- /dev/null
+++ b/ambari-web/test/views/main/host/metrics/disk_test.js
@@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+require('views/main/host/metrics/disk');
+
+describe('App.ChartHostMetricsDisk', function () {
+
+  var view;
+
+  beforeEach(function () {
+view = App.ChartHostMetricsDisk.create();
+  });
+
+  describe('#getData', function () {
+
+var cases = [
+  {
+data: {},
+result: {},
+title: 'no metrics data'
+  },
+  {
+data: {
+  metrics: null
+},
+result: {
+  metrics: null
+},
+title: 'malformed metrics data'
+  },
+  {
+data: {
+  metrics: {}
+},
+result: {
+  metrics: {}
+},
+title: 'no metrics data'
+  },
+  {
+data: {
+  metrics: {
+part_max_used: 0,
+disk: {}
+  }
+},
+  

[1/2] ambari git commit: AMBARI-13771. Password type property saved with empty value should not be encrypted and auto-filled (dlysnichenko)

2015-11-06 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 2e00358cb -> 5f52c1142
  refs/heads/trunk 1317c8f17 -> d6c7038b8


AMBARI-13771. Password type property saved with empty value should not be 
encrypted and auto-filled (dlysnichenko)


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

Branch: refs/heads/branch-2.1
Commit: 5f52c1142c5767bbd812937076740189625d2693
Parents: 2e00358
Author: Lisnichenko Dmitro 
Authored: Fri Nov 6 17:11:46 2015 +0200
Committer: Lisnichenko Dmitro 
Committed: Fri Nov 6 17:11:46 2015 +0200

--
 .../java/org/apache/ambari/server/utils/SecretReference.java   | 6 --
 .../server/controller/AmbariManagementControllerTest.java  | 4 
 .../stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml | 6 ++
 3 files changed, 14 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5f52c114/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
index d801975..6cfe53c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
@@ -108,8 +108,10 @@ public class SecretReference {
 if(propertiesTypes != null && 
propertiesTypes.containsKey(PropertyInfo.PropertyType.PASSWORD)) {
   for(String pwdPropertyName: 
propertiesTypes.get(PropertyInfo.PropertyType.PASSWORD)) {
 if(propertiesMap.containsKey(pwdPropertyName)){
-  String stub = SecretReference.generateStub(configType, 
configVersion, pwdPropertyName);
-  propertiesMap.put(pwdPropertyName, stub);
+  if(!propertiesMap.get(pwdPropertyName).equals("")) {
+String stub = SecretReference.generateStub(configType, 
configVersion, pwdPropertyName);
+propertiesMap.put(pwdPropertyName, stub);
+  }
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f52c114/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 394bae4..38231cd 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
@@ -10593,6 +10593,7 @@ public class AmbariManagementControllerTest {
 "version1",
 new HashMap(){{
   put("test.password", "first");
+  put("test.password.empty", "");
 }},
 new HashMap>()
 );
@@ -10695,6 +10696,9 @@ public class AmbariManagementControllerTest {
   if(resp.getConfigs().containsKey("test.password")) {
 assertEquals(resp.getConfigs().get("test.password"), secretName);
   }
+  if(resp.getConfigs().containsKey("test.password.empty")) {
+assertEquals(resp.getConfigs().get("test.password.empty"), "");
+  }
 }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f52c114/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
--
diff --git 
a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
 
b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
index f53c667..680a35f 100644
--- 
a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
+++ 
b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
@@ -29,6 +29,12 @@
 test
 1
   
+  
+test.password.empty
+PASSWORD
+
+1
+  
 
   
 dfs.namenode.name.dir



[2/2] ambari git commit: AMBARI-13771. Password type property saved with empty value should not be encrypted and auto-filled (dlysnichenko)

2015-11-06 Thread dmitriusan
AMBARI-13771. Password type property saved with empty value should not be 
encrypted and auto-filled (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: d6c7038b8132b9c66ac34aa3b00a944f752a984c
Parents: 1317c8f
Author: Lisnichenko Dmitro 
Authored: Fri Nov 6 17:11:46 2015 +0200
Committer: Lisnichenko Dmitro 
Committed: Fri Nov 6 17:13:41 2015 +0200

--
 .../java/org/apache/ambari/server/utils/SecretReference.java   | 6 --
 .../server/controller/AmbariManagementControllerTest.java  | 4 
 .../stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml | 6 ++
 3 files changed, 14 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d6c7038b/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
index d801975..6cfe53c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
@@ -108,8 +108,10 @@ public class SecretReference {
 if(propertiesTypes != null && 
propertiesTypes.containsKey(PropertyInfo.PropertyType.PASSWORD)) {
   for(String pwdPropertyName: 
propertiesTypes.get(PropertyInfo.PropertyType.PASSWORD)) {
 if(propertiesMap.containsKey(pwdPropertyName)){
-  String stub = SecretReference.generateStub(configType, 
configVersion, pwdPropertyName);
-  propertiesMap.put(pwdPropertyName, stub);
+  if(!propertiesMap.get(pwdPropertyName).equals("")) {
+String stub = SecretReference.generateStub(configType, 
configVersion, pwdPropertyName);
+propertiesMap.put(pwdPropertyName, stub);
+  }
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/d6c7038b/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 8d43349..f216e02 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
@@ -10590,6 +10590,7 @@ public class AmbariManagementControllerTest {
 "version1",
 new HashMap(){{
   put("test.password", "first");
+  put("test.password.empty", "");
 }},
 new HashMap>()
 );
@@ -10692,6 +10693,9 @@ public class AmbariManagementControllerTest {
   if(resp.getConfigs().containsKey("test.password")) {
 assertEquals(resp.getConfigs().get("test.password"), secretName);
   }
+  if(resp.getConfigs().containsKey("test.password.empty")) {
+assertEquals(resp.getConfigs().get("test.password.empty"), "");
+  }
 }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d6c7038b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
--
diff --git 
a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
 
b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
index f53c667..680a35f 100644
--- 
a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
+++ 
b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/configuration/hdfs-site.xml
@@ -29,6 +29,12 @@
 test
 1
   
+  
+test.password.empty
+PASSWORD
+
+1
+  
 
   
 dfs.namenode.name.dir



ambari git commit: AMBARI-13776. Remove hardcoded logic for handling db properties (akovalenko)

2015-11-06 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/trunk d6c7038b8 -> 62ff7acfe


AMBARI-13776. Remove hardcoded logic for handling db properties (akovalenko)


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

Branch: refs/heads/trunk
Commit: 62ff7acfe7f8e209364f49dd4a2b07e97ffafe00
Parents: d6c7038
Author: Aleksandr Kovalenko 
Authored: Fri Nov 6 18:03:43 2015 +0200
Committer: Aleksandr Kovalenko 
Committed: Fri Nov 6 18:03:43 2015 +0200

--
 ambari-web/app/views/common/controls_view.js| 15 ++---
 .../test/views/common/controls_view_test.js | 69 
 2 files changed, 73 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/62ff7acf/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index 1d11ad3..02f7cda 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -455,18 +455,11 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
* properties with these names don'use handleDBConnectionProperty method
*/
   dontUseHandleDbConnection: function () {
-var version = App.get('currentStackVersion').match(/(\d+)[\.,]?(\d+)?/),
-  majorVersion = version?version[1]: 0,
-  minorVersion = version? version[2]: 0;
-// functionality added in HDP 2.3
+// functionality added in Ranger 0.5
 // remove DB_FLAVOR so it can handle DB Connection checks
-// PHD-2.3 and SAPHD-1.0 is based on HDP-2.3
-var supportFromMap = {
-  'HDP': 2.3,
-  'PHD': 3.3,
-  'SAPHD': 1.0
-};
-if (Number(majorVersion + '.' + minorVersion) < 
supportFromMap[App.get('currentStackName')]){
+var rangerService = App.StackService.find().findProperty('serviceName', 
'RANGER');
+var rangerVersion = rangerService ? rangerService.get('serviceVersion') : 
'';
+if (rangerVersion && rangerVersion.split('.')[0] < 1 && 
rangerVersion.split('.')[1] < 5) {
   return ['DB_FLAVOR', 'authentication_method'];
 }
 return ['ranger.authentication.method'];

http://git-wip-us.apache.org/repos/asf/ambari/blob/62ff7acf/ambari-web/test/views/common/controls_view_test.js
--
diff --git a/ambari-web/test/views/common/controls_view_test.js 
b/ambari-web/test/views/common/controls_view_test.js
index b1914c0..6443cf5 100644
--- a/ambari-web/test/views/common/controls_view_test.js
+++ b/ambari-web/test/views/common/controls_view_test.js
@@ -110,6 +110,7 @@ describe('App.ServiceConfigRadioButtons', function () {
 }
   }),
   currentStackVersion: 'HDP-2.2',
+  rangerVersion: '0.4.0',
   propertyAppendTo1: 'javax.jdo.option.ConnectionURL',
   propertyAppendTo2: 'hive_database',
   isAdditionalView1Null: true,
@@ -139,6 +140,7 @@ describe('App.ServiceConfigRadioButtons', function () {
 }
   }),
   currentStackVersion: 'HDP-2.2',
+  rangerVersion: '0.4.0',
   propertyAppendTo1: 'javax.jdo.option.ConnectionURL',
   propertyAppendTo2: 'hive_database',
   isAdditionalView1Null: false,
@@ -168,6 +170,7 @@ describe('App.ServiceConfigRadioButtons', function () {
 }
   }),
   currentStackVersion: 'HDP-2.2',
+  rangerVersion: '0.4.0',
   propertyAppendTo1: 'oozie.service.JPAService.jdbc.url',
   propertyAppendTo2: 'oozie_database',
   isAdditionalView1Null: true,
@@ -197,6 +200,7 @@ describe('App.ServiceConfigRadioButtons', function () {
 }
   }),
   currentStackVersion: 'HDP-2.2',
+  rangerVersion: '0.4.0',
   propertyAppendTo1: 'oozie.service.JPAService.jdbc.url',
   propertyAppendTo2: 'oozie_database',
   isAdditionalView1Null: false,
@@ -224,6 +228,7 @@ describe('App.ServiceConfigRadioButtons', function () {
 }
   }),
   currentStackVersion: 'HDP-2.2',
+  rangerVersion: '0.4.0',
   propertyAppendTo1: 'ranger.jpa.jdbc.url',
   propertyAppendTo2: 'DB_FLAVOR',
   isAdditionalView1Null: true,
@@ -251,6 +256,7 @@ describe('App.ServiceConfigRadioButtons', function () {
 }
   }),
   currentStackVersion: 'HDP-2.3',
+  rangerVersion: '0.5.0',
   propertyAppendTo1: 'ranger.jpa.jdbc.url',
   

ambari git commit: AMBARI-13768 Ranger install: Required properties shows up with back button but with no indication of which property. (atkach)

2015-11-06 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk a8a238742 -> 6b3599a00


AMBARI-13768 Ranger install: Required properties shows up with back button but 
with no indication of which property. (atkach)


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

Branch: refs/heads/trunk
Commit: 6b3599a002eaaa5ed8eb15c2ef33f71fe1552417
Parents: a8a2387
Author: Andrii Tkach 
Authored: Fri Nov 6 16:16:44 2015 +0200
Committer: Andrii Tkach 
Committed: Fri Nov 6 16:16:44 2015 +0200

--
 ambari-web/app/controllers/main/service/info/configs.js  | 5 +++--
 ambari-web/app/controllers/wizard/step7_controller.js| 2 +-
 ambari-web/app/mappers/configs/themes_mapper.js  | 2 ++
 ambari-web/app/models/configs/objects/service_config.js  | 4 ++--
 .../app/models/configs/objects/service_config_property.js| 7 +++
 ambari-web/app/models/configs/stack_config_property.js   | 6 ++
 ambari-web/app/utils/config.js   | 4 ++--
 .../views/common/configs/service_config_layout_tab_view.js   | 8 
 ambari-web/test/controllers/main/service/info/config_test.js | 8 
 ambari-web/test/controllers/wizard/step7_test.js | 8 
 .../test/models/configs/objects/service_config_test.js   | 8 
 ambari-web/test/utils/config_test.js | 2 +-
 12 files changed, 40 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6b3599a0/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index b51711e..b464537 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -131,7 +131,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
*/
   errorsCount: function () {
 return this.get('selectedService.configs').filter(function (config) {
-  return Em.isNone(config.get('widget'));
+  return Em.isNone(config.get('widgetType'));
 }).filter(function(config) {
   return !config.get('isValid') || (config.get('overrides') || 
[]).someProperty('isValid', false);
 }).filterProperty('isVisible').length;
@@ -447,7 +447,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
   serviceName: advanced.get('serviceName'),
   supportsFinal: advanced.get('supportsFinal'),
   category: 'Advanced ' + 
App.config.getConfigTagFromFileName(advanced.get('fileName')),
-  widget: advanced.get('widget')
+  widget: advanced.get('widget'),
+  widgetType: advanced.get('widgetType')
 }));
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b3599a0/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index e34f4ad..c879acc 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -140,7 +140,7 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
*/
   errorsCount: function () {
 return this.get('selectedService.configs').filter(function (config) {
-  return Em.isNone(config.get('widget'));
+  return Em.isNone(config.get('widgetType'));
 }).filter(function(config) {
   return !config.get('isValid') || (config.get('overrides') || 
[]).someProperty('isValid', false);
 }).filterProperty('isVisible').length;

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b3599a0/ambari-web/app/mappers/configs/themes_mapper.js
--
diff --git a/ambari-web/app/mappers/configs/themes_mapper.js 
b/ambari-web/app/mappers/configs/themes_mapper.js
index e6ef5e2..5815955 100644
--- a/ambari-web/app/mappers/configs/themes_mapper.js
+++ b/ambari-web/app/mappers/configs/themes_mapper.js
@@ -298,6 +298,7 @@ App.themesMapper = App.QuickDataMapper.create({
 
   if (configProperty.get('id')) {
 configProperty.set('widget', widget.widget);
+configProperty.set('widgetType', Em.get(widget, 'widget.type'));
   } else {
 var split = widget.config.split("/");
 var fileName =  split[0] + '.xml';
@@ -305,6 +306,7 @@ 

[2/2] ambari git commit: AMBARI-13764. Hbase become stopped by itself (Upgrade from 2.1.1 to 2.1.3.0) (dlysnichenko)

2015-11-06 Thread dmitriusan
AMBARI-13764. Hbase become stopped by itself (Upgrade from 2.1.1 to 2.1.3.0) 
(dlysnichenko)


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

Branch: refs/heads/branch-2.1
Commit: 3dcc26a59db47a0229fb7f6de85fdeda140e47fb
Parents: 44608b2
Author: Lisnichenko Dmitro 
Authored: Fri Nov 6 14:29:08 2015 +0200
Committer: Lisnichenko Dmitro 
Committed: Fri Nov 6 14:29:41 2015 +0200

--
 .../0.96.0.2.0/package/scripts/hbase_service.py |  3 ++-
 .../python/stacks/2.0.6/HBASE/test_hbase_master.py  | 14 +++---
 .../stacks/2.0.6/HBASE/test_hbase_regionserver.py   | 16 
 3 files changed, 17 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3dcc26a5/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
index 95cd49d..f322aa4 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
@@ -29,7 +29,8 @@ def hbase_service(
 role = name
 cmd = format("{daemon_script} --config {hbase_conf_dir}")
 pid_file = format("{pid_dir}/hbase-{hbase_user}-{role}.pid")
-no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps -p `cat 
{pid_file}` >/dev/null 2>&1")
+pid_expression = as_sudo(["cat", pid_file])
+no_op_test = as_sudo(["test", "-f", pid_file]) + format(" && ps -p 
`{pid_expression}` >/dev/null 2>&1")
 
 if action == 'start':
   daemon_cmd = format("{cmd} start {role}")

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dcc26a5/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py 
b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
index b60bb69..b6039df 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
@@ -78,7 +78,7 @@ class TestHBaseMaster(RMFTestCase):
 
 self.assert_configure_default()
 self.assertResourceCalled('Execute', '/usr/lib/hbase/bin/hbase-daemon.sh 
--config /etc/hbase/conf start master',
-  not_if = 'ls /var/run/hbase/hbase-hbase-master.pid >/dev/null 2>&1 && ps 
-p `cat /var/run/hbase/hbase-hbase-master.pid` >/dev/null 2>&1',
+  not_if = 'ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hbase/hbase-hbase-master.pid && ps -p `ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E cat /var/run/hbase/hbase-hbase-master.pid` 
>/dev/null 2>&1',
   user = 'hbase'
 )
 self.assertNoMoreResources()
@@ -93,8 +93,8 @@ class TestHBaseMaster(RMFTestCase):
 )
 
 self.assertResourceCalled('Execute', '/usr/lib/hbase/bin/hbase-daemon.sh 
--config /etc/hbase/conf stop master',
-only_if = 'ls /var/run/hbase/hbase-hbase-master.pid >/dev/null 2>&1 && 
ps -p `cat /var/run/hbase/hbase-hbase-master.pid` >/dev/null 2>&1',
-on_timeout = '! ( ls /var/run/hbase/hbase-hbase-master.pid >/dev/null 
2>&1 && ps -p `cat /var/run/hbase/hbase-hbase-master.pid` >/dev/null 2>&1 ) || 
ambari-sudo.sh -H -E kill -9 `cat /var/run/hbase/hbase-hbase-master.pid`',
+only_if = 'ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hbase/hbase-hbase-master.pid && ps -p `ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E cat /var/run/hbase/hbase-hbase-master.pid` 
>/dev/null 2>&1',
+on_timeout = '! ( ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hbase/hbase-hbase-master.pid && ps -p `ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E cat /var/run/hbase/hbase-hbase-master.pid` 
>/dev/null 2>&1 ) || ambari-sudo.sh -H -E kill -9 `cat 
/var/run/hbase/hbase-hbase-master.pid`',
 timeout = 30,
 user = 'hbase',
 )
@@ -177,7 +177,7 @@ class TestHBaseMaster(RMFTestCase):
 
 self.assert_configure_secured()
 self.assertResourceCalled('Execute', '/usr/lib/hbase/bin/hbase-daemon.sh 
--config /etc/hbase/conf start master',
-  not_if = 'ls /var/run/hbase/hbase-hbase-master.pid >/dev/null 2>&1 && ps 
-p `cat /var/run/hbase/hbase-hbase-master.pid` >/dev/null 2>&1',
+  

ambari git commit: AMBARI-13765. Encrypted value of the password is changed even when the value is not changed by the user (onechiporenko)

2015-11-06 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 3dcc26a59 -> f14a8360e


AMBARI-13765. Encrypted value of the password is changed even when the value is 
not changed by the user (onechiporenko)


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

Branch: refs/heads/branch-2.1
Commit: f14a8360e4ec2e9a14f486edac7785f6278d49e4
Parents: 3dcc26a
Author: Oleg Nechiporenko 
Authored: Fri Nov 6 14:52:22 2015 +0200
Committer: Oleg Nechiporenko 
Committed: Fri Nov 6 15:04:45 2015 +0200

--
 .../controllers/main/service/info/configs.js| 13 
 ambari-web/app/messages.js  |  3 ++
 .../mixins/common/configs/configs_comparator.js |  7 +
 .../app/mixins/common/configs/configs_saver.js  | 10 +-
 .../configs/objects/service_config_property.js  | 20 
 .../common/configs/save_configuration.hbs   |  3 ++
 .../views/common/configs/config_history_flow.js | 10 +-
 ambari-web/app/views/common/controls_view.js|  2 +-
 .../main/service/info/config_test.js| 14 +
 .../objects/service_config_property_test.js | 32 +++-
 10 files changed, 110 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f14a8360/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index f550af4..cf5f788 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -228,6 +228,19 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
   }.property('propertyFilters', 'isCompareMode'),
 
   /**
+   * Detects of some of the `password`-configs has not default value
+   *
+   * @type {boolean}
+   */
+  passwordConfigsAreChanged: function () {
+return this.get('stepConfigs')
+  .findProperty('serviceName', this.get('selectedService.serviceName'))
+  .get('configs')
+  .filterProperty('displayType', 'password')
+  .someProperty('isNotDefaultValue');
+  }.property('stepConfigs.[].configs', 'selectedService.serviceName'),
+
+  /**
* indicate whether service config version belongs to default config group
* @param {object} version
* @return {Boolean}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f14a8360/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index f1a0b17..eba1551 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1835,6 +1835,7 @@ Em.I18n.translations = {
 
   'services.service.config.nothing.to.display': 'No properties to display.',
   'services.service.config.final':'Final',
+  'services.service.config.password.additionalDescription': 'For security 
purposes, password changes will not be shown in configuration version 
comparisons',
   'services.service.config.saved':'Save Configuration Changes',
   'services.service.config.notSaved':'Unable to Save Configuration Changes',
   'services.service.config.restartService.TooltipMessage':'Restart 
ServiceStale configuration used by {0} components on {1} hosts:{2}',
@@ -2626,6 +2627,8 @@ Em.I18n.translations = {
   'dashboard.configHistory.info-bar.save.popup.title': 'Save Configuration',
   'dashboard.configHistory.info-bar.makeCurrent.popup.title': 'Make Current 
Confirmation',
   'dashboard.configHistory.info-bar.save.popup.placeholder': 'What did you 
change?',
+  'dashboard.configHistory.info-bar.save.popup.warningForPasswordChange': 
'This configuration change includes a password change. The password change will 
be saved but for security purposes, password changes will not be shown in 
configuration version comparisons.',
+  'dashboard.configHistory.info-bar.save.popup.notesForPasswordChange': 
'Password change',
   'dashboard.configHistory.info-bar.revert.button': 'Make Current',
   'dashboard.configHistory.info-bar.revert.versionButton': 'Make {0} Current',
   'dashboard.configHistory.info-bar.view.button.disabled': 'You are currently 
viewing this version.',

http://git-wip-us.apache.org/repos/asf/ambari/blob/f14a8360/ambari-web/app/mixins/common/configs/configs_comparator.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_comparator.js 
b/ambari-web/app/mixins/common/configs/configs_comparator.js
index 

ambari git commit: AMBARI-13755. Express Upgrade: Failed to Downgrade Namenode (alejandro)

2015-11-06 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 36e20f9f6 -> 9cee9a22e


AMBARI-13755. Express Upgrade: Failed to Downgrade Namenode (alejandro)


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

Branch: refs/heads/trunk
Commit: 9cee9a22e0131da206e6fa3afb01e37da5680407
Parents: 36e20f9
Author: Alejandro Fernandez 
Authored: Thu Nov 5 17:52:47 2015 -0800
Committer: Alejandro Fernandez 
Committed: Fri Nov 6 11:46:54 2015 -0800

--
 .../2.1.0.2.0/package/scripts/hdfs_namenode.py  | 30 -
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  | 25 ++--
 .../package/scripts/namenode_upgrade.py | 23 +++
 .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml | 18 +-
 .../HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml | 65 
 .../HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml | 20 +-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 33 +++---
 .../python/stacks/2.0.6/HDFS/test_namenode.py   | 21 ++-
 8 files changed, 92 insertions(+), 143 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9cee9a22/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
index f941164..530832d 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
@@ -26,6 +26,7 @@ from resource_management.core.resources.service import Service
 from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions.check_process_status import 
check_process_status
 from resource_management.libraries.resources.execute_hadoop import 
ExecuteHadoop
+from resource_management.libraries.functions import Direction
 from ambari_commons import OSCheck, OSConst
 from ambari_commons.os_family_impl import OsFamilyImpl, OsFamilyFuncImpl
 
@@ -85,26 +86,27 @@ def namenode(action=None, hdfs_binary=None, do_format=True, 
upgrade_type=None, e
 
 options = ""
 if upgrade_type == "rolling":
-  options = "-rollingUpgrade started"
+  if params.upgrade_direction == Direction.UPGRADE:
+options = "-rollingUpgrade started"
+  elif params.upgrade_direction == Direction.DOWNGRADE:
+options = "-rollingUpgrade downgrade"
+
 elif upgrade_type == "nonrolling":
   is_previous_image_dir = is_previous_fs_image()
   Logger.info(format("Previous file system image dir present is 
{is_previous_image_dir}"))
 
-  if params.dfs_ha_enabled:
-if params.desired_namenode_role is None:
-  raise Fail("Did not receive parameter \"desired_namenode_role\" to 
indicate the role that this NameNode should have.")
+  if params.upgrade_direction == Direction.UPGRADE:
+if params.dfs_ha_enabled:
+  if params.desired_namenode_role is None:
+raise Fail("Did not receive parameter \"desired_namenode_role\" to 
indicate the role that this NameNode should have.")
 
-if params.desired_namenode_role == "active":
-  # The "-upgrade" command can only be used exactly once. If used more 
than once during a retry, it will cause problems.
-  options = "" if is_previous_image_dir else "-upgrade"
-
-if params.desired_namenode_role == "standby":
-  # bootstrap NN separately before starting the daemon
-  bootstrap_standby_namenode(params, use_path=True)
+  # Both Active and Standby can use the same command
+  options = "-rollingUpgrade started"
+else:
+  options = "-rollingUpgrade started"
+  elif params.upgrade_direction == Direction.DOWNGRADE:
+options = "-rollingUpgrade downgrade"
 
-  else:
-# Both Primary and Secondary NameNode can use the same command.
-options = "" if is_previous_image_dir else "-upgrade"
 Logger.info(format("Option for start command: {options}"))
 
 service(

http://git-wip-us.apache.org/repos/asf/ambari/blob/9cee9a22/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
 

ambari git commit: AMBARI-13755. Express Upgrade: Failed to Downgrade Namenode (alejandro)

2015-11-06 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 1b85ce559 -> 4fe63f735


AMBARI-13755. Express Upgrade: Failed to Downgrade Namenode (alejandro)


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

Branch: refs/heads/branch-2.1
Commit: 4fe63f735f70a8df3a725d9494adb77b5ce717da
Parents: 1b85ce5
Author: Alejandro Fernandez 
Authored: Fri Nov 6 11:49:24 2015 -0800
Committer: Alejandro Fernandez 
Committed: Fri Nov 6 11:49:24 2015 -0800

--
 .../2.1.0.2.0/package/scripts/hdfs_namenode.py  | 30 -
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  | 25 ++--
 .../package/scripts/namenode_upgrade.py | 23 +++
 .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml | 18 +-
 .../HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml | 65 
 .../HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml | 20 +-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 33 +++---
 .../python/stacks/2.0.6/HDFS/test_namenode.py   | 12 ++--
 8 files changed, 92 insertions(+), 134 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4fe63f73/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
index f941164..530832d 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
@@ -26,6 +26,7 @@ from resource_management.core.resources.service import Service
 from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions.check_process_status import 
check_process_status
 from resource_management.libraries.resources.execute_hadoop import 
ExecuteHadoop
+from resource_management.libraries.functions import Direction
 from ambari_commons import OSCheck, OSConst
 from ambari_commons.os_family_impl import OsFamilyImpl, OsFamilyFuncImpl
 
@@ -85,26 +86,27 @@ def namenode(action=None, hdfs_binary=None, do_format=True, 
upgrade_type=None, e
 
 options = ""
 if upgrade_type == "rolling":
-  options = "-rollingUpgrade started"
+  if params.upgrade_direction == Direction.UPGRADE:
+options = "-rollingUpgrade started"
+  elif params.upgrade_direction == Direction.DOWNGRADE:
+options = "-rollingUpgrade downgrade"
+
 elif upgrade_type == "nonrolling":
   is_previous_image_dir = is_previous_fs_image()
   Logger.info(format("Previous file system image dir present is 
{is_previous_image_dir}"))
 
-  if params.dfs_ha_enabled:
-if params.desired_namenode_role is None:
-  raise Fail("Did not receive parameter \"desired_namenode_role\" to 
indicate the role that this NameNode should have.")
+  if params.upgrade_direction == Direction.UPGRADE:
+if params.dfs_ha_enabled:
+  if params.desired_namenode_role is None:
+raise Fail("Did not receive parameter \"desired_namenode_role\" to 
indicate the role that this NameNode should have.")
 
-if params.desired_namenode_role == "active":
-  # The "-upgrade" command can only be used exactly once. If used more 
than once during a retry, it will cause problems.
-  options = "" if is_previous_image_dir else "-upgrade"
-
-if params.desired_namenode_role == "standby":
-  # bootstrap NN separately before starting the daemon
-  bootstrap_standby_namenode(params, use_path=True)
+  # Both Active and Standby can use the same command
+  options = "-rollingUpgrade started"
+else:
+  options = "-rollingUpgrade started"
+  elif params.upgrade_direction == Direction.DOWNGRADE:
+options = "-rollingUpgrade downgrade"
 
-  else:
-# Both Primary and Secondary NameNode can use the same command.
-options = "" if is_previous_image_dir else "-upgrade"
 Logger.info(format("Option for start command: {options}"))
 
 service(

http://git-wip-us.apache.org/repos/asf/ambari/blob/4fe63f73/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
 

ambari git commit: AMBARI-13757. Pause Upgrade is not sending abort request on 'Pause Upgrade'.(xiwang)

2015-11-06 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk beb5c49d3 -> 36e20f9f6


AMBARI-13757. Pause Upgrade is not sending abort request on 'Pause 
Upgrade'.(xiwang)


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

Branch: refs/heads/trunk
Commit: 36e20f9f691eace4775ad55e1aa438de0e15a0e9
Parents: beb5c49
Author: Xi Wang 
Authored: Fri Nov 6 11:03:36 2015 -0800
Committer: Xi Wang 
Committed: Fri Nov 6 11:03:36 2015 -0800

--
 .../main/admin/stack_upgrade/stack_upgrade_wizard.hbs  | 6 +++---
 .../app/views/main/admin/stack_upgrade/upgrade_wizard_view.js  | 4 +---
 2 files changed, 4 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/36e20f9f/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
--
diff --git 
a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs 
b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
index fd915a3..92c735f 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
@@ -118,7 +118,7 @@
 {{#if isDowngrade}}
 {{t admin.stackUpgrade.pauseDowngrade}}
 {{else}}
-{{t admin.stackUpgrade.pauseUpgrade}}
+{{t admin.stackUpgrade.pauseUpgrade}}
 {{/if}}
   
 {{t common.proceed}}
@@ -166,7 +166,7 @@
   {{#if isDowngrade}}
   {{t admin.stackUpgrade.pauseDowngrade}}
   {{else}}
-  {{t admin.stackUpgrade.pauseUpgrade}}
+  {{t admin.stackUpgrade.pauseUpgrade}}
   {{/if}}
 
   {{t common.proceed}}
@@ -227,7 +227,7 @@
 {{#if isDowngrade}}
   {{t admin.stackUpgrade.pauseDowngrade}}
 {{else}}
-  {{t admin.stackUpgrade.pauseUpgrade}}
+  {{t admin.stackUpgrade.pauseUpgrade}}
 {{/if}}
   
 {{t common.proceed}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/36e20f9f/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
index fe4bfaa..a76a5af 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
@@ -468,9 +468,7 @@ App.upgradeWizardView = Em.View.extend({
   },
 
   pauseUpgrade: function() {
-if (this.get('isFinalizeItem')) {
-  this.get('controller').suspendUpgrade();
-}
+this.get('controller').suspendUpgrade();
 this.get('parentView').closeWizard();
   }
 });



ambari git commit: AMBARI-13757. Pause Upgrade is not sending abort request on 'Pause Upgrade'.(xiwang)

2015-11-06 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 90c324355 -> 1b85ce559


AMBARI-13757. Pause Upgrade is not sending abort request on 'Pause 
Upgrade'.(xiwang)


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

Branch: refs/heads/branch-2.1
Commit: 1b85ce55930ef64a00792a717e57b7bbed1cceb3
Parents: 90c3243
Author: Xi Wang 
Authored: Thu Nov 5 18:42:48 2015 -0800
Committer: Xi Wang 
Committed: Fri Nov 6 11:39:54 2015 -0800

--
 .../templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs  | 4 ++--
 .../app/views/main/admin/stack_upgrade/upgrade_wizard_view.js| 4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1b85ce55/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
--
diff --git 
a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs 
b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
index 73caa18..be6596b 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
@@ -216,7 +216,7 @@
 {{#if isDowngrade}}
   {{t admin.stackUpgrade.pauseDowngrade}}
 {{else}}
-{{t admin.stackUpgrade.pauseUpgrade}}
+{{t admin.stackUpgrade.pauseUpgrade}}
 {{/if}}
   
 {{t common.proceed}}
@@ -264,7 +264,7 @@
 {{#if isDowngrade}}
   {{t admin.stackUpgrade.pauseDowngrade}}
 {{else}}
-  {{t admin.stackUpgrade.pauseUpgrade}}
+  {{t admin.stackUpgrade.pauseUpgrade}}
 {{/if}}
   
 {{t common.proceed}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b85ce55/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
index bf4806b..b34600b 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
@@ -515,9 +515,7 @@ App.upgradeWizardView = Em.View.extend({
   },
 
   pauseUpgrade: function() {
-if (this.get('isFinalizeItem') || this.get('isResolveHostsItem')) {
-  this.get('controller').suspendUpgrade();
-}
+this.get('controller').suspendUpgrade();
 this.get('parentView').closeWizard();
   },
 



ambari git commit: AMBARI-13765. Encrypted value of the password is changed even when the value is not changed by the user (onechiporenko)

2015-11-06 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 1469a0e62 -> a8a238742


AMBARI-13765. Encrypted value of the password is changed even when the value is 
not changed by the user (onechiporenko)


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

Branch: refs/heads/trunk
Commit: a8a2387428393715890e322b3ba03d8787fe7920
Parents: 1469a0e
Author: Oleg Nechiporenko 
Authored: Fri Nov 6 14:52:22 2015 +0200
Committer: Oleg Nechiporenko 
Committed: Fri Nov 6 14:54:46 2015 +0200

--
 .../controllers/main/service/info/configs.js| 13 
 ambari-web/app/messages.js  |  3 ++
 .../mixins/common/configs/configs_comparator.js |  7 +
 .../app/mixins/common/configs/configs_saver.js  | 10 +-
 .../configs/objects/service_config_property.js  | 19 +++-
 .../common/configs/save_configuration.hbs   |  3 ++
 .../views/common/configs/config_history_flow.js | 10 +-
 ambari-web/app/views/common/controls_view.js|  2 +-
 .../main/service/info/config_test.js| 14 +
 .../objects/service_config_property_test.js | 32 +++-
 10 files changed, 108 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a8a23874/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index f3bdc1a..b51711e 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -226,6 +226,19 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
   }.property('propertyFilters', 'isCompareMode'),
 
   /**
+   * Detects of some of the `password`-configs has not default value
+   *
+   * @type {boolean}
+   */
+  passwordConfigsAreChanged: function () {
+return this.get('stepConfigs')
+  .findProperty('serviceName', this.get('selectedService.serviceName'))
+  .get('configs')
+  .filterProperty('displayType', 'password')
+  .someProperty('isNotDefaultValue');
+  }.property('stepConfigs.[].configs', 'selectedService.serviceName'),
+
+  /**
* indicate whether service config version belongs to default config group
* @param {object} version
* @return {Boolean}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a8a23874/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 1ac2346..2cb7a97 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1805,6 +1805,7 @@ Em.I18n.translations = {
 
   'services.service.config.nothing.to.display': 'No properties to display.',
   'services.service.config.final':'Final',
+  'services.service.config.password.additionalDescription': 'For security 
purposes, password changes will not be shown in configuration version 
comparisons',
   'services.service.config.saved':'Save Configuration Changes',
   'services.service.config.notSaved':'Unable to Save Configuration Changes',
   'services.service.config.restartService.TooltipMessage':'Restart 
ServiceStale configuration used by {0} components on {1} hosts:{2}',
@@ -2597,6 +2598,8 @@ Em.I18n.translations = {
   'dashboard.configHistory.info-bar.save.popup.title': 'Save Configuration',
   'dashboard.configHistory.info-bar.makeCurrent.popup.title': 'Make Current 
Confirmation',
   'dashboard.configHistory.info-bar.save.popup.placeholder': 'What did you 
change?',
+  'dashboard.configHistory.info-bar.save.popup.warningForPasswordChange': 
'This configuration change includes a password change. The password change will 
be saved but for security purposes, password changes will not be shown in 
configuration version comparisons.',
+  'dashboard.configHistory.info-bar.save.popup.notesForPasswordChange': 
'Password change',
   'dashboard.configHistory.info-bar.revert.button': 'Make Current',
   'dashboard.configHistory.info-bar.revert.versionButton': 'Make {0} Current',
   'dashboard.configHistory.info-bar.view.button.disabled': 'You are currently 
viewing this version.',

http://git-wip-us.apache.org/repos/asf/ambari/blob/a8a23874/ambari-web/app/mixins/common/configs/configs_comparator.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_comparator.js 
b/ambari-web/app/mixins/common/configs/configs_comparator.js
index bb7bc88..ab8cbb4 

ambari git commit: AMBARI-13768 Ranger install: Required properties shows up with back button but with no indication of which property. (atkach)

2015-11-06 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 f14a8360e -> b85e7d3be


AMBARI-13768 Ranger install: Required properties shows up with back button but 
with no indication of which property. (atkach)


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

Branch: refs/heads/branch-2.1
Commit: b85e7d3beb498949421371158519a38db55828d0
Parents: f14a836
Author: Andrii Tkach 
Authored: Fri Nov 6 16:00:04 2015 +0200
Committer: Andrii Tkach 
Committed: Fri Nov 6 16:12:14 2015 +0200

--
 ambari-web/app/controllers/main/service/info/configs.js  | 5 +++--
 ambari-web/app/controllers/wizard/step7_controller.js| 2 +-
 ambari-web/app/mappers/configs/themes_mapper.js  | 2 ++
 ambari-web/app/models/configs/objects/service_config.js  | 4 ++--
 .../app/models/configs/objects/service_config_property.js| 7 +++
 ambari-web/app/models/configs/stack_config_property.js   | 6 ++
 ambari-web/app/utils/config.js   | 4 ++--
 .../views/common/configs/service_config_layout_tab_view.js   | 8 
 ambari-web/test/controllers/main/service/info/config_test.js | 8 
 ambari-web/test/controllers/wizard/step7_test.js | 8 
 .../test/models/configs/objects/service_config_test.js   | 8 
 ambari-web/test/utils/config_test.js | 2 +-
 12 files changed, 40 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b85e7d3b/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index cf5f788..4f867d5 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -133,7 +133,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
*/
   errorsCount: function () {
 return this.get('selectedService.configs').filter(function (config) {
-  return Em.isNone(config.get('widget'));
+  return Em.isNone(config.get('widgetType'));
 }).filter(function(config) {
   return !config.get('isValid') || (config.get('overrides') || 
[]).someProperty('isValid', false);
 }).filterProperty('isVisible').length;
@@ -449,7 +449,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
   serviceName: advanced.get('serviceName'),
   supportsFinal: advanced.get('supportsFinal'),
   category: 'Advanced ' + 
App.config.getConfigTagFromFileName(advanced.get('fileName')),
-  widget: advanced.get('widget')
+  widget: advanced.get('widget'),
+  widgetType: advanced.get('widgetType')
 }));
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/b85e7d3b/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index 66fdac0..4091720 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -132,7 +132,7 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
*/
   errorsCount: function () {
 return this.get('selectedService.configs').filter(function (config) {
-  return Em.isNone(config.get('widget'));
+  return Em.isNone(config.get('widgetType'));
 }).filter(function(config) {
   return !config.get('isValid') || (config.get('overrides') || 
[]).someProperty('isValid', false);
 }).filterProperty('isVisible').length;

http://git-wip-us.apache.org/repos/asf/ambari/blob/b85e7d3b/ambari-web/app/mappers/configs/themes_mapper.js
--
diff --git a/ambari-web/app/mappers/configs/themes_mapper.js 
b/ambari-web/app/mappers/configs/themes_mapper.js
index 0a55068..f080688 100644
--- a/ambari-web/app/mappers/configs/themes_mapper.js
+++ b/ambari-web/app/mappers/configs/themes_mapper.js
@@ -299,6 +299,7 @@ App.themesMapper = App.QuickDataMapper.create({
 
   if (configProperty.get('id')) {
 configProperty.set('widget', widget.widget);
+configProperty.set('widgetType', Em.get(widget, 'widget.type'));
   } else {
 var split = widget.config.split("/");
 var fileName =  split[0] + '.xml';
@@ -306,6 

[2/3] ambari git commit: AMBARI-13725: HAWQ and PXF to support 3 digit versioning instead of 4. (jaoki)

2015-11-06 Thread jaoki
http://git-wip-us.apache.org/repos/asf/ambari/blob/5dac27be/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
new file mode 100644
index 000..41b10dc
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
@@ -0,0 +1,178 @@
+
+
+
+  
+hawq_master_address_host
+HAWQ Master
+localhost
+The host name of HAWQ master.
+  
+
+  
+hawq_standby_address_host
+HAWQ Standby Master
+localhost
+The host name of HAWQ standby.
+  
+
+  
+hawq_master_address_port
+HAWQ Master Port
+5432
+The port of HAWQ master.
+  
+
+  
+hawq_segment_address_port
+HAWQ Segment Port
+4
+The port of HAWQ segment.
+  
+
+  
+hawq_dfs_url
+HAWQ DFS URL
+localhost:8020/hawq_default
+URL for accessing HDFS.
+  
+
+  
+hawq_master_directory
+HAWQ Master Directory
+/data/hawq/master
+The directory of HAWQ master.
+  
+
+  
+hawq_segment_directory
+HAWQ Segment Directory
+/data/hawq/segment
+The directory of HAWQ segment.
+   
+
+  
+hawq_master_temp_directory
+HAWQ Master Temp Directory
+/tmp
+The temporary directory reserved for HAWQ 
master.
+  
+
+  
+hawq_segment_temp_directory
+HAWQ Segment Temp Directory
+/tmp
+The temporary directory reserved for HAWQ 
segment.
+  
+
+  
+  
+hawq_global_rm_type
+none
+The resource manager type to start for allocating resource. 
+  'none' means HAWQ resource manager exclusively uses whole
+  cluster; 'yarn' means HAWQ resource manager contacts YARN
+  resource manager to negotiate resource.
+
+  
+
+  
+hawq_rm_memory_limit_perseg
+64GB
+The limit of memory usage in a HAWQ segment when 
+  hawq_global_rm_type is set 'none'.
+
+  
+
+  
+hawq_rm_nvcore_limit_perseg
+16
+The limit of virtual core usage in a HAWQ segment when 
+  hawq_global_rm_type is set 'none'.
+
+  
+
+  
+hawq_rm_yarn_address
+localhost:8032
+The address of YARN resource manager server.
+  
+
+  
+hawq_rm_yarn_scheduler_address
+localhost:8030
+The address of YARN scheduler server.
+  
+
+  
+hawq_rm_yarn_queue_name
+default
+The YARN queue name to register HAWQ resource 
manager.
+  
+
+  
+hawq_rm_yarn_app_name
+hawq
+The application name to register HAWQ resource manager in 
YARN.
+  
+
+  
+hawq_re_cpu_enable
+false
+  
+
+  
+hawq_re_cgroup_mount_point
+/sys/fs/cgroup
+  
+
+  
+hawq_re_cgroup_hierarchy_name
+hadoop-yarn
+  
+
+  
+hawq_re_cleanup_period
+180
+  
+
+  
+hawq_re_cpu_weight
+1024.0
+  
+
+  
+hawq_re_vcore_pcore_ratio
+1.0
+  
+
+  
+hawq_resourcemanager_master_address_domainsocket_port
+5436
+  
+
+  
+hawq_rm_master_port
+5437
+  
+
+  
+hawq_rm_segment_port
+5438
+  
+
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/5dac27be/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml
 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml
new file mode 100644
index 000..32ae5a5
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-sysctl-env.xml
@@ -0,0 +1,247 @@
+
+
+
+  
+kernel.shmmax
+5
+Maximum size in bytes of a single shared memory segment that 
a Linux process can allocate in its
+  virtual address space
+
+  false
+  true
+
+  
+
+  
+kernel.shmmni
+4096
+System wide maximum number of shared memory 
segments
+
+  false
+  true
+
+  
+
+  
+kernel.shmall
+40
+Total amount of shared memory pages that can be used system 
wide
+
+  false
+  true
+
+  
+
+  
+kernel.sem
+250 512000 100 2048
+Parameter to define semaphore related values
+
+  false
+  true
+
+  
+
+  
+kernel.sysrq
+1
+Enable(1)/Disable(0) functions of sysrq
+
+  false
+  true
+
+  
+
+  
+kernel.core_uses_pid
+1
+Enable appending process id to the name of core dump file. 
Ex: core.PID
+
+  false
+  true
+
+  
+
+  
+kernel.msgmnb
+65536
+Default maximum size of a message in bytes
+
+  false
+  true
+
+  
+
+  
+kernel.msgmax
+65536
+Default maxmimum size of a mesage queue
+
+  false
+  true
+
+  
+
+  
+

[1/3] ambari git commit: AMBARI-13725: HAWQ and PXF to support 3 digit versioning instead of 4. (jaoki)

2015-11-06 Thread jaoki
Repository: ambari
Updated Branches:
  refs/heads/trunk 9cee9a22e -> 5dac27bef


http://git-wip-us.apache.org/repos/asf/ambari/blob/5dac27be/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py
new file mode 100644
index 000..dd0031c
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+from resource_management import Script
+
+from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.core.resources.accounts import User
+from resource_management.core.resources.system import Directory, File, Execute
+from resource_management.core.source import Template
+
+
+
+class Pxf(Script):
+  """
+  Contains the interface definitions for methods like install,
+  start, stop, status, etc. for the PXF
+  """
+
+  def install(self, env):
+self.install_packages(env)
+self.configure(env)
+
+
+  def configure(self, env):
+import params
+env.set_params(params)
+self.__setup_user_group()
+self.__generate_config_files()
+# pxf-service init exits safely when it is already initialized
+self.__execute_service_command("init")
+
+
+  def start(self, env):
+self.configure(env)
+self.__grant_permissions()
+self.__execute_service_command("restart")
+
+
+  def stop(self, env):
+self.__execute_service_command("stop")
+
+
+  def status(self, env):
+try:
+  self.__execute_service_command("status")
+except Exception:
+  raise ComponentIsNotRunning()
+
+
+  def __execute_service_command(self, command):
+import params
+Execute("service {0} {1}".format(params.pxf_service_name, command),
+  timeout=params.default_exec_timeout,
+  logoutput=True)
+
+
+  def __setup_user_group(self):
+"""
+Creates PXF user with the required groups and bash as default shell
+"""
+import params
+User(params.pxf_user,
+ groups=[params.hdfs_superuser_group, params.user_group, 
params.tomcat_group],
+ shell="/bin/bash")
+
+
+  def __generate_config_files(self):
+"""
+Generates pxf-env.sh file from jinja template and sets the classpath for 
HDP
+"""
+import params
+import shutil
+
+hdp_stack = "HDP"
+
+# Create file pxf-env.sh from jinja template
+File("{0}/pxf-env.sh".format(params.pxf_conf_dir),
+ content = Template("pxf-env.j2"))
+
+# Classpath is set for PHD by default. If stack is HDP, set classpath for 
HDP
+if(params.stack_name == hdp_stack):
+  shutil.copy2("{0}/pxf-privatehdp.classpath".format(params.pxf_conf_dir),
+   "{0}/pxf-private.classpath".format(params.pxf_conf_dir))
+
+XmlConfig("pxf-site.xml",
+  conf_dir=params.pxf_conf_dir,
+  configurations=params.config['configurations']['pxf-site'],
+  
configuration_attributes=params.config['configuration_attributes']['pxf-site'])
+
+
+  def __grant_permissions(self):
+"""
+Grants permission to pxf:pxf for PXF instance directory
+"""
+import params
+Directory(params.pxf_instance_dir,
+  owner=params.pxf_user,
+  group=params.pxf_group,
+  recursive=True)
+
+
+if __name__ == "__main__":
+  Pxf().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/5dac27be/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/templates/pxf-env.j2
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/templates/pxf-env.j2
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/templates/pxf-env.j2
new file mode 100644
index 000..03f2420
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/templates/pxf-env.j2
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+#Licensed to the Apache Software Foundation (ASF) 

[3/3] ambari git commit: AMBARI-13725: HAWQ and PXF to support 3 digit versioning instead of 4. (jaoki)

2015-11-06 Thread jaoki
AMBARI-13725: HAWQ and PXF to support 3 digit versioning instead of 4. (jaoki)


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

Branch: refs/heads/trunk
Commit: 5dac27bef4a89a049c7e77f49828a20370d0b518
Parents: 9cee9a2
Author: Jun Aoki 
Authored: Fri Nov 6 13:49:33 2015 -0800
Committer: Jun Aoki 
Committed: Fri Nov 6 13:49:33 2015 -0800

--
 .../HAWQ/2.0.0.0/configuration/gpcheck-env.xml  |  86 --
 .../2.0.0.0/configuration/hawq-limits-env.xml   |  46 ---
 .../HAWQ/2.0.0.0/configuration/hawq-site.xml| 178 
 .../2.0.0.0/configuration/hawq-sysctl-env.xml   | 247 
 .../common-services/HAWQ/2.0.0.0/metainfo.xml   | 129 -
 .../HAWQ/2.0.0.0/package/scripts/common.py  | 283 ---
 .../HAWQ/2.0.0.0/package/scripts/constants.py   |  61 
 .../HAWQ/2.0.0.0/package/scripts/hawqmaster.py  |  55 
 .../HAWQ/2.0.0.0/package/scripts/hawqsegment.py | 102 ---
 .../HAWQ/2.0.0.0/package/scripts/hawqstandby.py |  58 
 .../HAWQ/2.0.0.0/package/scripts/hawqstatus.py  |  64 -
 .../2.0.0.0/package/scripts/master_helper.py| 194 -
 .../HAWQ/2.0.0.0/package/scripts/params.py  |  92 --
 .../2.0.0.0/package/scripts/service_check.py| 102 ---
 .../HAWQ/2.0.0.0/package/scripts/utils.py   | 108 ---
 .../2.0.0.0/package/templates/hawq-hosts.j2 |   5 -
 .../package/templates/hawq-profile.sh.j2|   8 -
 .../HAWQ/2.0.0.0/package/templates/slaves.j2|   3 -
 .../HAWQ/2.0.0/configuration/gpcheck-env.xml|  86 ++
 .../2.0.0/configuration/hawq-limits-env.xml |  46 +++
 .../HAWQ/2.0.0/configuration/hawq-site.xml  | 178 
 .../2.0.0/configuration/hawq-sysctl-env.xml | 247 
 .../common-services/HAWQ/2.0.0/metainfo.xml | 129 +
 .../HAWQ/2.0.0/package/scripts/common.py| 283 +++
 .../HAWQ/2.0.0/package/scripts/constants.py |  61 
 .../HAWQ/2.0.0/package/scripts/hawqmaster.py|  55 
 .../HAWQ/2.0.0/package/scripts/hawqsegment.py   | 102 +++
 .../HAWQ/2.0.0/package/scripts/hawqstandby.py   |  58 
 .../HAWQ/2.0.0/package/scripts/hawqstatus.py|  64 +
 .../HAWQ/2.0.0/package/scripts/master_helper.py | 194 +
 .../HAWQ/2.0.0/package/scripts/params.py|  92 ++
 .../HAWQ/2.0.0/package/scripts/service_check.py | 102 +++
 .../HAWQ/2.0.0/package/scripts/utils.py | 108 +++
 .../HAWQ/2.0.0/package/templates/hawq-hosts.j2  |   5 +
 .../2.0.0/package/templates/hawq-profile.sh.j2  |   8 +
 .../HAWQ/2.0.0/package/templates/slaves.j2  |   3 +
 .../PXF/3.0.0.0/configuration/pxf-site.xml  |  19 --
 .../common-services/PXF/3.0.0.0/metainfo.xml|  71 -
 .../PXF/3.0.0.0/package/scripts/params.py   |  42 ---
 .../PXF/3.0.0.0/package/scripts/pxf.py  | 120 
 .../PXF/3.0.0.0/package/templates/pxf-env.j2|  34 ---
 .../PXF/3.0.0/configuration/pxf-site.xml|  19 ++
 .../common-services/PXF/3.0.0/metainfo.xml  |  71 +
 .../PXF/3.0.0/package/scripts/params.py |  42 +++
 .../PXF/3.0.0/package/scripts/pxf.py| 120 
 .../PXF/3.0.0/package/templates/pxf-env.j2  |  34 +++
 46 files changed, 2107 insertions(+), 2107 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5dac27be/ambari-server/src/main/resources/common-services/HAWQ/2.0.0.0/configuration/gpcheck-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0.0/configuration/gpcheck-env.xml
 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0.0/configuration/gpcheck-env.xml
deleted file mode 100755
index a61a34f..000
--- 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0.0/configuration/gpcheck-env.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-  
-
-  content
-  Content
-  Contents of the configuration file 
/usr/local/hawq/etc/gpcheck.cnf. This file is used by 'hawq check' command, 
which can be run manually by gpadmin user on the HAWQ master host. This command 
validates the system parameters and HDFS parameters mentioned in this file to 
ensure optimal HAWQ operation.
-
-[global]
-configfile_version = 4
-
-[linux.mount]
-mount.points = /
-
-[linux.sysctl]
-sysctl.kernel.shmmax = 5
-sysctl.kernel.shmmni = 4096
-sysctl.kernel.shmall = 40
-sysctl.kernel.sem = 250 512000 100 2048
-sysctl.kernel.sysrq = 1
-sysctl.kernel.core_uses_pid = 1
-sysctl.kernel.msgmnb = 65536
-sysctl.kernel.msgmax = 65536