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


Java RefreshAuthorizationPolicyProtocol类代码示例

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


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

示例1: getProtocolVersion

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
public long getProtocolVersion(String protocol, 
                               long clientVersion) throws IOException {
  if (protocol.equals(ClientProtocol.class.getName())) {
    return ClientProtocol.versionID; 
  } else if (protocol.equals(DatanodeProtocol.class.getName())){
    return DatanodeProtocol.versionID;
  } else if (protocol.equals(NamenodeProtocol.class.getName())){
    return NamenodeProtocol.versionID;
  } else if (protocol.equals(RefreshAuthorizationPolicyProtocol.class.getName())){
    return RefreshAuthorizationPolicyProtocol.versionID;
  } else if (protocol.equals(RefreshUserMappingsProtocol.class.getName())){
    return RefreshUserMappingsProtocol.versionID;
  } else if (protocol.equals(RefreshCallQueueProtocol.class.getName())) {
    return RefreshCallQueueProtocol.versionID;
  } else if (protocol.equals(GetUserMappingsProtocol.class.getName())){
    return GetUserMappingsProtocol.versionID;
  } else if (protocol.equals(TraceAdminProtocol.class.getName())){
    return TraceAdminProtocol.versionID;
  } else {
    throw new IOException("Unknown protocol to name node: " + protocol);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:23,代码来源:NameNode.java

示例2: getProtocolVersion

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
public long getProtocolVersion(String protocol, 
                               long clientVersion) throws IOException {
  if (protocol.equals(InterTrackerProtocol.class.getName())) {
    return InterTrackerProtocol.versionID;
  } else if (protocol.equals(JobSubmissionProtocol.class.getName())){
    return JobSubmissionProtocol.versionID;
  } else if (protocol.equals(RefreshAuthorizationPolicyProtocol.class.getName())){
    return RefreshAuthorizationPolicyProtocol.versionID;
  } else if (protocol.equals(AdminOperationsProtocol.class.getName())){
    return AdminOperationsProtocol.versionID;
  } else if (protocol.equals(RefreshUserMappingsProtocol.class.getName())){
    return RefreshUserMappingsProtocol.versionID;
  } else if (protocol.equals(GetUserMappingsProtocol.class.getName())) {
    return GetUserMappingsProtocol.versionID;
  } else {
    throw new IOException("Unknown protocol to job tracker: " + protocol);
  }
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:19,代码来源:JobTracker.java

示例3: refreshAuthorizationPolicy

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
private int refreshAuthorizationPolicy() throws IOException {
  // Get the current configuration
  Configuration conf = getConf();
  
  // Create the client
  RefreshAuthorizationPolicyProtocol refreshProtocol = 
    (RefreshAuthorizationPolicyProtocol) 
    RPC.getProxy(RefreshAuthorizationPolicyProtocol.class, 
                 RefreshAuthorizationPolicyProtocol.versionID, 
                 JobTracker.getAddress(conf), getUGI(conf), conf,
                 NetUtils.getSocketFactory(conf, 
                                           RefreshAuthorizationPolicyProtocol.class));
  
  // Refresh the authorization policy in-effect
  refreshProtocol.refreshServiceAcl();
  
  return 0;
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:19,代码来源:MRAdmin.java

示例4: refreshServiceAcl

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
/**
 * Refresh the authorization policy on the {@link NameNode}.
 * @return exitcode 0 on success, non-zero on failure
 * @throws IOException
 */
public int refreshServiceAcl() throws IOException {
  // Get the current configuration
  Configuration conf = getConf();
  
  // Create the client
  RefreshAuthorizationPolicyProtocol refreshProtocol = 
    (RefreshAuthorizationPolicyProtocol) 
    RPC.getProxy(RefreshAuthorizationPolicyProtocol.class, 
                 RefreshAuthorizationPolicyProtocol.versionID, 
                 NameNode.getClientProtocolAddress(conf), getUGI(conf), conf,
                 NetUtils.getSocketFactory(conf, 
                                           RefreshAuthorizationPolicyProtocol.class));
  
  // Refresh the authorization policy in-effect
  refreshProtocol.refreshServiceAcl();
  
  return 0;
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:24,代码来源:DFSAdmin.java

示例5: getProtocolVersion

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
public long getProtocolVersion(String protocol, 
                               long clientVersion) throws IOException {
  if (protocol.equals(ClientProtocol.class.getName())) {
    return ClientProtocol.versionID; 
  } else if (protocol.equals(DatanodeProtocol.class.getName())){
    return DatanodeProtocol.versionID;
  } else if (protocol.equals(NamenodeProtocol.class.getName())){
    return NamenodeProtocol.versionID;
  } else if (protocol.equals(RefreshAuthorizationPolicyProtocol.class.getName())){
    return RefreshAuthorizationPolicyProtocol.versionID;
  } else if (protocol.equals(RefreshUserMappingsProtocol.class.getName())){
    return RefreshUserMappingsProtocol.versionID;
  } else if (protocol.equals(GetUserMappingsProtocol.class.getName())){
    return GetUserMappingsProtocol.versionID;
  } else {
    throw new IOException("Unknown protocol to name node: " + protocol);
  }
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:19,代码来源:NameNode.java

示例6: refreshServiceAcl

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
/**
 * Refresh the authorization policy on the {@link NameNode}.
 * @return exitcode 0 on success, non-zero on failure
 * @throws IOException
 */
public int refreshServiceAcl() throws IOException {
  // Get the current configuration
  Configuration conf = getConf();
  
  // for security authorization
  // server principal for this call   
  // should be NN's one.
  conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY, 
      conf.get(DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, ""));

  // Create the client
  RefreshAuthorizationPolicyProtocol refreshProtocol =
      NameNodeProxies.createProxy(conf, FileSystem.getDefaultUri(conf),
          RefreshAuthorizationPolicyProtocol.class).getProxy();
  
  // Refresh the authorization policy in-effect
  refreshProtocol.refreshServiceAcl();
  
  return 0;
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:26,代码来源:DFSAdmin.java

示例7: getProtocolVersion

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
public long getProtocolVersion(String protocol, long clientVersion)
    throws IOException {
  if (protocol.equals(ClientProtocol.class.getName())) {
    return ClientProtocol.versionID;
  } else if (protocol.equals(DatanodeProtocol.class.getName())) {
    return DatanodeProtocol.versionID;
  } else if (protocol.equals(NamenodeProtocol.class.getName())) {
    return NamenodeProtocol.versionID;
  } else if (protocol
      .equals(RefreshAuthorizationPolicyProtocol.class.getName())) {
    return RefreshAuthorizationPolicyProtocol.versionID;
  } else if (protocol.equals(RefreshUserMappingsProtocol.class.getName())) {
    return RefreshUserMappingsProtocol.versionID;
  } else if (protocol.equals(GetUserMappingsProtocol.class.getName())) {
    return GetUserMappingsProtocol.versionID;
  } else {
    throw new IOException("Unknown protocol to name node: " + protocol);
  }
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:20,代码来源:NameNode.java

示例8: refreshServiceAcl

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
/**
 * Refresh the authorization policy on the {@link NameNode}.
 *
 * @return exitcode 0 on success, non-zero on failure
 * @throws IOException
 */
public int refreshServiceAcl() throws IOException {
  // Get the current configuration
  Configuration conf = getConf();
  
  // for security authorization
  // server principal for this call   
  // should be NN's one.
  conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
      conf.get(DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, ""));

  // Create the client
  RefreshAuthorizationPolicyProtocol refreshProtocol = NameNodeProxies
      .createProxy(conf, FileSystem.getDefaultUri(conf),
          RefreshAuthorizationPolicyProtocol.class).getProxy();
  
  // Refresh the authorization policy in-effect
  refreshProtocol.refreshServiceAcl();
  
  return 0;
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:27,代码来源:DFSAdmin.java

示例9: refreshAuthorizationPolicy

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
private int refreshAuthorizationPolicy() throws IOException {
  // Get the current configuration
  Configuration conf = getConf();
  
  // for security authorization
  // server principal for this call   
  // should be JT's one.
  JobConf jConf = new JobConf(conf);
  conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY, 
      jConf.get(JobTracker.JT_USER_NAME, ""));
  
  
  // Create the client
  RefreshAuthorizationPolicyProtocol refreshProtocol = 
    (RefreshAuthorizationPolicyProtocol) 
    RPC.getProxy(RefreshAuthorizationPolicyProtocol.class, 
                 RefreshAuthorizationPolicyProtocol.versionID, 
                 JobTracker.getAddress(conf), getUGI(conf), conf,
                 NetUtils.getSocketFactory(conf, 
                                           RefreshAuthorizationPolicyProtocol.class));
  
  // Refresh the authorization policy in-effect
  refreshProtocol.refreshServiceAcl();
  
  return 0;
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre,代码行数:27,代码来源:MRAdmin.java

示例10: getProtocolVersion

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
public long getProtocolVersion(String protocol, 
                               long clientVersion) throws IOException {
  if (protocol.equals(InterTrackerProtocol.class.getName())) {
    return InterTrackerProtocol.versionID;
  } else if (protocol.equals(JobSubmissionProtocol.class.getName())){
    return JobSubmissionProtocol.versionID;
  } else if (protocol.equals(RefreshAuthorizationPolicyProtocol.class.getName())){
    return RefreshAuthorizationPolicyProtocol.versionID;
  } else if (protocol.equals(AdminOperationsProtocol.class.getName())){
    return AdminOperationsProtocol.versionID;
  } else if (protocol.equals(RefreshUserMappingsProtocol.class.getName())){
    return RefreshUserMappingsProtocol.versionID;
  } else {
    throw new IOException("Unknown protocol to job tracker: " + protocol);
  }
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre,代码行数:17,代码来源:JobTracker.java

示例11: getProtocolVersion

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
public long getProtocolVersion(String protocol, 
                               long clientVersion) throws IOException {
  if (protocol.equals(ClientProtocol.class.getName())) {
    return ClientProtocol.versionID; 
  } else if (protocol.equals(DatanodeProtocol.class.getName())){
    return DatanodeProtocol.versionID;
  } else if (protocol.equals(NamenodeProtocol.class.getName())){
    return NamenodeProtocol.versionID;
  } else if (protocol.equals(RefreshAuthorizationPolicyProtocol.class.getName())){
    return RefreshAuthorizationPolicyProtocol.versionID;
  } else if (protocol.equals(RefreshUserMappingsProtocol.class.getName())){
    return RefreshUserMappingsProtocol.versionID;
  } else {
    throw new IOException("Unknown protocol to name node: " + protocol);
  }
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre,代码行数:17,代码来源:NameNode.java

示例12: getProtocolVersion

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
public long getProtocolVersion(String protocol, 
                               long clientVersion) throws IOException {
  if (protocol.equals(ClientProtocol.class.getName())) {
    return ClientProtocol.versionID; 
  } else if (protocol.equals(DatanodeProtocol.class.getName())){
    return DatanodeProtocol.versionID;
  } else if (protocol.equals(NamenodeProtocol.class.getName())){
    return NamenodeProtocol.versionID;
  } else if (protocol.equals(RefreshAuthorizationPolicyProtocol.class.getName())){
    return RefreshAuthorizationPolicyProtocol.versionID;
  } else if (protocol.equals(RefreshUserMappingsProtocol.class.getName())){
    return RefreshUserMappingsProtocol.versionID;
  } else if (protocol.equals(RefreshCallQueueProtocol.class.getName())) {
    return RefreshCallQueueProtocol.versionID;
  } else if (protocol.equals(GetUserMappingsProtocol.class.getName())){
    return GetUserMappingsProtocol.versionID;
  } else {
    throw new IOException("Unknown protocol to name node: " + protocol);
  }
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:21,代码来源:NameNode.java

示例13: refreshServiceAcl

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
/**
 * Refresh the authorization policy on the {@link NameNode}.
 * @return exitcode 0 on success, non-zero on failure
 * @throws IOException
 */
public int refreshServiceAcl() throws IOException {
  // Get the current configuration
  Configuration conf = getConf();
  
  // for security authorization
  // server principal for this call   
  // should be NN's one.
  conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY, 
      conf.get(DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, ""));

  // Create the client
  RefreshAuthorizationPolicyProtocol refreshProtocol = 
    (RefreshAuthorizationPolicyProtocol) 
    RPC.getProxy(RefreshAuthorizationPolicyProtocol.class, 
                 RefreshAuthorizationPolicyProtocol.versionID, 
                 NameNode.getAddress(conf), getUGI(), conf,
                 NetUtils.getSocketFactory(conf, 
                                           RefreshAuthorizationPolicyProtocol.class));
  
  // Refresh the authorization policy in-effect
  refreshProtocol.refreshServiceAcl();
  
  return 0;
}
 
开发者ID:cumulusyebl,项目名称:cumulus,代码行数:30,代码来源:DFSAdmin.java

示例14: refreshServiceAcl

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
/**
 * Refresh the authorization policy on the {@link NameNode}.
 * @return exitcode 0 on success, non-zero on failure
 * @throws IOException
 */
public int refreshServiceAcl() throws IOException {
  // Get the current configuration
  Configuration conf = getConf();
  
  // Create the client
  RefreshAuthorizationPolicyProtocol refreshProtocol = 
    (RefreshAuthorizationPolicyProtocol) 
    RPC.getProxy(RefreshAuthorizationPolicyProtocol.class, 
                 RefreshAuthorizationPolicyProtocol.versionID, 
                 NameNode.getAddress(conf), getUGI(conf), conf,
                 NetUtils.getSocketFactory(conf, 
                                           RefreshAuthorizationPolicyProtocol.class));
  
  // Refresh the authorization policy in-effect
  refreshProtocol.refreshServiceAcl();
  
  return 0;
}
 
开发者ID:iVCE,项目名称:RDFS,代码行数:24,代码来源:DFSAdmin.java

示例15: refreshAuthorizationPolicy

import org.apache.hadoop.security.authorize.RefreshAuthorizationPolicyProtocol; //导入依赖的package包/类
private int refreshAuthorizationPolicy() throws IOException {
  // Get the current configuration
  Configuration conf = getConf();
  
  // for security authorization
  // server principal for this call   
  // should be JT's one.
  JobConf jConf = new JobConf(conf);
  conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY, 
      jConf.get(JobTracker.JT_USER_NAME, ""));

  // Create the client
  RefreshAuthorizationPolicyProtocol refreshProtocol = 
    (RefreshAuthorizationPolicyProtocol) 
    RPC.getProxy(RefreshAuthorizationPolicyProtocol.class, 
                 RefreshAuthorizationPolicyProtocol.versionID, 
                 JobTracker.getAddress(conf), getUGI(conf), conf,
                 NetUtils.getSocketFactory(conf, 
                                           RefreshAuthorizationPolicyProtocol.class));
  
  // Refresh the authorization policy in-effect
  refreshProtocol.refreshServiceAcl();
  
  return 0;
}
 
开发者ID:rekhajoshm,项目名称:mapreduce-fork,代码行数:26,代码来源:MRAdmin.java


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