gpt4 book ai didi

org.apache.gobblin.yarn.YarnContainerSecurityManager类的使用及代码示例

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

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

YarnContainerSecurityManager介绍

[英]A class for managing token renewing in the containers including the container for the GobblinApplicationMaster.

This class implements a simple monitor for modifications on the token file and reloads tokens in the token file if the file has been modified and adds the tokens to the credentials of the current login user.
[中]用于管理容器中的令牌续订的类,包括GobblinApplicationMaster的容器。
这个类实现了一个对令牌文件修改的简单监控,如果文件已被修改,则在令牌文件中重新加载令牌,并将令牌添加到当前登录用户的凭据中。

代码示例

代码示例来源:origin: apache/incubator-gobblin

/**
 * Build the {@link YarnContainerSecurityManager} for the Application Master.
 */
private YarnContainerSecurityManager buildYarnContainerSecurityManager(Config config, FileSystem fs) {
 return new YarnContainerSecurityManager(config, fs, this.eventBus);
}

代码示例来源:origin: apache/incubator-gobblin

@SuppressWarnings("unused")
@Subscribe
public void handleTokenFileUpdatedEvent(DelegationTokenUpdatedEvent delegationTokenUpdatedEvent) {
 try {
  addDelegationTokens(readDelegationTokens(this.tokenFilePath));
 } catch (IOException ioe) {
  throw Throwables.propagate(ioe);
 }
}

代码示例来源:origin: apache/incubator-gobblin

@Test(dependsOnMethods = "testWriteDelegationTokenToFile")
public void testYarnContainerSecurityManager() throws IOException {
 Collection<Token<?>> tokens = this.yarnContainerSecurityManager.readDelegationTokens(this.tokenFilePath);
 assertToken(tokens);
 this.yarnContainerSecurityManager.addDelegationTokens(tokens);
 assertToken(UserGroupInformation.getCurrentUser().getTokens());
}

代码示例来源:origin: apache/incubator-gobblin

@Override
public List<Service> getServices() {
 List<Service> services = new ArrayList<>();
 if (this.config.hasPath(GobblinYarnConfigurationKeys.KEYTAB_FILE_PATH)) {
  LOGGER.info("Adding YarnContainerSecurityManager since login is keytab based");
  services.add(new YarnContainerSecurityManager(this.config, this.fs, this.eventBus));
 }
 return services;
}

代码示例来源:origin: org.apache.gobblin/gobblin-yarn

@SuppressWarnings("unused")
@Subscribe
public void handleTokenFileUpdatedEvent(DelegationTokenUpdatedEvent delegationTokenUpdatedEvent) {
 try {
  addDelegationTokens(readDelegationTokens(this.tokenFilePath));
 } catch (IOException ioe) {
  throw Throwables.propagate(ioe);
 }
}

代码示例来源:origin: apache/incubator-gobblin

this.yarnAppSecurityManager =
  new YarnAppSecurityManager(config, this.helixManager, this.localFs, this.tokenFilePath);
this.yarnContainerSecurityManager = new YarnContainerSecurityManager(config, this.localFs, new EventBus());

代码示例来源:origin: org.apache.gobblin/gobblin-yarn

/**
 * Build the {@link YarnContainerSecurityManager} for the Application Master.
 */
private YarnContainerSecurityManager buildYarnContainerSecurityManager(Config config, FileSystem fs) {
 return new YarnContainerSecurityManager(config, fs, this.eventBus);
}

代码示例来源:origin: org.apache.gobblin/gobblin-yarn

@Override
public List<Service> getServices() {
 List<Service> services = new ArrayList<>();
 if (this.config.hasPath(GobblinYarnConfigurationKeys.KEYTAB_FILE_PATH)) {
  LOGGER.info("Adding YarnContainerSecurityManager since login is keytab based");
  services.add(new YarnContainerSecurityManager(this.config, this.fs, this.eventBus));
 }
 return services;
}

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