@NotThreadSafe public abstract class UnderFileSystemCluster extends Object
| Constructor and Description |
|---|
UnderFileSystemCluster(String baseDir) |
| Modifier and Type | Method and Description |
|---|---|
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 directoryIOException - when the operation failspublic static UnderFileSystemCluster getUnderFilesystemCluster(String baseDir)
UnderFileSystemCluster.baseDir - the base directoryUnderFileSystemClusterpublic static String getUnderFSClass()
UnderFileSystem class namepublic void cleanup()
throws IOException
IOException - when the operation failspublic abstract String getUnderFilesystemAddress()
public abstract boolean isStarted()
public void registerJVMOnExistHook()
throws IOException
shutdown() phase will be automatically called while the
process exists.IOException - when the operation failspublic abstract void shutdown()
throws IOException
IOException - when the operation failspublic abstract void start()
throws IOException
IOException - when the operation failsCopyright © 2016. All Rights Reserved.