Search in sources :

Example 1 with SleepingUnderFileSystem

use of alluxio.testutils.underfs.sleeping.SleepingUnderFileSystem in project alluxio by Alluxio.

the class JournalShutdownIntegrationTest method mountUnmount.

/**
 * @param fs Filesystem client
 * @return a spied UFS factory mounted to and then unmounted from fs
 */
private UnderFileSystemFactory mountUnmount(FileSystem fs) throws Exception {
    SleepingUnderFileSystem sleepingUfs = new SleepingUnderFileSystem(new AlluxioURI("sleep:///"), new SleepingUnderFileSystemOptions(), UnderFileSystemConfiguration.defaults(ServerConfiguration.global()));
    SleepingUnderFileSystemFactory sleepingUfsFactory = new SleepingUnderFileSystemFactory(sleepingUfs);
    UnderFileSystemFactoryRegistry.register(sleepingUfsFactory);
    fs.mount(new AlluxioURI("/mnt"), new AlluxioURI("sleep:///"));
    fs.unmount(new AlluxioURI("/mnt"));
    return spy(sleepingUfsFactory);
}
Also used : SleepingUnderFileSystemFactory(alluxio.testutils.underfs.sleeping.SleepingUnderFileSystemFactory) SleepingUnderFileSystem(alluxio.testutils.underfs.sleeping.SleepingUnderFileSystem) SleepingUnderFileSystemOptions(alluxio.testutils.underfs.sleeping.SleepingUnderFileSystemOptions) AlluxioURI(alluxio.AlluxioURI)

Aggregations

AlluxioURI (alluxio.AlluxioURI)1 SleepingUnderFileSystem (alluxio.testutils.underfs.sleeping.SleepingUnderFileSystem)1 SleepingUnderFileSystemFactory (alluxio.testutils.underfs.sleeping.SleepingUnderFileSystemFactory)1 SleepingUnderFileSystemOptions (alluxio.testutils.underfs.sleeping.SleepingUnderFileSystemOptions)1