route-transition 钩子函数。 Spark有个关于是否允许一个application存在多个SparkContext实例的配置项, 如下: spark.driver.allowMultipleContexts: If true, log warnings instead of throwing exceptions when multiple SparkContexts are active.