Codota Logo
StringUtils.getTrimmedStrings
Code IndexAdd Codota to your IDE (free)

How to use
getTrimmedStrings
method
in
org.apache.hadoop.util.StringUtils

Best Java code snippets using org.apache.hadoop.util.StringUtils.getTrimmedStrings (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: apache/flink

/**
 * Get the comma delimited values of the <code>name</code> property as
 * an array of <code>String</code>s, trimmed of the leading and trailing whitespace.
 * If no such property is specified then an empty array is returned.
 *
 * @param name property name.
 * @return property value as an array of trimmed <code>String</code>s,
 *         or empty array.
 */
public String[] getTrimmedStrings(String name) {
 String valueString = get(name);
 return StringUtils.getTrimmedStrings(valueString);
}
origin: apache/flink

/**
 * Get the comma delimited values of the <code>name</code> property as
 * an array of <code>String</code>s, trimmed of the leading and trailing whitespace.
 * If no such property is specified then an empty array is returned.
 *
 * @param name property name.
 * @return property value as an array of trimmed <code>String</code>s,
 *         or empty array.
 */
public String[] getTrimmedStrings(String name) {
  String valueString = get(name);
  return StringUtils.getTrimmedStrings(valueString);
}
origin: apache/flink

/**
 * Get the comma delimited values of the <code>name</code> property as
 * an array of <code>String</code>s, trimmed of the leading and trailing whitespace.
 * If no such property is specified then default value is returned.
 *
 * @param name property name.
 * @param defaultValue The default value
 * @return property value as an array of trimmed <code>String</code>s,
 *         or default value.
 */
public String[] getTrimmedStrings(String name, String... defaultValue) {
 String valueString = get(name);
 if (null == valueString) {
  return defaultValue;
 } else {
  return StringUtils.getTrimmedStrings(valueString);
 }
}
origin: apache/flink

/**
 * Get the comma delimited values of the <code>name</code> property as
 * an array of <code>String</code>s, trimmed of the leading and trailing whitespace.
 * If no such property is specified then default value is returned.
 *
 * @param name property name.
 * @param defaultValue The default value
 * @return property value as an array of trimmed <code>String</code>s,
 *         or default value.
 */
public String[] getTrimmedStrings(String name, String... defaultValue) {
  String valueString = get(name);
  if (null == valueString) {
    return defaultValue;
  } else {
    return StringUtils.getTrimmedStrings(valueString);
  }
}
origin: org.apache.hadoop/hadoop-common

/** 
 * Get the comma delimited values of the <code>name</code> property as 
 * an array of <code>String</code>s, trimmed of the leading and trailing whitespace.
 * If no such property is specified then an empty array is returned.
 * 
 * @param name property name.
 * @return property value as an array of trimmed <code>String</code>s, 
 *         or empty array. 
 */
public String[] getTrimmedStrings(String name) {
 String valueString = get(name);
 return StringUtils.getTrimmedStrings(valueString);
}
origin: org.apache.hadoop/hadoop-common

/** 
 * Get the comma delimited values of the <code>name</code> property as 
 * an array of <code>String</code>s, trimmed of the leading and trailing whitespace.
 * If no such property is specified then default value is returned.
 * 
 * @param name property name.
 * @param defaultValue The default value
 * @return property value as an array of trimmed <code>String</code>s, 
 *         or default value. 
 */
public String[] getTrimmedStrings(String name, String... defaultValue) {
 String valueString = get(name);
 if (null == valueString) {
  return defaultValue;
 } else {
  return StringUtils.getTrimmedStrings(valueString);
 }
}
origin: org.apache.hadoop/hadoop-common

public ConfigRedactor(Configuration conf) {
 String sensitiveRegexList = conf.get(
   HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS,
   HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS_DEFAULT);
 List<String> sensitiveRegexes =
   Arrays.asList(StringUtils.getTrimmedStrings(sensitiveRegexList));
 compiledPatterns = new ArrayList<Pattern>();
 for (String regex : sensitiveRegexes) {
  Pattern p = Pattern.compile(regex);
  compiledPatterns.add(p);
 }
}
origin: org.apache.hadoop/hadoop-common

/**
 * Splits a comma separated value <code>String</code>, trimming leading and
 * trailing whitespace on each value. Duplicate and empty values are removed.
 *
 * @param str a comma separated <String> with values, may be null
 * @return a <code>Collection</code> of <code>String</code> values, empty
 *         Collection if null String input
 */
public static Collection<String> getTrimmedStringCollection(String str){
 Set<String> set = new LinkedHashSet<String>(
  Arrays.asList(getTrimmedStrings(str)));
 set.remove("");
 return set;
}

origin: org.apache.hadoop/hadoop-common

public ApplicationClassLoader(URL[] urls, ClassLoader parent,
  List<String> systemClasses) {
 super(urls, parent);
 this.parent = parent;
 if (parent == null) {
  throw new IllegalArgumentException("No parent classloader!");
 }
 // if the caller-specified system classes are null or empty, use the default
 this.systemClasses = (systemClasses == null || systemClasses.isEmpty()) ?
   Arrays.asList(StringUtils.getTrimmedStrings(SYSTEM_CLASSES_DEFAULT)) :
   systemClasses;
 LOG.info("classpath: " + Arrays.toString(urls));
 LOG.info("system classes: " + this.systemClasses);
}
origin: apache/hive

public static String[] getTrimmedStringsVar(Configuration conf, ConfVars var) {
 assert (var.valClass == String.class) : var.varname;
 String[] result = conf.getTrimmedStrings(var.varname, (String[])null);
 if (result != null) {
  return result;
 }
 if (var.altName != null) {
  result = conf.getTrimmedStrings(var.altName, (String[])null);
  if (result != null) {
   return result;
  }
 }
 return org.apache.hadoop.util.StringUtils.getTrimmedStrings(var.defaultStrVal);
}
origin: org.apache.hadoop/hadoop-common

String[] hosts = StringUtils.getTrimmedStrings(v);
String str = readFirstTagValue(e, "timeout");
Integer timeout = (str == null)? null : Integer.parseInt(str);
origin: org.apache.hadoop/hadoop-common

String[] dirStrings = StringUtils.getTrimmedStrings(newLocalDirs);
ctx.localFS = FileSystem.getLocal(conf);
int numDirs = dirStrings.length;
origin: org.apache.hadoop/hadoop-common

List<String> systemClassesList = systemClasses == null ?
  null :
  Arrays.asList(StringUtils.getTrimmedStrings(systemClasses));
origin: apache/hive

 return createFileInTmp(prefix, suffix, "Local directories not specified", isDirectory);
String[] localDirs = StringUtils.getTrimmedStrings(localDirList);
if (localDirs.length == 0) {
 return createFileInTmp(prefix, suffix, "Local directories not specified", isDirectory);
origin: apache/hive

/**
 * Get values from comma-separated config, to an array after extracting individual values.
 * @param conf Configuration to retrieve it from
 * @param var variable to retrieve
 * @return Array of String, containing each value from the comma-separated config,
 *  or default value if value not in config file
 */
public static String[] getTrimmedStringsVar(Configuration conf, ConfVars var) {
 assert var.defaultVal.getClass() == String.class;
 String[] result = conf.getTrimmedStrings(var.varname, (String[]) null);
 if (result != null) {
  return result;
 }
 if (var.hiveName != null) {
  result = conf.getTrimmedStrings(var.hiveName, (String[]) null);
  if (result != null) {
   return result;
  }
 }
 return org.apache.hadoop.util.StringUtils.getTrimmedStrings((String) var.getDefaultVal());
}
origin: org.apache.hadoop/hadoop-common

  StringUtils.getTrimmedStrings(tokenFileLocation)) {
if (tokenFileName.length() > 0) {
 File tokenFile = new File(tokenFileName);
origin: org.apache.hadoop/hadoop-common

 StringUtils.getTrimmedStrings(tokenFileLocation)) {
if (tokenFileName.length() > 0) {
 File tokenFile = new File(tokenFileName);
origin: org.apache.hadoop/hadoop-common

 private ServerConnector createHttpsChannelConnector(
   Server server, HttpConfiguration httpConfig) {
  httpConfig.setSecureScheme(HTTPS_SCHEME);
  httpConfig.addCustomizer(new SecureRequestCustomizer());
  ServerConnector conn = createHttpChannelConnector(server, httpConfig);
  SslContextFactory sslContextFactory = new SslContextFactory();
  sslContextFactory.setNeedClientAuth(needsClientAuth);
  sslContextFactory.setKeyManagerPassword(keyPassword);
  if (keyStore != null) {
   sslContextFactory.setKeyStorePath(keyStore);
   sslContextFactory.setKeyStoreType(keyStoreType);
   sslContextFactory.setKeyStorePassword(keyStorePassword);
  }
  if (trustStore != null) {
   sslContextFactory.setTrustStorePath(trustStore);
   sslContextFactory.setTrustStoreType(trustStoreType);
   sslContextFactory.setTrustStorePassword(trustStorePassword);
  }
  if(null != excludeCiphers && !excludeCiphers.isEmpty()) {
   sslContextFactory.setExcludeCipherSuites(
     StringUtils.getTrimmedStrings(excludeCiphers));
   LOG.info("Excluded Cipher List:" + excludeCiphers);
  }
  conn.addFirstConnectionFactory(new SslConnectionFactory(sslContextFactory,
    HttpVersion.HTTP_1_1.asString()));
  return conn;
 }
}
origin: apache/hive

  new String[0] : StringUtils.getTrimmedStrings(localDirList);
int rpcPort = HiveConf.getIntVar(daemonConf, ConfVars.LLAP_DAEMON_RPC_PORT);
int mngPort = HiveConf.getIntVar(daemonConf, ConfVars.LLAP_MANAGEMENT_RPC_PORT);
origin: org.apache.hadoop/hadoop-hdfs

private static Set<String> parseBlockPoolList(String string) {
 String[] addrs = StringUtils.getTrimmedStrings(string);
 return new HashSet<String>(Arrays.asList(addrs));
}
org.apache.hadoop.utilStringUtilsgetTrimmedStrings

Javadoc

Splits a comma separated value String, trimming leading and trailing whitespace on each value.

Popular methods of StringUtils

  • stringifyException
    Make a string representation of the exception.
  • join
    Concatenates strings, using a separator.
  • split
  • arrayToString
  • toLowerCase
    Converts all of the characters in this String to lower case with Locale.ENGLISH.
  • escapeString
  • startupShutdownMessage
    Print a log message for starting up and shutting down
  • getStrings
    Returns an arraylist of strings.
  • toUpperCase
    Converts all of the characters in this String to upper case with Locale.ENGLISH.
  • byteToHexString
    Given an array of bytes it will convert the bytes to a hex string representation of the bytes
  • formatTime
    Given the time in long milliseconds, returns a String in the format Xhrs, Ymins, Z sec.
  • unEscapeString
  • formatTime,
  • unEscapeString,
  • getStringCollection,
  • byteDesc,
  • formatPercent,
  • equalsIgnoreCase,
  • format,
  • formatTimeDiff,
  • getTrimmedStringCollection

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now