/** * <p>Create a new instance of AMRMClientAsync.</p> * * @param intervalMs heartbeat interval in milliseconds between AM and RM * @param callbackHandler callback handler that processes responses from * the <code>ResourceManager</code> */ public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync( int intervalMs, AbstractCallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(intervalMs, callbackHandler); }
/** * Registers this application master with the resource manager. On successful * registration, starts the heartbeating thread. * * @param appHostName Name of the host on which master is running * @param appHostPort Port master is listening on * @param appTrackingUrl URL at which the master info can be seen * @return Register AM Response. * @throws YarnException * @throws IOException */ public RegisterApplicationMasterResponse registerApplicationMaster( String appHostName, int appHostPort, String appTrackingUrl) throws YarnException, IOException { return registerApplicationMaster( appHostName, appHostPort, appTrackingUrl, null); }
@Override public synchronized void removeContainerRequest(T req) { super.removeContainerRequest(req); boolean hasLocality = (req.getNodes() != null && !req.getNodes().isEmpty()) || (req.getRacks() != null && !req.getRacks().isEmpty()); LocalityRequestCounter lrc = knownRequestsByPriority.get( req.getPriority()); if (hasLocality) { lrc.localityRequests.decrementAndGet(); } else { lrc.noLocalityRequests.decrementAndGet(); } if (lrc.localityRequests.get() == 0 && lrc.noLocalityRequests.get() == 0) { knownRequestsByPriority.remove(req.getPriority()); } }
@Override public synchronized void addContainerRequest(T req) { super.addContainerRequest(req); boolean hasLocality = (req.getNodes() != null && !req.getNodes().isEmpty()) || (req.getRacks() != null && !req.getRacks().isEmpty()); LocalityRequestCounter lrc = knownRequestsByPriority.get(req.getPriority()); if (lrc == null) { lrc = new LocalityRequestCounter(); knownRequestsByPriority.put(req.getPriority(), lrc); } if (hasLocality) { lrc.localityRequests.incrementAndGet(); } else { lrc.noLocalityRequests.incrementAndGet(); } }
/** * <p>Create a new instance of AMRMClientAsync.</p> * * @param intervalMs heartbeat interval in milliseconds between AM and RM * @param callbackHandler callback handler that processes responses from * the <code>ResourceManager</code> */ public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync( int intervalMs, AbstractCallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(intervalMs, callbackHandler); }
public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync(AMRMClient<T> client, int intervalMs, CallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(client, intervalMs, callbackHandler); }
public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync(AMRMClient<T> client, int intervalMs, CallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(client, intervalMs, callbackHandler); }
/** * <p>Create a new instance of AMRMClientAsync.</p> * * @param client the AMRMClient instance * @param intervalMs heartbeat interval in milliseconds between AM and RM * @param callbackHandler callback handler that processes responses from * the <code>ResourceManager</code> */ public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync( AMRMClient<T> client, int intervalMs, AbstractCallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(client, intervalMs, callbackHandler); }
public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync(int intervalMs, CallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(intervalMs, callbackHandler); }
public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync(int intervalMs, CallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(intervalMs, callbackHandler); }
/** * <p>Create a new instance of AMRMClientAsync.</p> * * @param client the AMRMClient instance * @param intervalMs heartbeat interval in milliseconds between AM and RM * @param callbackHandler callback handler that processes responses from * the <code>ResourceManager</code> */ public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync( AMRMClient<T> client, int intervalMs, AbstractCallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(client, intervalMs, callbackHandler); }
/** * * @deprecated Use {@link #createAMRMClientAsync(int, * AMRMClientAsync.AbstractCallbackHandler)} instead. */ @Deprecated public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync(int intervalMs, CallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(intervalMs, callbackHandler); }
/** * * @deprecated Use {@link #createAMRMClientAsync(AMRMClient, * int, AMRMClientAsync.AbstractCallbackHandler)} instead. */ @Deprecated public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync(AMRMClient<T> client, int intervalMs, CallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(client, intervalMs, callbackHandler); }
/** * * @deprecated Use {@link #createAMRMClientAsync(int, * AMRMClientAsync.AbstractCallbackHandler)} instead. */ @Deprecated public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync(int intervalMs, CallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(intervalMs, callbackHandler); }
/** * * @deprecated Use {@link #createAMRMClientAsync(AMRMClient, * int, AMRMClientAsync.AbstractCallbackHandler)} instead. */ @Deprecated public static <T extends ContainerRequest> AMRMClientAsync<T> createAMRMClientAsync(AMRMClient<T> client, int intervalMs, CallbackHandler callbackHandler) { return new AMRMClientAsyncImpl<T>(client, intervalMs, callbackHandler); }