@Override public void setConf(Configuration conf) { super.setConf(conf); String fixedFile = conf.get(HADOOP_SECURITY_SASL_FIXEDWHITELIST_FILE, FIXEDWHITELIST_DEFAULT_LOCATION); String variableFile = null; long expiryTime = 0; if (conf.getBoolean(HADOOP_SECURITY_SASL_VARIABLEWHITELIST_ENABLE, false)) { variableFile = conf.get(HADOOP_SECURITY_SASL_VARIABLEWHITELIST_FILE, VARIABLEWHITELIST_DEFAULT_LOCATION); expiryTime = conf.getLong(HADOOP_SECURITY_SASL_VARIABLEWHITELIST_CACHE_SECS,3600) * 1000; } whiteList = new CombinedIPWhiteList(fixedFile,variableFile,expiryTime); this.saslProps = getSaslProperties(conf); }
@Override public void setConf(Configuration conf) { super.setConf(conf); String fixedFile = conf.get(DFS_DATATRANSFER_SERVER_FIXEDWHITELIST_FILE, FIXEDWHITELIST_DEFAULT_LOCATION); String variableFile = null; long expiryTime = 0; if (conf.getBoolean(DFS_DATATRANSFER_SERVER_VARIABLEWHITELIST_ENABLE, false)) { variableFile = conf.get(DFS_DATATRANSFER_SERVER_VARIABLEWHITELIST_FILE, VARIABLEWHITELIST_DEFAULT_LOCATION); expiryTime = conf.getLong(DFS_DATATRANSFER_SERVER_VARIABLEWHITELIST_CACHE_SECS,3600) * 1000; } whiteListForServer = new CombinedIPWhiteList(fixedFile,variableFile,expiryTime); fixedFile = conf.get(DFS_DATATRANSFER_CLIENT_FIXEDWHITELIST_FILE, fixedFile); expiryTime = 0; if (conf.getBoolean(DFS_DATATRANSFER_CLIENT_VARIABLEWHITELIST_ENABLE, false)) { variableFile = conf.get(DFS_DATATRANSFER_CLIENT_VARIABLEWHITELIST_FILE,variableFile); expiryTime = conf.getLong(DFS_DATATRANSFER_CLIENT_VARIABLEWHITELIST_CACHE_SECS,3600) * 1000; } whitelistForClient = new CombinedIPWhiteList(fixedFile,variableFile,expiryTime); }