Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/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
Java Hadoop分布式缓存可以添加FileToClassPath.class文件,还是仅限于.jar文件?_Java_Hadoop - Fatal编程技术网

Java Hadoop分布式缓存可以添加FileToClassPath.class文件,还是仅限于.jar文件?

Java Hadoop分布式缓存可以添加FileToClassPath.class文件,还是仅限于.jar文件?,java,hadoop,Java,Hadoop,我尝试了以下方法: DistributedCache.addFileToClassPath(new Path("something.jar"), config); DistributedCache.addFileToClassPath(new Path("something.class"),config); 第一个有效,第二个无效。addFileToClassPath是否仅适用于JAR?这看起来很奇怪,因为还有一个addArchiveToClassPath方法

我尝试了以下方法:

DistributedCache.addFileToClassPath(new Path("something.jar"), config);
DistributedCache.addFileToClassPath(new Path("something.class"),config);
第一个有效,第二个无效。addFileToClassPath是否仅适用于JAR?这看起来很奇怪,因为还有一个addArchiveToClassPath方法