From: <tho...@us...> - 2010-10-08 16:42:40
|
Revision: 3758 http://bigdata.svn.sourceforge.net/bigdata/?rev=3758&view=rev Author: thompsonbry Date: 2010-10-08 16:42:34 +0000 (Fri, 08 Oct 2010) Log Message: ----------- Modified to set the REMOTE_ACCESS_PATH annotation on the Predicate rather than the Join Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2010-10-08 16:22:13 UTC (rev 3757) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2010-10-08 16:42:34 UTC (rev 3758) @@ -670,15 +670,13 @@ if (scaleOut) { anns.add(new NV(Predicate.Annotations.EVALUATION_CONTEXT, BOpEvaluationContext.SHARDED)); - anns - .add(new NV(Predicate.Annotations.REMOTE_ACCESS_PATH, - false)); + pred = (Predicate) pred.setProperty( + Predicate.Annotations.REMOTE_ACCESS_PATH, false); } else { anns.add(new NV(Predicate.Annotations.EVALUATION_CONTEXT, BOpEvaluationContext.ANY)); - anns - .add(new NV(Predicate.Annotations.REMOTE_ACCESS_PATH, - false)); + pred = (Predicate) pred.setProperty( + Predicate.Annotations.REMOTE_ACCESS_PATH, false); } return new PipelineJoin(new BOp[] { dataSetJoin, pred }, anns @@ -905,15 +903,13 @@ if (scaleOut) { anns.add(new NV(Predicate.Annotations.EVALUATION_CONTEXT, BOpEvaluationContext.ANY)); - anns - .add(new NV(Predicate.Annotations.REMOTE_ACCESS_PATH, - true)); + pred = (Predicate) pred.setProperty( + Predicate.Annotations.REMOTE_ACCESS_PATH, false); } else { anns.add(new NV(Predicate.Annotations.EVALUATION_CONTEXT, BOpEvaluationContext.ANY)); - anns - .add(new NV(Predicate.Annotations.REMOTE_ACCESS_PATH, - false)); + pred = (Predicate) pred.setProperty( + Predicate.Annotations.REMOTE_ACCESS_PATH, false); } return new PipelineJoin(new BOp[] { left, pred }, anns This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2011-01-02 22:49:33
|
Revision: 4046 http://bigdata.svn.sourceforge.net/bigdata/?rev=4046&view=rev Author: thompsonbry Date: 2011-01-02 22:49:27 +0000 (Sun, 02 Jan 2011) Log Message: ----------- Backed out the runtime optimizer query hint since it was not correctly integrated. I've added some more inline comments on how the integration should be developed. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-02 21:40:00 UTC (rev 4045) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-02 22:49:27 UTC (rev 4046) @@ -66,8 +66,6 @@ import com.bigdata.bop.bset.StartOp; import com.bigdata.bop.controller.Steps; import com.bigdata.bop.controller.Union; -import com.bigdata.bop.controller.JoinGraph.JGraph; -import com.bigdata.bop.controller.JoinGraph.Path; import com.bigdata.bop.cost.ScanCostReport; import com.bigdata.bop.cost.SubqueryCostReport; import com.bigdata.bop.engine.QueryEngine; @@ -443,6 +441,16 @@ * which optimizes the join graph and then evaluates it rather than * explicitly doing the optimization and evaluation steps here. * + * FIXME The runtime query optimizer can not be run against an + * IPredicate[] extracted from the IRule, even for triples, because + * those IPredicates lack some critical annotations, such as the + * bopId, which are only added in the logic below this point. Thus, + * while we can run the static optimizer first, the runtime + * optimizer needs to be run after we convert to bops (or as a bop + * at runtime). [This all runs into trouble because we are creating + * the JOIN operators in the code below rather than inferring the + * correct JOIN annotations based on the IPredicates.] + * * @todo Make sure that a summary of the information collected by * the runtime query optimizer is attached as an annotation to the * query. @@ -450,35 +458,38 @@ * @todo query hints for [limit] and [nedges]. */ - // The initial sampling limit. - final int limit = 100; +// // The initial sampling limit. +// final int limit = 100; +// +// // The #of edges considered for the initial paths. +// final int nedges = 2; +// +// // isolate/extract the join graph. +// final IPredicate[] preds = new IPredicate[rule.getTailCount()]; +// for (int i = 0; i < preds.length; i++) { +// preds[i] = rule.getTail(i); +// } +// +// final JGraph g = new JGraph(preds); +// +// final Path p; +// try { +// p = g.runtimeOptimizer(queryEngine, limit, nedges); +// } catch (Exception e) { +// throw new RuntimeException(e); +// } +// +// // the permutation order. +// order = g.getOrder(p); +// +// keyOrder = null; +// +// cardinality = null; +// +// break; - // The #of edges considered for the initial paths. - final int nedges = 2; + throw new UnsupportedOperationException("Runtime optimizer is not supported yet."); - // isolate/extract the join graph. - final IPredicate[] preds = new IPredicate[rule.getTailCount()]; - for (int i = 0; i < preds.length; i++) { - preds[i] = rule.getTail(i); - } - - final JGraph g = new JGraph(preds); - - final Path p; - try { - p = g.runtimeOptimizer(queryEngine, limit, nedges); - } catch (Exception e) { - throw new RuntimeException(e); - } - - // the permutation order. - order = g.getOrder(p); - - keyOrder = null; - - cardinality = null; - - break; } default: throw new AssertionError("Unknown option: " + optimizer); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2011-01-13 20:47:50
|
Revision: 4088 http://bigdata.svn.sourceforge.net/bigdata/?rev=4088&view=rev Author: thompsonbry Date: 2011-01-13 20:47:44 +0000 (Thu, 13 Jan 2011) Log Message: ----------- javadoc Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-13 20:25:42 UTC (rev 4087) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-13 20:47:44 UTC (rev 4088) @@ -258,7 +258,8 @@ BOpEvaluationContext.CONTROLLER)) { /* * Wrap with an operator which will be evaluated on the query - * controller. + * controller so the results will be streamed back to the query + * controller in scale-out. */ tmp = new SliceOp(new BOp[] { tmp }, NV.asMap(// new NV(BOp.Annotations.BOP_ID, idFactory This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2011-01-19 16:13:31
|
Revision: 4128 http://bigdata.svn.sourceforge.net/bigdata/?rev=4128&view=rev Author: thompsonbry Date: 2011-01-19 16:13:24 +0000 (Wed, 19 Jan 2011) Log Message: ----------- Added comment that the CONDITION for the ConditionalRoutingOp should be lifted into the SubqueryOp. This way we can issue fewer subqueries. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-19 02:03:23 UTC (rev 4127) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-19 16:13:24 UTC (rev 4128) @@ -550,7 +550,7 @@ PipelineOp left = startOp; - if (conditionals != null) { + if (conditionals != null) { // @todo lift into CONDITION on SubqueryOp for (IConstraint c : conditionals) { final int condId = idFactory.incrementAndGet(); final PipelineOp condOp = applyQueryHints( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-01-20 17:48:27
|
Revision: 4140 http://bigdata.svn.sourceforge.net/bigdata/?rev=4140&view=rev Author: mrpersonick Date: 2011-01-20 17:48:21 +0000 (Thu, 20 Jan 2011) Log Message: ----------- took out SELECT annotation for now - it's broken Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-20 16:54:51 UTC (rev 4139) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-20 17:48:21 UTC (rev 4140) @@ -632,8 +632,8 @@ anns.add(new NV(BOp.Annotations.BOP_ID, joinId)); - anns.add(new NV(PipelineJoin.Annotations.SELECT, - selectVars[order[i]])); +// anns.add(new NV(PipelineJoin.Annotations.SELECT, +// selectVars[order[i]])); // No. The join just looks at the Predicate's optional annotation. // if (pred.isOptional()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-02-10 16:39:31
|
Revision: 4188 http://bigdata.svn.sourceforge.net/bigdata/?rev=4188&view=rev Author: mrpersonick Date: 2011-02-10 16:39:25 +0000 (Thu, 10 Feb 2011) Log Message: ----------- disabled select variable computation for now Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-02-09 17:18:18 UTC (rev 4187) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-02-10 16:39:25 UTC (rev 4188) @@ -513,8 +513,8 @@ } // the variables to be retained for each join. - final IVariable<?>[][] selectVars = RuleState - .computeRequiredVarsForEachTail(rule, order); +// final IVariable<?>[][] selectVars = RuleState +// .computeRequiredVarsForEachTail(rule, order); /* * Map the constraints from the variables they use. This way, we can This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-06-09 15:56:03
|
Revision: 4656 http://bigdata.svn.sourceforge.net/bigdata/?rev=4656&view=rev Author: mrpersonick Date: 2011-06-09 15:55:56 +0000 (Thu, 09 Jun 2011) Log Message: ----------- fixed a bug where a Collection of constraints was immutable but needed to be mutable Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-06-09 15:15:11 UTC (rev 4655) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-06-09 15:55:56 UTC (rev 4656) @@ -696,7 +696,11 @@ // IPredicate.Annotations.CONSTRAINTS, constraints // .toArray(new IConstraint[constraints.size()])); - final Iterator<IConstraint> it = constraints.iterator(); + // create a mutable version + final Collection<IConstraint> tmp = new LinkedList<IConstraint>(); + tmp.addAll(constraints); + + final Iterator<IConstraint> it = tmp.iterator(); while (it.hasNext()) { @@ -717,7 +721,7 @@ // add constraints to the join for that predicate. anns.add(new NV( PipelineJoin.Annotations.CONSTRAINTS, - constraints.toArray(new IConstraint[constraints.size()]))); + tmp.toArray(new IConstraint[tmp.size()]))); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-06-09 21:16:11
|
Revision: 4680 http://bigdata.svn.sourceforge.net/bigdata/?rev=4680&view=rev Author: mrpersonick Date: 2011-06-09 21:16:05 +0000 (Thu, 09 Jun 2011) Log Message: ----------- working through unit test failures Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-06-09 21:08:41 UTC (rev 4679) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-06-09 21:16:05 UTC (rev 4680) @@ -598,7 +598,7 @@ constraints[i] = rule.getConstraint(i); } - final int nknownBound = knownBound.size(); + final int nknownBound = knownBound != null ? knownBound.size() : 0; // figure out which constraints are attached to which // predicates. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |