public Path getDataLocation() {
    if (table.isPartitioned()) {
      if (tPartition.getSd() == null) {
        return null;
      } else {
        return new Path(tPartition.getSd().getLocation());
      }
    } else {
      if (table.getTTable() == null || table.getTTable().getSd() == null) {
        return null;
      } else {
        return new Path(table.getTTable().getSd().getLocation());
      }
    }
  }
Initializes this object with the given variables

@param table
         Table the partition belongs to
@param tPartition
         Thrift Partition object
@throws HiveException
          Thrown if we cannot initialize the partition
ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java