public static int getBucketingVersion(final String versionStr) {
    int bucketingVersion = 1;
    if (versionStr != null) {
      try {
        bucketingVersion = Integer.parseInt(versionStr);
      } catch (NumberFormatException e) {
        // Do nothing
      }
    }
    return bucketingVersion;
  }
Checks if path passed in exists and has writable permissions.
The path will be created if it does not exist.
@param rootHDFSDirPath
@param conf
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java