Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用自定义Hadoop文件系统Spark_Hadoop_Apache Spark_Yarn - Fatal编程技术网

使用自定义Hadoop文件系统Spark

使用自定义Hadoop文件系统Spark,hadoop,apache-spark,yarn,Hadoop,Apache Spark,Yarn,我已经有一个带有Thread的集群,配置为在core-site.xml中使用自定义Hadoop文件系统: <property> <name>fs.custom.impl</name> <value>package.of.custom.class.CustomFileSystem</value> </property> fs.custom.impl package.of.custom.class.Custo

我已经有一个带有Thread的集群,配置为在core-site.xml中使用自定义Hadoop文件系统:

<property>
    <name>fs.custom.impl</name>
    <value>package.of.custom.class.CustomFileSystem</value>
</property>

fs.custom.impl
package.of.custom.class.CustomFileSystem
我想在这个纱线集群上运行一个Spark作业,它从这个定制文件系统读取一个输入RDD:

final JavaPairRDD<String, String> files = 
        sparkContext.wholeTextFiles("custom://path/to/directory");
final javapairdd文件=
sparkContext.wholeTextFiles(“custom://path/to/directory");

有没有办法不用重新配置Spark就可以做到这一点?i、 e.我可以将Spark指向现有的core-site.xml吗?最好的方法是什么?

HADOOP\u CONF\u DIR
设置到包含
core-site.xml
的目录。(这记录在中。)


您仍然需要确保
package.of.custom.class.CustomFileSystem
位于类路径上。

谢谢,我没有看到这个!