ambari git commit: AMBARI-14713: Service checks for PXF using HDFS and HBase (nalex via jaoki)

2016-01-28 Thread jaoki
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 dcb7d4524 -> b6a591a60


AMBARI-14713: Service checks for PXF using HDFS and HBase (nalex via jaoki)


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

Branch: refs/heads/branch-2.2
Commit: b6a591a607b9d49a66619b5103fd037d2a838810
Parents: dcb7d45
Author: Jun Aoki 
Authored: Thu Jan 28 13:41:19 2016 -0800
Committer: Jun Aoki 
Committed: Thu Jan 28 13:41:19 2016 -0800

--
 .../common-services/PXF/3.0.0/metainfo.xml  |   6 +
 .../PXF/3.0.0/package/scripts/params.py |  31 ++-
 .../PXF/3.0.0/package/scripts/pxf_constants.py  |  26 ++
 .../PXF/3.0.0/package/scripts/pxf_utils.py  |  49 
 .../PXF/3.0.0/package/scripts/service_check.py  | 266 +++
 5 files changed, 377 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b6a591a6/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
index cb2411c..1797b29 100644
--- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
@@ -66,6 +66,12 @@
 
   
 
+  
+scripts/service_check.py
+PYTHON
+300
+  
+
   
 pxf-profiles
 pxf-public-classpath

http://git-wip-us.apache.org/repos/asf/ambari/blob/b6a591a6/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
index 1d77787..36dc7c1 100644
--- 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
@@ -16,17 +16,23 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 """
 
+import os
+import functools
+
 from resource_management import Script
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.resources.hdfs_resource import HdfsResource
 
 config = Script.get_config()
 
-
 pxf_service_name = "pxf-service"
 stack_name = str(config["hostLevelParams"]["stack_name"])
 
 # Users and Groups
 pxf_user = "pxf"
 pxf_group = pxf_user
+hdfs_superuser = config['configurations']['hadoop-env']['hdfs_user']
 hdfs_superuser_group = 
config["configurations"]["hdfs-site"]["dfs.permissions.superusergroup"]
 user_group = config["configurations"]["cluster-env"]["user_group"]
 tomcat_group = "tomcat"
@@ -44,3 +50,26 @@ default_exec_timeout = 600
 # security related
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 realm_name = config['configurations']['kerberos-env']['realm']
+
+#HBase
+is_hbase_installed = default("/clusterHostInfo/hbase_master_hosts", None) is 
not None
+
+# HDFS
+hdfs_site = config['configurations']['hdfs-site']
+default_fs = config['configurations']['core-site']['fs.defaultFS']
+
+security_enabled = config['configurations']['cluster-env']['security_enabled']
+hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
+kinit_path_local = 
get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', 
None))
+hdfs_principal_name = 
config['configurations']['hadoop-env']['hdfs_principal_name']
+
+# HDFSResource partial function
+HdfsResource = functools.partial(HdfsResource,
+user=hdfs_superuser,
+security_enabled=security_enabled,
+keytab=hdfs_user_keytab,
+kinit_path_local=kinit_path_local,
+principal_name=hdfs_principal_name,
+hdfs_site=hdfs_site,
+default_fs=default_fs)
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/b6a591a6/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
new file mode 100644
index 000..3138379
--- /dev/null
+++ 
b/ambari-server/src/main/resources/c

[12/22] ambari git commit: AMBARI-14713: Service checks for PXF using HDFS and HBase (nalex via jaoki)

2016-01-21 Thread ncole
AMBARI-14713: Service checks for PXF using HDFS and HBase (nalex via jaoki)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 5380fefdee8c73780d9a40e00e68e53f4d665c9c
Parents: 03a0f9f
Author: Jun Aoki 
Authored: Wed Jan 20 16:01:14 2016 -0800
Committer: Jun Aoki 
Committed: Wed Jan 20 16:01:14 2016 -0800

--
 .../common-services/PXF/3.0.0/metainfo.xml  |   6 +
 .../PXF/3.0.0/package/scripts/params.py |  31 ++-
 .../PXF/3.0.0/package/scripts/pxf_constants.py  |  26 ++
 .../PXF/3.0.0/package/scripts/pxf_utils.py  |  49 
 .../PXF/3.0.0/package/scripts/service_check.py  | 266 +++
 5 files changed, 377 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5380fefd/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
index cb2411c..1797b29 100644
--- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
@@ -66,6 +66,12 @@
 
   
 
+  
+scripts/service_check.py
+PYTHON
+300
+  
+
   
 pxf-profiles
 pxf-public-classpath

http://git-wip-us.apache.org/repos/asf/ambari/blob/5380fefd/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
index 1d77787..36dc7c1 100644
--- 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
@@ -16,17 +16,23 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 """
 
+import os
+import functools
+
 from resource_management import Script
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.resources.hdfs_resource import HdfsResource
 
 config = Script.get_config()
 
