By default, the timeout is set to 60 seconds. To change it to 2 minutes, you have to set it to 120 seconds and you can do it using the following commands:
val sc = new SparkContext(new SparkConf())
./bin/spark-submit <all your existing options> --spark.worker.timeout=120