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

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

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

origin: org.apache.hadoop/hadoop-common

/**
 * Unescape commas in the string using the default escape char
 * @param str a string
 * @return an unescaped string
 */
public static String unEscapeString(String str) {
 return unEscapeString(str, ESCAPE_CHAR, COMMA);
}

origin: org.apache.hadoop/hadoop-common

/**
 * Unescape <code>charToEscape</code> in the string 
 * with the escape char <code>escapeChar</code>
 * 
 * @param str string
 * @param escapeChar escape char
 * @param charToEscape the escaped char
 * @return an unescaped string
 */
public static String unEscapeString(
  String str, char escapeChar, char charToEscape) {
 return unEscapeString(str, escapeChar, new char[] {charToEscape});
}

origin: apache/hive

/**
 * replaces all occurrences of "\," with ","; returns {@code s} if no modifications needed
 */
public static String unEscapeString(String s) {
 return s != null && s.contains("\\,") ? StringUtils.unEscapeString(s) : s;
}
origin: apache/hive

/**
 * Take an encode strings and decode it into an array of strings.
 */
public static String[] decodeArray(String s) {
 if (s == null)
  return null;
 String[] escaped = StringUtils.split(s);
 String[] plain = new String[escaped.length];
 for (int i = 0; i < escaped.length; ++i)
  plain[i] = StringUtils.unEscapeString(escaped[i]);
 return plain;
}
origin: apache/hive

/**
 * Get the list of input {@link Path}s for the map-reduce job.
 *
 * @param conf The configuration of the job
 * @return the list of input {@link Path}s for the map-reduce job.
 */
static Path[] getInputPaths(Configuration conf) throws IOException {
 String dirs = conf.get("mapred.input.dir");
 if (dirs == null) {
  throw new IOException("Configuration mapred.input.dir is not defined.");
 }
 String [] list = StringUtils.split(dirs);
 Path[] result = new Path[list.length];
 for (int i = 0; i < list.length; i++) {
  result[i] = new Path(StringUtils.unEscapeString(list[i]));
 }
 return result;
}
origin: apache/hive

/**
 * When a Pig job is submitted and it uses HCat, WebHCat may be configured to ship hive tar
 * to the target node.  Pig on the target node needs some env vars configured.
 */
private static void handlePigEnvVars(Configuration conf, Map<String, String> env) {
 if(conf.get(PigConstants.HIVE_HOME) != null) {
  env.put(PigConstants.HIVE_HOME, new File(conf.get(PigConstants.HIVE_HOME)).getAbsolutePath());
 }
 if(conf.get(PigConstants.HCAT_HOME) != null) {
  env.put(PigConstants.HCAT_HOME, new File(conf.get(PigConstants.HCAT_HOME)).getAbsolutePath());
 }
 if(conf.get(PigConstants.PIG_OPTS) != null) {
  StringBuilder pigOpts = new StringBuilder();
  for(String prop : StringUtils.split(conf.get(PigConstants.PIG_OPTS))) {
   pigOpts.append("-D").append(StringUtils.unEscapeString(prop)).append(" ");
  }
  env.put(PigConstants.PIG_OPTS, pigOpts.toString());
 }
}
origin: apache/drill

/**
 * Get the list of input {@link Path}s for the map-reduce job.
 *
 * @param conf The configuration of the job
 * @return the list of input {@link Path}s for the map-reduce job.
 */
static Path[] getInputPaths(Configuration conf) throws IOException {
 String dirs = conf.get("mapred.input.dir");
 if (dirs == null) {
  throw new IOException("Configuration mapred.input.dir is not defined.");
 }
 String [] list = StringUtils.split(dirs);
 Path[] result = new Path[list.length];
 for (int i = 0; i < list.length; i++) {
  result[i] = new Path(StringUtils.unEscapeString(list[i]));
 }
 return result;
}
origin: com.github.jiayuhan-it/hadoop-common

/**
 * Unescape commas in the string using the default escape char
 * @param str a string
 * @return an unescaped string
 */
public static String unEscapeString(String str) {
 return unEscapeString(str, ESCAPE_CHAR, COMMA);
}

origin: io.prestosql.hadoop/hadoop-apache

/**
 * Unescape commas in the string using the default escape char
 * @param str a string
 * @return an unescaped string
 */
