gpt4 book ai didi

org.apache.hadoop.yarn.server.utils.YarnServerSecurityUtils.authorizeRequest()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 01:57:31 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.hadoop.yarn.server.utils.YarnServerSecurityUtils.authorizeRequest()方法的一些代码示例,展示了YarnServerSecurityUtils.authorizeRequest()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnServerSecurityUtils.authorizeRequest()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.server.utils.YarnServerSecurityUtils
类名称:YarnServerSecurityUtils
方法名:authorizeRequest

YarnServerSecurityUtils.authorizeRequest介绍

[英]Authorizes the current request and returns the AMRMTokenIdentifier for the current application.
[中]授权当前请求并返回当前应用程序的AMRMTokenIdentifier。

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

private static ApplicationAttemptId getAppAttemptId() throws YarnException {
  AMRMTokenIdentifier amrmTokenIdentifier =
    YarnServerSecurityUtils.authorizeRequest();
  ApplicationAttemptId applicationAttemptId =
    amrmTokenIdentifier.getApplicationAttemptId();
  return applicationAttemptId;
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-nodemanager

/**
 * Authorizes the request and returns the application specific request
 * processing pipeline.
 *
 * @return the the intercepter wrapper instance
 * @throws YarnException if fails
 */
private RequestInterceptorChainWrapper authorizeAndGetInterceptorChain()
  throws YarnException {
 AMRMTokenIdentifier tokenIdentifier =
   YarnServerSecurityUtils.authorizeRequest();
 return getInterceptorChain(tokenIdentifier);
}

代码示例来源:origin: io.hops/hadoop-yarn-server-nodemanager

/**
 * Authorizes the request and returns the application specific request
 * processing pipeline.
 *
 * @return the the intercepter wrapper instance
 * @throws YarnException
 */
private RequestInterceptorChainWrapper authorizeAndGetInterceptorChain()
  throws YarnException {
 AMRMTokenIdentifier tokenIdentifier =
   YarnServerSecurityUtils.authorizeRequest();
 return getInterceptorChain(tokenIdentifier);
}

代码示例来源:origin: io.hops/hadoop-yarn-server-nodemanager

/**
 * This is called by the AMs started on this node to send heart beat to RM.
 * This method does the initial authorization and then forwards the request to
 * the application instance specific pipeline, which is a chain of request
 * intercepter objects. One application request processing pipeline is created
 * per AM instance.
 */
@Override
public AllocateResponse allocate(AllocateRequest request)
  throws YarnException, IOException {
 AMRMTokenIdentifier amrmTokenIdentifier =
   YarnServerSecurityUtils.authorizeRequest();
 RequestInterceptorChainWrapper pipeline =
   getInterceptorChain(amrmTokenIdentifier);
 AllocateResponse allocateResponse =
   pipeline.getRootInterceptor().allocate(request);
 updateAMRMTokens(amrmTokenIdentifier, pipeline, allocateResponse);
 return allocateResponse;
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-nodemanager

/**
 * This is called by the AMs started on this node to send heart beat to RM.
 * This method does the initial authorization and then forwards the request to
 * the application instance specific pipeline, which is a chain of request
 * intercepter objects. One application request processing pipeline is created
 * per AM instance.
 */
@Override
public AllocateResponse allocate(AllocateRequest request)
  throws YarnException, IOException {
 AMRMTokenIdentifier amrmTokenIdentifier =
   YarnServerSecurityUtils.authorizeRequest();
 RequestInterceptorChainWrapper pipeline =
   getInterceptorChain(amrmTokenIdentifier);
 AllocateResponse allocateResponse =
   pipeline.getRootInterceptor().allocate(request);
 updateAMRMTokens(amrmTokenIdentifier, pipeline, allocateResponse);
 return allocateResponse;
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

YarnServerSecurityUtils.authorizeRequest().getApplicationAttemptId();
ApplicationId appId = applicationAttemptId.getApplicationId();

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

YarnServerSecurityUtils.authorizeRequest();
ApplicationAttemptId applicationAttemptId =
  amrmTokenIdentifier.getApplicationAttemptId();

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

YarnServerSecurityUtils.authorizeRequest();

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com