public Set<Partition> getAllPartitionsOf(Table tbl) throws HiveException {
    int batchSize = tbl.hasNonNativePartitionSupport() ? 
        0 : MetastoreConf.getIntVar(conf, MetastoreConf.ConfVars.BATCH_RETRIEVE_MAX);
    if (batchSize > 0) {
      return getAllPartitionsInBatches(tbl, batchSize, DEFAULT_BATCH_DECAYING_FACTOR, MetastoreConf.getIntVar(
          conf, MetastoreConf.ConfVars.GETPARTITIONS_BATCH_MAX_RETRIES), null, false);
    } else {
      return getAllPartitions(tbl);
    }
  }
Get all the partitions. Do it in batches if batchSize is more than 0 else get it in one call.
@param tbl table for which partitions are needed
@return list of partition objects
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java