Search in sources :

Example 1 with SeekingQueryPlanner

use of datawave.query.planner.SeekingQueryPlanner in project datawave by NationalSecurityAgency.

the class LookupUUIDTune method configure.

@Override
public void configure(BaseQueryLogic<Entry<Key, Value>> logic) {
    if (logic instanceof ShardQueryLogic) {
        ShardQueryLogic rsq = ShardQueryLogic.class.cast(logic);
        rsq.setBypassAccumulo(bypassAccumulo);
        rsq.setSpeculativeScanning(speculativeScanning);
        rsq.setCacheModel(enableCaching);
        rsq.setPrimaryToSecondaryFieldMap(primaryToSecondaryFieldMap);
        rsq.setEnforceUniqueTermsWithinExpressions(enforceUniqueTermsWithinExpressions);
        if (querySyntaxParsers != null) {
            rsq.setQuerySyntaxParsers(querySyntaxParsers);
        }
        if (reduceResponse) {
            rsq.setParseTldUids(true);
            // setup SeekingQueryPlanner in case the queryIterator requires it
            SeekingQueryPlanner planner = new SeekingQueryPlanner();
            planner.setMaxFieldHitsBeforeSeek(maxFieldHitsBeforeSeek);
            planner.setMaxKeysBeforeSeek(maxKeysBeforeSeek);
            rsq.setQueryPlanner(planner);
            if (maxPageSize != -1) {
                rsq.setMaxPageSize(maxPageSize);
            }
            if (pageByteTrigger != -1) {
                rsq.setPageByteTrigger(pageByteTrigger);
            }
        }
    }
}
Also used : ShardQueryLogic(datawave.query.tables.ShardQueryLogic) SeekingQueryPlanner(datawave.query.planner.SeekingQueryPlanner)

Aggregations

SeekingQueryPlanner (datawave.query.planner.SeekingQueryPlanner)1 ShardQueryLogic (datawave.query.tables.ShardQueryLogic)1