@NotThreadSafe public final class LocalAlluxioMaster extends Object
LocalAlluxioCluster
and MultiMasterLocalAlluxioCluster.
Isolated is defined as having its own root directory, and port.| Modifier and Type | Method and Description |
|---|---|
void |
clearClients()
Clears all the clients.
|
static LocalAlluxioMaster |
create()
Creates a new local Alluxio master with an isolated work directory and port.
|
static LocalAlluxioMaster |
create(String workDirectory)
Creates a new local Alluxio master with a isolated port.
|
InetSocketAddress |
getAddress() |
FileSystem |
getClient() |
AlluxioMaster |
getInternalMaster() |
String |
getJournalFolder() |
String |
getRPCBindHost()
Gets the actual bind hostname on RPC service (used by unit test only).
|
int |
getRPCLocalPort()
Gets the actual port that the RPC service is listening on (used by unit test only).
|
String |
getUri() |
String |
getWebBindHost()
Gets the actual bind hostname on web service (used by unit test only).
|
int |
getWebLocalPort()
Gets the actual port that the web service is listening on (used by unit test only).
|
boolean |
isServing() |
void |
kill()
Kills the master thread, by calling
Thread.interrupt(). |
void |
start()
Starts the master.
|
void |
stop()
Stops the master and cleans up client connections.
|
public static LocalAlluxioMaster create() throws IOException
IOException - when unable to do file operation or listen on portpublic static LocalAlluxioMaster create(String workDirectory) throws IOException
workDirectory - Alluxio work directory, this method will create it if it doesn't exist yetIOException - when unable to do file operation or listen on portpublic void start()
public boolean isServing()
public void stop()
throws Exception
Exception - when the operation failspublic void kill()
throws Exception
Thread.interrupt().Exception - if master thread cannot be interruptedpublic void clearClients()
throws IOException
IOException - if the client pool cannot be closedpublic InetSocketAddress getAddress()
public AlluxioMaster getInternalMaster()
AlluxioMasterpublic String getRPCBindHost()
public int getRPCLocalPort()
public String getWebBindHost()
public int getWebLocalPort()
public String getUri()
public FileSystem getClient() throws IOException
IOException - if the client cannot be retrievedpublic String getJournalFolder()
Copyright © 2016. All Rights Reserved.