ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject git commit: AMBARI-4845. Remove test code from component script files in stack definition (aonishuk)
Date Wed, 26 Feb 2014 15:59:14 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 43077b30d -> 0a1cf22d1


AMBARI-4845. Remove test code from component script files in stack
definition (aonishuk)


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

Branch: refs/heads/trunk
Commit: 0a1cf22d12bf388db54286b8a5dc121c83c190e7
Parents: 43077b3
Author: Andrew Onischuk <aonishuk@hortonworks.com>
Authored: Wed Feb 26 07:58:22 2014 -0800
Committer: Andrew Onischuk <aonishuk@hortonworks.com>
Committed: Wed Feb 26 07:59:04 2014 -0800

----------------------------------------------------------------------
 .../services/HBASE/package/scripts/hbase_client.py     | 11 +----------
 .../services/HBASE/package/scripts/hbase_master.py     | 12 +-----------
 .../HBASE/package/scripts/hbase_regionserver.py        | 10 +---------
 .../services/HBASE/package/scripts/service_check.py    | 12 ++----------
 .../services/NAGIOS/package/scripts/nagios_server.py   | 13 ++-----------
 .../services/OOZIE/package/scripts/oozie_client.py     | 11 +----------
 .../services/OOZIE/package/scripts/oozie_server.py     | 11 +----------
 .../services/OOZIE/package/scripts/service_check.py    | 12 +-----------
 .../1.3.2/services/PIG/package/scripts/pig_client.py   | 10 ----------
 .../services/PIG/package/scripts/service_check.py      | 12 ------------
 .../services/HBASE/package/scripts/hbase_client.py     | 11 +----------
 .../services/HBASE/package/scripts/hbase_master.py     | 12 +-----------
 .../HBASE/package/scripts/hbase_regionserver.py        | 10 +---------
 .../services/HBASE/package/scripts/service_check.py    |  9 ---------
 .../services/NAGIOS/package/scripts/nagios_server.py   | 12 +-----------
 .../services/OOZIE/package/scripts/oozie_client.py     | 10 ----------
 .../services/OOZIE/package/scripts/oozie_server.py     | 10 ----------
 .../services/OOZIE/package/scripts/service_check.py    | 10 ----------
 .../2.0.6/services/PIG/package/scripts/pig_client.py   | 10 ----------
 .../services/PIG/package/scripts/service_check.py      | 12 ------------
 .../2.1.1/services/TEZ/package/scripts/tez_client.py   |  9 ---------
 21 files changed, 14 insertions(+), 215 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_client.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_client.py
index 01ca548..043ad11 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_client.py
@@ -38,15 +38,6 @@ class HbaseClient(Script):
   def status(self, env):
     raise ClientComponentHasNoStatus()
 
-#for tests
-def main():
-  command_type = 'install'
-  command_data_file = '/root/workspace/HBase/input.json'
-  basedir = '/root/workspace/HBase/'
-  stdoutfile = '/1.txt'
-  sys.argv = ["", command_type, command_data_file, basedir, stdoutfile]
-  
-  HbaseClient().execute()
-  
+
 if __name__ == "__main__":
   HbaseClient().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_master.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_master.py
index 4b36eb2..1073dd9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_master.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_master.py
@@ -65,16 +65,6 @@ class HbaseMaster(Script):
 
     hbase_decommission(env)
 
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "install"
-  print "Running "+command_type
-  command_data_file = '/var/lib/ambari-agent/data/command-3.json'
-  basedir = '/root/ambari/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HBASE/package'
-  stroutputf = '/1.txt'
-  sys.argv = ["", command_type, command_data_file, basedir, stroutputf]
-  
-  HbaseMaster().execute()
-  
+
 if __name__ == "__main__":
   HbaseMaster().execute()
-  #main()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_regionserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_regionserver.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_regionserver.py
index 49528d3..232b500 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_regionserver.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_regionserver.py
@@ -61,14 +61,6 @@ class HbaseRegionServer(Script):
   def decommission(self, env):
     print "Decommission not yet implemented!"
     
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "stop"
-  print "Running "+command_type
-  command_data_file = '/root/workspace/HBase/input.json'
-  basedir = '/root/workspace/HBase/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  HbaseRegionServer().execute()
-  
+
 if __name__ == "__main__":
   HbaseRegionServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/service_check.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/service_check.py
index 1e28c6b..460c650 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/service_check.py
@@ -73,16 +73,8 @@ class HbaseServiceCheck(Script):
       user = params.smoke_test_user,
       logoutput = True
     )
