static URL urlFromPathString(String onestr) {
    URL oneurl = null;
    try {
      if (StringUtils.indexOf(onestr, "file:/") == 0) {
        oneurl = new URL(onestr);
      } else {
        oneurl = new File(onestr).toURL();
      }
    } catch (Exception err) {
      LOG.error("Bad URL {}, ignoring path", onestr);
    }
    return oneurl;
  }
Create a URL from a string representing a path to a local file.
The path string can be just a path, or can start with file:/, file:///
@param onestr  path string
@return
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java