use of datawave.query.tables.ShardQueryLogic 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);
}
}
}
}
use of datawave.query.tables.ShardQueryLogic in project datawave by NationalSecurityAgency.
the class GroupingDocumentTransformer method createGroupFieldsList.
public void createGroupFieldsList(Collection<String> groupFieldsSet) {
this.groupFieldsList = Lists.newArrayList(groupFieldsSet);
QueryModel model = ((ShardQueryLogic) logic).getQueryModel();
for (String groupField : groupFieldsSet) {
String f = model.getReverseAliasForField(groupField);
if (f != null && !f.isEmpty()) {
this.groupFieldsList.add(f);
}
}
}
use of datawave.query.tables.ShardQueryLogic in project datawave by NationalSecurityAgency.
the class MixedGeoAndGeoWaveTest method getQueryResults.
private List<DefaultEvent> getQueryResults(String queryString) throws Exception {
ShardQueryLogic logic = getShardQueryLogic();
Iterator iter = getResultsIterator(queryString, logic);
List<DefaultEvent> events = new ArrayList<>();
while (iter.hasNext()) events.add((DefaultEvent) iter.next());
return events;
}
use of datawave.query.tables.ShardQueryLogic in project datawave by NationalSecurityAgency.
the class MixedGeoAndGeoWaveTest method getShardQueryLogic.
private ShardQueryLogic getShardQueryLogic() {
ShardQueryLogic logic = new ShardQueryLogic(this.logic);
// increase the depth threshold
logic.setMaxDepthThreshold(20);
// set the pushdown threshold really high to avoid collapsing uids into shards (overrides setCollapseUids if #terms is greater than this threshold)
((DefaultQueryPlanner) (logic.getQueryPlanner())).setPushdownThreshold(1000000);
URL hdfsSiteConfig = this.getClass().getResource("/testhadoop.config");
logic.setHdfsSiteConfigURLs(hdfsSiteConfig.toExternalForm());
setupIvarator(logic);
return logic;
}
use of datawave.query.tables.ShardQueryLogic in project datawave by NationalSecurityAgency.
the class ContentFunctionQueryTest method getShardQueryLogic.
private ShardQueryLogic getShardQueryLogic(boolean useIvarator) {
ShardQueryLogic logic = new ShardQueryLogic(this.logic);
// increase the depth threshold
logic.setMaxDepthThreshold(20);
// set the pushdown threshold really high to avoid collapsing uids into shards (overrides setCollapseUids if #terms is greater than this threshold)
((DefaultQueryPlanner) (logic.getQueryPlanner())).setPushdownThreshold(1000000);
URL hdfsSiteConfig = this.getClass().getResource("/testhadoop.config");
logic.setHdfsSiteConfigURLs(hdfsSiteConfig.toExternalForm());
logic.setIvaratorCacheDirConfigs(ivaratorCacheDirConfigs);
if (useIvarator)
setupIvarator(logic);
return logic;
}
Aggregations