[SPARK-1161] Adding an optional batchSize with default value 10