/** * 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*"); }
/** * 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; }
/** * 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; } }
/** * 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; } }
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) {
@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; }
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) {
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; }
pluginProps.getStringList("alerter.external.classpaths", (List<String>) null);
pluginProps.getStringList("trigger.external.classpaths", (List<String>) null);
pluginProps.getStringList("trigger.external.classpaths", (List<String>) null);
props.getStringList(CommonJobProperties.DEPENDENCIES, (List<String>) null);
final boolean pluginHidden = pluginProps.getBoolean("viewer.hidden", false); final List<String> extLibClasspath = pluginProps.getStringList("viewer.external.classpaths", (List<String>) null);
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; } }
/** * 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*"); }
/** * 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*"); }
/** * 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; } }
/** * 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; } }
/** * 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; } }
/** * 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; } }