【发布时间】:2017-04-06 22:17:06
【问题描述】:
根据火花docs,
要开始使用,您需要在 spark 类路径中包含特定数据库的 JDBC 驱动程序。例如,要从 Spark Shell 连接到 postgres,您需要运行以下命令:
bin/spark-shell --driver-class-path postgresql-9.4.1207.jar --jars postgresql-9.4.1207.jar
没有--driver-class-path,作业也能正常工作。那么,spark命令中--driver-class-path有什么用呢?
【问题讨论】:
-
--driver-class-path标志是特定于驱动程序的,而--jars标志将 JAR 分发并添加到驱动程序和执行程序的 CP。
标签: apache-spark