Package org.apache.hadoop.security

Examples of org.apache.hadoop.security.RefreshUserMappingsProtocol


    // should be NAMENODE's one.
    conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
        conf.get(DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, ""));
   
    // Create the client
    RefreshUserMappingsProtocol refreshProtocol =
      (RefreshUserMappingsProtocol)
      RPC.getProxy(RefreshUserMappingsProtocol.class,
                   RefreshUserMappingsProtocol.versionID,
                   NameNode.getAddress(conf), getUGI(), conf,
                   NetUtils.getSocketFactory(conf,
                                             RefreshUserMappingsProtocol.class));
   
    // Refresh the user-to-groups mappings
    refreshProtocol.refreshUserToGroupsMappings();
   
    return 0;
  }
View Full Code Here


    // should be NAMENODE's one.
    conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
        conf.get(DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, ""));
   
    // Create the client
    RefreshUserMappingsProtocol refreshProtocol =
      (RefreshUserMappingsProtocol)
      RPC.getProxy(RefreshUserMappingsProtocol.class,
                   RefreshUserMappingsProtocol.versionID,
                   NameNode.getAddress(conf), getUGI(), conf,
                   NetUtils.getSocketFactory(conf,
                       RefreshUserMappingsProtocol.class));
   
    // Refresh the user-to-groups mappings
    refreshProtocol.refreshSuperUserGroupsConfiguration();
   
    return 0;
  }
View Full Code Here

    JobConf jConf = new JobConf(conf);
    conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
        jConf.get(JobTracker.JT_USER_NAME, ""));
   
    // Create the client
    RefreshUserMappingsProtocol refreshProtocol =
      (RefreshUserMappingsProtocol)
      RPC.getProxy(RefreshUserMappingsProtocol.class,
                   RefreshUserMappingsProtocol.versionID,
                   JobTracker.getAddress(conf), getUGI(conf), conf,
                   NetUtils.getSocketFactory(conf,
                       RefreshUserMappingsProtocol.class));
   
    // Refresh the user-to-groups mappings
    refreshProtocol.refreshSuperUserGroupsConfiguration();
   
    return 0;
  }
View Full Code Here

        jConf.get(JobTracker.JT_USER_NAME, ""));
   
   
   
    // Create the client
    RefreshUserMappingsProtocol refreshProtocol =
      (RefreshUserMappingsProtocol)
      RPC.getProxy(RefreshUserMappingsProtocol.class,
                   RefreshUserMappingsProtocol.versionID,
                   JobTracker.getAddress(conf), getUGI(conf), conf,
                   NetUtils.getSocketFactory(conf,
                                             RefreshUserMappingsProtocol.class));

    // Refresh the user-to-groups mappings
    refreshProtocol.refreshUserToGroupsMappings();

    return 0;
  }
View Full Code Here

    // 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
    RefreshUserMappingsProtocol refreshProtocol =
      NameNodeProxies.createProxy(conf, FileSystem.getDefaultUri(conf),
          RefreshUserMappingsProtocol.class).getProxy();

    // Refresh the user-to-groups mappings
    refreshProtocol.refreshUserToGroupsMappings();
   
    return 0;
  }
View Full Code Here

    // should be NAMENODE's one.
    conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
        conf.get(DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, ""));

    // Create the client
    RefreshUserMappingsProtocol refreshProtocol =
      NameNodeProxies.createProxy(conf, FileSystem.getDefaultUri(conf),
          RefreshUserMappingsProtocol.class).getProxy();

    // Refresh the user-to-groups mappings
    refreshProtocol.refreshSuperUserGroupsConfiguration();

    return 0;
  }
View Full Code Here

        System.out.println("Refresh user to groups mapping successful for "
            + proxy.getAddress());
      }
    } else {
      // Create the client
      RefreshUserMappingsProtocol refreshProtocol =
          NameNodeProxies.createProxy(conf, FileSystem.getDefaultUri(conf),
              RefreshUserMappingsProtocol.class).getProxy();

      // Refresh the user-to-groups mappings
      refreshProtocol.refreshUserToGroupsMappings();
      System.out.println("Refresh user to groups mapping successful");
    }
   
    return 0;
  }
View Full Code Here

        System.out.println("Refresh super user groups configuration " +
            "successful for " + proxy.getAddress());
      }
    } else {
      // Create the client
      RefreshUserMappingsProtocol refreshProtocol =
          NameNodeProxies.createProxy(conf, FileSystem.getDefaultUri(conf),
              RefreshUserMappingsProtocol.class).getProxy();

      // Refresh the user-to-groups mappings
      refreshProtocol.refreshSuperUserGroupsConfiguration();
      System.out.println("Refresh super user groups configuration successful");
    }

    return 0;
  }
View Full Code Here

    // should be NAMENODE's one.
    conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
        conf.get(DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, ""));
   
    // Create the client
    RefreshUserMappingsProtocol refreshProtocol =
      (RefreshUserMappingsProtocol)
      RPC.getProxy(RefreshUserMappingsProtocol.class,
                   RefreshUserMappingsProtocol.versionID,
                   NameNode.getAddress(conf), getUGI(), conf,
                   NetUtils.getSocketFactory(conf,
                                             RefreshUserMappingsProtocol.class));
   
    // Refresh the user-to-groups mappings
    refreshProtocol.refreshUserToGroupsMappings();
   
    return 0;
  }
View Full Code Here

    // should be NAMENODE's one.
    conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
        conf.get(DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, ""));
   
    // Create the client
    RefreshUserMappingsProtocol refreshProtocol =
      (RefreshUserMappingsProtocol)
      RPC.getProxy(RefreshUserMappingsProtocol.class,
                   RefreshUserMappingsProtocol.versionID,
                   NameNode.getAddress(conf), getUGI(), conf,
                   NetUtils.getSocketFactory(conf,
                       RefreshUserMappingsProtocol.class));
   
    // Refresh the user-to-groups mappings
    refreshProtocol.refreshSuperUserGroupsConfiguration();
   
    return 0;
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.security.RefreshUserMappingsProtocol

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.