class BufferedPartitionFetcher implements PartitionFetcher {

  @Override
  public Partition fetch(String partitionName) {
    int partitionPosition = partitionNames.indexOf(partitionName);
    if (partitionPosition < 0) {
      throw new PartitionNotFoundException("Unknown partition " + partitionName);
    }

    if (!buffer.containsKey(partitionName)) {
      bufferPartitions(partitionPosition);
    }

    return buffer.get(partitionName);
  }

  public  BufferedPartitionFetcher(IMetaStoreClient metastore, Table table, short bufferSize);

}