private static boolean isValidWALRootDir(Path walDir, final Configuration c) throws IOException {
    Path rootDir = getRootDir(c);
    FileSystem fs = walDir.getFileSystem(c);
    Path qualifiedWalDir = walDir.makeQualified(fs.getUri(), fs.getWorkingDirectory());
    if (!qualifiedWalDir.equals(rootDir)) {
      if (qualifiedWalDir.toString().startsWith(rootDir.toString() + "/")) {
        throw new IllegalStateException("Illegal WAL directory specified. "
          + "WAL directories are not permitted to be under root directory: rootDir="
          + rootDir.toString() + ", qualifiedWALDir=" + qualifiedWalDir);
      }
    }
    return true;
  }
Returns the URI in the string format
@param c configuration
@param p path
@return - the URI's to string format
hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java