spark提交文件支持路径类型

发布时间 2023-11-30 20:46:30作者: MuXinu

spark-submit  提交文件支持的路径类型

类似以下参数

--files
--jars
--archives

--conf spark.yarn.jars
--conf spark.yarn.archive
--conf spark.yarn.dist.archives
--conf spark.yarn.dist.files
--conf spark.yarn.dist.jars
  1. 本地文件系统路径

    spark-submit --files file:/path/to/your/local/file
  2. HDFS 路径 

    spark-submit --files hdfs:///path/to/your/hdfs/file
  3. HTTP/HTTPS URL

    spark-submit --files https://example.com/path/to/your/remote/file
    或
    spark-submit --files http://example.com/path/to/your/remote/file

    注意:使用 HTTP/HTTPS URL 需要确保集群节点能够访问这个 URL。

  4. 本地 Maven 仓库依赖项

    spark-submit --files maven://groupId:artifactId:version

    这样 Spark 将尝试从 Maven 仓库下载指定的依赖项。