@NotThreadSafe public abstract class UnderFileSystemCluster extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
mBaseDir |
protected Configuration |
mConfiguration |
| Constructor and Description |
|---|
UnderFileSystemCluster(String baseDir,
Configuration configuration) |
| 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,
Configuration configuration)
Creates an underfs test bed and register the shutdown hook.
|
abstract String |
getUnderFilesystemAddress() |
static UnderFileSystemCluster |
getUnderFilesystemCluster(String baseDir,
Configuration configuration)
Gets the
UnderFileSystemCluster. |
abstract boolean |
isStarted() |
static boolean |
readEOFReturnsNegative()
This method is only used by the alluxio.client.FileOutStreamIntegrationTest unit-test.
|
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
protected final Configuration mConfiguration
public UnderFileSystemCluster(String baseDir, Configuration configuration)
baseDir - the base directoryconfiguration - the configuration for Alluxiopublic static UnderFileSystemCluster get()
public static UnderFileSystemCluster get(String baseDir, Configuration configuration) throws IOException
baseDir - base directoryconfiguration - Alluxio configurationIOException - when the operation failspublic static UnderFileSystemCluster getUnderFilesystemCluster(String baseDir, Configuration configuration)
UnderFileSystemCluster.baseDir - the base directoryconfiguration - the configuration for AlluxioUnderFileSystemClusterpublic static boolean readEOFReturnsNegative()
public 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.