private void checkReservationSystem() throws YarnException { // Check if reservation is enabled if (reservationSystem == null) { throw RPCUtil.getRemoteException("Reservation is not enabled." + " Please enable & try again"); } }
private static <T extends IOException> T instantiateIOException( Class<? extends T> cls, RemoteException re) throws RemoteException { return instantiateException(cls, re); }
@Override public RegisterTensorBoardUrlResponse registerTensorBoardUrl(RegisterTensorBoardUrlRequest request) throws YarnException, IOException { YarnTensorFlowClusterProtos.RegisterTensorBoardUrlRequestProto requestProto = ((RegisterTensorBoardUrlRequestPBImpl) request).getProto(); try { return new RegisterTensorBoardUrlResponsePBImpl(proxy.registerTensorBoardUrl(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
@Override public Empty finishApplication(Empty request) throws YarnException, IOException { YarnTensorFlowClusterProtos.EmptyProto requestProto = ((EmptyPBImpl) request).getProto(); try { return new EmptyPBImpl(proxy.finishApplication(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
@Override public HeartbeatResponse taskExecutorHeartbeat(HeartbeatRequest request) throws YarnException, IOException { HeartbeatRequestProto requestProto = ((HeartbeatRequestPBImpl) request).getProto(); try { return new HeartbeatResponsePBImpl(proxy.taskExecutorHeartbeat(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
private void checkReservationSytem(String auditConstant) throws YarnException { // Check if reservation is enabled if (reservationSystem == null) { throw RPCUtil.getRemoteException("Reservation is not enabled." + " Please enable & try again"); } }
private static <T extends RuntimeException> T instantiateRuntimeException( Class<? extends T> cls, RemoteException re) throws RemoteException { return instantiateException(cls, re); }
@Override public GetClusterSpecResponse getClusterSpec(GetClusterSpecRequest request) throws YarnException, IOException { GetClusterSpecRequestProto requestProto = ((GetClusterSpecRequestPBImpl) request).getProto(); try { return new GetClusterSpecResponsePBImpl(proxy.getClusterSpec(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
private void checkReservationSytem(String auditConstant) throws YarnException { // Check if reservation is enabled if (reservationSystem == null) { throw RPCUtil.getRemoteException("Reservation is not enabled." + " Please enable & try again"); } }
private static <T extends YarnException> T instantiateYarnException( Class<? extends T> cls, RemoteException re) throws RemoteException { return instantiateException(cls, re); }
@Override public RegisterWorkerSpecResponse registerWorkerSpec(RegisterWorkerSpecRequest request) throws YarnException, IOException { RegisterWorkerSpecRequestProto requestProto = ((RegisterWorkerSpecRequestPBImpl) request).getProto(); try { return new RegisterWorkerSpecResponsePBImpl(proxy.registerWorkerSpec(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
private void addStartingContainer(StartedContainer startedContainer) throws YarnException { if (startedContainers.putIfAbsent(startedContainer.containerId, startedContainer) != null) { throw RPCUtil.getRemoteException("Container " + startedContainer.containerId.toString() + " is already started"); } }
@Override public RegisterExecutionResultResponse registerExecutionResult(RegisterExecutionResultRequest request) throws YarnException, IOException { YarnTensorFlowClusterProtos.RegisterExecutionResultRequestProto requestProto = ((RegisterExecutionResultRequestPBImpl) request).getProto(); try { return new RegisterExecutionResultResponsePBImpl(proxy.registerExecutionResult(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
private YarnException logAndWrapException(Exception exception, String user, String operation, String msg) throws YarnException { LOG.warn("Exception " + msg, exception); RMAuditLogger.logFailure(user, operation, "", "AdminService", "Exception " + msg); return RPCUtil.getRemoteException(exception); }
@Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) throws YarnException, IOException { RegisterNodeManagerRequestProto requestProto = ((RegisterNodeManagerRequestPBImpl)request).getProto(); try { return new RegisterNodeManagerResponsePBImpl(proxy.registerNodeManager(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
private UserGroupInformation checkAcls(String method) throws YarnException { try { return checkAccess(method); } catch (IOException ioe) { throw RPCUtil.getRemoteException(ioe); } }
@Override public AllocateResponse allocate(AllocateRequest request) throws YarnException, IOException { AllocateRequestProto requestProto = ((AllocateRequestPBImpl) request).getProto(); try { return new AllocateResponsePBImpl(proxy.allocate(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
private UserGroupInformation checkAcls(String method) throws YarnException { try { return checkAccess(method); } catch (IOException ioe) { throw RPCUtil.getRemoteException(ioe); } }
@Override public AllocateResponse allocate(AllocateRequest request) throws YarnException, IOException { AllocateRequestProto requestProto = ((AllocateRequestPBImpl) request).getProto(); try { return new AllocateResponsePBImpl(proxy.allocate(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
private void addStartingContainer(StartedContainer startedContainer) throws YarnException { if (startedContainers.putIfAbsent(startedContainer.containerId, startedContainer) != null) { throw RPCUtil.getRemoteException("Container " + startedContainer.containerId.toString() + " is already started"); } }