use of datawave.query.planner.DefaultQueryPlanner in project datawave by NationalSecurityAgency.
the class WiredQueryExecutorBeanTest method testCreatingContext.
@Test
public void testCreatingContext() throws Exception {
DefaultQueryPlanner defaultQueryPlanner = ctx.getBean("DefaultQueryPlanner", DefaultQueryPlanner.class);
Assert.assertNotNull(defaultQueryPlanner);
}
use of datawave.query.planner.DefaultQueryPlanner in project datawave by NationalSecurityAgency.
the class LookupUUIDTune method configure.
@Override
public void configure(QueryPlanner planner) {
if (planner instanceof DefaultQueryPlanner) {
DefaultQueryPlanner dqp = DefaultQueryPlanner.class.cast(planner);
dqp.setCacheDataTypes(enableCaching);
if (transforms != null) {
dqp.setTransformRules(transforms);
}
if (disableComplexFunctions) {
dqp.setDisableAnyFieldLookup(true);
dqp.setDisableBoundedLookup(true);
dqp.setDisableCompositeFields(true);
dqp.setDisableExpandIndexFunction(true);
dqp.setDisableTestNonExistentFields(true);
if (reduceResponse)
try {
Class iteratorClass = Class.forName(this.queryIteratorClass);
dqp.setQueryIteratorClass(iteratorClass);
} catch (ClassNotFoundException e) {
throw new IllegalStateException("Cannot Instantiate queryIteratorClass: " + this.queryIteratorClass, e);
}
}
if (enablePreload) {
dqp.setPreloadOptions(true);
}
}
}
use of datawave.query.planner.DefaultQueryPlanner in project datawave by NationalSecurityAgency.
the class AbstractFunctionalQuery method querySetUp.
@Before
public void querySetUp() throws IOException {
log.debug("--------- querySetUp ---------");
this.logic = createQueryLogic();
QueryTestTableHelper.configureLogicToScanTables(this.logic);
this.logic.setFullTableScanEnabled(false);
this.logic.setIncludeDataTypeAsField(true);
this.logic.setDateIndexHelperFactory(new DateIndexHelperFactory());
this.logic.setMarkingFunctions(new Default());
this.logic.setMetadataHelperFactory(new MetadataHelperFactory());
this.logic.setQueryPlanner(new DefaultQueryPlanner());
this.logic.setResponseObjectFactory(new DefaultResponseObjectFactory());
this.logic.setCollectTimingDetails(true);
this.logic.setLogTimingDetails(true);
this.logic.setMinimumSelectivity(0.03D);
this.logic.setMaxIndexScanTimeMillis(5000);
// count logic
countLogic.setIncludeDataTypeAsField(true);
countLogic.setFullTableScanEnabled(false);
countLogic.setDateIndexHelperFactory(new DateIndexHelperFactory());
countLogic.setMarkingFunctions(new Default());
countLogic.setMetadataHelperFactory(new MetadataHelperFactory());
countLogic.setQueryPlanner(new DefaultQueryPlanner());
countLogic.setResponseObjectFactory(new DefaultResponseObjectFactory());
QueryTestTableHelper.configureLogicToScanTables(countLogic);
// init must set auths
testInit();
Assert.assertNotNull(this.auths);
authSet.clear();
authSet.add(this.auths);
SubjectIssuerDNPair dn = SubjectIssuerDNPair.of("userDn", "issuerDn");
DatawaveUser user = new DatawaveUser(dn, DatawaveUser.UserType.USER, Sets.newHashSet(this.auths.toString().split(",")), null, null, -1L);
this.principal = new DatawavePrincipal(Collections.singleton(user));
this.testHarness = new QueryLogicTestHarness(this);
}
use of datawave.query.planner.DefaultQueryPlanner in project datawave by NationalSecurityAgency.
the class ExceededOrThresholdMarkerJexlNodeTest method getShardQueryLogic.
private ShardQueryLogic getShardQueryLogic() throws IOException {
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.planner.DefaultQueryPlanner in project datawave by NationalSecurityAgency.
the class IndexQueryLogicTest method querySetUp.
@Before
public void querySetUp() throws IOException {
log.debug("--------- querySetUp ---------");
// Super call to pick up authSet initialization
super.querySetUp();
this.logic = new IndexQueryLogic();
QueryTestTableHelper.configureLogicToScanTables(this.logic);
this.logic.setFullTableScanEnabled(false);
this.logic.setIncludeDataTypeAsField(true);
this.logic.setIncludeGroupingContext(true);
this.logic.setDateIndexHelperFactory(new DateIndexHelperFactory());
this.logic.setMarkingFunctions(new MarkingFunctions.Default());
this.logic.setMetadataHelperFactory(new MetadataHelperFactory());
this.logic.setQueryPlanner(new DefaultQueryPlanner());
this.logic.setResponseObjectFactory(new DefaultResponseObjectFactory());
// init must set auths
testInit();
SubjectIssuerDNPair dn = SubjectIssuerDNPair.of("userDn", "issuerDn");
DatawaveUser user = new DatawaveUser(dn, DatawaveUser.UserType.USER, Sets.newHashSet(this.auths.toString().split(",")), null, null, -1L);
this.principal = new DatawavePrincipal(Collections.singleton(user));
this.testHarness = new QueryLogicTestHarness(this);
}
Aggregations