SPARK-1565, update examples to be used with spark-submit script.