Repository: ambari Updated Branches: refs/heads/trunk d97b62946 -> aa8c7fad8
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/aa8c7fad Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aa8c7fad Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aa8c7fad Branch: refs/heads/trunk Commit: aa8c7fad8686af8933b7fec7c2aad3de765a800a Parents: d97b629 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:52:53 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/aa8c7fad/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()