/** * @return a new instance of {@link AlluxioMasterProcess} */ public static AlluxioMasterProcess create() { return create(MasterProcess.setupBindSocket(ServiceType.MASTER_RPC), MasterProcess.setupBindSocket(ServiceType.MASTER_WEB)); }
/** * @return the URI of the master */ public String getUri() { return Constants.HEADER_FT + mHostname + ":" + getLocalAlluxioMaster().getRpcLocalPort(); }
@Override public synchronized InetSocketAddress getAddress() throws UnavailableException { return mMasterInquireClient.getPrimaryRpcAddress(); } }
public static AlluxioJobMasterProcess create() { return create(MasterProcess.setupBindSocket(ServiceType.JOB_MASTER_RPC), MasterProcess.setupBindSocket(ServiceType.JOB_MASTER_WEB)); }
@Override public synchronized FileSystem getClient() throws IOException { return getLocalAlluxioMaster().getClient(); }
/** * @return true if the master is serving, false otherwise */ public boolean isServing() { return mMasterProcess.isServing(); }
/** * Restarts the master(s). */ public void restartMasters() throws Exception { stopMasters(); startMasters(); }
/** * @param address the master address */ public SingleMasterInquireClient(InetSocketAddress address) { mConnectDetails = new SingleMasterConnectDetails(address); }
/** * @return the URI of the master */ public String getUri() { return Constants.HEADER + mHostname + ":" + getRpcLocalPort(); }
/** * @return a {@link MasterHealthCheckClient} for the current builder values */ public HealthCheckClient build() { return new MasterHealthCheckClient(mAlluxioMasterName, mProcessCheck, mConf); } }
/** * Create an instance of a {@link MasterClientContextBuilder} which can be used to obtain and * instance of {@link MasterClientContext}. * * @param ctx The context to base * @return a builder for a {@link MasterClientContext} */ public static MasterClientContextBuilder newBuilder(ClientContext ctx) { return new MasterClientContextBuilder(ctx); }
/** * Creates a new master client base. * * @param clientConf master client configuration * @param address address to connect to * @param retryPolicySupplier retry policy to use */ public AbstractMasterClient(MasterClientContext clientConf, InetSocketAddress address, Supplier<RetryPolicy> retryPolicySupplier) { super(clientConf, address, retryPolicySupplier); mMasterInquireClient = clientConf.getMasterInquireClient(); }
/** * @return a new builder */ public static Builder newBuilder() { return new Builder(); }
/** * @param masterAddresses the potential master addresses * @param retryPolicySupplier the retry policy supplier * @param alluxioConf Alluxio configuration */ public PollingMasterInquireClient(List<InetSocketAddress> masterAddresses, Supplier<RetryPolicy> retryPolicySupplier, AlluxioConfiguration alluxioConf) { mConnectDetails = new MultiMasterConnectDetails(masterAddresses); mRetryPolicySupplier = retryPolicySupplier; mConfiguration = alluxioConf; }
@Override public void stopMasters() throws Exception { mMaster.stop(); } }
@Override public FileSystem getClient(FileSystemContext context) throws IOException { return getLocalAlluxioMaster().getClient(context); }
/** * @return the RPC port of the master */ public int getMasterRpcPort() { return mMaster.getRpcLocalPort(); }