There is a property of Spark which lets you set the recovery mode. To set Zookeeper as the recovery mode, try the below commands:
val sc = new SparkContext(new SparkConf())
./bin/spark-submit <all your existing options> --spark.deploy.recoveryMode=ZOOKEEPER