Java Code Examples for org.apache.hadoop.yarn.ipc.RPCUtil#unwrapAndThrowException()

The following examples show how to use org.apache.hadoop.yarn.ipc.RPCUtil#unwrapAndThrowException() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ResourceManagerAdministrationProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public RefreshNodesResponse refreshNodes(RefreshNodesRequest request)
throws YarnException, IOException {
  RefreshNodesRequestProto requestProto = 
    ((RefreshNodesRequestPBImpl)request).getProto();
  try {
    return new RefreshNodesResponsePBImpl(
        proxy.refreshNodes(null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 2
Source File: ApplicationClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetDelegationTokenResponse getDelegationToken(
    GetDelegationTokenRequest request) throws YarnException,
    IOException {
  GetDelegationTokenRequestProto requestProto =
      ((GetDelegationTokenRequestPBImpl) request).getProto();
  try {
    return new GetDelegationTokenResponsePBImpl(proxy.getDelegationToken(
      null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 3
Source File: ResourceManagerAdministrationProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public RefreshServiceAclsResponse refreshServiceAcls(
    RefreshServiceAclsRequest request) throws YarnException,
    IOException {
  RefreshServiceAclsRequestProto requestProto = 
      ((RefreshServiceAclsRequestPBImpl)request).getProto();
  try {
    return new RefreshServiceAclsResponsePBImpl(proxy.refreshServiceAcls(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 4
Source File: ResourceManagerAdministrationProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public RefreshAdminAclsResponse refreshAdminAcls(
    RefreshAdminAclsRequest request) throws YarnException, IOException {
  RefreshAdminAclsRequestProto requestProto = 
    ((RefreshAdminAclsRequestPBImpl)request).getProto();
  try {
    return new RefreshAdminAclsResponsePBImpl(
        proxy.refreshAdminAcls(null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 5
Source File: ContainerManagementProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public StopContainersResponse stopContainers(StopContainersRequest requests)
    throws YarnException, IOException {
  StopContainersRequestProto requestProto =
      ((StopContainersRequestPBImpl) requests).getProto();
  try {
    return new StopContainersResponsePBImpl(proxy.stopContainers(null,
      requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 6
Source File: ContainerManagementProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public StartContainersResponse
    startContainers(StartContainersRequest requests) throws YarnException,
        IOException {
  StartContainersRequestProto requestProto =
      ((StartContainersRequestPBImpl) requests).getProto();
  try {
    return new StartContainersResponsePBImpl(proxy.startContainers(null,
      requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 7
Source File: ClientSCMProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public ReleaseSharedCacheResourceResponse release(
    ReleaseSharedCacheResourceRequest request) throws YarnException,
    IOException {
  ReleaseSharedCacheResourceRequestProto requestProto =
      ((ReleaseSharedCacheResourceRequestPBImpl) request).getProto();
  try {
    return new ReleaseSharedCacheResourceResponsePBImpl(proxy.release(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 8
Source File: ClientSCMProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public UseSharedCacheResourceResponse use(
    UseSharedCacheResourceRequest request) throws YarnException, IOException {
  UseSharedCacheResourceRequestProto requestProto =
      ((UseSharedCacheResourceRequestPBImpl) request).getProto();
  try {
    return new UseSharedCacheResourceResponsePBImpl(proxy.use(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 9
Source File: ApplicationClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetClusterNodesResponse
    getClusterNodes(GetClusterNodesRequest request)
        throws YarnException, IOException {
  GetClusterNodesRequestProto requestProto =
      ((GetClusterNodesRequestPBImpl) request).getProto();
  try {
    return new GetClusterNodesResponsePBImpl(proxy.getClusterNodes(null,
      requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 10
Source File: ApplicationClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetContainersResponse getContainers(GetContainersRequest request)
    throws YarnException, IOException {
  GetContainersRequestProto requestProto =
      ((GetContainersRequestPBImpl) request).getProto();
  try {
    return new GetContainersResponsePBImpl(proxy.getContainers(null,
      requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 11
Source File: TensorFlowClusterPBClientImpl.java    From TensorFlowOnYARN with Apache License 2.0 5 votes vote down vote up
@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;
  }
}
 
Example 12
Source File: ResourceManagerAdministrationProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public AddToClusterNodeLabelsResponse addToClusterNodeLabels(
    AddToClusterNodeLabelsRequest request) throws YarnException, IOException {
  AddToClusterNodeLabelsRequestProto requestProto =
      ((AddToClusterNodeLabelsRequestPBImpl) request).getProto();
  try {
    return new AddToClusterNodeLabelsResponsePBImpl(
        proxy.addToClusterNodeLabels(null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 13
Source File: ResourceManagerAdministrationProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public RefreshQueuesResponse refreshQueues(RefreshQueuesRequest request)
    throws YarnException, IOException {
  RefreshQueuesRequestProto requestProto = 
    ((RefreshQueuesRequestPBImpl)request).getProto();
  try {
    return new RefreshQueuesResponsePBImpl(
        proxy.refreshQueues(null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 14
Source File: ApplicationClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetNewApplicationResponse getNewApplication(
    GetNewApplicationRequest request) throws YarnException,
    IOException {
  GetNewApplicationRequestProto requestProto =
      ((GetNewApplicationRequestPBImpl) request).getProto();
  try {
    return new GetNewApplicationResponsePBImpl(proxy.getNewApplication(null,
      requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 15
Source File: ApplicationClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public MoveApplicationAcrossQueuesResponse moveApplicationAcrossQueues(
    MoveApplicationAcrossQueuesRequest request) throws YarnException,
    IOException {
  MoveApplicationAcrossQueuesRequestProto requestProto =
      ((MoveApplicationAcrossQueuesRequestPBImpl) request).getProto();
  try {
    return new MoveApplicationAcrossQueuesResponsePBImpl(
        proxy.moveApplicationAcrossQueues(null, requestProto));

  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 16
Source File: ApplicationHistoryProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetApplicationsResponse
    getApplications(GetApplicationsRequest request) throws YarnException,
        IOException {
  GetApplicationsRequestProto requestProto =
      ((GetApplicationsRequestPBImpl) request).getProto();
  try {
    return new GetApplicationsResponsePBImpl(proxy.getApplications(null,
      requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 17
Source File: ApplicationClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetApplicationAttemptReportResponse getApplicationAttemptReport(
    GetApplicationAttemptReportRequest request) throws YarnException,
    IOException {
  GetApplicationAttemptReportRequestProto requestProto =
      ((GetApplicationAttemptReportRequestPBImpl) request).getProto();
  try {
    return new GetApplicationAttemptReportResponsePBImpl(
      proxy.getApplicationAttemptReport(null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 18
Source File: ApplicationClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetContainerReportResponse getContainerReport(
    GetContainerReportRequest request) throws YarnException, IOException {
  GetContainerReportRequestProto requestProto =
      ((GetContainerReportRequestPBImpl) request).getProto();
  try {
    return new GetContainerReportResponsePBImpl(proxy.getContainerReport(
      null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 19
Source File: ApplicationClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetLabelsToNodesResponse getLabelsToNodes(
    GetLabelsToNodesRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetLabelsToNodesRequestProto requestProto =
      ((GetLabelsToNodesRequestPBImpl) request).getProto();
  try {
    return new GetLabelsToNodesResponsePBImpl(proxy.getLabelsToNodes(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
Example 20
Source File: ResourceManagerAdministrationProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public RefreshSuperUserGroupsConfigurationResponse refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
    throws YarnException, IOException {
  RefreshSuperUserGroupsConfigurationRequestProto requestProto = 
    ((RefreshSuperUserGroupsConfigurationRequestPBImpl)request).getProto();
  try {
    return new RefreshSuperUserGroupsConfigurationResponsePBImpl(
        proxy.refreshSuperUserGroupsConfiguration(null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}