/** * Construct a PartitionedRegionQueryEvaluator * * @param sys the distributed system * @param pr the partitioned region * @param query the query * @param parameters the parameters for executing the query * @param cumulativeResults where to add the results as they come in */ public PartitionedRegionQueryEvaluator(InternalDistributedSystem sys, PartitionedRegion pr, DefaultQuery query, Object[] parameters, SelectResults cumulativeResults, Set<Integer> bucketsToQuery) { super(sys, pr.getPRId()); this.pr = pr; this.query = query; this.parameters = parameters; this.cumulativeResults = cumulativeResults; this.bucketsToQuery = bucketsToQuery; this.resultsPerMember = new ConcurrentHashMap<InternalDistributedMember, Collection<Collection>>(); this.node2bucketIds = Collections.emptyMap(); if (query != null && query.isTraced()) { prQueryTraceInfoList = new ConcurrentLinkedQueue(); } }
public QueryMessage(InternalDistributedMember recipient, int regionId, ReplyProcessor21 processor, DefaultQuery query, Object[] parameters, final List buckets) { super(recipient, regionId, processor); this.queryString = query.getQueryString(); this.buckets = buckets; this.parameters = parameters; this.cqQuery = query.isCqQuery(); this.traceOn = query.isTraced() || DefaultQuery.QUERY_VERBOSE; }
/** * Asif: This method should not be used for multiple partitioned regions based join queries We do * not support equijoin queries on PartitionedRegions unless they are colocated and the the * colocated columns ACTUALLY EXIST IN WHERE CLAUSE , AND IN CASE OF MULTI COLUMN PARTITIONING , * SHOULD HAVE AND CLAUSE. * * If not , this method will return wrong results. We DO NOT DETECT COLOCATION CRITERIA IN THE * MULTI REGION PR BASED QUERIES. */ @Override public Object executeQuery(DefaultQuery query, Object[] parameters, Set buckets) throws FunctionDomainException, TypeMismatchException, NameResolutionException, QueryInvocationTargetException { long startTime = 0L; Object result = null; boolean traceOn = DefaultQuery.QUERY_VERBOSE || query.isTraced(); if (traceOn && this.proxy != null) { startTime = NanoTimer.getTime(); } QueryObserver indexObserver = query.startTrace(); try { result = this.proxy.executeQuery(query, parameters, buckets); } finally { query.endTrace(indexObserver, startTime, result); } return result; }
if (prQueryTraceInfoList != null && this.query.isTraced() && logger.isInfoEnabled()) { if (DefaultQuery.testHook != null) { DefaultQuery.testHook
query.isTraced() && this.sender.getVersionObject().compareTo(Version.GFE_81) >= 0;