Alluxio Error:java.lang.IllegalArgumentException: Wrong FS Alluxio Error:java.lang.IllegalArgumentException: Wrong FS hadoop hadoop

Alluxio Error:java.lang.IllegalArgumentException: Wrong FS


The problem comes from the call to

FileSystem fs = FileSystem.get(conf);

on line 101. The FileSystem created by FileSystem.get(conf) will only support paths with the scheme defined by Hadoop's fs.defaultFS property. To fix the error, change that line to

FileSystem fs = FileSystem.get(URI.create("alluxio://nn1:19998/", conf)

By passing a URI, you override fs.defaultFS, enabling the created FileSystem to support paths using the alluxio:// scheme.

You could also fix the error by modifying fs.defaultFS in your core-site.xml

<property>  <name>fs.defaultFS</name>  <value>alluxio://nn1:19998/</value></property>

However, this could impact other systems that share the core-site.xml file, so I recommend the first approach of passing an alluxio:// URI to FileSystem.get()