You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/05/12 16:51:01 UTC
[1/2] AMBARI-5588. Ambari should not hardcode python 2.6,
but support 2.6 and higher (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/trunk ca3cce1a5 -> 5e49df1a6
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/__init__.py
index a582077..35de4bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/__init__.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/application_timeline_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/application_timeline_server.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/application_timeline_server.py
index 77c3777..0719da8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/application_timeline_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/application_timeline_server.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -53,4 +52,4 @@ class ApplicationTimelineServer(Script):
check_process_status(status_params.yarn_historyserver_pid_file)
if __name__ == "__main__":
- ApplicationTimelineServer().execute()
\ No newline at end of file
+ ApplicationTimelineServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/historyserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/historyserver.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/historyserver.py
index 6736d40..d5c6db2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/historyserver.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/historyserver.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapred_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapred_service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapred_service_check.py
index 3b789f8..4685716 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapred_service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapred_service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -71,4 +70,4 @@ class MapReduce2ServiceCheck(Script):
)
if __name__ == "__main__":
- MapReduce2ServiceCheck().execute()
\ No newline at end of file
+ MapReduce2ServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapreduce2_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapreduce2_client.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapreduce2_client.py
index 54119a7..831e5e8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapreduce2_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/mapreduce2_client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/nodemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/nodemanager.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/nodemanager.py
index 473f50c..8e153e0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/nodemanager.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/nodemanager.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/params.py
index a523a4f..c4f830b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/resourcemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/resourcemanager.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/resourcemanager.py
index 6e6b34f..a286ae3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/resourcemanager.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/resourcemanager.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service.py
index 0692c1b..d854565 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -60,4 +59,4 @@ def service(componentName, action='start', serviceName='yarn'):
rm_pid = format("rm -f {pid_file}")
Execute(rm_pid,
user=usr
- )
\ No newline at end of file
+ )
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service_check.py
index 135b30b..beae43a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -65,4 +64,4 @@ class ServiceCheck(Script):
)
if __name__ == "__main__":
- ServiceCheck().execute()
\ No newline at end of file
+ ServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn.py
index 9387022..eeedc46 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -150,7 +149,7 @@ def yarn(name = None):
group=params.yarn_executor_container_group,
mode=06050
)
-
+
File(format("{config_dir}/container-executor.cfg"),
group=params.user_group,
mode=0644,
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn_client.py b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn_client.py
index 7e9c564..f6b4b44 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/scripts/yarn_client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -40,4 +39,4 @@ class YarnClient(Script):
raise ClientComponentHasNoStatus()
if __name__ == "__main__":
- YarnClient().execute()
\ No newline at end of file
+ YarnClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py
index 399fd78..f3bef97 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py
index 95a9b88..6ba5ad0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
index a582077..35de4bb 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
index a582077..35de4bb 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
index a582077..35de4bb 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
index a582077..35de4bb 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
index a582077..35de4bb 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
[2/2] git commit: AMBARI-5588. Ambari should not hardcode python 2.6,
but support 2.6 and higher (aonishuk)
Posted by ao...@apache.org.
AMBARI-5588. Ambari should not hardcode python 2.6, but support 2.6 and higher (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5e49df1a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5e49df1a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5e49df1a
Branch: refs/heads/trunk
Commit: 5e49df1a65f9ae9cef58131ff8932bb7f841b148
Parents: ca3cce1
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon May 12 17:50:51 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon May 12 17:50:51 2014 +0300
----------------------------------------------------------------------
ambari-agent/conf/unix/ambari-agent | 8 +++-
ambari-agent/conf/unix/install-helper.sh | 19 ++++++++--
ambari-agent/pom.xml | 29 ++++++++++++--
.../files/validateYarnComponentStatus.py | 6 +--
.../src/main/python/ambari_agent/Facter.py | 12 +++---
.../libraries/script/hook.py | 2 +-
ambari-client/pom.xml | 4 +-
ambari-common/src/main/unix/ambari-python-wrap | 40 ++++++++++++++++++++
ambari-server/conf/unix/install-helper.sh | 17 ++++++++-
ambari-server/pom.xml | 25 +++++++++++-
ambari-server/sbin/ambari-server | 6 ++-
ambari-server/src/main/python/bootstrap.py | 2 +-
.../1.3.2/hooks/after-INSTALL/scripts/hook.py | 1 -
.../1.3.2/hooks/before-INSTALL/scripts/hook.py | 1 -
.../1.3.2/hooks/before-RESTART/scripts/hook.py | 2 -
.../1.3.2/hooks/before-START/scripts/hook.py | 1 -
.../1.3.2/services/HDFS/package/scripts/hdfs.py | 3 +-
.../MAPREDUCE/package/scripts/client.py | 3 +-
.../MAPREDUCE/package/scripts/historyserver.py | 3 +-
.../MAPREDUCE/package/scripts/jobtracker.py | 5 +--
.../MAPREDUCE/package/scripts/mapreduce.py | 1 -
.../MAPREDUCE/package/scripts/params.py | 1 -
.../MAPREDUCE/package/scripts/service.py | 3 +-
.../MAPREDUCE/package/scripts/service_check.py | 4 +-
.../MAPREDUCE/package/scripts/status_params.py | 3 +-
.../MAPREDUCE/package/scripts/tasktracker.py | 5 +--
.../services/PIG/package/scripts/params.py | 3 +-
.../1.3.2/services/PIG/package/scripts/pig.py | 11 +++---
.../services/PIG/package/scripts/pig_client.py | 7 ++--
.../PIG/package/scripts/service_check.py | 17 ++++-----
.../WEBHCAT/package/scripts/__init__.py | 3 +-
.../services/WEBHCAT/package/scripts/params.py | 3 +-
.../WEBHCAT/package/scripts/service_check.py | 3 +-
.../services/WEBHCAT/package/scripts/webhcat.py | 1 -
.../WEBHCAT/package/scripts/webhcat_server.py | 3 +-
.../WEBHCAT/package/scripts/webhcat_service.py | 1 -
.../ZOOKEEPER/package/scripts/__init__.py | 3 +-
.../ZOOKEEPER/package/scripts/params.py | 1 -
.../ZOOKEEPER/package/scripts/service_check.py | 3 +-
.../ZOOKEEPER/package/scripts/zookeeper.py | 1 -
.../package/scripts/zookeeper_client.py | 3 +-
.../package/scripts/zookeeper_server.py | 3 +-
.../package/scripts/zookeeper_service.py | 3 +-
.../2.0.6/hooks/before-INSTALL/scripts/hook.py | 1 -
.../2.0.6/hooks/before-RESTART/scripts/hook.py | 2 -
.../2.0.6/hooks/before-START/scripts/hook.py | 1 -
.../2.0.6/services/HDFS/package/scripts/hdfs.py | 3 +-
.../services/PIG/package/scripts/params.py | 3 +-
.../2.0.6/services/PIG/package/scripts/pig.py | 7 ++--
.../services/PIG/package/scripts/pig_client.py | 7 ++--
.../PIG/package/scripts/service_check.py | 17 ++++-----
.../WEBHCAT/package/scripts/__init__.py | 3 +-
.../services/WEBHCAT/package/scripts/params.py | 3 +-
.../WEBHCAT/package/scripts/service_check.py | 9 ++---
.../services/WEBHCAT/package/scripts/webhcat.py | 3 +-
.../WEBHCAT/package/scripts/webhcat_server.py | 3 +-
.../WEBHCAT/package/scripts/webhcat_service.py | 1 -
.../services/YARN/package/scripts/__init__.py | 3 +-
.../scripts/application_timeline_server.py | 3 +-
.../YARN/package/scripts/historyserver.py | 1 -
.../package/scripts/mapred_service_check.py | 3 +-
.../YARN/package/scripts/mapreduce2_client.py | 1 -
.../YARN/package/scripts/nodemanager.py | 1 -
.../services/YARN/package/scripts/params.py | 1 -
.../YARN/package/scripts/resourcemanager.py | 1 -
.../services/YARN/package/scripts/service.py | 3 +-
.../YARN/package/scripts/service_check.py | 3 +-
.../2.0.6/services/YARN/package/scripts/yarn.py | 3 +-
.../YARN/package/scripts/yarn_client.py | 3 +-
.../ZOOKEEPER/package/scripts/__init__.py | 3 +-
.../ZOOKEEPER/package/scripts/params.py | 1 -
.../ZOOKEEPER/package/scripts/service_check.py | 3 +-
.../ZOOKEEPER/package/scripts/zookeeper.py | 1 -
.../package/scripts/zookeeper_client.py | 3 +-
.../package/scripts/zookeeper_server.py | 3 +-
.../package/scripts/zookeeper_service.py | 3 +-
.../services/YARN/package/scripts/__init__.py | 3 +-
.../scripts/application_timeline_server.py | 3 +-
.../YARN/package/scripts/historyserver.py | 1 -
.../package/scripts/mapred_service_check.py | 3 +-
.../YARN/package/scripts/mapreduce2_client.py | 1 -
.../YARN/package/scripts/nodemanager.py | 1 -
.../services/YARN/package/scripts/params.py | 1 -
.../YARN/package/scripts/resourcemanager.py | 1 -
.../services/YARN/package/scripts/service.py | 3 +-
.../YARN/package/scripts/service_check.py | 3 +-
.../services/YARN/package/scripts/yarn.py | 3 +-
.../YARN/package/scripts/yarn_client.py | 3 +-
.../HDP/2.1/services/TEZ/package/scripts/tez.py | 1 -
.../services/TEZ/package/scripts/tez_client.py | 1 -
.../stacks/HDP/2.0.6/hooks/dummy-script.py | 3 +-
.../services/HBASE/package/dummy-script.py | 3 +-
.../2.0.7/services/HDFS/package/dummy-script.py | 3 +-
.../stacks/HDP/2.0.8/hooks/dummy-script.py | 3 +-
.../2.0.8/services/HDFS/package/dummy-script.py | 3 +-
95 files changed, 228 insertions(+), 196 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-agent/conf/unix/ambari-agent
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent
index aee155e..e867155 100644
--- a/ambari-agent/conf/unix/ambari-agent
+++ b/ambari-agent/conf/unix/ambari-agent
@@ -49,7 +49,11 @@ OK=1
NOTOK=0
-if [ -a /usr/bin/python2.6 ]; then
+if [ -a /usr/bin/python2.7 ] && [ -z "$PYTHON" ]; then
+ PYTHON=/usr/bin/python2.7
+fi
+
+if [ -a /usr/bin/python2.6 ] && [ -z "$PYTHON" ]; then
PYTHON=/usr/bin/python2.6
fi
@@ -207,7 +211,7 @@ case "$1" in
$0 stop
$0 start "$@"
retcode=$?
- ;;
+ ;;
*)
tput bold
echo "Usage: /usr/sbin/ambari-agent {start|stop|restart|status}"
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-agent/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/install-helper.sh b/ambari-agent/conf/unix/install-helper.sh
index 65bc7bd..2d47fc7 100644
--- a/ambari-agent/conf/unix/install-helper.sh
+++ b/ambari-agent/conf/unix/install-helper.sh
@@ -22,19 +22,32 @@ COMMON_DIR="/usr/lib/python2.6/site-packages/common_functions"
INSTALL_HELPER_SERVER="/var/lib/ambari-server/install-helper.sh"
COMMON_DIR_AGENT="/usr/lib/ambari-agent/lib/common_functions"
+PYTHON_WRAPER_TARGET="/usr/bin/ambari-python-wrap"
+PYTHON_WRAPER_SOURCE="/var/lib/ambari-agent/ambari-python-wrap"
do_install(){
+ # setting common_functions shared resource
if [ ! -d "$COMMON_DIR" ]; then
ln -s "$COMMON_DIR_AGENT" "$COMMON_DIR"
fi
+ # setting python-wrapper script
+ if [ ! -f "$PYTHON_WRAPER_TARGET" ]; then
+ ln -s "$PYTHON_WRAPER_SOURCE" "$PYTHON_WRAPER_TARGET"
+ fi
}
do_remove(){
if [ -d "$COMMON_DIR" ]; then # common dir exists
rm -f "$COMMON_DIR"
- if [ -f "$INSTALL_HELPER_SERVER" ]; then # call server shared files installer
- $INSTALL_HELPER_SERVER install
- fi
+ fi
+
+ if [ -f "$PYTHON_WRAPER_TARGET" ]; then
+ rm -f "$PYTHON_WRAPER_TARGET"
+ fi
+
+ # if server package exists, restore their settings
+ if [ -f "$INSTALL_HELPER_SERVER" ]; then # call server shared files installer
+ $INSTALL_HELPER_SERVER install
fi
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-agent/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 97806e0..87d3427 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -125,7 +125,7 @@
<executions>
<execution>
<configuration>
- <executable>python2.6</executable>
+ <executable>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable>
<workingDirectory>src/test/python</workingDirectory>
<arguments>
<argument>unitTests.py</argument>
@@ -144,7 +144,7 @@
<execution>
<!-- TODO: Looks like section is unused, maybe remove? -->
<configuration>
- <executable>python2.6</executable>
+ <executable>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable>
<workingDirectory>target/ambari-agent-${project.version}</workingDirectory>
<arguments>
<argument>${project.basedir}/src/main/python/setup.py</argument>
@@ -163,7 +163,7 @@
</execution>
<execution>
<configuration>
- <executable>python2.6</executable>
+ <executable>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable>
<workingDirectory>${basedir}</workingDirectory>
<arguments>
<argument>${resource.keeper.script}</argument>
@@ -228,6 +228,18 @@
</sources>
</mapping>
<mapping>
+ <directory>/var/lib/ambari-agent/</directory>
+ <filemode>755</filemode>
+ <username>root</username>
+ <groupname>root</groupname>
+ <directoryIncluded>false</directoryIncluded>
+ <sources>
+ <source>
+ <location>../ambari-common/src/main/unix/ambari-python-wrap</location>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
<directory>${resmgmt.install.dir}</directory>
<sources>
<source>
@@ -550,6 +562,17 @@
</mapper>
</data>
<data>
+ <src>../ambari-common/src/main/unix/ambari-python-wrap</src>
+ <type>file</type>
+ <mapper>
+ <type>perm</type>
+ <prefix>/var/lib/ambari-agent</prefix>
+ <user>root</user>
+ <group>root</group>
+ <filemode>755</filemode>
+ </mapper>
+ </data>
+ <data>
<src>${target.cache.dir}</src>
<type>directory</type>
<mapper>
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-agent/src/main/puppet/modules/hdp-yarn/files/validateYarnComponentStatus.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-yarn/files/validateYarnComponentStatus.py b/ambari-agent/src/main/puppet/modules/hdp-yarn/files/validateYarnComponentStatus.py
index 5186f21..6bb8041 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-yarn/files/validateYarnComponentStatus.py
+++ b/ambari-agent/src/main/puppet/modules/hdp-yarn/files/validateYarnComponentStatus.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.6
+#!/usr/bin/env ambari-python-wrap
'''
Licensed to the Apache Software Foundation (ASF) under one
@@ -40,7 +40,7 @@ def getResponse(path, address, ssl_enabled):
url = 'https://' + address + path
else:
url = 'http://' + address + path
-
+
command_with_flags = [command,httpGssnegotiate,userpswd,insecure,url]
try:
proc = subprocess.Popen(command_with_flags, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -143,7 +143,7 @@ def main():
(options, args) = parser.parse_args()
component = args[0]
-
+
address = options.address
ssl_enabled = (options.ssl_enabled) in 'true'
if component == RESOURCEMANAGER:
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-agent/src/main/python/ambari_agent/Facter.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/Facter.py b/ambari-agent/src/main/python/ambari_agent/Facter.py
index f9bca94..5df87ac 100644
--- a/ambari-agent/src/main/python/ambari_agent/Facter.py
+++ b/ambari-agent/src/main/python/ambari_agent/Facter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.6
+#!/usr/bin/env ambari-python-wrap
'''
Licensed to the Apache Software Foundation (ASF) under one
@@ -42,9 +42,9 @@ GET_MEMINFO_CMD = "cat /proc/meminfo"
class Facter():
def __init__(self):
-
- self.DATA_IFCONFIG_OUTPUT = Facter.setDataIfConfigOutput()
- self.DATA_UPTIME_OUTPUT = Facter.setDataUpTimeOutput()
+
+ self.DATA_IFCONFIG_OUTPUT = Facter.setDataIfConfigOutput()
+ self.DATA_UPTIME_OUTPUT = Facter.setDataUpTimeOutput()
self.DATA_MEMINFO_OUTPUT = Facter.setMemInfoOutput()
@staticmethod
@@ -189,7 +189,7 @@ class Facter():
# Return first ip adress
def getIpAddress(self):
- result = self.data_return_first("(?: inet addr:)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})",
+ result = self.data_return_first("(?: inet addr:)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})",
self.DATA_IFCONFIG_OUTPUT)
if result == '':
log.warn("Can't get an ip address from {0}".format(self.DATA_IFCONFIG_OUTPUT))
@@ -199,7 +199,7 @@ class Facter():
# Return netmask
def getNetmask(self):
- result = self.data_return_first("(?: Mask:)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})",
+ result = self.data_return_first("(?: Mask:)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})",
self.DATA_IFCONFIG_OUTPUT)
if result == '':
log.warn("Can't get a netmask from {0}".format(self.DATA_IFCONFIG_OUTPUT))
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-agent/src/main/python/resource_management/libraries/script/hook.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/libraries/script/hook.py b/ambari-agent/src/main/python/resource_management/libraries/script/hook.py
index 399baac..5c8eafc 100644
--- a/ambari-agent/src/main/python/resource_management/libraries/script/hook.py
+++ b/ambari-agent/src/main/python/resource_management/libraries/script/hook.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.6
+#!/usr/bin/env ambari-python-wrap
'''
Licensed to the Apache Software Foundation (ASF) under one
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-client/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-client/pom.xml b/ambari-client/pom.xml
index 4c6f009..86a0837 100755
--- a/ambari-client/pom.xml
+++ b/ambari-client/pom.xml
@@ -72,7 +72,7 @@
<executions>
<execution>
<configuration>
- <executable>python2.6</executable>
+ <executable>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable>
<workingDirectory>src/test/python</workingDirectory>
<arguments>
<argument>unitTests.py</argument>
@@ -90,7 +90,7 @@
</execution>
<execution>
<configuration>
- <executable>python2.6</executable>
+ <executable>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable>
<workingDirectory>target/ambari-client-${project.version}</workingDirectory>
<arguments>
<argument>${project.basedir}/src/main/python/setup.py</argument>
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-common/src/main/unix/ambari-python-wrap
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/unix/ambari-python-wrap b/ambari-common/src/main/unix/ambari-python-wrap
new file mode 100755
index 0000000..6494d79
--- /dev/null
+++ b/ambari-common/src/main/unix/ambari-python-wrap
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+# Copyright 2011 The Apache Software Foundation
+#
+# 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.
+
+export PYTHONPATH=/usr/lib/python2.6/site-packages/common_functions:$PYTHONPATH
+
+# reset settings
+unset PYTHON
+
+# checking for preferable python versions
+if [ -a /usr/bin/python2.7 ] && [ -z "$PYTHON" ]; then
+ PYTHON=/usr/bin/python2.7
+fi
+
+if [ -a /usr/bin/python2.6 ] && [ -z "$PYTHON" ]; then
+ PYTHON=/usr/bin/python2.6
+fi
+
+# if no preferable python versions found, try to use system one
+if [[ -z "$PYTHON" ]]; then
+ PYTHON=/usr/bin/python
+fi
+
+# execute script
+$PYTHON $@
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/install-helper.sh b/ambari-server/conf/unix/install-helper.sh
index a1d5cb2..9471289 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -21,19 +21,32 @@ COMMON_DIR="/usr/lib/python2.6/site-packages/common_functions"
INSTALL_HELPER_AGENT="/var/lib/ambari-agent/install-helper.sh"
COMMON_DIR_SERVER="/usr/lib/ambari-server/lib/common_functions"
+PYTHON_WRAPER_TARGET="/usr/bin/ambari-python-wrap"
+PYTHON_WRAPER_SOURCE="/var/lib/ambari-server/ambari-python-wrap"
do_install(){
+ # setting common_functions shared resource
if [ ! -d "$COMMON_DIR" ]; then
ln -s "$COMMON_DIR_SERVER" "$COMMON_DIR"
fi
+ # setting python-wrapper script
+ if [ ! -f "$PYTHON_WRAPER_TARGET" ]; then
+ ln -s "$PYTHON_WRAPER_SOURCE" "$PYTHON_WRAPER_TARGET"
+ fi
}
do_remove(){
if [ -d "$COMMON_DIR" ]; then # common dir exists
rm -f "$COMMON_DIR"
- if [ -f "$INSTALL_HELPER_AGENT" ]; then # call agent shared files installer
+ fi
+
+ if [ -f "$PYTHON_WRAPER_TARGET" ]; then
+ rm -f "$PYTHON_WRAPER_TARGET"
+ fi
+
+ # if server package exists, restore their settings
+ if [ -f "$INSTALL_HELPER_AGENT" ]; then # call agent shared files installer
$INSTALL_HELPER_AGENT install
- fi
fi
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 6f12cd4..f5aa263 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -286,6 +286,18 @@
</sources>
</mapping>
<mapping>
+ <directory>/var/lib/ambari-server/</directory>
+ <filemode>755</filemode>
+ <username>root</username>
+ <groupname>root</groupname>
+ <directoryIncluded>false</directoryIncluded>
+ <sources>
+ <source>
+ <location>../ambari-common/src/main/unix/ambari-python-wrap</location>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
<directory>/etc/ambari-server/conf</directory>
<configuration>true</configuration>
<sources>
@@ -543,6 +555,17 @@
</mapper>
</data>
<data>
+ <src>../ambari-common/src/main/unix/ambari-python-wrap</src>
+ <type>file</type>
+ <mapper>
+ <type>perm</type>
+ <prefix>/var/lib/ambari-server</prefix>
+ <user>root</user>
+ <group>root</group>
+ <filemode>755</filemode>
+ </mapper>
+ </data>
+ <data>
<src>${basedir}/target/ambari-server</src>
<type>file</type>
<mapper>
@@ -851,7 +874,7 @@
<executions>
<execution>
<configuration>
- <executable>python2.6</executable>
+ <executable>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable>
<workingDirectory>src/test/python</workingDirectory>
<arguments>
<argument>unitTests.py</argument>
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/sbin/ambari-server
----------------------------------------------------------------------
diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server
index 55cc3a9..0610657 100644
--- a/ambari-server/sbin/ambari-server
+++ b/ambari-server/sbin/ambari-server
@@ -41,7 +41,11 @@ export AMBARI_CONF_DIR=/etc/ambari-server/conf:$PATH
# Because Ambari rpm unpacks modules here on all systems
export PYTHONPATH=/usr/lib/python2.6/site-packages:$PYTHONPATH
-if [ -a /usr/bin/python2.6 ]; then
+if [ -a /usr/bin/python2.7 ] && [ -z "$PYTHON" ]; then
+ PYTHON=/usr/bin/python2.7
+fi
+
+if [ -a /usr/bin/python2.6 ] && [ -z "$PYTHON" ]; then
PYTHON=/usr/bin/python2.6
fi
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/python/bootstrap.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py
index ac2ad66..fa20240 100755
--- a/ambari-server/src/main/python/bootstrap.py
+++ b/ambari-server/src/main/python/bootstrap.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.6
+#!/usr/bin/env ambari-python-wrap
'''
Licensed to the Apache Software Foundation (ASF) under one
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/hook.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/hook.py
index 25a56ad..cf83e19 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/hook.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/after-INSTALL/scripts/hook.py
@@ -1,4 +1,3 @@
-##!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/scripts/hook.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/scripts/hook.py
index 03859e4..9b200af 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/scripts/hook.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/scripts/hook.py
@@ -1,4 +1,3 @@
-##!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-RESTART/scripts/hook.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-RESTART/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-RESTART/scripts/hook.py
index 0596106..05977c3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-RESTART/scripts/hook.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-RESTART/scripts/hook.py
@@ -1,5 +1,3 @@
-##!/usr/bin/env python2.6
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/hook.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/hook.py
index d413371..8ad8c70 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/hook.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/hook.py
@@ -1,4 +1,3 @@
-##!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/hdfs.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/hdfs.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/hdfs.py
index 06bf583..d988c56 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/hdfs.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/hdfs.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -60,4 +59,4 @@ def hdfs(name=None):
File(os.path.join(params.hadoop_conf_dir, 'slaves'),
owner=tc_owner,
content=Template("slaves.j2")
- )
\ No newline at end of file
+ )
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/client.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/client.py
index 79c644d..8b98fe2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -40,4 +39,4 @@ class Client(Script):
raise ClientComponentHasNoStatus()
if __name__ == "__main__":
- Client().execute()
\ No newline at end of file
+ Client().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/historyserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/historyserver.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/historyserver.py
index 25bc59a..bccd0c6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/historyserver.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/historyserver.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -28,7 +27,7 @@ from service import service
class Historyserver(Script):
def install(self, env):
self.install_packages(env)
-
+
def configure(self, env):
import params
env.set_params(params)
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/jobtracker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/jobtracker.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/jobtracker.py
index e87e469..783261e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/jobtracker.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/jobtracker.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -42,7 +41,7 @@ class Jobtracker(Script):
service('jobtracker',
action='start'
)
-
+
def stop(self, env):
import params
env.set_params(params)
@@ -50,7 +49,7 @@ class Jobtracker(Script):
service('jobtracker',
action='stop'
)
-
+
def status(self, env):
import status_params
env.set_params(status_params)
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/mapreduce.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/mapreduce.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/mapreduce.py
index a957d78..9b2f387 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/mapreduce.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/mapreduce.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/params.py
index f6f4367..432f803 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service.py
index f4aa91b..cb885e0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -53,4 +52,4 @@ def service(
Execute(daemon_cmd,
user=params.mapred_user
)
- Execute(rm_pid)
\ No newline at end of file
+ Execute(rm_pid)
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service_check.py
index c0a4a59..c32e1e1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -20,7 +19,6 @@ Ambari Agent
"""
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -86,4 +84,4 @@ class ServiceCheck(Script):
)
if __name__ == "__main__":
- ServiceCheck().execute()
\ No newline at end of file
+ ServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/status_params.py
index f964a76..99c4dcd 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/status_params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -30,4 +29,4 @@ mapred_pid_dir = format("{pid_dir_prefix}/{mapred_user}")
jobtracker_pid_file = format("{mapred_pid_dir}/hadoop-{mapred_user}-jobtracker.pid")
tasktracker_pid_file = format("{mapred_pid_dir}/hadoop-{mapred_user}-tasktracker.pid")
-historyserver_pid_file = format("{mapred_pid_dir}/hadoop-{mapred_user}-historyserver.pid")
\ No newline at end of file
+historyserver_pid_file = format("{mapred_pid_dir}/hadoop-{mapred_user}-historyserver.pid")
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/tasktracker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/tasktracker.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/tasktracker.py
index 77d974b..c405b94 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/tasktracker.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/package/scripts/tasktracker.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -20,7 +19,6 @@ Ambari Agent
"""
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -42,7 +40,6 @@ Ambari Agent
"""
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -101,4 +98,4 @@ class Tasktracker(Script):
check_process_status(status_params.tasktracker_pid_file)
if __name__ == "__main__":
- Tasktracker().execute()
\ No newline at end of file
+ Tasktracker().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/params.py
index ab52cac..c44acfa 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -43,4 +42,4 @@ hadoop_home = "/usr"
if (('pig-log4j' in config['configurations']) and ('content' in config['configurations']['pig-log4j'])):
log4j_props = config['configurations']['pig-log4j']['content']
else:
- log4j_props = None
\ No newline at end of file
+ log4j_props = None
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig.py
index 7bf6927..8a8cd52 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -46,16 +45,16 @@ def pig():
group=params.user_group,
owner=params.hdfs_user
)
-
-
+
+
def pig_TemplateConfig(name):
import params
-
+
if not isinstance(name, list):
name = [name]
-
+
for x in name:
TemplateConfig( format("{pig_conf_dir}/{x}"),
owner = params.hdfs_user
)
-
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig_client.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig_client.py
index fca2e0f..931dceb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/pig_client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -24,12 +23,12 @@ import sys
from resource_management import *
from pig import pig
-
+
class PigClient(Script):
def install(self, env):
self.install_packages(env)
self.configure(env)
-
+
def configure(self, env):
import params
env.set_params(params)
@@ -37,6 +36,6 @@ class PigClient(Script):
def status(self, env):
raise ClientComponentHasNoStatus()
-
+
if __name__ == "__main__":
PigClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/service_check.py
index 9fd0657..0e96a77 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/package/scripts/service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -26,15 +25,15 @@ class PigServiceCheck(Script):
def service_check(self, env):
import params
env.set_params(params)
-
+
input_file = 'passwd'
output_file = "pigsmoke.out"
-
+
cleanup_cmd = format("dfs -rmr {output_file} {input_file}")
#cleanup put below to handle retries; if retrying there wil be a stale file that needs cleanup; exit code is fn of second command
create_file_cmd = format("{cleanup_cmd}; hadoop dfs -put /etc/passwd {input_file} ") #TODO: inconsistent that second command needs hadoop
test_cmd = format("fs -test -e {output_file}")
-
+
ExecuteHadoop( create_file_cmd,
tries = 3,
try_sleep = 5,
@@ -45,24 +44,24 @@ class PigServiceCheck(Script):
security_enabled = params.security_enabled,
kinit_path_local = params.kinit_path_local
)
-
+
File( '/tmp/pigSmoke.sh',
content = StaticFile("pigSmoke.sh"),
mode = 0755
)
-
+
Execute( "pig /tmp/pigSmoke.sh",
tries = 3,
try_sleep = 5,
path = '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
user = params.smokeuser
)
-
+
ExecuteHadoop( test_cmd,
user = params.smokeuser,
conf_dir = params.hadoop_conf_dir
)
-
+
if __name__ == "__main__":
PigServiceCheck().execute()
-
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/__init__.py
index a582077..35de4bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/__init__.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
index 0af8ae5..a64f480 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -75,4 +74,4 @@ HdfsDirectory = functools.partial(
security_enabled = security_enabled,
keytab = hdfs_user_keytab,
kinit_path_local = kinit_path_local
-)
\ No newline at end of file
+)
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
index d482d8e..e98d6cf 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -42,4 +41,4 @@ class WebHCatServiceCheck(Script):
logoutput=True)
if __name__ == "__main__":
- WebHCatServiceCheck().execute()
\ No newline at end of file
+ WebHCatServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat.py
index b2ef5dd..921c9d1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_server.py
index 4365111..2111fa4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_server.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -51,4 +50,4 @@ class WebHCatServer(Script):
check_process_status(status_params.pid_file)
if __name__ == "__main__":
- WebHCatServer().execute()
\ No newline at end of file
+ WebHCatServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_service.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_service.py
index 12c3854..57ec17a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/webhcat_service.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/__init__.py
index a582077..35de4bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/__init__.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py
index 259f859..64e080e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/service_check.py
index 6b3553d..df8b13f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -44,4 +43,4 @@ class ZookeeperServiceCheck(Script):
)
if __name__ == "__main__":
- ZookeeperServiceCheck().execute()
\ No newline at end of file
+ ZookeeperServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper.py
index 23db950..ff12aa0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_client.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_client.py
index 028a37d..4bffac3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -40,4 +39,4 @@ class ZookeeperClient(Script):
raise ClientComponentHasNoStatus()
if __name__ == "__main__":
- ZookeeperClient().execute()
\ No newline at end of file
+ ZookeeperClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_server.py
index e8cc264..9b9112c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_server.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -52,4 +51,4 @@ class ZookeeperServer(Script):
check_process_status(status_params.zk_pid_file)
if __name__ == "__main__":
- ZookeeperServer().execute()
\ No newline at end of file
+ ZookeeperServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_service.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_service.py
index 83b8f08..d642bc6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/zookeeper_service.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -40,4 +39,4 @@ def zookeeper_service(action='start'):
Execute(daemon_cmd,
user=params.zk_user
)
- Execute(rm_pid)
\ No newline at end of file
+ Execute(rm_pid)
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/hook.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/hook.py
index 5c023ae..bb68560 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/hook.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/hook.py
@@ -1,4 +1,3 @@
-##!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-RESTART/scripts/hook.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-RESTART/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-RESTART/scripts/hook.py
index 0596106..05977c3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-RESTART/scripts/hook.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-RESTART/scripts/hook.py
@@ -1,5 +1,3 @@
-##!/usr/bin/env python2.6
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py
index a9c7474..7018e95 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py
@@ -1,4 +1,3 @@
-##!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py
index 06bf583..d988c56 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -60,4 +59,4 @@ def hdfs(name=None):
File(os.path.join(params.hadoop_conf_dir, 'slaves'),
owner=tc_owner,
content=Template("slaves.j2")
- )
\ No newline at end of file
+ )
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py
index ab52cac..c44acfa 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -43,4 +42,4 @@ hadoop_home = "/usr"
if (('pig-log4j' in config['configurations']) and ('content' in config['configurations']['pig-log4j'])):
log4j_props = config['configurations']['pig-log4j']['content']
else:
- log4j_props = None
\ No newline at end of file
+ log4j_props = None
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py
index bf0ccd9..329a0bc 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -49,12 +48,12 @@ def pig():
def pig_TemplateConfig(name):
import params
-
+
if not isinstance(name, list):
name = [name]
-
+
for x in name:
TemplateConfig( format("{pig_conf_dir}/{x}"),
owner = params.hdfs_user
)
-
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig_client.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig_client.py
index fca2e0f..931dceb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig_client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -24,12 +23,12 @@ import sys
from resource_management import *
from pig import pig
-
+
class PigClient(Script):
def install(self, env):
self.install_packages(env)
self.configure(env)
-
+
def configure(self, env):
import params
env.set_params(params)
@@ -37,6 +36,6 @@ class PigClient(Script):
def status(self, env):
raise ClientComponentHasNoStatus()
-
+
if __name__ == "__main__":
PigClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/service_check.py
index 9fd0657..0e96a77 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -26,15 +25,15 @@ class PigServiceCheck(Script):
def service_check(self, env):
import params
env.set_params(params)
-
+
input_file = 'passwd'
output_file = "pigsmoke.out"
-
+
cleanup_cmd = format("dfs -rmr {output_file} {input_file}")
#cleanup put below to handle retries; if retrying there wil be a stale file that needs cleanup; exit code is fn of second command
create_file_cmd = format("{cleanup_cmd}; hadoop dfs -put /etc/passwd {input_file} ") #TODO: inconsistent that second command needs hadoop
test_cmd = format("fs -test -e {output_file}")
-
+
ExecuteHadoop( create_file_cmd,
tries = 3,
try_sleep = 5,
@@ -45,24 +44,24 @@ class PigServiceCheck(Script):
security_enabled = params.security_enabled,
kinit_path_local = params.kinit_path_local
)
-
+
File( '/tmp/pigSmoke.sh',
content = StaticFile("pigSmoke.sh"),
mode = 0755
)
-
+
Execute( "pig /tmp/pigSmoke.sh",
tries = 3,
try_sleep = 5,
path = '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
user = params.smokeuser
)
-
+
ExecuteHadoop( test_cmd,
user = params.smokeuser,
conf_dir = params.hadoop_conf_dir
)
-
+
if __name__ == "__main__":
PigServiceCheck().execute()
-
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/__init__.py
index a582077..35de4bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/__init__.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py
index 12d87b7..c401c4a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -80,4 +79,4 @@ HdfsDirectory = functools.partial(
security_enabled = security_enabled,
keytab = hdfs_user_keytab,
kinit_path_local = kinit_path_local
-)
\ No newline at end of file
+)
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py
index b03cb8a..5eaaf31 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -24,14 +23,14 @@ from resource_management import *
class WebHCatServiceCheck(Script):
def service_check(self, env):
import params
-
+
env.set_params(params)
-
+
File('/tmp/templetonSmoke.sh',
content= StaticFile('templetonSmoke.sh'),
mode=0755
)
-
+
cmd = format("/tmp/templetonSmoke.sh {webhcat_server_host[0]} {smokeuser} {smokeuser_keytab}"
" {security_param} {kinit_path_local}",
smokeuser_keytab=params.smoke_user_keytab if params.security_enabled else "no_keytab")
@@ -43,4 +42,4 @@ class WebHCatServiceCheck(Script):
logoutput=True)
if __name__ == "__main__":
- WebHCatServiceCheck().execute()
\ No newline at end of file
+ WebHCatServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py
index 65a7783..03c0e0c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -106,4 +105,4 @@ def webhcat():
dest_dir=params.webhcat_apps_dir,
kinnit_if_needed=kinit_if_needed,
hdfs_user=params.hdfs_user
- )
\ No newline at end of file
+ )
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py
index 4365111..2111fa4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_server.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -51,4 +50,4 @@ class WebHCatServer(Script):
check_process_status(status_params.pid_file)
if __name__ == "__main__":
- WebHCatServer().execute()
\ No newline at end of file
+ WebHCatServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_service.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_service.py
index 4b86338..a92446d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/webhcat_service.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/__init__.py
index a582077..35de4bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/__init__.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
index 77c3777..0719da8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -53,4 +52,4 @@ class ApplicationTimelineServer(Script):
check_process_status(status_params.yarn_historyserver_pid_file)
if __name__ == "__main__":
- ApplicationTimelineServer().execute()
\ No newline at end of file
+ ApplicationTimelineServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/historyserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/historyserver.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/historyserver.py
index 6736d40..d5c6db2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/historyserver.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/historyserver.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapred_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapred_service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapred_service_check.py
index 3b789f8..4685716 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapred_service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapred_service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -71,4 +70,4 @@ class MapReduce2ServiceCheck(Script):
)
if __name__ == "__main__":
- MapReduce2ServiceCheck().execute()
\ No newline at end of file
+ MapReduce2ServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapreduce2_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapreduce2_client.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapreduce2_client.py
index 54119a7..831e5e8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapreduce2_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/mapreduce2_client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/nodemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/nodemanager.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/nodemanager.py
index 473f50c..8e153e0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/nodemanager.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/nodemanager.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
index e85a2ee..c34a536 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/resourcemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/resourcemanager.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/resourcemanager.py
index 605d9bf..84f0c84 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/resourcemanager.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/resourcemanager.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service.py
index 0692c1b..d854565 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -60,4 +59,4 @@ def service(componentName, action='start', serviceName='yarn'):
rm_pid = format("rm -f {pid_file}")
Execute(rm_pid,
user=usr
- )
\ No newline at end of file
+ )
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service_check.py
index 135b30b..beae43a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -65,4 +64,4 @@ class ServiceCheck(Script):
)
if __name__ == "__main__":
- ServiceCheck().execute()
\ No newline at end of file
+ ServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py
index cfb21e5..a09a6d6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -144,7 +143,7 @@ def yarn(name = None):
group=params.yarn_executor_container_group,
mode=06050
)
-
+
File(format("{config_dir}/container-executor.cfg"),
group=params.user_group,
mode=0644,
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn_client.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn_client.py
index 7e9c564..f6b4b44 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn_client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -40,4 +39,4 @@ class YarnClient(Script):
raise ClientComponentHasNoStatus()
if __name__ == "__main__":
- YarnClient().execute()
\ No newline at end of file
+ YarnClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/__init__.py
index a582077..35de4bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/__init__.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,4 @@ limitations under the License.
Ambari Agent
-"""
\ No newline at end of file
+"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py
index 259f859..64e080e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/service_check.py
index 2f5fc96..3c809d8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/service_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -44,4 +43,4 @@ class ZookeeperServiceCheck(Script):
)
if __name__ == "__main__":
- ZookeeperServiceCheck().execute()
\ No newline at end of file
+ ZookeeperServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py
index c900043..4f3ee2f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_client.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_client.py
index 028a37d..4bffac3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_client.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -40,4 +39,4 @@ class ZookeeperClient(Script):
raise ClientComponentHasNoStatus()
if __name__ == "__main__":
- ZookeeperClient().execute()
\ No newline at end of file
+ ZookeeperClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_server.py
index e8cc264..9b9112c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_server.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -52,4 +51,4 @@ class ZookeeperServer(Script):
check_process_status(status_params.zk_pid_file)
if __name__ == "__main__":
- ZookeeperServer().execute()
\ No newline at end of file
+ ZookeeperServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e49df1a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_service.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_service.py
index 83b8f08..d642bc6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper_service.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.6
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -40,4 +39,4 @@ def zookeeper_service(action='start'):
Execute(daemon_cmd,
user=params.zk_user
)
- Execute(rm_pid)
\ No newline at end of file
+ Execute(rm_pid)