-    
-def main():
-  import sys
-  command_type = 'perform'
-  command_data_file = '/root/workspace/HBase/input.json'
-  basedir = '/root/workspace/HBase/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  HbaseServiceCheck().execute()
-  
+
+
 if __name__ == "__main__":
   HbaseServiceCheck().execute()
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/nagios_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/nagios_server.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/nagios_server.py
index f2e9635..32b6cd9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/nagios_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/nagios_server.py
@@ -97,16 +97,7 @@ def update_ignorable(params):
     finally:
       if f is not None:
         f.close()
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "install"
-  print "Running "+command_type
-  command_data_file = '/var/lib/ambari-agent/data/command-3.json'
-  basedir = '/root/ambari/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package'
-  stroutfile = '/1.txt'
-  sys.argv = ["", command_type, command_data_file, basedir, stroutfile]
-  
-  NagiosServer().execute()
-  
+
+
 if __name__ == "__main__":
-  #main()
   NagiosServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_client.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_client.py
index 23fdc12..d38bfb8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_client.py
@@ -39,15 +39,6 @@ class OozieClient(Script):
   def status(self, env):
     raise ClientComponentHasNoStatus()
     
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "install"
-  print "Running "+command_type
-  command_data_file = '/root/workspace/Oozie/input.json'
-  basedir = '/root/workspace/Oozie/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  OozieClient().execute()
-  
+
 if __name__ == "__main__":
-  #main()
   OozieClient().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_server.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_server.py
index 513e9e6..502a9d3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/oozie_server.py
@@ -51,15 +51,6 @@ class OozieServer(Script):
     env.set_params(status_params)
     check_process_status(status_params.pid_file)
     
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "start"
-  print "Running "+command_type
-  command_data_file = '/root/workspace/Oozie/input.json'
-  basedir = '/root/workspace/Oozie/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  OozieServer().execute()
-  
+
 if __name__ == "__main__":
-  #main()
   OozieServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/service_check.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/service_check.py
index 7dbfc87..8c4d9d0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/package/scripts/service_check.py
@@ -31,17 +31,7 @@ def oozie_smoke_shell_file(
     try_sleep = 5,
     logoutput = True
   )
-    
-def main():
-  import sys
-  command_type = 'service_check'
-  command_data_file = '/root/workspace/Oozie/input.json'
-  basedir = '/root/workspace/Oozie/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  OozieServiceCheck().execute()
-  
+
 if __name__ == "__main__":
   OozieServiceCheck().execute()
-  #main()
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/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 acd0cb1..fca2e0f 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
@@ -38,15 +38,5 @@ class PigClient(Script):
   def status(self, env):
     raise ClientComponentHasNoStatus()
     
-#for tests
-def main():
-  command_type = 'install'
-  command_data_file = '/root/workspace/Pig/input.json'
-  basedir = '/root/workspace/Pig/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  PigClient().execute()
-  
 if __name__ == "__main__":
-  #main()
   PigClient().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/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 1cfced2..5dd0935 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
@@ -64,18 +64,6 @@ class PigServiceCheck(Script):
       conf_dir = params.hadoop_conf_dir
     )
     
-def main():
-  command_type = "service_check"
-  print "Running "+command_type
-  command_data_file = '/var/lib/ambari-agent/data/command-2.json'
-  basedir = '/root/ambari/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package'
-  stroutfile = '/1.txt'
-  import sys
-  sys.argv = ["", command_type, command_data_file, basedir, stroutfile]
-  
-  PigServiceCheck().execute()
-  
 if __name__ == "__main__":
-  #main()
   PigServiceCheck().execute()
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_client.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_client.py
index 01ca548..043ad11 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_client.py
@@ -38,15 +38,6 @@ class HbaseClient(Script):
   def status(self, env):
     raise ClientComponentHasNoStatus()
 
-#for tests
-def main():
-  command_type = 'install'
-  command_data_file = '/root/workspace/HBase/input.json'
-  basedir = '/root/workspace/HBase/'
-  stdoutfile = '/1.txt'
-  sys.argv = ["", command_type, command_data_file, basedir, stdoutfile]
-  
-  HbaseClient().execute()
-  
+
 if __name__ == "__main__":
   HbaseClient().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_master.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_master.py
index 4b36eb2..1073dd9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_master.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_master.py
@@ -65,16 +65,6 @@ class HbaseMaster(Script):
 
     hbase_decommission(env)
 
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "install"
-  print "Running "+command_type
-  command_data_file = '/var/lib/ambari-agent/data/command-3.json'
-  basedir = '/root/ambari/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HBASE/package'
-  stroutputf = '/1.txt'
-  sys.argv = ["", command_type, command_data_file, basedir, stroutputf]
-  
-  HbaseMaster().execute()
-  
+
 if __name__ == "__main__":
   HbaseMaster().execute()
