Repository: ambari Updated Branches: refs/heads/branch-2.2 467045c66 -> a6d73a064
AMBARI-14512. Add service check script for spark (Jeff Zhang via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a6d73a06 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a6d73a06 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a6d73a06 Branch: refs/heads/branch-2.2 Commit: a6d73a064cd10bb0e8672a6628133ad26ff4ea32 Parents: 467045c Author: Sumit Mohanty <smoha...@hortonworks.com> Authored: Tue Jan 5 19:52:53 2016 -0800 Committer: Sumit Mohanty <smoha...@hortonworks.com> Committed: Tue Jan 5 19:57:13 2016 -0800 ---------------------------------------------------------------------- .../SPARK/1.2.0.2.2/package/scripts/service_check.py | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a6d73a06/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/service_check.py index 694f046..c004654 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/service_check.py @@ -39,5 +39,14 @@ class SparkServiceCheck(Script): logoutput=True ) + # Run SparkPi to verify spark + if Script.is_hdp_stack_greater_or_equal("2.4"): + command = "spark-submit --class org.apache.spark.examples.SparkPi --master yarn-client /usr/hdp/current/spark-client/lib/spark-examples*.jar 10" + Execute(command, + tries = 10, + try_sleep = 3, + user = params.spark_user, + logoutput=True) + if __name__ == "__main__": SparkServiceCheck().execute()