From: <tho...@us...> - 2010-09-30 16:14:51
|
Revision: 3699 http://bigdata.svn.sourceforge.net/bigdata/?rev=3699&view=rev Author: thompsonbry Date: 2010-09-30 16:14:43 +0000 (Thu, 30 Sep 2010) Log Message: ----------- Added a factory pattern for the query engine and hooked it into the unit tests and the sail. Working in the new logic for named and default graph access paths. I've added a method to clear annotations that we do not want to pass around. Exposed a method in RuleState (public static) to report the variables to be retained by each join. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpBase.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/ap/Predicate.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/QueryEngine.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/fed/FederatedQueryEngine.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/relation/rule/eval/RuleState.java branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/fed/TestFederatedQueryEngine.java branches/QUADS_QUERY_BRANCH/bigdata-jini/src/test/com/bigdata/bop/fed/jini/TestJiniFederatedQueryEngine.java branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java Added Paths: ----------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/fed/QueryEngineFactory.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpBase.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpBase.java 2010-09-30 15:30:23 UTC (rev 3698) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpBase.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -411,11 +411,6 @@ * The name. * @param value * The value. - * - * @return The old value. - * - * @todo thread safety and visibility for concurrent access to and - * modifications of the annotations map. */ protected void setProperty(final String name, final Object value) { @@ -423,6 +418,23 @@ } + /** + * Clear an annotation. + * <p> + * Note: This protected to facilitate copy-on-write patterns. It is not + * public to prevent arbitrary changes to operators outside of methods which + * clone the operator and return the modified version. This is part of the + * effectively immutable contract for {@link BOp}s. + * + * @param name + * The name. + */ + protected void clearProperty(final String name) { + + annotations.remove(name); + + } + public int getId() { return (Integer) getRequiredProperty(Annotations.BOP_ID); Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/ap/Predicate.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/ap/Predicate.java 2010-09-30 15:30:23 UTC (rev 3698) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/ap/Predicate.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -93,7 +93,7 @@ super(vars, NV.asMap(annotations)); } - + /** * Disallows <code>null</code> in any position. * @param args @@ -491,6 +491,28 @@ } + /** + * Strips off the named annotations. + * + * @param names + * The annotations to be removed. + * + * @return A new predicate in which the specified annotations do not appear. + */ + public Predicate<E> clearAnnotations(final String[] names) { + + final Predicate<E> tmp = this.clone(); + + for(String name : names) { + + tmp.clearProperty(name); + + } + + return tmp; + + } + public String toString() { return toString(null/* bindingSet */); Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/QueryEngine.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/QueryEngine.java 2010-09-30 15:30:23 UTC (rev 3698) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/QueryEngine.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -269,7 +269,17 @@ return localIndexManager; } + + /** + * Return <code>true</code> iff running against an + * {@link IBigdataFederation}. + */ + public boolean isScaleOut() { + return false; + + } + /** * The currently executing queries. */ Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/fed/FederatedQueryEngine.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/fed/FederatedQueryEngine.java 2010-09-30 15:30:23 UTC (rev 3698) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/fed/FederatedQueryEngine.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -125,6 +125,13 @@ return resourceService; } + + @Override + final public boolean isScaleOut() { + + return true; + + } /** * Overridden to strengthen the return type. Added: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/fed/QueryEngineFactory.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/fed/QueryEngineFactory.java (rev 0) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/fed/QueryEngineFactory.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -0,0 +1,215 @@ +/** + +Copyright (C) SYSTAP, LLC 2006-2010. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* + * Created on Sep 30, 2010 + */ + +package com.bigdata.bop.fed; + +import java.io.File; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.util.Properties; +import java.util.UUID; + +import com.bigdata.bop.engine.QueryEngine; +import com.bigdata.journal.BufferMode; +import com.bigdata.journal.IIndexManager; +import com.bigdata.journal.Journal; +import com.bigdata.service.IBigdataFederation; +import com.bigdata.service.ManagedResourceService; +import com.bigdata.service.ResourceService; +import com.bigdata.util.config.NicUtil; + +/** + * Factory for a query controller. + * + * @author <a href="mailto:tho...@us...">Bryan Thompson</a> + * @version $Id$ + */ +public class QueryEngineFactory { + + /** + * New instance for standalone or scale-out. + * + * @param indexManager + * The database. + * + * @return The query controller. + */ + static public QueryEngine newQueryController(final IIndexManager indexManager) { + + if (indexManager instanceof IBigdataFederation<?>) { + + return newFederatedQueryController((IBigdataFederation<?>) indexManager); + + } + + return newStandaloneQueryController((Journal) indexManager); + + } + + /** + * New query controller for standalone. + * + * @param indexManager + * The journal. + * + * @return The query controller. + */ + static public QueryEngine newStandaloneQueryController( + final Journal indexManager) { + + final QueryEngine queryEngine = new QueryEngine(indexManager); + + queryEngine.init(); + + return queryEngine; + + } + + /** + * New query controller for scale-out. + * + * @param fed + * The federation. + * + * @return The query controller. + * + * @todo parameterize the local resource service and temporary storage. + */ + static public FederatedQueryEngine newFederatedQueryController( + final IBigdataFederation<?> fed) { + + // The local resource service for the query controller. + ManagedResourceService queryEngineResourceService = null; + + // The local persistence store for the query controller. + Journal queryEngineStore = null; + + final FederatedQueryEngine queryEngine; + try { + + // Create index manager for the query controller. + { + + final Properties p = new Properties(); + + p.setProperty(Journal.Options.BUFFER_MODE, BufferMode.Temporary + .toString()); + + p.setProperty(Journal.Options.CREATE_TEMP_FILE, "true"); + + queryEngineStore = new Journal(p); + + } + + // create resource service for the query controller. + { + queryEngineResourceService = new ManagedResourceService( + new InetSocketAddress(InetAddress + .getByName(NicUtil.getIpAddress("default.nic", + "default", true/* loopbackOk */)), 0/* port */ + ), 0/* requestServicePoolSize */) { + + @Override + protected File getResource(UUID uuid) throws Exception { + // Will not serve up files. + return null; + } + }; + } + + // create the query controller. + queryEngine = new FederatedQueryController(fed.getServiceUUID(), + fed, queryEngineStore, queryEngineResourceService); + + } catch (Throwable t) { + + if (queryEngineStore != null) + queryEngineStore.destroy(); + + if (queryEngineResourceService != null) + queryEngineResourceService.shutdownNow(); + + throw new RuntimeException(t); + + } + + queryEngine.init(); + + return queryEngine; + + } + + /** + * Implementation manages its own local storage and resource service. + */ + private static class FederatedQueryController extends FederatedQueryEngine { + + /** The local persistence store for the {@link #queryEngine}. */ + final Journal queryEngineStore; + + /** The local {@link ResourceService} for the {@link #queryEngine}. */ + final ManagedResourceService queryEngineResourceService; + + /** + * @param thisService + * @param fed + * @param indexManager + * @param resourceService + */ + public FederatedQueryController(UUID thisService, + IBigdataFederation<?> fed, Journal indexManager, + ManagedResourceService resourceService) { + + super(thisService, fed, indexManager, resourceService); + + this.queryEngineStore = indexManager; + + this.queryEngineResourceService = resourceService; + + } + + @Override + public void shutdown() { + super.shutdown(); + queryEngineResourceService.shutdown(); + tearDown(); + } + + @Override + public void shutdownNow() { + super.shutdownNow(); + queryEngineResourceService.shutdownNow(); + tearDown(); + } + + private void tearDown() { + queryEngineStore.destroy(); + } + + } + +} Property changes on: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/fed/QueryEngineFactory.java ___________________________________________________________________ Added: svn:keywords + Id Date Revision Author HeadURL Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java 2010-09-30 15:30:23 UTC (rev 3698) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -46,6 +46,7 @@ import com.bigdata.bop.BOp; import com.bigdata.bop.BOpContext; import com.bigdata.bop.BOpEvaluationContext; +import com.bigdata.bop.NV; import com.bigdata.bop.PipelineOp; import com.bigdata.bop.IBindingSet; import com.bigdata.bop.IConstraint; @@ -241,6 +242,39 @@ } } + + /** + * Shallow copy vararg constructor. + * + * @param args + * @param annotations + */ + public PipelineJoin(final BOp[] args, NV[] annotations) { + + this(args, NV.asMap(annotations)); + + } + + /** + * Shallow copy constructor. + * + * @param args + * @param annotations + */ + public PipelineJoin(final BOp[] args, final Map<String, Object> annotations) { + + super(args, annotations); + + if (arity() != 2) + throw new IllegalArgumentException(); + + if (left() == null) + throw new IllegalArgumentException(); + + if (right() == null) + throw new IllegalArgumentException(); + + } /** * @param left @@ -254,14 +288,8 @@ public PipelineJoin(final PipelineOp left, final IPredicate<?> right, final Map<String, Object> annotations) { - super(new BOp[] { left, right }, annotations); + this(new BOp[] { left, right }, annotations); - if (left == null) - throw new IllegalArgumentException(); - - if (right == null) - throw new IllegalArgumentException(); - } /** Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/relation/rule/eval/RuleState.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/relation/rule/eval/RuleState.java 2010-09-30 15:30:23 UTC (rev 3698) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/relation/rule/eval/RuleState.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -308,7 +308,7 @@ * @return * The array of required variables for each tail index. */ - protected IVariable[][] computeRequiredVarsForEachTail(final IRule rule, + static public IVariable[][] computeRequiredVarsForEachTail(final IRule rule, final int[] order) { if (order == null) Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/fed/TestFederatedQueryEngine.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/fed/TestFederatedQueryEngine.java 2010-09-30 15:30:23 UTC (rev 3698) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/fed/TestFederatedQueryEngine.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -27,10 +27,7 @@ package com.bigdata.bop.fed; -import java.io.File; import java.io.IOException; -import java.net.InetAddress; -import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.Map; import java.util.Properties; @@ -40,7 +37,6 @@ import com.bigdata.bop.BOp; import com.bigdata.bop.BOpContext; import com.bigdata.bop.BOpEvaluationContext; -import com.bigdata.bop.PipelineOp; import com.bigdata.bop.Constant; import com.bigdata.bop.HashBindingSet; import com.bigdata.bop.IBindingSet; @@ -49,6 +45,7 @@ import com.bigdata.bop.IVariable; import com.bigdata.bop.IVariableOrConstant; import com.bigdata.bop.NV; +import com.bigdata.bop.PipelineOp; import com.bigdata.bop.Var; import com.bigdata.bop.ap.E; import com.bigdata.bop.ap.Predicate; @@ -66,21 +63,15 @@ import com.bigdata.bop.solutions.SliceOp; import com.bigdata.bop.solutions.SortOp; import com.bigdata.btree.keys.KeyBuilder; -import com.bigdata.journal.BufferMode; import com.bigdata.journal.ITx; -import com.bigdata.journal.Journal; -import com.bigdata.rdf.spo.DistinctSPOIterator; import com.bigdata.relation.accesspath.IAsynchronousIterator; import com.bigdata.relation.accesspath.ThickAsynchronousIterator; import com.bigdata.service.AbstractEmbeddedFederationTestCase; import com.bigdata.service.DataService; import com.bigdata.service.EmbeddedClient; import com.bigdata.service.EmbeddedFederation; -import com.bigdata.service.ManagedResourceService; -import com.bigdata.service.ResourceService; import com.bigdata.striterator.ChunkedArrayIterator; import com.bigdata.striterator.Dechunkerator; -import com.bigdata.util.config.NicUtil; /** * Unit tests for {@link FederatedQueryEngine} running against an @@ -132,12 +123,12 @@ // The separator key between the index partitions. private byte[] separatorKey; - /** The local persistence store for the {@link #queryEngine}. */ - private Journal queryEngineStore; +// /** The local persistence store for the {@link #queryEngine}. */ +// private Journal queryEngineStore; +// +// /** The local {@link ResourceService} for the {@link #queryEngine}. */ +// private ManagedResourceService queryEngineResourceService; - /** The local {@link ResourceService} for the {@link #queryEngine}. */ - private ManagedResourceService queryEngineResourceService; - /** The query controller. */ private FederatedQueryEngine queryEngine; @@ -163,42 +154,43 @@ // final IBigdataFederation<?> fed = client.connect(); - // create index manager for the query controller. - { - final Properties p = new Properties(); - p.setProperty(Journal.Options.BUFFER_MODE, BufferMode.Transient - .toString()); - queryEngineStore = new Journal(p); - } +// // create index manager for the query controller. +// { +// final Properties p = new Properties(); +// p.setProperty(Journal.Options.BUFFER_MODE, BufferMode.Transient +// .toString()); +// queryEngineStore = new Journal(p); +// } +// +// // create resource service for the query controller. +// { +// queryEngineResourceService = new ManagedResourceService( +// new InetSocketAddress(InetAddress +// .getByName(NicUtil.getIpAddress("default.nic", +// "default", true/* loopbackOk */)), 0/* port */ +// ), 0/* requestServicePoolSize */) { +// +// @Override +// protected File getResource(UUID uuid) throws Exception { +// // Will not serve up files. +// return null; +// } +// }; +// } +// +// { +// +// // create the query controller. +// queryEngine = new FederatedQueryEngine(UUID.randomUUID(), fed, +// queryEngineStore, queryEngineResourceService); +// +// queryEngine.init(); +// +// System.err.println("controller: " + queryEngine); +// +// } + queryEngine = QueryEngineFactory.newFederatedQueryController(fed); - // create resource service for the query controller. - { - queryEngineResourceService = new ManagedResourceService( - new InetSocketAddress(InetAddress - .getByName(NicUtil.getIpAddress("default.nic", - "default", true/* loopbackOk */)), 0/* port */ - ), 0/* requestServicePoolSize */) { - - @Override - protected File getResource(UUID uuid) throws Exception { - // Will not serve up files. - return null; - } - }; - } - - { - - // create the query controller. - queryEngine = new FederatedQueryEngine(UUID.randomUUID(), fed, - queryEngineStore, queryEngineResourceService); - - queryEngine.init(); - - System.err.println("controller: " + queryEngine); - - } - // dataService0 = fed.getDataService(dataServices[0]); // dataService1 = fed.getDataService(dataServices[1]); { @@ -251,14 +243,14 @@ // clear reference. separatorKey = null; - if (queryEngineResourceService != null) { - queryEngineResourceService.shutdownNow(); - queryEngineResourceService = null; - } - if (queryEngineStore != null) { - queryEngineStore.destroy(); - queryEngineStore = null; - } +// if (queryEngineResourceService != null) { +// queryEngineResourceService.shutdownNow(); +// queryEngineResourceService = null; +// } +// if (queryEngineStore != null) { +// queryEngineStore.destroy(); +// queryEngineStore = null; +// } if (queryEngine != null) { queryEngine.shutdownNow(); queryEngine = null; Modified: branches/QUADS_QUERY_BRANCH/bigdata-jini/src/test/com/bigdata/bop/fed/jini/TestJiniFederatedQueryEngine.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-jini/src/test/com/bigdata/bop/fed/jini/TestJiniFederatedQueryEngine.java 2010-09-30 15:30:23 UTC (rev 3698) +++ branches/QUADS_QUERY_BRANCH/bigdata-jini/src/test/com/bigdata/bop/fed/jini/TestJiniFederatedQueryEngine.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -27,10 +27,7 @@ package com.bigdata.bop.fed.jini; -import java.io.File; import java.io.IOException; -import java.net.InetAddress; -import java.net.InetSocketAddress; import java.util.Map; import java.util.Properties; import java.util.UUID; @@ -43,7 +40,6 @@ import com.bigdata.bop.BOp; import com.bigdata.bop.BOpContext; import com.bigdata.bop.BOpEvaluationContext; -import com.bigdata.bop.PipelineOp; import com.bigdata.bop.Constant; import com.bigdata.bop.HashBindingSet; import com.bigdata.bop.IBindingSet; @@ -51,6 +47,7 @@ import com.bigdata.bop.IVariable; import com.bigdata.bop.IVariableOrConstant; import com.bigdata.bop.NV; +import com.bigdata.bop.PipelineOp; import com.bigdata.bop.Var; import com.bigdata.bop.ap.E; import com.bigdata.bop.ap.Predicate; @@ -64,25 +61,21 @@ import com.bigdata.bop.engine.RunningQuery; import com.bigdata.bop.engine.TestQueryEngine; import com.bigdata.bop.fed.FederatedQueryEngine; +import com.bigdata.bop.fed.QueryEngineFactory; import com.bigdata.bop.join.PipelineJoin; import com.bigdata.bop.solutions.SliceOp; import com.bigdata.bop.solutions.SortOp; import com.bigdata.btree.keys.KeyBuilder; -import com.bigdata.journal.BufferMode; import com.bigdata.journal.ITx; -import com.bigdata.journal.Journal; import com.bigdata.relation.accesspath.IAsynchronousIterator; import com.bigdata.relation.accesspath.ThickAsynchronousIterator; import com.bigdata.service.DataService; import com.bigdata.service.IBigdataFederation; import com.bigdata.service.IDataService; -import com.bigdata.service.ManagedResourceService; -import com.bigdata.service.ResourceService; import com.bigdata.service.jini.JiniClient; import com.bigdata.service.jini.JiniFederation; import com.bigdata.striterator.ChunkedArrayIterator; import com.bigdata.striterator.Dechunkerator; -import com.bigdata.util.config.NicUtil; import com.ibm.icu.impl.ByteBuffer; /** @@ -137,12 +130,12 @@ private JiniClient<?> client; - /** The local persistence store for the {@link #queryEngine}. */ - private Journal queryEngineStore; +// /** The local persistence store for the {@link #queryEngine}. */ +// private Journal queryEngineStore; +// +// /** The local {@link ResourceService} for the {@link #queryEngine}. */ +// private ManagedResourceService queryEngineResourceService; - /** The local {@link ResourceService} for the {@link #queryEngine}. */ - private ManagedResourceService queryEngineResourceService; - /** The query controller. */ private FederatedQueryEngine queryEngine; @@ -163,40 +156,42 @@ final IBigdataFederation<?> fed = client.connect(); - // create index manager for the query controller. - { - final Properties p = new Properties(); - p.setProperty(Journal.Options.BUFFER_MODE, BufferMode.Transient - .toString()); - queryEngineStore = new Journal(p); - } - - // create resource service for the query controller. - { - queryEngineResourceService = new ManagedResourceService( - new InetSocketAddress(InetAddress - .getByName(NicUtil.getIpAddress("default.nic", - "default", true/* loopbackOk */)), 0/* port */ - ), 0/* requestServicePoolSize */) { +// // create index manager for the query controller. +// { +// final Properties p = new Properties(); +// p.setProperty(Journal.Options.BUFFER_MODE, BufferMode.Transient +// .toString()); +// queryEngineStore = new Journal(p); +// } +// +// // create resource service for the query controller. +// { +// queryEngineResourceService = new ManagedResourceService( +// new InetSocketAddress(InetAddress +// .getByName(NicUtil.getIpAddress("default.nic", +// "default", true/* loopbackOk */)), 0/* port */ +// ), 0/* requestServicePoolSize */) { +// +// @Override +// protected File getResource(UUID uuid) throws Exception { +// // Will not serve up files. +// return null; +// } +// }; +// } +// +// // create the query controller. +// { +// +// queryEngine = new FederatedQueryEngine(fed.getServiceUUID(), fed, +// queryEngineStore, queryEngineResourceService); +// +// queryEngine.init(); +// +// } - @Override - protected File getResource(UUID uuid) throws Exception { - // Will not serve up files. - return null; - } - }; - } - - // create the query controller. - { - - queryEngine = new FederatedQueryEngine(fed.getServiceUUID(), fed, - queryEngineStore, queryEngineResourceService); + queryEngine = QueryEngineFactory.newFederatedQueryController(fed); - queryEngine.init(); - - } - /* * Discover the data services. We need their UUIDs in order to create * the test relation split across an index partition located on each of @@ -280,14 +275,14 @@ dataService0 = null; dataService1 = null; - if (queryEngineResourceService != null) { - queryEngineResourceService.shutdownNow(); - queryEngineResourceService = null; - } - if (queryEngineStore != null) { - queryEngineStore.destroy(); - queryEngineStore = null; - } +// if (queryEngineResourceService != null) { +// queryEngineResourceService.shutdownNow(); +// queryEngineResourceService = null; +// } +// if (queryEngineStore != null) { +// queryEngineStore.destroy(); +// queryEngineStore = null; +// } if (queryEngine != null) { queryEngine.shutdownNow(); queryEngine = null; Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java 2010-09-30 15:30:23 UTC (rev 3698) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java 2010-09-30 16:14:43 UTC (rev 3699) @@ -113,6 +113,7 @@ import org.openrdf.sail.SailException; import com.bigdata.bop.engine.QueryEngine; +import com.bigdata.bop.fed.QueryEngineFactory; import com.bigdata.journal.IIndexManager; import com.bigdata.journal.ITransactionService; import com.bigdata.journal.ITx; @@ -920,11 +921,10 @@ namespaces = Collections.synchronizedMap(new LinkedHashMap<String, String>()); + + queryEngine = QueryEngineFactory.newQueryController(database + .getIndexManager()); - queryEngine = new QueryEngine(database.getIndexManager()); - - queryEngine.init(); - } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |