azkaban.utils.Props.getStringList()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(163)

本文整理了Java中azkaban.utils.Props.getStringList()方法的一些代码示例,展示了Props.getStringList()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Props.getStringList()方法的具体详情如下:
包路径:azkaban.utils.Props
类名称:Props
方法名:getStringList

Props.getStringList介绍

[英]Returns a list of strings with the comma as the separator of the value
[中]返回以逗号作为值分隔符的字符串列表

代码示例

代码示例来源:origin: azkaban/azkaban

/**
 * Returns a list of strings with the comma as the separator of the value
 */
public List<String> getStringList(final String key) {
 return getStringList(key, "\\s*,\\s*");
}

代码示例来源:origin: azkaban/azkaban

/**
 * Returns a list of clusters with the comma as the separator of the value
 * e.g., for input string: "thrift://hcat1:port,thrift://hcat2:port;thrift://hcat3:port,thrift://hcat4:port;"
 * we will get ["thrift://hcat1:port,thrift://hcat2:port", "thrift://hcat3:port,thrift://hcat4:port"] as output
 */
public List<String> getStringListFromCluster(final String key) {
 List<String> curlist = getStringList(key, "\\s*;\\s*");
 // remove empty elements in the array
 for (Iterator<String> iter = curlist.listIterator(); iter.hasNext(); ) {
  String a = iter.next();
  if (a.length() == 0) {
   iter.remove();
  }
 }
 return curlist;
}

代码示例来源:origin: azkaban/azkaban

/**
 * Returns a list of strings with the sep as the separator of the value. If the value is null,
 * it'll return the defaultValue.
 */
public List<String> getStringList(final String key, final List<String> defaultValue,
  final String sep) {
 if (containsKey(key)) {
  return getStringList(key, sep);
 } else {
  return defaultValue;
 }
}

代码示例来源:origin: azkaban/azkaban

/**
 * Returns a list of strings with the comma as the separator of the value. If the value is null,
 * it'll return the defaultValue.
 */
public List<String> getStringList(final String key, final List<String> defaultValue) {
 if (containsKey(key)) {
  return getStringList(key);
 } else {
  return defaultValue;
 }
}

代码示例来源:origin: azkaban/azkaban

prop.getStringList(CommonJobProperties.SUCCESS_EMAILS,
    Collections.EMPTY_LIST);
final Set<String> successEmail = new HashSet<>();
  prop.getStringList(CommonJobProperties.FAILURE_EMAILS,
    Collections.EMPTY_LIST);
final Set<String> failureEmail = new HashSet<>();
  prop.getStringList(CommonJobProperties.NOTIFY_EMAILS,
    Collections.EMPTY_LIST);
