Search in sources :

Example 1 with TabletInfoImpl

use of com.mapr.db.impl.TabletInfoImpl in project drill by apache.

the class JsonTableGroupScan method computeRegionsToScan.

/**
   * Compute regions to scan based on the scanSpec
   */
private void computeRegionsToScan() {
    boolean foundStartRegion = false;
    regionsToScan = new TreeMap<TabletFragmentInfo, String>();
    for (TabletInfo tabletInfo : tabletInfos) {
        TabletInfoImpl tabletInfoImpl = (TabletInfoImpl) tabletInfo;
        if (!foundStartRegion && !isNullOrEmpty(scanSpec.getStartRow()) && !tabletInfoImpl.containsRow(scanSpec.getStartRow())) {
            continue;
        }
        foundStartRegion = true;
        regionsToScan.put(new TabletFragmentInfo(tabletInfoImpl), tabletInfo.getLocations()[0]);
        if (!isNullOrEmpty(scanSpec.getStopRow()) && tabletInfoImpl.containsRow(scanSpec.getStopRow())) {
            break;
        }
    }
}
Also used : TabletInfoImpl(com.mapr.db.impl.TabletInfoImpl) TabletFragmentInfo(org.apache.drill.exec.store.mapr.db.TabletFragmentInfo) TabletInfo(com.mapr.db.TabletInfo)

Aggregations

TabletInfo (com.mapr.db.TabletInfo)1 TabletInfoImpl (com.mapr.db.impl.TabletInfoImpl)1 TabletFragmentInfo (org.apache.drill.exec.store.mapr.db.TabletFragmentInfo)1