Tabnine Logo
StringUtils.getStringCollection
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.apache.hadoop/hadoop-common

/**
 * Returns a collection of strings.
 * @param str comma separated string values
 * @return an <code>ArrayList</code> of string values
 */
public static Collection<String> getStringCollection(String str){
 String delim = ",";
 return getStringCollection(str, delim);
}
origin: apache/flink

/**
 * Get the comma delimited values of the <code>name</code> property as
 * a collection of <code>String</code>s.
 * If no such property is specified then empty collection is returned.
 * <p>
 * This is an optimized version of {@link #getStrings(String)}
 *
 * @param name property name.
 * @return property value as a collection of <code>String</code>s.
 */
public Collection<String> getStringCollection(String name) {
 String valueString = get(name);
 return StringUtils.getStringCollection(valueString);
}
origin: apache/flink

/**
 * Get the comma delimited values of the <code>name</code> property as
 * a collection of <code>String</code>s.
 * If no such property is specified then empty collection is returned.
 * <p>
 * This is an optimized version of {@link #getStrings(String)}
 *
 * @param name property name.
 * @return property value as a collection of <code>String</code>s.
 */
public Collection<String> getStringCollection(String name) {
  String valueString = get(name);
  return StringUtils.getStringCollection(valueString);
}
origin: org.apache.hadoop/hadoop-common

/** 
 * Get the comma delimited values of the <code>name</code> property as 
 * a collection of <code>String</code>s.  
 * If no such property is specified then empty collection is returned.
 * <p>
 * This is an optimized version of {@link #getStrings(String)}
 * 
 * @param name property name.
 * @return property value as a collection of <code>String</code>s. 
 */
public Collection<String> getStringCollection(String name) {
 String valueString = get(name);
 return StringUtils.getStringCollection(valueString);
}
origin: org.apache.hadoop/hadoop-common

/**
 * Returns an arraylist of strings.
 * @param str the string values
 * @param delim delimiter to separate the values
 * @return the arraylist of the separated string values
 */
public static String[] getStrings(String str, String delim){
 Collection<String> values = getStringCollection(str, delim);
 if(values.size() == 0) {
  return null;
 }
 return values.toArray(new String[values.size()]);
}
origin: apache/hive

/**
 * From a string which columns names (including hive column), return a list
 * of string columns
 *
 * @param columns comma separated list of columns
 * @return list with virtual columns removed
 */
public static List<String> getColumnNames(final String columns) {
 return (List<String>) VirtualColumn.
   removeVirtualColumns(StringUtils.getStringCollection(columns));
}
origin: apache/drill

/**
 * From a string which columns names (including hive column), return a list
 * of string columns
 *
 * @param columns comma separated list of columns
 * @return list with virtual columns removed
 */
public static List<String> getColumnNames(final String columns) {
 return (List<String>) VirtualColumn.
   removeVirtualColumns(StringUtils.getStringCollection(columns));
}
origin: org.apache.hadoop/hadoop-common

private void parseStaticMapping(Configuration conf) {
 String staticMapping = conf.get(
   CommonConfigurationKeys.HADOOP_USER_GROUP_STATIC_OVERRIDES,
   CommonConfigurationKeys.HADOOP_USER_GROUP_STATIC_OVERRIDES_DEFAULT);
 Collection<String> mappings = StringUtils.getStringCollection(
   staticMapping, ";");
 Map<String, List<String>> staticUserToGroupsMap =
   new HashMap<String, List<String>>();
 for (String users : mappings) {
  Collection<String> userToGroups = StringUtils.getStringCollection(users,
    "=");
  if (userToGroups.size() < 1 || userToGroups.size() > 2) {
   throw new HadoopIllegalArgumentException("Configuration "
     + CommonConfigurationKeys.HADOOP_USER_GROUP_STATIC_OVERRIDES
     + " is invalid");
  }
  String[] userToGroupsArray = userToGroups.toArray(new String[userToGroups
    .size()]);
  String user = userToGroupsArray[0];
  List<String> groups = Collections.emptyList();
  if (userToGroupsArray.length == 2) {
   groups = (List<String>) StringUtils
     .getStringCollection(userToGroupsArray[1]);
  }
  staticUserToGroupsMap.put(user, groups);
 }
 staticMapRef.set(
   staticUserToGroupsMap.isEmpty() ? null : staticUserToGroupsMap);
}
origin: org.apache.hadoop/hadoop-common

/**
 * Parses a string representation of an ACL spec into a list of AclEntry
 * objects. Example: "user::rwx,user:foo:rw-,group::r--,other::---"
 * The expected format of ACL entries in the string parameter is the same
 * format produced by the {@link #toStringStable()} method.
 * 
 * @param aclSpec
 *          String representation of an ACL spec.
 * @param includePermission
 *          for setAcl operations this will be true. i.e. AclSpec should
 *          include permissions.<br>
 *          But for removeAcl operation it will be false. i.e. AclSpec should
 *          not contain permissions.<br>
 *          Example: "user:foo,group:bar"
 * @return Returns list of {@link AclEntry} parsed
 */
