RegionScanner innerScanner = s;
if (p != null || j != null) {
innerScanner = new HashJoinRegionScanner(s, p, j, tenantId, c.getEnvironment());
}
final OrderedResultIterator iterator = deserializeFromScan(scan,innerScanner);
if (iterator == null) {
return getWrappedScanner(c, innerScanner);
}
return getTopNScanner(c, innerScanner, iterator, tenantId);