Java 类org.apache.hadoop.util.CombinedIPWhiteList 实例源码

项目:hadoop-oss    文件:WhitelistBasedResolver.java   
@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);
}
项目:hadoop    文件:WhitelistBasedResolver.java   
@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);
}
项目:aliyun-oss-hadoop-fs    文件:WhitelistBasedResolver.java   
@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);
}
项目:big-c    文件:WhitelistBasedResolver.java   
@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);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:WhitelistBasedResolver.java   
@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);
}
项目:hops    文件:WhitelistBasedResolver.java   
@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);
}
项目:hadoop    文件:WhitelistBasedTrustedChannelResolver.java   
@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);
}
项目:aliyun-oss-hadoop-fs    文件:WhitelistBasedTrustedChannelResolver.java   
@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);
}
项目:big-c    文件:WhitelistBasedTrustedChannelResolver.java   
@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);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:WhitelistBasedTrustedChannelResolver.java   
@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);
}
项目:FlexMap    文件:WhitelistBasedTrustedChannelResolver.java   
@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);
}