List of usage examples for org.apache.hadoop.util StringUtils getStringCollection
public static Collection<String> getStringCollection(String str)
From source file:co.cask.tigon.conf.Configuration.java
License:Apache License
/** * 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>/*from w w w . j av a2s. c o m*/ * 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); }
From source file:org.apache.oozie.service.LiteWorkflowStoreService.java
License:Apache License
/** * Get system defined and instance defined error codes for which USER_RETRY is allowed * * @return set of error code user-retry is allowed for *///ww w. jav a2 s . c o m public static Set<String> getUserRetryErrorCode() { // eliminating whitespaces in the error codes value specification String errorCodeString = ConfigurationService.get(CONF_USER_RETRY_ERROR_CODE).replaceAll("\\s+", ""); Collection<String> strings = StringUtils.getStringCollection(errorCodeString); String errorCodeExtString = ConfigurationService.get(CONF_USER_RETRY_ERROR_CODE_EXT).replaceAll("\\s+", ""); Collection<String> extra = StringUtils.getStringCollection(errorCodeExtString); Set<String> set = new HashSet<String>(); set.addAll(strings); set.addAll(extra); return set; }
From source file:org.apache.parquet.hive.internal.AbstractHiveBinding.java
License:Apache License
/** * {@inheritDoc}/* w ww .j av a2 s . c om*/ */ @Override public List<String> getColumns(final String columns) { final List<String> result = (List<String>) StringUtils.getStringCollection(columns); result.removeAll(virtualColumns); return result; }
From source file:parquet.hive.ManageJobConfig.java
License:Apache License
/** * From a string which columns names (including hive column), return a list of string columns * * @param columns/* w w w .j a v a 2 s .c om*/ * @return */ public static List<String> getColumns(final String columns) { final List<String> listColumns = (List<String>) StringUtils.getStringCollection(columns); // Remove virtual Hive columns, hardcoded for compatibility listColumns.remove("INPUT__FILE__NAME"); listColumns.remove("BLOCK__OFFSET__INSIDE__FILE"); listColumns.remove("ROW__OFFSET__INSIDE__BLOCK"); listColumns.remove("RAW__DATA__SIZE"); return listColumns; }