use of alluxio.underfs.local.LocalUnderFileSystemFactory in project alluxio by Alluxio.
the class MultiUfsMountIntegrationTest method before.
@Before
public void before() throws Exception {
mUfsFactory1 = new ConfExpectingUnderFileSystemFactory("ufs1", UFS_CONF1);
mUfsFactory2 = new ConfExpectingUnderFileSystemFactory("ufs2", UFS_CONF2);
mUfsFactory3 = new ConfExpectingUnderFileSystemFactory("ufs3", UFS_CONF3);
mUfsFactory4 = new ConfExpectingUnderFileSystemFactory("ufs4", UFS_CONF4);
UnderFileSystemFactoryRegistry.register(mUfsFactory1);
UnderFileSystemFactoryRegistry.register(mUfsFactory2);
UnderFileSystemFactoryRegistry.register(mUfsFactory3);
UnderFileSystemFactoryRegistry.register(mUfsFactory4);
mUfsUri1 = "ufs1://" + mFolder.newFolder().getAbsoluteFile();
mUfsUri2 = "ufs2://" + mFolder.newFolder().getAbsoluteFile();
mUfsUri3 = "ufs3://" + mFolder.newFolder().getAbsoluteFile();
mUfsUri4 = "ufs4://" + mFolder.newFolder().getAbsoluteFile();
mLocalUfs = new LocalUnderFileSystemFactory().create(mFolder.getRoot().getAbsolutePath(), UnderFileSystemConfiguration.defaults(ServerConfiguration.global()));
mLocalAlluxioCluster = mLocalAlluxioClusterResource.get();
mFileSystem = mLocalAlluxioCluster.getClient();
// Mount ufs1 to /mnt1 with specified options.
MountPOptions options1 = MountPOptions.newBuilder().putAllProperties(UFS_CONF1).build();
mFileSystem.mount(mMountPoint1, new AlluxioURI(mUfsUri1), options1);
// Mount ufs2 to /mnt2 with specified options.
MountPOptions options2 = MountPOptions.newBuilder().putAllProperties(UFS_CONF2).build();
mFileSystem.mount(mMountPoint2, new AlluxioURI(mUfsUri2), options2);
}
Aggregations