/** * Return the {@link IQueryAttributes} associated with this query. * * @return The {@link IQueryAttributes}. */ public IQueryAttributes getQueryAttributes() { return getRunningQuery().getAttributes(); }
/** * Return the {@link IQueryAttributes} associated with this query. * * @return The {@link IQueryAttributes}. */ public IQueryAttributes getQueryAttributes() { return getRunningQuery().getAttributes(); }
/** * Return the {@link IQueryAttributes} associated with the specified query. * * @param queryId * The {@link UUID} of some {@link IRunningQuery} -or- null to * use the {@link IQueryAttributes} of this query. * * @return The {@link IQueryAttributes} for that {@link IRunningQuery}. * * @throws RuntimeException * if the {@link IRunningQuery} has halted. * @throws RuntimeException * if the {@link IRunningQuery} is not found. */ public IQueryAttributes getQueryAttributes(final UUID queryId) { if (queryId == null) // See BLZG-1493 return getRunningQuery().getAttributes(); return getRunningQuery(queryId).getAttributes(); }
/** * Return the {@link IQueryAttributes} associated with the specified query. * * @param queryId * The {@link UUID} of some {@link IRunningQuery} -or- null to * use the {@link IQueryAttributes} of this query. * * @return The {@link IQueryAttributes} for that {@link IRunningQuery}. * * @throws RuntimeException * if the {@link IRunningQuery} has halted. * @throws RuntimeException * if the {@link IRunningQuery} is not found. */ public IQueryAttributes getQueryAttributes(final UUID queryId) { if (queryId == null) // See BLZG-1493 return getRunningQuery().getAttributes(); return getRunningQuery(queryId).getAttributes(); }
/** * Return the samples associated with the computed join path. * * @see Annotations#SAMPLES */ @SuppressWarnings("unchecked") public Map<PathIds, EdgeSample> getSamples(final IRunningQuery q) { return (Map<PathIds, EdgeSample>) q.getAttributes().get( getId() + "-" + Attributes.SAMPLES); }
/** * Return the computed join path. * * @see Attributes#PATH */ public Path getPath(final IRunningQuery q) { return (Path) q.getAttributes().get(getId() + "-" + Attributes.PATH); }
/** * Return the query plan to be executed based on the RTO determined join * ordering. * * @see Attributes#QUERY_PLAN */ public PipelineOp getQueryPlan(final IRunningQuery q) { return (PipelineOp) q.getAttributes().get( getId() + "-" + Attributes.QUERY_PLAN); }
/** * Return the computed join path. * * @see Attributes#PATH */ public Path getPath(final IRunningQuery q) { return (Path) q.getAttributes().get(getId() + "-" + Attributes.PATH); }
/** * Return the query plan to be executed based on the RTO determined join * ordering. * * @see Attributes#QUERY_PLAN */ public PipelineOp getQueryPlan(final IRunningQuery q) { return (PipelineOp) q.getAttributes().get( getId() + "-" + Attributes.QUERY_PLAN); }
/** * Discard the shared state (this can not be discarded until the last * invocation). */ private void release() { context.getRunningQuery().getAttributes().remove(sharedStateKey); }
/** * Discard the shared state (this can not be discarded until the last * invocation). */ private void release() { context.getRunningQuery().getAttributes().remove(sharedStateKey); }
private void setSamples(final IRunningQuery q, final Map<PathIds, EdgeSample> samples) { q.getAttributes().put(getId() + "-" + Attributes.SAMPLES, samples); }
/** * Return the samples associated with the computed join path. * * @see Annotations#SAMPLES */ @SuppressWarnings("unchecked") public Map<PathIds, EdgeSample> getSamples(final IRunningQuery q) { return (Map<PathIds, EdgeSample>) q.getAttributes().get( getId() + "-" + Attributes.SAMPLES); }
private void setQueryPlan(final IRunningQuery q, final PipelineOp queryPlan) { q.getAttributes().put(getId() + "-" + Attributes.QUERY_PLAN, queryPlan); }
private void setSamples(final IRunningQuery q, final Map<PathIds, EdgeSample> samples) { q.getAttributes().put(getId() + "-" + Attributes.SAMPLES, samples); }
private void setQueryPlan(final IRunningQuery q, final PipelineOp queryPlan) { q.getAttributes().put(getId() + "-" + Attributes.QUERY_PLAN, queryPlan); }
private void setPath(final IRunningQuery q, final Path p) { q.getAttributes().put(getId() + "-" + Attributes.PATH, p); }
private void setPath(final IRunningQuery q, final Path p) { q.getAttributes().put(getId() + "-" + Attributes.PATH, p); }
DistinctTask(final JVMDistinctBindingSetsOp op, final BOpContext<IBindingSet> context) { this.context = context; this.chunkCapacity = op.getChunkCapacity(); final IVariable<?>[] vars = op.getVariables(); /* * The map is shared state across invocations of this operator task. */ { final Integer key = op.getId(); final IQueryAttributes attribs = context.getRunningQuery() .getAttributes(); IDistinctFilter filter = (IDistinctFilter) attribs.get(key); if (filter == null) { filter = new JVMDistinctFilter(vars, op.getInitialCapacity(), op.getLoadFactor(), op.getConcurrencyLevel()); final IDistinctFilter tmp = (IDistinctFilter) attribs .putIfAbsent(key, filter); if (tmp != null) filter = tmp; } this.filter = filter; } } @Override
DistinctTask(final JVMDistinctBindingSetsOp op, final BOpContext<IBindingSet> context) { this.context = context; this.chunkCapacity = op.getChunkCapacity(); final IVariable<?>[] vars = op.getVariables(); /* * The map is shared state across invocations of this operator task. */ { final Integer key = op.getId(); final IQueryAttributes attribs = context.getRunningQuery() .getAttributes(); IDistinctFilter filter = (IDistinctFilter) attribs.get(key); if (filter == null) { filter = new JVMDistinctFilter(vars, op.getInitialCapacity(), op.getLoadFactor(), op.getConcurrencyLevel()); final IDistinctFilter tmp = (IDistinctFilter) attribs .putIfAbsent(key, filter); if (tmp != null) filter = tmp; } this.filter = filter; } } @Override