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

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

Best Java code snippets using org.apache.hadoop.util.StringUtils.getStrings (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: org.apache.hadoop/hadoop-common

/**
 * Returns an arraylist of strings.
 * @param str the comma separated string values
 * @return the arraylist of the comma separated string values
 */
public static String[] getStrings(String str){
 String delim = ",";
 return getStrings(str, delim);
}
origin: apache/flink

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

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

/**
 * Get the comma delimited values of the <code>name</code> property as
 * an array of <code>String</code>s.
 * 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 <code>String</code>s,
 *         or default value.
 */
public String[] getStrings(String name, String... defaultValue) {
 String valueString = get(name);
 if (valueString == null) {
  return defaultValue;
 } else {
  return StringUtils.getStrings(valueString);
 }
}
origin: apache/flink

/**
 * Get the comma delimited values of the <code>name</code> property as
 * an array of <code>String</code>s.
 * 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 <code>String</code>s,
 *         or default value.
 */
public String[] getStrings(String name, String... defaultValue) {
  String valueString = get(name);
  if (valueString == null) {
    return defaultValue;
  } else {
    return StringUtils.getStrings(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.  
 * If no such property is specified then <code>null</code> is returned.
 * 
 * @param name property name.
 * @return property value as an array of <code>String</code>s, 
 *         or <code>null</code>. 
 */
public String[] getStrings(String name) {
 String valueString = get(name);
 return StringUtils.getStrings(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.  
 * 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 <code>String</code>s, 
 *         or default value. 
 */
public String[] getStrings(String name, String... defaultValue) {
 String valueString = get(name);
 if (valueString == null) {
  return defaultValue;
 } else {
  return StringUtils.getStrings(valueString);
 }
}

origin: alibaba/jstorm

/**
 * Take a quorum list and split it to (trimmed) pairs
 * @param hostPortQuorumList list of form h1:port, h2:port2,...
 * @return a possibly empty list of values between commas. They may not be
 * valid hostname:port pairs
 */
public static List<String> splitToPairs(String hostPortQuorumList) {
 // split an address hot
 String[] strings = StringUtils.getStrings(hostPortQuorumList);
 int len = 0;
 if (strings != null) {
  len = strings.length;
 }
 List<String> tuples = new ArrayList<String>(len);
 if (strings != null) {
  for (String s : strings) {
   tuples.add(s.trim());
  }
 }
 return tuples;
}
origin: apache/hive

private static boolean checkInputFormatForLlapEncode(Configuration conf, String ifName) {
 String formatList = HiveConf.getVar(conf, ConfVars.LLAP_IO_ENCODE_FORMATS);
 if (LOG.isDebugEnabled()) {
  LOG.debug("Checking " + ifName + " against " + formatList);
 }
 String[] formats = StringUtils.getStrings(formatList);
 if (formats != null) {
  for (String format : formats) {
   // TODO: should we check isAssignableFrom?
   if (ifName.equals(format)) {
    if (LOG.isInfoEnabled()) {
     LOG.info("Using SerDe-based LLAP reader for " + ifName);
    }
    return true;
   }
  }
 }
 return false;
}
origin: apache/hbase

 /**
  * Get the client ZK Quorum servers string
  * @param conf the configuration to read
  * @return Client quorum servers, or null if not specified
  */
 public static String getClientZKQuorumServersString(Configuration conf) {
  String clientQuromServers = conf.get(HConstants.CLIENT_ZOOKEEPER_QUORUM);
  if (clientQuromServers == null) {
   return null;
  }
  int defaultClientPort =
    conf.getInt(HConstants.ZOOKEEPER_CLIENT_PORT, HConstants.DEFAULT_ZOOKEEPER_CLIENT_PORT);
  String clientZkClientPort =
    Integer.toString(conf.getInt(HConstants.CLIENT_ZOOKEEPER_CLIENT_PORT, defaultClientPort));
  // Build the ZK quorum server string with "server:clientport" list, separated by ','
  final String[] serverHosts = StringUtils.getStrings(clientQuromServers);
  return buildZKQuorumServerString(serverHosts, clientZkClientPort);
 }
}
origin: apache/hive

public static Collection<Class<?>> getClassNamesFromConfig(HiveConf hiveConf, ConfVars confVar) {
 String[] classNames = org.apache.hadoop.util.StringUtils.getStrings(HiveConf.getVar(hiveConf,
   confVar));
 if (classNames == null) {
  return new ArrayList<>(0);
 }
 Collection<Class<?>> classList = new ArrayList<Class<?>>(classNames.length);
 for (String className : classNames) {
  if (StringUtils.isEmpty(className)) {
   continue;
  }
  try {
   classList.add(Class.forName(className));
  } catch (Exception ex) {
   LOG.warn("Cannot create class {} for {} checks", className, confVar.varname);
  }
 }
 return classList;
}
origin: alibaba/jstorm

/**
 * Split a quorum list into a list of hostnames and ports
 * @param hostPortQuorumList split to a list of hosts and ports
 * @return a list of values
 */
public static List<HostAndPort> splitToHostsAndPorts(String hostPortQuorumList) {
 // split an address hot
 String[] strings = StringUtils.getStrings(hostPortQuorumList);
 int len = 0;
 if (strings != null) {
  len = strings.length;
 }
 List<HostAndPort> list = new ArrayList<HostAndPort>(len);
 if (strings != null) {
  for (String s : strings) {
   list.add(HostAndPort.fromString(s.trim()).withDefaultPort(DEFAULT_PORT));
  }
 }
 return list;
}
origin: apache/drill

 LOG.debug("Checking " + ifName + " against " + formatList);
String[] formats = StringUtils.getStrings(formatList);
if (formats != null) {
 for (String format : formats) {
origin: org.apache.hadoop/hadoop-common

case NFLY:
 final URI[] targetUris = StringUtils.stringToURI(
   StringUtils.getStrings(target));
 newLink = new INodeLink<T>(fullPath, aUgi,
    getTargetFileSystem(settings, targetUris), targetUris);
origin: apache/sentry

 private static Set<String> parseConnectUsersFromConf(String value) {
  //Removed the logic to convert the allowed users to lower case, as user names need to be case sensitive
  return Sets.newHashSet(StringUtils.getStrings(value));
 }
}
origin: com.github.jiayuhan-it/hadoop-common

/** 
 * Get the comma delimited values of the <code>name</code> property as 
 * an array of <code>String</code>s.  
 * If no such property is specified then <code>null</code> is returned.
 * 
 * @param name property name.
 * @return property value as an array of <code>String</code>s, 
 *         or <code>null</code>. 
 */
public String[] getStrings(String name) {
 String valueString = get(name);
 return StringUtils.getStrings(valueString);
}
origin: apache/incubator-sentry

 private static Set<String> parseConnectUsersFromConf(String value) {
  if (value != null) {
   value = value.toLowerCase();
  }
  return Sets.newHashSet(StringUtils.getStrings(value));
 }
}
origin: apache/oozie

public static void addMapReduceToClasspath(Map<String, String> env, Configuration conf) {
  boolean crossPlatform = conf.getBoolean(MRConfig.MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM,
      MRConfig.DEFAULT_MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM);
  for (String c : conf.getStrings(MRJobConfig.MAPREDUCE_APPLICATION_CLASSPATH,
      crossPlatform ?
          StringUtils.getStrings(MRJobConfig.DEFAULT_MAPREDUCE_CROSS_PLATFORM_APPLICATION_CLASSPATH)
          : StringUtils.getStrings(MRJobConfig.DEFAULT_MAPREDUCE_APPLICATION_CLASSPATH))) {
    MRApps.addToEnvironment(env, ApplicationConstants.Environment.CLASSPATH.name(),
        c.trim(), conf);
  }
}
origin: ch.cern.hadoop/hadoop-streaming

/**
 * get the uris of all the files/caches
 */
protected void getURIs(String lcacheArchives, String lcacheFiles) {
 String archives[] = StringUtils.getStrings(lcacheArchives);
 String files[] = StringUtils.getStrings(lcacheFiles);
 fileURIs = StringUtils.stringToURI(files);
 archiveURIs = StringUtils.stringToURI(archives);
}
origin: org.apache.hadoop/hadoop-streaming

/**
 * get the uris of all the files/caches
 */
protected void getURIs(String lcacheArchives, String lcacheFiles) {
 String archives[] = StringUtils.getStrings(lcacheArchives);
 String files[] = StringUtils.getStrings(lcacheFiles);
 fileURIs = StringUtils.stringToURI(files);
 archiveURIs = StringUtils.stringToURI(archives);
}
org.apache.hadoop.utilStringUtilsgetStrings

Javadoc

Returns an arraylist of strings.

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
  • 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
  • getStringCollection
    Returns a collection of strings.
  • unEscapeString,
  • getStringCollection,
  • byteDesc,
  • formatPercent,
  • getTrimmedStrings,
  • equalsIgnoreCase,
  • format,
  • formatTimeDiff,
  • getTrimmedStringCollection

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Join (org.hibernate.mapping)
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
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