question on starting LocalAlluxioCuster

39 views
Skip to first unread message

Antonio Si

unread,
May 27, 2016, 9:16:44 PM5/27/16
to Alluxio Users
Hi,

I am trying to write tests by starting a LocalAlluxioCluster and I am getting the following error:

java.lang.IllegalArgumentException: No Under File System Factory found for: /mnt/alluxio_default_home
at alluxio.underfs.UnderFileSystemRegistry.create(UnderFileSystemRegistry.java:107)
at alluxio.underfs.UnderFileSystem.get(UnderFileSystem.java:105)
at alluxio.underfs.UnderFileSystem.get(UnderFileSystem.java:89)
at alluxio.util.UnderFileSystemUtils.deleteDir(UnderFileSystemUtils.java:37)
at alluxio.master.AbstractLocalAlluxioCluster.setupTest(AbstractLocalAlluxioCluster.java:223)
at alluxio.master.AbstractLocalAlluxioCluster.start(AbstractLocalAlluxioCluster.java:98)

Does it mean that I miss configuring the UnderFs for the local cluster? How do I set it up? Any
example code I can look at?

Thanks.

Antonio.

Bin Fan

unread,
May 27, 2016, 9:27:30 PM5/27/16
to Alluxio Users
to use localAlluxioCluster, you don't really need to set up dir specially.
many files in tests/ can serve as examples.
see FileSystemUtilsIntegrationTest.java for instance.

Antonio Si

unread,
Jun 1, 2016, 3:54:03 PM6/1/16
to Alluxio Users
Thanks Bin.

Here is my code to start the mini cluster:

Configuration conf = new Configuration();
conf.set(Constants.HOME, "file://"+TEST_PATH);
this.localAlluxioCluster.start(conf);

I am now getting the following exception:

java.lang.NullPointerException
at alluxio.underfs.local.LocalUnderFileSystem.mkdirs(LocalUnderFileSystem.java:200)
at alluxio.util.UnderFileSystemUtils.mkdirIfNotExists(UnderFileSystemUtils.java:56)
at alluxio.master.AbstractLocalAlluxioCluster.setupTest(AbstractLocalAlluxioCluster.java:226)
at alluxio.master.AbstractLocalAlluxioCluster.start(AbstractLocalAlluxioCluster.java:98)

Looking at the LocalUderFileSystem code at line 200:

   while (!parent.exists()) {
      dirsToMake.push(parent);
      parent = parent.getParentFile();
    }

Should the while loop check if parent != null as well?

Thanks.

Antonio.

Bin Fan

unread,
Jun 1, 2016, 4:24:29 PM6/1/16
to Antonio Si, Alluxio Users
Hi Antonio,

LocalAlluxioCluster is not a real cluster having master and worker processes. 
It is only a mock class for developers to test functions with both Master/Worker launched in the same process locally.
Is this fitting your scenario? 

If yes, LocalAlluxioCluster will take care of the home directory during tests and you do need to specify anything special. 

- Bin

--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alluxio-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages