当前位置: 首页>>代码示例>>Java>>正文


Java ClientToAMTokenSelector类代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.security.client.ClientToAMTokenSelector的典型用法代码示例。如果您正苦于以下问题:Java ClientToAMTokenSelector类的具体用法?Java ClientToAMTokenSelector怎么用?Java ClientToAMTokenSelector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ClientToAMTokenSelector类属于org.apache.hadoop.yarn.security.client包,在下文中一共展示了ClientToAMTokenSelector类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTokenInfo

import org.apache.hadoop.yarn.security.client.ClientToAMTokenSelector; //导入依赖的package包/类
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }
  };
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:TestClientToAMTokens.java

示例2: getTokenInfo

import org.apache.hadoop.yarn.security.client.ClientToAMTokenSelector; //导入依赖的package包/类
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol.equals(MRClientProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }
  };
}
 
开发者ID:naver,项目名称:hadoop,代码行数:20,代码来源:MRClientSecurityInfo.java

示例3: recoverAppAttemptTokens

import org.apache.hadoop.yarn.security.client.ClientToAMTokenSelector; //导入依赖的package包/类
private void recoverAppAttemptTokens(Credentials appAttemptTokens) {
  if (appAttemptTokens == null) {
    return;
  }
  if (UserGroupInformation.isSecurityEnabled()) {

    ClientToAMTokenSelector clientToAMTokenSelector =
        new ClientToAMTokenSelector();
    this.clientToAMToken =
        clientToAMTokenSelector.selectToken(new Text(),
          appAttemptTokens.getAllTokens());
  }

  // Only one AMRMToken is stored per-attempt, so this should be fine. Can't
  // use TokenSelector as service may change - think fail-over.
  this.amrmToken =
      (Token<AMRMTokenIdentifier>) appAttemptTokens
        .getToken(RMStateStore.AM_RM_TOKEN_SERVICE);

  // For now, no need to populate tokens back to AMRMTokenSecretManager,
  // because running attempts are rebooted. Later in work-preserve restart,
  // we'll create NEW->RUNNING transition in which the restored tokens will be
  // added to the secret manager
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:25,代码来源:RMAppAttemptImpl.java

示例4: getTokenInfo

import org.apache.hadoop.yarn.security.client.ClientToAMTokenSelector; //导入依赖的package包/类
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol.equals(SliderClusterProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }

    @Override
    public String toString() {
      return "SliderClusterProtocolPB token info";
    }
  };
}
 
开发者ID:apache,项目名称:incubator-slider,代码行数:25,代码来源:SliderRPCSecurityInfo.java

示例5: getTokenInfo

import org.apache.hadoop.yarn.security.client.ClientToAMTokenSelector; //导入依赖的package包/类
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol.equals(DAGClientAMProtocolBlockingPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }
  };
}
 
开发者ID:apache,项目名称:incubator-tez,代码行数:20,代码来源:DAGClientSecurityInfo.java


注:本文中的org.apache.hadoop.yarn.security.client.ClientToAMTokenSelector类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。