@Override
      public Void execute(int size) throws HiveException {
        result.clear();
        PartitionIterable partitionIterable = new PartitionIterable(Hive.get(), tbl, partialPartitionSpec, size,
            isAuthRequired, userName, groupNames);
        partitionIterable.forEach(result::add);
        return null;
      }
Main method which fetches the partitions in batches
@param tbl table for which partitions are needed
@param batchSize Number of partitions to be fectehd in one batched call
@param decayingFactor the value by which batchSize decays in the next retry in case it faces an exception
@param maxRetries Number of retries allowed for this operation
@param partialPartitionSpec partialPartitionSpec for the table
@param isAuthRequired If auth information is required along with partitions
@param userName name of the calling user
@param groupNames groups the call
@return list of partition objects
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java