add spark mode (from Spark-0.9.0, not in Spark-1.0.0)