public Path createPath(Table tbl) throws HiveException {
      String prefixSubdir;
      try {
        prefixSubdir = Warehouse.makePartName(fields, values);
      } catch (MetaException e) {
        throw new HiveException("Unable to get partitions directories prefix", e);
      }
      Path tableDir = tbl.getDataLocation();
      if (tableDir == null) {
        throw new HiveException("Table has no location set");
      }
      return new Path(tableDir, prefixSubdir);
    }
Creates path where partitions matching prefix should lie in filesystem
@param tbl table in which partition is
@return expected location of partitions matching prefix in filesystem
ql/src/java/org/apache/hadoop/hive/ql/exec/ArchiveUtils.java