Java 类org.apache.hadoop.yarn.api.protocolrecords.ReleaseSharedCacheResourceResponse 实例源码

项目:hadoop    文件:ClientSCMProtocolPBClientImpl.java   
@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;
  }
}
项目:hadoop    文件:ClientProtocolService.java   
@Override
public ReleaseSharedCacheResourceResponse release(
    ReleaseSharedCacheResourceRequest request) throws YarnException,
    IOException {

  ReleaseSharedCacheResourceResponse response =
      recordFactory
          .newRecordInstance(ReleaseSharedCacheResourceResponse.class);

  UserGroupInformation callerUGI;
  try {
    callerUGI = UserGroupInformation.getCurrentUser();
  } catch (IOException ie) {
    LOG.info("Error getting UGI ", ie);
    throw RPCUtil.getRemoteException(ie);
  }

  boolean removed =
      this.store.removeResourceReference(
          request.getResourceKey(),
          new SharedCacheResourceReference(request.getAppId(), callerUGI
              .getShortUserName()), true);

  if (removed) {
    this.metrics.incCacheRelease();
  }

  return response;
}
项目:aliyun-oss-hadoop-fs    文件:ClientSCMProtocolPBClientImpl.java   
@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;
  }
}
项目:aliyun-oss-hadoop-fs    文件:ClientProtocolService.java   
@Override
public ReleaseSharedCacheResourceResponse release(
    ReleaseSharedCacheResourceRequest request) throws YarnException,
    IOException {

  ReleaseSharedCacheResourceResponse response =
      recordFactory
          .newRecordInstance(ReleaseSharedCacheResourceResponse.class);

  UserGroupInformation callerUGI;
  try {
    callerUGI = UserGroupInformation.getCurrentUser();
  } catch (IOException ie) {
    LOG.info("Error getting UGI ", ie);
    throw RPCUtil.getRemoteException(ie);
  }

  boolean removed =
      this.store.removeResourceReference(
          request.getResourceKey(),
          new SharedCacheResourceReference(request.getAppId(), callerUGI
              .getShortUserName()), true);

  if (removed) {
    this.metrics.incCacheRelease();
  }

  return response;
}
项目:big-c    文件:ClientSCMProtocolPBClientImpl.java   
@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;
  }
}
项目:big-c    文件:ClientProtocolService.java   
@Override
public ReleaseSharedCacheResourceResponse release(
    ReleaseSharedCacheResourceRequest request) throws YarnException,
    IOException {

  ReleaseSharedCacheResourceResponse response =
      recordFactory
          .newRecordInstance(ReleaseSharedCacheResourceResponse.class);

  UserGroupInformation callerUGI;
  try {
    callerUGI = UserGroupInformation.getCurrentUser();
  } catch (IOException ie) {
    LOG.info("Error getting UGI ", ie);
    throw RPCUtil.getRemoteException(ie);
  }

  boolean removed =
      this.store.removeResourceReference(
          request.getResourceKey(),
          new SharedCacheResourceReference(request.getAppId(), callerUGI
              .getShortUserName()), true);

  if (removed) {
    this.metrics.incCacheRelease();
  }

  return response;
}
项目:hops    文件:ClientSCMProtocolPBClientImpl.java   
@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;
  }
}
项目:hops    文件:ClientProtocolService.java   
@Override
public ReleaseSharedCacheResourceResponse release(
    ReleaseSharedCacheResourceRequest request) throws YarnException,
    IOException {

  ReleaseSharedCacheResourceResponse response =
      recordFactory
          .newRecordInstance(ReleaseSharedCacheResourceResponse.class);

  UserGroupInformation callerUGI;
  try {
    callerUGI = UserGroupInformation.getCurrentUser();
  } catch (IOException ie) {
    LOG.info("Error getting UGI ", ie);
    throw RPCUtil.getRemoteException(ie);
  }

  boolean removed =
      this.store.removeResourceReference(
          request.getResourceKey(),
          new SharedCacheResourceReference(request.getAppId(), callerUGI
              .getShortUserName()), true);

  if (removed) {
    this.metrics.incCacheRelease();
  }

  return response;
}
项目:hadoop    文件:ClientSCMProtocol.java   
/**
 * <p>
 * The interface used by clients to release a resource with the
 * <code>SharedCacheManager.</code> This method is called once an application
 * is no longer using a claimed resource in the shared cache. The client uses
 * a checksum to identify the resource and an {@link ApplicationId} to
 * identify which application is releasing the resource.
 * </p>
 *
 * <p>
 * Note: This method is an optimization and the client is not required to call
 * it for correctness.
 * </p>
 *
 * <p>
 * Currently the <code>SharedCacheManager</code> sends an empty response.
 * </p>
 *
 * @param request request to release a resource in the shared cache
 * @return (empty) response on releasing the resource
 * @throws YarnException
 * @throws IOException
 */
public ReleaseSharedCacheResourceResponse release(
    ReleaseSharedCacheResourceRequest request) throws YarnException, IOException;
项目:aliyun-oss-hadoop-fs    文件:ClientSCMProtocol.java   
/**
 * <p>
 * The interface used by clients to release a resource with the
 * <code>SharedCacheManager.</code> This method is called once an application
 * is no longer using a claimed resource in the shared cache. The client uses
 * a checksum to identify the resource and an {@link ApplicationId} to
 * identify which application is releasing the resource.
 * </p>
 *
 * <p>
 * Note: This method is an optimization and the client is not required to call
 * it for correctness.
 * </p>
 *
 * <p>
 * Currently the <code>SharedCacheManager</code> sends an empty response.
 * </p>
 *
 * @param request request to release a resource in the shared cache
 * @return (empty) response on releasing the resource
 * @throws YarnException
 * @throws IOException
 */
public ReleaseSharedCacheResourceResponse release(
    ReleaseSharedCacheResourceRequest request) throws YarnException, IOException;
项目:big-c    文件:ClientSCMProtocol.java   
/**
 * <p>
 * The interface used by clients to release a resource with the
 * <code>SharedCacheManager.</code> This method is called once an application
 * is no longer using a claimed resource in the shared cache. The client uses
 * a checksum to identify the resource and an {@link ApplicationId} to
 * identify which application is releasing the resource.
 * </p>
 *
 * <p>
 * Note: This method is an optimization and the client is not required to call
 * it for correctness.
 * </p>
 *
 * <p>
 * Currently the <code>SharedCacheManager</code> sends an empty response.
 * </p>
 *
 * @param request request to release a resource in the shared cache
 * @return (empty) response on releasing the resource
 * @throws YarnException
 * @throws IOException
 */
public ReleaseSharedCacheResourceResponse release(
    ReleaseSharedCacheResourceRequest request) throws YarnException, IOException;
项目:hops    文件:ClientSCMProtocol.java   
/**
 * <p>
 * The interface used by clients to release a resource with the
 * <code>SharedCacheManager.</code> This method is called once an application
 * is no longer using a claimed resource in the shared cache. The client uses
 * a checksum to identify the resource and an {@link ApplicationId} to
 * identify which application is releasing the resource.
 * </p>
 *
 * <p>
 * Note: This method is an optimization and the client is not required to call
 * it for correctness.
 * </p>
 *
 * <p>
 * Currently the <code>SharedCacheManager</code> sends an empty response.
 * </p>
 *
 * @param request request to release a resource in the shared cache
 * @return (empty) response on releasing the resource
 * @throws YarnException
 * @throws IOException
 */
public ReleaseSharedCacheResourceResponse release(
    ReleaseSharedCacheResourceRequest request) throws YarnException, IOException;