@Test public void testUserUpdateSetting() throws IOException { ShellBasedIdMapping iug = new ShellBasedIdMapping(new Configuration()); assertEquals(iug.getTimeout(), IdMappingConstant.USERGROUPID_UPDATE_MILLIS_DEFAULT); Configuration conf = new Configuration(); conf.setLong(IdMappingConstant.USERGROUPID_UPDATE_MILLIS_KEY, 0); iug = new ShellBasedIdMapping(conf); assertEquals(iug.getTimeout(), IdMappingConstant.USERGROUPID_UPDATE_MILLIS_MIN); conf.setLong(IdMappingConstant.USERGROUPID_UPDATE_MILLIS_KEY, IdMappingConstant.USERGROUPID_UPDATE_MILLIS_DEFAULT * 2); iug = new ShellBasedIdMapping(conf); assertEquals(iug.getTimeout(), IdMappingConstant.USERGROUPID_UPDATE_MILLIS_DEFAULT * 2); }
@VisibleForTesting public long getTimeout() { return timeout; }
ShellBasedIdMapping implements IdMappingServiceProvider { @VisibleForTesting public long getTimeout() { return timeout; } }
ShellBasedIdMapping implements IdMappingServiceProvider { @VisibleForTesting public long getTimeout() { return timeout; } ShellBasedIdMapping(Configuration conf,
      final String defaultStaticIdMappingFile);  ShellBasedIdMapping(Configuration conf); }
ShellBasedIdMapping implements IdMappingServiceProvider { @VisibleForTesting public long getTimeout() { return timeout; } ShellBasedIdMapping(Configuration conf,
      final String defaultStaticIdMappingFile);  ShellBasedIdMapping(Configuration conf); @VisibleForTesting long getTimeout(); @VisibleForTesting static void updateMapInternal(BiMap<Integer, String> map, String mapName,
      String command, String regex, Map<Integer, Integer> staticMapping); synchronized void updateMaps(); synchronized int getUid(String user); synchronized int getGid(String group); synchronized String getUserName(int uid, String unknown); synchronized String getGroupName(int gid, String unknown); int getUidAllowingUnknown(String user); int getGidAllowingUnknown(String group); }
ShellBasedIdMapping implements IdMappingServiceProvider { @VisibleForTesting public long getTimeout() { return timeout; } ShellBasedIdMapping(Configuration conf,
      final String defaultStaticIdMappingFile);  ShellBasedIdMapping(Configuration conf); @VisibleForTesting long getTimeout(); @VisibleForTesting static void updateMapInternal(BiMap<Integer, String> map, String mapName,
      String command, String regex, Map<Integer, Integer> staticMapping); synchronized void updateMaps(); synchronized int getUid(String user); synchronized int getGid(String group); synchronized String getUserName(int uid, String unknown); synchronized String getGroupName(int gid, String unknown); int getUidAllowingUnknown(String user); int getGidAllowingUnknown(String group);  }