Spark batch mode runnable now

The performance is still bad in batch mode.