org.apache.hadoop.nfs.nfs3
Class IdUserGroup

java.lang.Object
  extended by org.apache.hadoop.nfs.nfs3.IdUserGroup

public class IdUserGroup
extends Object

Map id to user name or group name. It does update every 15 minutes. Only a single instance of this class is expected to be on the server.


Nested Class Summary
static class IdUserGroup.DuplicateNameOrIdException
           
 
Constructor Summary
IdUserGroup()
           
 
Method Summary
 int getGid(String group)
           
 int getGidAllowingUnknown(String group)
           
 String getGroupName(int gid, String unknown)
           
 int getUid(String user)
           
 int getUidAllowingUnknown(String user)
           
 String getUserName(int uid, String unknown)
           
static void updateMapInternal(com.google.common.collect.BiMap<Integer,String> map, String mapName, String command, String regex)
          Get the whole list of users and groups and save them in the maps.
 void updateMaps()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdUserGroup

public IdUserGroup()
            throws IOException
Throws:
IOException
Method Detail

updateMapInternal

public static void updateMapInternal(com.google.common.collect.BiMap<Integer,String> map,
                                     String mapName,
                                     String command,
                                     String regex)
                              throws IOException
Get the whole list of users and groups and save them in the maps.

Throws:
IOException

updateMaps

public void updateMaps()
                throws IOException
Throws:
IOException

getUid

public int getUid(String user)
           throws IOException
Throws:
IOException

getGid

public int getGid(String group)
           throws IOException
Throws:
IOException

getUserName

public String getUserName(int uid,
                          String unknown)

getGroupName

public String getGroupName(int gid,
                           String unknown)

getUidAllowingUnknown

public int getUidAllowingUnknown(String user)

getGidAllowingUnknown

public int getGidAllowingUnknown(String group)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.