/** * Waits for a new master to start until a timeout occurs. * * @param timeoutMs the number of milliseconds to wait before giving up and throwing an exception */ public void waitForNewMaster(int timeoutMs) throws TimeoutException, InterruptedException { CommonUtils.waitFor("the new leader master to start", () -> getLeaderIndex() != -1, WaitForOptions.defaults().setTimeoutMs(timeoutMs)); }
/** * @return the URI of the master */ public String getUri() { return Constants.HEADER_FT + mHostname + ":" + getLocalAlluxioMaster().getRpcLocalPort(); }
@Override public void initConfiguration() throws IOException { setAlluxioWorkDirectory(); setHostname(); for (Map.Entry<PropertyKey, String> entry : ConfigurationTestUtils .testConfigurationDefaults(ServerConfiguration.global(), mHostname, mWorkDirectory) .entrySet()) { ServerConfiguration.set(entry.getKey(), entry.getValue()); } ServerConfiguration.set(PropertyKey.MASTER_RPC_PORT, 0); ServerConfiguration.set(PropertyKey.TEST_MODE, true); ServerConfiguration.set(PropertyKey.MASTER_WEB_PORT, 0); ServerConfiguration.set(PropertyKey.PROXY_WEB_PORT, 0); ServerConfiguration.set(PropertyKey.WORKER_RPC_PORT, 0); ServerConfiguration.set(PropertyKey.WORKER_WEB_PORT, 0); }
@Override public synchronized FileSystem getClient() throws IOException { return getLocalAlluxioMaster().getClient(); }
@Override public Boolean apply(Void input) { return getLeaderIndex() != -1; } }, WaitForOptions.defaults().setTimeoutMs(timeoutMs));
@Override public FileSystem getClient(FileSystemContext context) throws IOException { return getLocalAlluxioMaster().getClient(context); }
String.valueOf(getLocalAlluxioMaster().getRpcLocalPort()));
/** * @return the URI of the master */ public String getUri() { return Constants.HEADER_FT + mHostname + ":" + getLocalAlluxioMaster().getRpcLocalPort(); }
@Override public synchronized FileSystem getClient() throws IOException { return getLocalAlluxioMaster().getClient(); }
@Override public FileSystem getClient(FileSystemContext context) throws IOException { return getLocalAlluxioMaster().getClient(context); }
String.valueOf(getLocalAlluxioMaster().getRpcLocalPort()));