for (String email : notifyEmailList) {

代码示例来源:origin: azkaban/azkaban

@Inject
public ExecutorHealthChecker(final Props azkProps, final ExecutorLoader executorLoader,
  final ExecutorApiGateway apiGateway, final AlerterHolder alerterHolder) {
 this.healthCheckIntervalMin = azkProps
   .getLong(ConfigurationKeys.AZKABAN_EXECUTOR_HEALTHCHECK_INTERVAL_MIN,
     DEFAULT_EXECUTOR_HEALTHCHECK_INTERVAL.toMinutes());
 this.executorMaxFailureCount = azkProps.getInt(ConfigurationKeys
   .AZKABAN_EXECUTOR_MAX_FAILURE_COUNT, DEFAULT_EXECUTOR_MAX_FAILURE_COUNT);
 this.alertEmails = azkProps.getStringList(ConfigurationKeys.AZKABAN_ADMIN_ALERT_EMAIL);
 this.scheduler = Executors.newSingleThreadScheduledExecutor();
 this.executorLoader = executorLoader;
 this.apiGateway = apiGateway;
 this.alerterHolder = alerterHolder;
}

代码示例来源:origin: azkaban/azkaban

pluginLoadProps.getStringList("jobtype.global.classpath", null, ",");
if (typeGlobalClassPath != null) {
 for (final String jar : typeGlobalClassPath) {
  pluginLoadProps.getStringList("jobtype.classpath", null, ",");
if (typeClassPath != null) {
 for (final String jar : typeClassPath) {
  pluginLoadProps.getStringList("jobtype.lib.dir", null, ",");
if (jobtypeLibDirs != null) {
 for (final String libDir : jobtypeLibDirs) {

代码示例来源:origin: azkaban/azkaban

protected List<String> getClassPaths() {
 final List<String> classPaths = getJobProps().getStringList(CLASSPATH, null, ",");
 final ArrayList<String> classpathList = new ArrayList<>();
 // Adding global properties used system wide.
 if (getJobProps().containsKey(GLOBAL_CLASSPATH)) {
  final List<String> globalClasspath =
    getJobProps().getStringList(GLOBAL_CLASSPATH);
  for (final String global : globalClasspath) {
   getLog().info("Adding to global classpath:" + global);
   classpathList.add(global);
  }
 }
 if (classPaths == null) {
  final File path = new File(getPath());
  // File parent = path.getParentFile();
  getLog().info(
    "No classpath specified. Trying to load classes from " + path);
  if (path != null) {
   for (final File file : path.listFiles()) {
    if (file.getName().endsWith(".jar")) {
     // log.info("Adding to classpath:" + file.getName());
     classpathList.add(file.getName());
    }
   }
  }
 } else {
  classpathList.addAll(classPaths);
 }
 return classpathList;
}

代码示例来源:origin: azkaban/azkaban

pluginProps.getStringList("alerter.external.classpaths",
  (List<String>) null);

代码示例来源:origin: azkaban/azkaban

pluginProps.getStringList("trigger.external.classpaths",
  (List<String>) null);

代码示例来源:origin: azkaban/azkaban

pluginProps.getStringList("trigger.external.classpaths",
  (List<String>) null);

代码示例来源:origin: azkaban/azkaban

props.getStringList(CommonJobProperties.DEPENDENCIES,
  (List<String>) null);

代码示例来源:origin: azkaban/azkaban

final boolean pluginHidden = pluginProps.getBoolean("viewer.hidden", false);
final List<String> extLibClasspath =
  pluginProps.getStringList("viewer.external.classpaths",
    (List<String>) null);

代码示例来源:origin: azkaban/azkaban

private SslSocketConnector getSslSocketConnector(final int sslPortNumber) {
  final SslSocketConnector secureConnector = new SslSocketConnector();
  secureConnector.setPort(sslPortNumber);
  secureConnector.setKeystore(this.props.getString("jetty.keystore"));
  secureConnector.setPassword(this.props.getString("jetty.password"));
  secureConnector.setKeyPassword(this.props.getString("jetty.keypassword"));
  secureConnector.setTruststore(this.props.getString("jetty.truststore"));
  secureConnector.setTrustPassword(this.props.getString("jetty.trustpassword"));
  secureConnector.setHeaderBufferSize(MAX_HEADER_BUFFER_SIZE);

  // set up vulnerable cipher suites to exclude
  final List<String> cipherSuitesToExclude = this.props
    .getStringList("jetty.excludeCipherSuites");
  logger.info("Excluded Cipher Suites: " + String.valueOf(cipherSuitesToExclude));
  if (cipherSuitesToExclude != null && !cipherSuitesToExclude.isEmpty()) {
   secureConnector.setExcludeCipherSuites(cipherSuitesToExclude.toArray(new String[0]));
  }
  return secureConnector;
 }
}

代码示例来源:origin: com.linkedin.azkaban/az-core

/**
 * Returns a list of strings with the comma as the separator of the value
 *
 * @param key the key
 * @return the string list
 */
public List<String> getStringList(final String key) {
 return getStringList(key, "\\s*,\\s*");
}

代码示例来源:origin: com.linkedin.azkaban/azkaban

/**
 * Returns a list of strings with the comma as the separator of the value
 * 
 * @param key
 * @return
 */
public List<String> getStringList(String key) {
  return getStringList(key, "\\s*,\\s*");
}

代码示例来源:origin: com.linkedin.azkaban/azkaban

/**
 * Returns a list of strings with the sep as the separator of the value. If
 * the value is null, it'll return the defaultValue.
 * 
 * @param key
 * @return
 */
public List<String> getStringList(String key, List<String> defaultValue,
    String sep) {
  if (containsKey(key)) {
    return getStringList(key, sep);
  } else {
    return defaultValue;
  }
}

代码示例来源:origin: com.linkedin.azkaban/azkaban

/**
 * Returns a list of strings with the comma as the separator of the value.
 * If the value is null, it'll return the defaultValue.
 * 
 * @param key
 * @return
 */
public List<String> getStringList(String key, List<String> defaultValue) {
  if (containsKey(key)) {
    return getStringList(key);
  } else {
    return defaultValue;
  }
}

代码示例来源:origin: com.linkedin.azkaban/az-core

/**
 * Returns a list of strings with the comma as the separator of the value. If the value is null,
 * it'll return the defaultValue.
 *
 * @param key the key
 * @param defaultValue the default value
 * @return the string list
 */
public List<String> getStringList(final String key, final List<String> defaultValue) {
 if (containsKey(key)) {
  return getStringList(key);
 } else {
  return defaultValue;
 }
}

代码示例来源:origin: com.linkedin.azkaban/az-core

/**
 * Returns a list of strings with the sep as the separator of the value. If the value is null,
 * it'll return the defaultValue.
 *
 * @param key the key
 * @param defaultValue the default value
 * @param sep the sep
 * @return the string list
 */
public List<String> getStringList(final String key, final List<String> defaultValue,
  final String sep) {
 if (containsKey(key)) {
  return getStringList(key, sep);
 } else {
  return defaultValue;
 }
}

相关文章