@NotThreadSafe public abstract class UnderFileSystemCluster extends Object
| Constructor and Description |
|---|
UnderFileSystemCluster(String baseDir) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
cleanup()
Cleans up the test environment over underfs cluster system, so that we can re-use the running
system for the next test round instead of turning on/off it from time to time.
|
static UnderFileSystemCluster |
get() |
static UnderFileSystemCluster |
get(String baseDir)
Creates an underfs test bed and register the shutdown hook.
|
abstract String |
getUnderFilesystemAddress() |
static UnderFileSystemCluster |
getUnderFilesystemCluster(String baseDir)
Gets the
UnderFileSystemCluster. |
static String |
getUnderFSClass() |
abstract boolean |
isStarted() |
void |
registerJVMOnExistHook()
Adds a shutdown hook.
|
abstract void |
shutdown()
Stops the underfs cluster system.
|
abstract void |
start()
Starts the underfs cluster system.
|
protected String mBaseDir
public UnderFileSystemCluster(String baseDir)
baseDir - the base directorypublic static UnderFileSystemCluster get()
public static UnderFileSystemCluster get(String baseDir) throws IOException
baseDir - base directoryIOExceptionpublic static UnderFileSystemCluster getUnderFilesystemCluster(String baseDir)
UnderFileSystemCluster.baseDir - the base directoryUnderFileSystemClusterpublic static String getUnderFSClass()
UnderFileSystem class namepublic abstract void cleanup()
throws IOException
IOExceptionpublic abstract String getUnderFilesystemAddress()
public abstract boolean isStarted()
public void registerJVMOnExistHook()
throws IOException
shutdown() phase will be automatically called while the
process exists.IOExceptionpublic abstract void shutdown()
throws IOException
IOExceptionpublic abstract void start()
throws IOException
IOExceptionCopyright © 2017. All Rights Reserved.