Codota Logo
StringUtils.unEscapeString
Code IndexAdd Codota 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)

  • 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

/**
 * 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

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • String (java.lang)
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • JLabel (javax.swing)
  • JOptionPane (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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