Description Usage Arguments Details Note Examples
The path passed can be either a local file, a file in HDFS (or other Hadoop-supported filesystems), or an HTTP, HTTPS or FTP URI. To access the file in Spark jobs, use spark.getSparkFiles(fileName) to find its download location.
1 | spark.addFile(path, recursive = FALSE)
|
path |
The path of the file to be added |
recursive |
Whether to add files recursively from the path. Default is FALSE. |
A directory can be given if the recursive option is set to true. Currently directories are only supported for Hadoop-supported filesystems. Refer Hadoop-supported filesystems at https://cwiki.apache.org/confluence/display/HADOOP2/HCFS.
Note: A path can be added only once. Subsequent additions of the same path are ignored.
spark.addFile since 2.1.0
1 2 3 4 | ## Not run:
spark.addFile("~/myfile")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.