protected RowRangeHistogramStatistics<?> getHistStats( final Index index, final List<Short> adapterIds, final TransientAdapterStore adapterStore, final DataStatisticsStore statsStore, final Map<Pair<Index, ByteArray>, RowRangeHistogramStatistics<?>> statsCache, final ByteArray partitionKey, final String[] authorizations) throws IOException { Pair<Index, ByteArray> key = Pair.of(index, partitionKey); RowRangeHistogramStatistics<?> rangeStats = statsCache.get(key); if (rangeStats == null) { try { rangeStats = getRangeStats( index, adapterIds, adapterStore, statsStore, partitionKey, authorizations); if (rangeStats != null) { statsCache.put(key, rangeStats); } } catch (final Exception e) { throw new IOException(e); } } return rangeStats; }