-
 pxf_service_name = "pxf-service"
 stack_name = str(config["hostLevelParams"]["stack_name"])
 
 # Users and Groups
 pxf_user = "pxf"
 pxf_group = pxf_user
+hdfs_superuser = config['configurations']['hadoop-env']['hdfs_user']
 hdfs_superuser_group = 
config["configurations"]["hdfs-site"]["dfs.permissions.superusergroup"]
 user_group = config["configurations"]["cluster-env"]["user_group"]
 tomcat_group = "tomcat"
@@ -44,3 +50,26 @@ default_exec_timeout = 600
 # security related
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 realm_name = config['configurations']['kerberos-env']['realm']
+
+#HBase
+is_hbase_installed = default("/clusterHostInfo/hbase_master_hosts", None) is 
not None
+
+# HDFS
+hdfs_site = config['configurations']['hdfs-site']
+default_fs = config['configurations']['core-site']['fs.defaultFS']
+
+security_enabled = config['configurations']['cluster-env']['security_enabled']
+hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
+kinit_path_local = 
get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', 
None))
+hdfs_principal_name = 
config['configurations']['hadoop-env']['hdfs_principal_name']
+
+# HDFSResource partial function
+HdfsResource = functools.partial(HdfsResource,
+user=hdfs_superuser,
+security_enabled=security_enabled,
+keytab=hdfs_user_keytab,
+kinit_path_local=kinit_path_local,
+principal_name=hdfs_principal_name,
+hdfs_site=hdfs_site,
+default_fs=default_fs)
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/5380fefd/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
new file mode 100644
index 000..3138379
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
@@ -0,0 +1,26 

ambari git commit: AMBARI-14713: Service checks for PXF using HDFS and HBase (nalex via jaoki)

2016-01-20 Thread jaoki
Repository: ambari
Updated Branches:
  refs/heads/trunk 03a0f9f50 -> 5380fefde


AMBARI-14713: Service checks for PXF using HDFS and HBase (nalex via jaoki)


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

Branch: refs/heads/trunk
Commit: 5380fefdee8c73780d9a40e00e68e53f4d665c9c
Parents: 03a0f9f
Author: Jun Aoki 
Authored: Wed Jan 20 16:01:14 2016 -0800
Committer: Jun Aoki 
Committed: Wed Jan 20 16:01:14 2016 -0800

--
 .../common-services/PXF/3.0.0/metainfo.xml  |   6 +
 .../PXF/3.0.0/package/scripts/params.py |  31 ++-
 .../PXF/3.0.0/package/scripts/pxf_constants.py  |  26 ++
 .../PXF/3.0.0/package/scripts/pxf_utils.py  |  49 
 .../PXF/3.0.0/package/scripts/service_check.py  | 266 +++
 5 files changed, 377 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5380fefd/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
index cb2411c..1797b29 100644
--- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml
@@ -66,6 +66,12 @@
 
   
 
+  
+scripts/service_check.py
+PYTHON
+300
+  
+
   
 pxf-profiles
 pxf-public-classpath

http://git-wip-us.apache.org/repos/asf/ambari/blob/5380fefd/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
index 1d77787..36dc7c1 100644
--- 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
@@ -16,17 +16,23 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 """
 
+import os
+import functools
+
 from resource_management import Script
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.resources.hdfs_resource import HdfsResource
 
 config = Script.get_config()
 
-
 pxf_service_name = "pxf-service"
 stack_name = str(config["hostLevelParams"]["stack_name"])
 
 # Users and Groups
 pxf_user = "pxf"
 pxf_group = pxf_user
+hdfs_superuser = config['configurations']['hadoop-env']['hdfs_user']
 hdfs_superuser_group = 
config["configurations"]["hdfs-site"]["dfs.permissions.superusergroup"]
 user_group = config["configurations"]["cluster-env"]["user_group"]
 tomcat_group = "tomcat"
@@ -44,3 +50,26 @@ default_exec_timeout = 600
 # security related
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 realm_name = config['configurations']['kerberos-env']['realm']
+
+#HBase
+is_hbase_installed = default("/clusterHostInfo/hbase_master_hosts", None) is 
not None
+
+# HDFS
+hdfs_site = config['configurations']['hdfs-site']
+default_fs = config['configurations']['core-site']['fs.defaultFS']
+
+security_enabled = config['configurations']['cluster-env']['security_enabled']
+hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
+kinit_path_local = 
get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', 
None))
+hdfs_principal_name = 
config['configurations']['hadoop-env']['hdfs_principal_name']
+
+# HDFSResource partial function
+HdfsResource = functools.partial(HdfsResource,
+user=hdfs_superuser,
+security_enabled=security_enabled,
+keytab=hdfs_user_keytab,
+kinit_path_local=kinit_path_local,
+principal_name=hdfs_principal_name,
+hdfs_site=hdfs_site,
+default_fs=default_fs)
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/5380fefd/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
 
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py
new file mode 100644
index 000..3138379
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-serv