public static String unEscapeString(String str) {
 return unEscapeString(str, ESCAPE_CHAR, COMMA);
}

origin: ch.cern.hadoop/hadoop-common

/**
 * Unescape commas in the string using the default escape char
 * @param str a string
 * @return an unescaped string
 */
public static String unEscapeString(String str) {
 return unEscapeString(str, ESCAPE_CHAR, COMMA);
}

origin: io.hops/hadoop-common

/**
 * Unescape commas in the string using the default escape char
 * @param str a string
 * @return an unescaped string
 */
public static String unEscapeString(String str) {
 return unEscapeString(str, ESCAPE_CHAR, COMMA);
}

origin: com.facebook.hadoop/hadoop-core

/**
 * Unescape commas in the string using the default escape char
 * @param str a string
 * @return an unescaped string
 */
public static String unEscapeString(String str) {
 return unEscapeString(str, ESCAPE_CHAR, COMMA);
}

origin: org.jvnet.hudson.hadoop/hadoop-core

/**
 * Unescape commas in the string using the default escape char
 * @param str a string
 * @return an unescaped string
 */
public static String unEscapeString(String str) {
 return unEscapeString(str, ESCAPE_CHAR, COMMA);
}

origin: org.apache.hive.hcatalog/hive-webhcat

/**
 * Take an encode strings and decode it into an array of strings.
 */
public static String[] decodeArray(String s) {
 if (s == null)
  return null;
 String[] escaped = StringUtils.split(s);
 String[] plain = new String[escaped.length];
 for (int i = 0; i < escaped.length; ++i)
  plain[i] = StringUtils.unEscapeString(escaped[i]);
 return plain;
}
origin: io.github.repir/RepIRTools

public static Path[] getInputPaths(Configuration conf) {
  String dirs = conf.get(INPUT_DIR, "");
  String[] list = StringUtils.split(dirs);
  Path[] result = new Path[list.length];
  for (int i = 0; i < list.length; i++) {
    result[i] = new Path(StringUtils.unEscapeString(list[i]));
  }
  return result;
}
origin: ShifuML/shifu

  public static Path[] getInputPaths(JobContext context) {
    String dirs = context.getConfiguration().get(CommonConstants.CROSS_VALIDATION_DIR, "");
    LOG.info("crossValidation_dir:" + dirs);
    String[] list = StringUtils.split(dirs);
    Path[] result = new Path[list.length];
    for(int i = 0; i < list.length; i++) {
      result[i] = new Path(StringUtils.unEscapeString(list[i]));
    }
    return result;
  }
}
origin: ShifuML/guagua

/**
 * Get the list of input {@link Path}s for the map-reduce job.
 */
private static Path[] getInputPaths(String inputs) {
  String[] list = StringUtils.split(inputs);
  Path[] result = new Path[list.length];
  for(int i = 0; i < list.length; i++) {
    result[i] = new Path(StringUtils.unEscapeString(list[i]));
  }
  return result;
}
origin: ml.shifu/guagua-yarn

/**
 * Get the list of input {@link Path}s for the map-reduce job.
 */
private static Path[] getInputPaths(String inputs) {
  String[] list = StringUtils.split(inputs);
  Path[] result = new Path[list.length];
  for(int i = 0; i < list.length; i++) {
    result[i] = new Path(StringUtils.unEscapeString(list[i]));
  }
  return result;
}
origin: ml.shifu/guagua-mapreduce

/**
 * Get the list of input {@link Path}s for the map-reduce job.
 */
private static Path[] getInputPaths(String inputs) {
  String[] list = StringUtils.split(inputs);
  Path[] result = new Path[list.length];
  for(int i = 0; i < list.length; i++) {
    result[i] = new Path(StringUtils.unEscapeString(list[i]));
  }
  return result;
}
origin: ml.shifu/guagua-mapreduce

/**
 * Get the list of input {@link Path}s for the map-reduce job.
 */
private static Path[] getInputPaths(String inputs) {
  String[] list = StringUtils.split(inputs);
  Path[] result = new Path[list.length];
  for(int i = 0; i < list.length; i++) {
    result[i] = new Path(StringUtils.unEscapeString(list[i]));
  }
  return result;
}
org.apache.hadoop.utilStringUtilsunEscapeString

Javadoc

Unescape commas in the string using the default escape char

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JComboBox (javax.swing)
  • JLabel (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top plugins for Android Studio
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