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


Java JobACL.values方法代码示例

本文整理汇总了Java中org.apache.hadoop.mapreduce.JobACL.values方法的典型用法代码示例。如果您正苦于以下问题:Java JobACL.values方法的具体用法?Java JobACL.values怎么用?Java JobACL.values使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.mapreduce.JobACL的用法示例。


在下文中一共展示了JobACL.values方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: constructJobACLs

import org.apache.hadoop.mapreduce.JobACL; //导入方法依赖的package包/类
/**
 * Construct the jobACLs from the configuration so that they can be kept in
 * the memory. If authorization is disabled on the JT, nothing is constructed
 * and an empty map is returned.
 * 
 * @return JobACL to AccessControlList map.
 */
public Map<JobACL, AccessControlList> constructJobACLs(Configuration conf) {

  Map<JobACL, AccessControlList> acls =
      new HashMap<JobACL, AccessControlList>();

  // Don't construct anything if authorization is disabled.
  if (!areACLsEnabled()) {
    return acls;
  }

  for (JobACL aclName : JobACL.values()) {
    String aclConfigName = aclName.getAclName();
    String aclConfigured = conf.get(aclConfigName);
    if (aclConfigured == null) {
      // If ACLs are not configured at all, we grant no access to anyone. So
      // jobOwner and cluster administrator _only_ can do 'stuff'
      aclConfigured = " ";
    }
    acls.put(aclName, new AccessControlList(aclConfigured));
  }
  return acls;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:30,代码来源:JobACLsManager.java

示例2: getJobAcls

import org.apache.hadoop.mapreduce.JobACL; //导入方法依赖的package包/类
/** Get the acls configured for the job **/
public Map<JobACL, AccessControlList> getJobAcls() {
  Map<JobACL, AccessControlList> jobAcls =
      new HashMap<JobACL, AccessControlList>();
  for (JobACL jobACL : JobACL.values()) {
    Utf8 jobACLsUtf8 = new Utf8(jobACL.getAclName());
    if (datum.acls.containsKey(jobACLsUtf8)) {
      jobAcls.put(jobACL, new AccessControlList(datum.acls.get(
          jobACLsUtf8).toString()));
    }
  }
  return jobAcls;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:JobSubmittedEvent.java

示例3: getJobAcls

import org.apache.hadoop.mapreduce.JobACL; //导入方法依赖的package包/类
/** Get the acls configured for the job **/
public Map<JobACL, AccessControlList> getJobAcls() {
  Map<JobACL, AccessControlList> jobAcls =
      new HashMap<JobACL, AccessControlList>();
  for (JobACL jobACL : JobACL.values()) {
    Utf8 jobACLsUtf8 = new Utf8(jobACL.getAclName());
    if (datum.getAcls().containsKey(jobACLsUtf8)) {
      jobAcls.put(jobACL, new AccessControlList(datum.getAcls().get(
          jobACLsUtf8).toString()));
    }
  }
  return jobAcls;
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:14,代码来源:JobSubmittedEvent.java


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