public static List<AclEntry> parseAclSpec(String aclSpec,
  boolean includePermission) {
 List<AclEntry> aclEntries = new ArrayList<AclEntry>();
 Collection<String> aclStrings = StringUtils.getStringCollection(aclSpec,
   ",");
 for (String aclStr : aclStrings) {
  AclEntry aclEntry = parseAclEntry(aclStr, includePermission);
  aclEntries.add(aclEntry);
 }
 return aclEntries;
}
origin: ch.cern.hadoop/hadoop-common

/**
 * Returns a collection of strings.
 * @param str comma seperated string values
 * @return an <code>ArrayList</code> of string values
 */
public static Collection<String> getStringCollection(String str){
 String delim = ",";
 return getStringCollection(str, delim);
}
origin: io.prestosql.hadoop/hadoop-apache

/**
 * Returns a collection of strings.
 * @param str comma seperated string values
 * @return an <code>ArrayList</code> of string values
 */
public static Collection<String> getStringCollection(String str){
 String delim = ",";
 return getStringCollection(str, delim);
}
origin: io.hops/hadoop-common

/**
 * Returns a collection of strings.
 * @param str comma seperated string values
 * @return an <code>ArrayList</code> of string values
 */
public static Collection<String> getStringCollection(String str) {
 String delim = ",";
 return getStringCollection(str, delim);
}
origin: org.apache.slider/slider-core

/**
 * Split a classpath. This uses the local path separator so MUST NOT
 * be used to work with remote classpaths
 * @param localpath local path
 * @return a splite
 */
public Collection<String> splitClasspath(String localpath) {
 String separator = System.getProperty("path.separator");
 return StringUtils.getStringCollection(localpath, separator);
}
origin: org.apache.parquet/parquet-hive-binding-interface

/**
 * {@inheritDoc}
 */
@Override
public List<String> getColumns(final String columns) {
 final List<String> result = (List<String>) StringUtils.getStringCollection(columns);
 result.removeAll(virtualColumns);
 return result;
}
origin: com.github.jiayuhan-it/hadoop-common

/**
 * Returns an arraylist of strings.
 * @param str the comma seperated string values
 * @return the arraylist of the comma seperated string values
 */
public static String[] getStrings(String str){
 Collection<String> values = getStringCollection(str);
 if(values.size() == 0) {
  return null;
 }
 return values.toArray(new String[values.size()]);
}
origin: org.jvnet.hudson.hadoop/hadoop-core

/**
 * Returns an arraylist of strings.
 * @param str the comma seperated string values
 * @return the arraylist of the comma seperated string values
 */
public static String[] getStrings(String str){
 Collection<String> values = getStringCollection(str);
 if(values.size() == 0) {
  return null;
 }
 return values.toArray(new String[values.size()]);
}
origin: ch.cern.hadoop/hadoop-common

/**
 * Returns an arraylist of strings.
 * @param str the comma seperated string values
 * @return the arraylist of the comma seperated string values
 */
public static String[] getStrings(String str){
 Collection<String> values = getStringCollection(str);
 if(values.size() == 0) {
  return null;
 }
 return values.toArray(new String[values.size()]);
}
origin: com.facebook.hadoop/hadoop-core

/**
 * Returns an arraylist of strings.
 * @param str the comma seperated string values
 * @return the arraylist of the comma seperated string values
 */
public static String[] getStrings(String str){
 Collection<String> values = getStringCollection(str);
 if(values.size() == 0) {
  return null;
 }
 return values.toArray(new String[values.size()]);
}
origin: com.facebook.presto.hive/hive-apache

/**
 * From a string which columns names (including hive column), return a list
 * of string columns
 *
 * @param columns comma separated list of columns
 * @return list with virtual columns removed
 */
private static List<String> getColumnNames(final String columns) {
 return (List<String>) VirtualColumn.
   removeVirtualColumns(StringUtils.getStringCollection(columns));
}
origin: org.apache.pig/pig

private void retrieveAvailableZoneList() throws IOException {
  if (availableZoneIDs != null){
    return;
  }
  Properties props = UDFContext.getUDFContext().getUDFProperties(PigImplConstants.PIG_DATETIME_ZONES_LIST.getClass());
  Collection<String> zoneList = StringUtils.getStringCollection(props.getProperty(PigImplConstants.PIG_DATETIME_ZONES_LIST));
  if (zoneList == null || zoneList.size() == 0){
    throw new IOException("Datetime zone information not set");
  }
  availableZoneIDs = new ArrayList<>(zoneList);
}
org.apache.hadoop.utilStringUtilsgetStringCollection

Javadoc

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Permission (java.security)
    Legacy security code; do not use.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now