-  #main()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_regionserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_regionserver.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_regionserver.py
index 49528d3..232b500 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_regionserver.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase_regionserver.py
@@ -61,14 +61,6 @@ class HbaseRegionServer(Script):
   def decommission(self, env):
     print "Decommission not yet implemented!"
     
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "stop"
-  print "Running "+command_type
-  command_data_file = '/root/workspace/HBase/input.json'
-  basedir = '/root/workspace/HBase/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  HbaseRegionServer().execute()
-  
+
 if __name__ == "__main__":
   HbaseRegionServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/service_check.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/service_check.py
index 1e28c6b..c9adad3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/service_check.py
@@ -74,15 +74,6 @@ class HbaseServiceCheck(Script):
       logoutput = True
     )
     
-def main():
-  import sys
-  command_type = 'perform'
-  command_data_file = '/root/workspace/HBase/input.json'
-  basedir = '/root/workspace/HBase/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  HbaseServiceCheck().execute()
-  
 if __name__ == "__main__":
   HbaseServiceCheck().execute()
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/nagios_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/nagios_server.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/nagios_server.py
index e3c3448..32b6cd9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/nagios_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/nagios_server.py
@@ -98,16 +98,6 @@ def update_ignorable(params):
       if f is not None:
         f.close()
 
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "install"
-  print "Running "+command_type
-  command_data_file = '/var/lib/ambari-agent/data/command-3.json'
-  basedir = '/root/ambari/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package'
-  stroutfile = '/1.txt'
-  sys.argv = ["", command_type, command_data_file, basedir, stroutfile]
-  
-  NagiosServer().execute()
-  
+
 if __name__ == "__main__":
-  #main()
   NagiosServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_client.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_client.py
index 1d5db39..c589b60 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_client.py
@@ -19,15 +19,5 @@ class OozieClient(Script):
   def status(self, env):
     raise ClientComponentHasNoStatus()
     
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "install"
-  print "Running "+command_type
-  command_data_file = '/root/workspace/Oozie/input.json'
-  basedir = '/root/workspace/Oozie/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  OozieClient().execute()
-  
 if __name__ == "__main__":
-  #main()
   OozieClient().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_server.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_server.py
index dc37bff..07e8230 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_server.py
@@ -32,15 +32,5 @@ class OozieServer(Script):
     env.set_params(status_params)
     check_process_status(status_params.pid_file)
     
-def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "start"
-  print "Running "+command_type
-  command_data_file = '/root/workspace/Oozie/input.json'
-  basedir = '/root/workspace/Oozie/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  OozieServer().execute()
-  
 if __name__ == "__main__":
-  #main()
   OozieServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
index 7c1c1f2..857270d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/service_check.py
@@ -52,16 +52,6 @@ def oozie_smoke_shell_file(
     logoutput = True
   )
     
-def main():
-  import sys
-  command_type = 'service_check'
-  command_data_file = '/root/workspace/Oozie/input.json'
-  basedir = '/root/workspace/Oozie/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  OozieServiceCheck().execute()
-  
 if __name__ == "__main__":
   OozieServiceCheck().execute()
-  #main()
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/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 acd0cb1..fca2e0f 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
@@ -38,15 +38,5 @@ class PigClient(Script):
   def status(self, env):
     raise ClientComponentHasNoStatus()
     
-#for tests
-def main():
-  command_type = 'install'
-  command_data_file = '/root/workspace/Pig/input.json'
-  basedir = '/root/workspace/Pig/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-  
-  PigClient().execute()
-  
 if __name__ == "__main__":
-  #main()
   PigClient().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/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 1cfced2..5dd0935 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
@@ -64,18 +64,6 @@ class PigServiceCheck(Script):
       conf_dir = params.hadoop_conf_dir
     )
     
-def main():
-  command_type = "service_check"
-  print "Running "+command_type
-  command_data_file = '/var/lib/ambari-agent/data/command-2.json'
-  basedir = '/root/ambari/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package'
-  stroutfile = '/1.txt'
-  import sys
-  sys.argv = ["", command_type, command_data_file, basedir, stroutfile]
-  
-  PigServiceCheck().execute()
-  
 if __name__ == "__main__":
-  #main()
   PigServiceCheck().execute()
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1cf22d/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/TEZ/package/scripts/tez_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/TEZ/package/scripts/tez_client.py
b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/TEZ/package/scripts/tez_client.py
index 5c8c4aa..95a9b88 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/TEZ/package/scripts/tez_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/TEZ/package/scripts/tez_client.py
@@ -37,15 +37,6 @@ class TezClient(Script):
   def status(self, env):
     raise ClientComponentHasNoStatus()
 
-#for tests
-def main():
-  command_type = 'install'
-  command_data_file = '/root/workspace/Pig/input.json'
-  basedir = '/root/workspace/Pig/main'
-  sys.argv = ["", command_type, command_data_file, basedir]
-
-  TezClient().execute()
 
 if __name__ == "__main__":
-  #main()
   TezClient().execute()


Mime
View raw message