Java 类org.apache.hadoop.security.NetgroupCache 实例源码

项目:hadoop-oss    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop-oss    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hadoop-oss    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Get unix groups (parent) and netgroups for given user
 *
 * @param user get groups and netgroups for this user
 * @return groups and netgroups for user
 */
@Override
public List<String> getGroups(String user) throws IOException {
  // parent get unix groups
  List<String> groups = new LinkedList<String>(super.getGroups(user));
  NetgroupCache.getNetgroups(user, groups);
  return groups;
}
项目:hadoop-oss    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop-oss    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hadoop    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hadoop    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Get unix groups (parent) and netgroups for given user
 *
 * @param user get groups and netgroups for this user
 * @return groups and netgroups for user
 */
@Override
public List<String> getGroups(String user) throws IOException {
  // parent get unix groups
  List<String> groups = new LinkedList<String>(super.getGroups(user));
  NetgroupCache.getNetgroups(user, groups);
  return groups;
}
项目:hadoop    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:aliyun-oss-hadoop-fs    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:aliyun-oss-hadoop-fs    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:aliyun-oss-hadoop-fs    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Get unix groups (parent) and netgroups for given user
 *
 * @param user get groups and netgroups for this user
 * @return groups and netgroups for user
 */
@Override
public List<String> getGroups(String user) throws IOException {
  // parent get unix groups
  List<String> groups = new LinkedList<String>(super.getGroups(user));
  NetgroupCache.getNetgroups(user, groups);
  return groups;
}
项目:aliyun-oss-hadoop-fs    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:aliyun-oss-hadoop-fs    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:big-c    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:big-c    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:big-c    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Get unix groups (parent) and netgroups for given user
 *
 * @param user get groups and netgroups for this user
 * @return groups and netgroups for user
 */
@Override
public List<String> getGroups(String user) throws IOException {
  // parent get unix groups
  List<String> groups = new LinkedList<String>(super.getGroups(user));
  NetgroupCache.getNetgroups(user, groups);
  return groups;
}
项目:big-c    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:big-c    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Get unix groups (parent) and netgroups for given user
 *
 * @param user get groups and netgroups for this user
 * @return groups and netgroups for user
 */
@Override
public List<String> getGroups(String user) throws IOException {
  // parent get unix groups
  List<String> groups = new LinkedList<String>(super.getGroups(user));
  NetgroupCache.getNetgroups(user, groups);
  return groups;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hadoop-plus    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop-plus    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hadoop-plus    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Get unix groups (parent) and netgroups for given user
 *
 * @param user get groups and netgroups for this user
 * @return groups and netgroups for user
 */
@Override
public List<String> getGroups(String user) throws IOException {
  // parent get unix groups
  List<String> groups = new LinkedList<String>(super.getGroups(user));
  NetgroupCache.getNetgroups(user, groups);
  return groups;
}
项目:hadoop-plus    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop-plus    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hops    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hops    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hops    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Get unix groups (parent) and netgroups for given user
 *
 * @param user get groups and netgroups for this user
 * @return groups and netgroups for user
 */
@Override
public List<String> getGroups(String user) throws IOException {
  // parent get unix groups
  List<String> groups = new LinkedList<String>(super.getGroups(user));
  NetgroupCache.getNetgroups(user, groups);
  return groups;
}
项目:hops    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hops    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hadoop-TCP    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop-TCP    文件:JniBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}
项目:hadoop-TCP    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Get unix groups (parent) and netgroups for given user
 *
 * @param user get groups and netgroups for this user
 * @return groups and netgroups for user
 */
@Override
public List<String> getGroups(String user) throws IOException {
  // parent get unix groups
  List<String> groups = new LinkedList<String>(super.getGroups(user));
  NetgroupCache.getNetgroups(user, groups);
  return groups;
}
项目:hadoop-TCP    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Refresh the netgroup cache
 */
@Override
public void cacheGroupsRefresh() throws IOException {
  List<String> groups = NetgroupCache.getNetgroupNames();
  NetgroupCache.clear();
  cacheGroupsAdd(groups);
}
项目:hadoop-TCP    文件:ShellBasedUnixGroupsNetgroupMapping.java   
/**
 * Add a group to cache, only netgroups are cached
 *
 * @param groups list of group names to add to cache
 */
@Override
public void cacheGroupsAdd(List<String> groups) throws IOException {
  for(String group: groups) {
    if(group.length() == 0) {
      // better safe than sorry (should never happen)
    } else if(group.charAt(0) == '@') {
      if(!NetgroupCache.isCached(group)) {
        NetgroupCache.add(group, getUsersForNetgroup(group));
      }
    } else {
      // unix group, not caching
    }
  }
}