|
From: <mrp...@us...> - 2014-09-02 16:01:56
|
Revision: 8636
http://sourceforge.net/p/bigdata/code/8636
Author: mrpersonick
Date: 2014-09-02 16:01:51 +0000 (Tue, 02 Sep 2014)
Log Message:
-----------
Bringing 2.7 branch up to date from 1.3 branch (HEAD = 8635).
Modified Paths:
--------------
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/PipelineOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/controller/HTreeNamedSubqueryOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/controller/JVMNamedSubqueryOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/fed/DelegateIndexManager.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HTreeHashJoinOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HashIndexOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HashJoinOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/JVMHashJoinOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/HTreeDistinctBindingSetsOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/MemorySortOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/PipelinedAggregationOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/AbstractBTree.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/AbstractNode.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/BTree.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/Checkpoint.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/DefaultEvictionListener.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/IIndex.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/ILocalBTreeView.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/ReadCommittedView.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/UnisolatedReadWriteIndex.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/data/IAbstractNodeData.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/data/ILeafData.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/isolation/IsolatedFusedView.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/proc/IIndexProcedure.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/view/FusedView.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/cache/ConcurrentWeakValueCache.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/htree/AbstractHTree.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/htree/HTree.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/io/writecache/BufferedWrite.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/io/writecache/IBufferedWriter.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/io/writecache/WriteCacheCounters.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/AbstractJournal.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/AbstractTask.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/ConcurrencyManager.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/DumpJournal.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/IBTreeManager.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/IIndexManager.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/IIndexStore.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/IJournal.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/IResourceManager.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/ITask.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/IndexProcedureTask.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/Journal.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/TemporaryStore.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/resources/IndexManager.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/resources/ResourceEvents.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/resources/StoreManager.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/rwstore/RWStore.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/service/MetadataService.java
branches/SESAME_2_7/bigdata/src/test/com/bigdata/bop/join/TestJVMHashJoinOp.java
branches/SESAME_2_7/bigdata/src/test/com/bigdata/bop/solutions/TestHTreeDistinctBindingSets.java
branches/SESAME_2_7/bigdata/src/test/com/bigdata/bop/solutions/TestMemorySortOp.java
branches/SESAME_2_7/bigdata/src/test/com/bigdata/journal/StressTestUnisolatedReadWriteIndex.java
branches/SESAME_2_7/bigdata/src/test/com/bigdata/journal/TestJournalBasics.java
branches/SESAME_2_7/bigdata/src/test/com/bigdata/rwstore/TestRWJournal.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataEdge.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataElement.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataGraph.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataGraphBulkLoad.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataGraphClient.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataGraphConfiguration.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataGraphEmbedded.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataGraphFactory.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataGraphQuery.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataPredicate.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataRDFFactory.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataVertex.java
branches/SESAME_2_7/bigdata-blueprints/src/test/com/bigdata/blueprints/AbstractTestBigdataGraph.java
branches/SESAME_2_7/bigdata-blueprints/src/test/com/bigdata/blueprints/TestBigdataGraphEmbedded.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/DTE.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/LexiconConfiguration.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/XSD.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/AbstractIV.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/uri/URIExtensionIV.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/lexicon/LexiconRelation.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/AST2BOpContext.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/DefaultOptimizerList.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/task/AbstractApiTask.java
branches/SESAME_2_7/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestBFS.java
branches/SESAME_2_7/bigdata-rdf/src/test/com/bigdata/rdf/internal/HashCollisionUtility.java
branches/SESAME_2_7/bigdata-rdf/src/test/com/bigdata/rdf/internal/TestDTE.java
branches/SESAME_2_7/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTickets.java
branches/SESAME_2_7/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSailFactory.java
branches/SESAME_2_7/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataValueReplacer.java
branches/SESAME_2_7/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HAStatusServletUtil.java
branches/SESAME_2_7/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/StatusServlet.java
branches/SESAME_2_7/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailEmbeddedFederationWithQuads.java
branches/SESAME_2_7/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithQuads.java
branches/SESAME_2_7/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithSids.java
branches/SESAME_2_7/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithoutSids.java
branches/SESAME_2_7/bigdata-war/src/WEB-INF/GraphStore.properties
branches/SESAME_2_7/bigdata-war/src/html/css/style.css
branches/SESAME_2_7/bigdata-war/src/html/index.html
branches/SESAME_2_7/bigdata-war/src/html/js/workbench.js
Added Paths:
-----------
branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/ISingleThreadedOp.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/IGISTLocalManager.java
branches/SESAME_2_7/bigdata/src/java/com/bigdata/journal/IGISTManager.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataGraphlet.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataQueryProjection.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BigdataSelection.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BlueprintsValueFactory.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/DefaultBlueprintsValueFactory.java
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/ImmortalGraph.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/IInlineURIFactory.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/InlineIPv4URIHandler.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/InlineURIFactory.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/InlineURIHandler.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/InlineUUIDURIHandler.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/MultipurposeIDHandler.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/NoInlineURIFactory.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/uri/IPv4AddrIV.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/vocab/BaseVocabularyDecl.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/vocab/DefaultBigdataVocabulary.java
branches/SESAME_2_7/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.rq
branches/SESAME_2_7/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.srx
branches/SESAME_2_7/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket-765.trig
branches/SESAME_2_7/bigdata-sails/src/test/com/bigdata/rdf/sail/TestInlineURIs.java
branches/SESAME_2_7/bigdata-war/src/html/js/vendor/cm-addons/matchbrackets.js
Removed Paths:
-------------
branches/SESAME_2_7/bigdata-blueprints/src/java/com/bigdata/blueprints/BlueprintsRDFFactory.java
branches/SESAME_2_7/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/uri/IPAddrIV.java
Copied: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/ISingleThreadedOp.java (from rev 8635, branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/ISingleThreadedOp.java)
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/ISingleThreadedOp.java (rev 0)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/ISingleThreadedOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -0,0 +1,40 @@
+/*
+
+Copyright (C) SYSTAP, LLC 2006-2008. 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 Aug 26, 2010
+ */
+package com.bigdata.bop;
+
+/**
+ * Marker interface for an operator whose instances do not support concurrent
+ * execution.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ *
+ * @see PipelineOp.Annotations#MAX_PARALLEL
+ */
+public interface ISingleThreadedOp {
+
+}
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/PipelineOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/PipelineOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/PipelineOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -122,6 +122,8 @@
* {@link #MAX_MESSAGES_PER_TASK} and {@link #PIPELINE_QUEUE_CAPACITY}
* have less effect and performance tends to be best around a modest
* value (10) for those annotations.
+ *
+ * @see ISingleThreadedOp
*/
String MAX_PARALLEL = PipelineOp.class.getName() + ".maxParallel";
@@ -505,17 +507,49 @@
//
// }
- /**
- * The maximum parallelism with which tasks may be evaluated for this
- * operator (this is a per-shard limit in scale-out). A value of ONE (1)
- * indicates that at most ONE (1) instance of this task may be executing in
- * parallel for a given shard and may be used to indicate that the operator
- * evaluation task is not thread-safe.
- *
- * @see Annotations#MAX_PARALLEL
- */
+ /**
+ * If parallel evaluation is not allowed, then throws
+ * {@link IllegalArgumentException}.
+ */
+ final protected void assertMaxParallelOne() {
+
+ /*
+ * Note: Tests the annotation, not getMaxParallel(), since we want to
+ * make sure the annotation is valid and getMaxParallel() also tests for
+ * the ISingleThreadedOp interface.
+ */
+ if (getProperty(PipelineOp.Annotations.MAX_PARALLEL,
+ PipelineOp.Annotations.DEFAULT_MAX_PARALLEL) != 1) {
+
+ throw new IllegalArgumentException(
+ PipelineOp.Annotations.MAX_PARALLEL + "="
+ + getMaxParallel());
+
+ }
+
+ }
+
+ /**
+ * The maximum parallelism with which tasks may be evaluated for this
+ * operator (this is a per-shard limit in scale-out). A value of ONE (1)
+ * indicates that at most ONE (1) instance of this task may be executing in
+ * parallel for a given shard and may be used to indicate that the operator
+ * evaluation task is not thread-safe.
+ *
+ * @see Annotations#MAX_PARALLEL
+ * @see ISingleThreadedOp
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/1002"> </a>
+ */
final public int getMaxParallel() {
+ if(this instanceof ISingleThreadedOp) {
+
+ // Ignore the annotation value.
+ return 1;
+
+ }
+
return getProperty(PipelineOp.Annotations.MAX_PARALLEL,
PipelineOp.Annotations.DEFAULT_MAX_PARALLEL);
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/controller/HTreeNamedSubqueryOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/controller/HTreeNamedSubqueryOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/controller/HTreeNamedSubqueryOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -40,6 +40,7 @@
import com.bigdata.bop.BOpUtility;
import com.bigdata.bop.IBindingSet;
import com.bigdata.bop.IQueryAttributes;
+import com.bigdata.bop.ISingleThreadedOp;
import com.bigdata.bop.IVariable;
import com.bigdata.bop.NV;
import com.bigdata.bop.PipelineOp;
@@ -73,7 +74,8 @@
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
*/
-public class HTreeNamedSubqueryOp extends PipelineOp implements INamedSubqueryOp {
+public class HTreeNamedSubqueryOp extends PipelineOp implements
+ INamedSubqueryOp, ISingleThreadedOp {
static private final transient Logger log = Logger
.getLogger(HTreeNamedSubqueryOp.class);
@@ -123,11 +125,7 @@
+ getEvaluationContext());
}
- if (getMaxParallel() != 1) {
- throw new IllegalArgumentException(
- PipelineOp.Annotations.MAX_PARALLEL + "="
- + getMaxParallel());
- }
+ assertMaxParallelOne();
if (!isAtOnceEvaluation())
throw new IllegalArgumentException();
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/controller/JVMNamedSubqueryOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/controller/JVMNamedSubqueryOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/controller/JVMNamedSubqueryOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -40,6 +40,7 @@
import com.bigdata.bop.BOpUtility;
import com.bigdata.bop.IBindingSet;
import com.bigdata.bop.IQueryAttributes;
+import com.bigdata.bop.ISingleThreadedOp;
import com.bigdata.bop.IVariable;
import com.bigdata.bop.NV;
import com.bigdata.bop.PipelineOp;
@@ -73,7 +74,8 @@
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
*/
-public class JVMNamedSubqueryOp extends PipelineOp implements INamedSubqueryOp {
+public class JVMNamedSubqueryOp extends PipelineOp implements INamedSubqueryOp,
+ ISingleThreadedOp {
static private final transient Logger log = Logger
.getLogger(JVMNamedSubqueryOp.class);
@@ -112,11 +114,7 @@
+ getEvaluationContext());
}
- if (getMaxParallel() != 1) {
- throw new IllegalArgumentException(
- PipelineOp.Annotations.MAX_PARALLEL + "="
- + getMaxParallel());
- }
+ assertMaxParallelOne();
if (!isAtOnceEvaluation())
throw new IllegalArgumentException();
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/fed/DelegateIndexManager.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/fed/DelegateIndexManager.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/fed/DelegateIndexManager.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -1,3 +1,27 @@
+/*
+
+Copyright (C) SYSTAP, LLC 2006-2008. 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
+
+*/
package com.bigdata.bop.fed;
import java.util.Iterator;
@@ -35,8 +59,6 @@
* how to create the index partition view.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id: JoinTaskFactoryTask.java 3448 2010-08-18 20:55:58Z thompsonbry
- * $
*
* @todo While this class solves our problem I do not know whether or not this
* class should this class have more visibility? The downside is that it
@@ -64,7 +86,10 @@
/**
* Delegates to the {@link IndexManager}.
+ * <p>
+ * {@inheritDoc}
*/
+ @Override
public IIndex getIndex(final String name, final long timestamp) {
return dataService.getResourceManager().getIndex(name, timestamp);
@@ -73,7 +98,10 @@
/**
* Not allowed.
+ * <p>
+ * {@inheritDoc}
*/
+ @Override
public void dropIndex(final String name) {
throw new UnsupportedOperationException();
@@ -83,79 +111,93 @@
/**
* Not allowed.
*/
+ @Override
public void registerIndex(IndexMetadata indexMetadata) {
throw new UnsupportedOperationException();
}
+ @Override
public void destroy() {
throw new UnsupportedOperationException();
}
+ @Override
public ExecutorService getExecutorService() {
return dataService.getFederation().getExecutorService();
}
+ @Override
public BigdataFileSystem getGlobalFileSystem() {
return dataService.getFederation().getGlobalFileSystem();
}
+ @Override
public SparseRowStore getGlobalRowStore() {
return dataService.getFederation().getGlobalRowStore();
}
+ @Override
public SparseRowStore getGlobalRowStore(final long timestamp) {
return dataService.getFederation().getGlobalRowStore(timestamp);
}
+ @Override
public long getLastCommitTime() {
return dataService.getFederation().getLastCommitTime();
}
+ @Override
public IResourceLocator getResourceLocator() {
return dataService.getFederation().getResourceLocator();
}
-
+
+ @Override
public IResourceLockService getResourceLockService() {
return dataService.getFederation().getResourceLockService();
}
+ @Override
public TemporaryStore getTempStore() {
return dataService.getFederation().getTempStore();
}
+ @Override
public ScheduledFuture<?> addScheduledTask(Runnable task,
long initialDelay, long delay, TimeUnit unit) {
return dataService.getFederation().addScheduledTask(task, initialDelay, delay, unit);
}
+ @Override
public boolean getCollectPlatformStatistics() {
return dataService.getFederation().getCollectPlatformStatistics();
}
+ @Override
public boolean getCollectQueueStatistics() {
return dataService.getFederation().getCollectQueueStatistics();
}
+ @Override
public int getHttpdPort() {
return dataService.getFederation().getHttpdPort();
}
@@ -171,6 +213,7 @@
return dataService.getFederation().getCounters();
}
+ @Override
public String toString() {
return super.toString() + "{dataServiceUUID="
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HTreeHashJoinOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HTreeHashJoinOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HTreeHashJoinOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -33,6 +33,7 @@
import com.bigdata.bop.BOpContext;
import com.bigdata.bop.IBindingSet;
import com.bigdata.bop.IPredicate;
+import com.bigdata.bop.ISingleThreadedOp;
import com.bigdata.bop.NV;
import com.bigdata.bop.PipelineOp;
import com.bigdata.bop.controller.INamedSolutionSetRef;
@@ -94,9 +95,9 @@
* @see HTreeHashJoinUtility
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
-public class HTreeHashJoinOp<E> extends HashJoinOp<E> {
+public class HTreeHashJoinOp<E> extends HashJoinOp<E> implements
+ ISingleThreadedOp {
/**
*
@@ -117,7 +118,7 @@
}
- public HTreeHashJoinOp(final BOp[] args, NV... annotations) {
+ public HTreeHashJoinOp(final BOp[] args, final NV... annotations) {
this(args, NV.asMap(annotations));
@@ -132,9 +133,7 @@
super(args, annotations);
- if (getMaxParallel() != 1)
- throw new UnsupportedOperationException(Annotations.MAX_PARALLEL
- + "=" + getMaxParallel());
+ assertMaxParallelOne();
// Note: This is no longer true. It is now shared via the IQueryAttributes.
// // shared state is used to share the hash table.
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HashIndexOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HashIndexOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HashIndexOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -38,6 +38,7 @@
import com.bigdata.bop.BOpUtility;
import com.bigdata.bop.IBindingSet;
import com.bigdata.bop.IQueryAttributes;
+import com.bigdata.bop.ISingleThreadedOp;
import com.bigdata.bop.IVariable;
import com.bigdata.bop.NV;
import com.bigdata.bop.PipelineOp;
@@ -77,7 +78,7 @@
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
*/
-abstract public class HashIndexOp extends PipelineOp {
+abstract public class HashIndexOp extends PipelineOp implements ISingleThreadedOp {
// static private final transient Logger log = Logger
// .getLogger(HashIndexOp.class);
@@ -150,12 +151,18 @@
BOp.Annotations.EVALUATION_CONTEXT + "="
+ getEvaluationContext());
}
- if (getEvaluationContext() != BOpEvaluationContext.CONTROLLER) {
- throw new IllegalArgumentException(
- BOp.Annotations.EVALUATION_CONTEXT + "="
- + getEvaluationContext());
- }
+// if (getEvaluationContext() != BOpEvaluationContext.CONTROLLER) {
+// throw new IllegalArgumentException(
+// BOp.Annotations.EVALUATION_CONTEXT + "="
+// + getEvaluationContext());
+// }
+ /*
+ * This operator writes on an object that is not thread-safe for
+ * mutation.
+ */
+ assertMaxParallelOne();
+
if (!isLastPassRequested()) {
/*
* Last pass evaluation must be requested. This operator will not
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HashJoinOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HashJoinOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/HashJoinOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -65,7 +65,6 @@
* which join are output.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
abstract public class HashJoinOp<E> extends PipelineOp implements
IShardwisePipelineOp<E> {
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/JVMHashJoinOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/JVMHashJoinOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/join/JVMHashJoinOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -34,6 +34,7 @@
import com.bigdata.bop.HashMapAnnotations;
import com.bigdata.bop.IBindingSet;
import com.bigdata.bop.IPredicate;
+import com.bigdata.bop.ISingleThreadedOp;
import com.bigdata.bop.NV;
import com.bigdata.bop.controller.INamedSolutionSetRef;
import com.bigdata.relation.accesspath.IAccessPath;
@@ -56,9 +57,8 @@
* @see JVMHashJoinUtility
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
-public class JVMHashJoinOp<E> extends HashJoinOp<E> {
+public class JVMHashJoinOp<E> extends HashJoinOp<E> implements ISingleThreadedOp {
/**
*
@@ -94,9 +94,7 @@
super(args, annotations);
- if (getMaxParallel() != 1)
- throw new UnsupportedOperationException(Annotations.MAX_PARALLEL
- + "=" + getMaxParallel());
+ assertMaxParallelOne();
assertAtOnceJavaHeapOp();
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/HTreeDistinctBindingSetsOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/HTreeDistinctBindingSetsOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/HTreeDistinctBindingSetsOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -9,6 +9,7 @@
import com.bigdata.bop.HTreeAnnotations;
import com.bigdata.bop.IBindingSet;
import com.bigdata.bop.IQueryAttributes;
+import com.bigdata.bop.ISingleThreadedOp;
import com.bigdata.bop.IVariable;
import com.bigdata.bop.NV;
import com.bigdata.bop.PipelineOp;
@@ -42,10 +43,9 @@
* on the native heap and eventually the machine will begin to swap.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id: DistinctElementFilter.java 3466 2010-08-27 14:28:04Z
- * thompsonbry $
*/
-public class HTreeDistinctBindingSetsOp extends PipelineOp {
+public class HTreeDistinctBindingSetsOp extends PipelineOp implements
+ ISingleThreadedOp {
// private final static transient Logger log = Logger
// .getLogger(DistinctBindingSetsWithHTreeOp.class);
@@ -96,9 +96,7 @@
+ getEvaluationContext());
}
- if (getMaxParallel() != 1)
- throw new UnsupportedOperationException(Annotations.MAX_PARALLEL
- + "=" + getMaxParallel());
+ assertMaxParallelOne();
// // shared state is used to share the hash table.
// if (!isSharedState()) {
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/MemorySortOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/MemorySortOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/MemorySortOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -34,7 +34,8 @@
* <p>
* Computing the value expressions first is not only an efficiency, but is also
* required in order to detect type errors. When a type error is detected for a
- * value expression the corresponding input solution is dropped. Since the
+ * value expression the corresponding input solution is kept but with no new
+ * bindings, see trac-765. Since the
* computed value expressions must become bound on the solutions to be sorted,
* the caller is responsible for wrapping any value expression more complex than
* a variable or a constant with an {@link IBind} onto an anonymous variable.
@@ -290,14 +291,9 @@
} catch (SparqlTypeErrorException ex) {
- // drop solution with type error.
+ // log type error, do not drop solution (see trac 765).
TypeErrorLog.handleTypeError(ex, expr, stats);
-// if (log.isInfoEnabled())
-// log.info("Dropping solution due to type error: "
-// + bset);
- continue;
-
}
// add to the set of solutions to be sorted.
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/PipelinedAggregationOp.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/PipelinedAggregationOp.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/bop/solutions/PipelinedAggregationOp.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -19,6 +19,7 @@
import com.bigdata.bop.IBindingSet;
import com.bigdata.bop.IConstant;
import com.bigdata.bop.IConstraint;
+import com.bigdata.bop.ISingleThreadedOp;
import com.bigdata.bop.IValueExpression;
import com.bigdata.bop.IVariable;
import com.bigdata.bop.PipelineOp;
@@ -58,10 +59,9 @@
* the operator can still be invoked multiple times).
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id: DistinctElementFilter.java 3466 2010-08-27 14:28:04Z
- * thompsonbry $
*/
-public class PipelinedAggregationOp extends GroupByOp {
+public class PipelinedAggregationOp extends GroupByOp implements
+ ISingleThreadedOp {
private final static transient Logger log = Logger
.getLogger(PipelinedAggregationOp.class);
@@ -136,14 +136,11 @@
+ "=" + isLastPassRequested());
}
- if (getMaxParallel() != 1) {
- /*
- * Note: The operator MUST be single threaded in order to receive
- * the isLastInvocation notice.
- */
- throw new UnsupportedOperationException(Annotations.MAX_PARALLEL
- + "=" + getMaxParallel());
- }
+ /*
+ * Note: The operator MUST be single threaded in order to receive the
+ * isLastInvocation notice.
+ */
+ assertMaxParallelOne();
}
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/AbstractBTree.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/AbstractBTree.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/AbstractBTree.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -23,6 +23,7 @@
*/
/*
* Created on Dec 19, 2006
+ *
*/
package com.bigdata.btree;
@@ -3623,7 +3624,24 @@
assert node.dirty;
assert !node.deleted;
assert !node.isPersistent();
- assert !node.isReadOnly(); // FIXME Occasional CI errors on this assert for TestMROWTransactions. Also StressTestUnisolatedReadWriteIndex. See http://trac.bigdata.com/ticket/343
+ /**
+ * Occasional CI errors on this assert for have been observed for
+ * StressTestUnisolatedReadWriteIndex. This has been traced to a test
+ * error. The test was interrupting the tasks, but the tasks were not
+ * being cancelled simultaneously. This meant that one task could be
+ * interrupted during an eviction from the write retention queue and
+ * that another task could obtain the UnisolatedReadWriteIndex lock and
+ * then hit the error since the BTree, the write retention queue, and
+ * the nodes that were being evicted would an inconsistent state state.
+ * The test does not fail if it is run to completion (no timeout).
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/343" >Stochastic assert
+ * in AbstractBTree#writeNodeOrLeaf() in CI </a>
+ *
+ * TestMROWTransactions might also demonstrate an issue
+ * occasionally. If so, then check for the same root cause.
+ */
+ assert !node.isReadOnly();
assertNotReadOnly();
/*
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/AbstractNode.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/AbstractNode.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/AbstractNode.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -23,6 +23,7 @@
*/
/*
* Created on Nov 15, 2006
+ *
*/
package com.bigdata.btree;
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/BTree.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/BTree.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/BTree.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -23,6 +23,7 @@
*/
/*
* Created on Nov 15, 2006
+ *
*/
package com.bigdata.btree;
@@ -155,7 +156,6 @@
* several published papers.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public class BTree extends AbstractBTree implements //ICommitter,
ICheckpointProtocol {// ILocalBTreeView {
@@ -167,18 +167,21 @@
}
+ @Override
final public long getNodeCount() {
return nnodes;
}
+ @Override
final public long getLeafCount() {
return nleaves;
}
+ @Override
final public long getEntryCount() {
return nentries;
@@ -201,6 +204,7 @@
* counter will assign values within a namespace defined by the partition
* identifier.
*/
+ @Override
public ICounter getCounter() {
ICounter counter = new Counter(this);
@@ -628,12 +632,14 @@
// }
// final private boolean readOnly;
+ @Override
final public long getLastCommitTime() {
return lastCommitTime;
}
+ @Override
final public long getRevisionTimestamp() {
if (readOnly)
@@ -643,6 +649,7 @@
}
+ @Override
final public void setLastCommitTime(final long lastCommitTime) {
if (lastCommitTime == 0L)
@@ -685,6 +692,7 @@
/**
* Return the {@link IDirtyListener}.
*/
+ @Override
final public IDirtyListener getDirtyListener() {
return listener;
@@ -696,6 +704,7 @@
*
* @param listener The listener.
*/
+ @Override
final public void setDirtyListener(final IDirtyListener listener) {
assertNotReadOnly();
@@ -847,6 +856,7 @@
*
* @see #load(IRawStore, long, boolean)
*/
+ @Override
final public long writeCheckpoint() {
// write checkpoint and return address of that checkpoint record.
@@ -859,6 +869,7 @@
*
* @see #load(IRawStore, long, boolean)
*/
+ @Override
final public Checkpoint writeCheckpoint2() {
assertNotTransient();
@@ -889,8 +900,10 @@
* @see https://sourceforge.net/apps/trac/bigdata/ticket/343
* @see https://sourceforge.net/apps/trac/bigdata/ticket/440
*/
- final Lock lock = new UnisolatedReadWriteIndex(this).writeLock();
- try {
+// final Lock lock = new UnisolatedReadWriteIndex(this).writeLock();
+ final Lock lock = UnisolatedReadWriteIndex.getReadWriteLock(this).writeLock();
+ lock.lock();
+ try {
if (/* autoCommit && */needsCheckpoint()) {
@@ -1084,6 +1097,7 @@
}
+ @Override
final public Checkpoint getCheckpoint() {
if (checkpoint == null)
@@ -1093,18 +1107,21 @@
}
+ @Override
final public long getRecordVersion() {
- return recordVersion;
+ return recordVersion;
}
+ @Override
final public long getMetadataAddr() {
- return metadata.getMetadataAddr();
+ return metadata.getMetadataAddr();
}
+ @Override
final public long getRootAddr() {
return (root == null ? getCheckpoint().getRootAddr() : root
@@ -1293,9 +1310,10 @@
* @return The address of a {@link Checkpoint} record from which the btree
* may be reloaded.
*/
+ @Override
public long handleCommit(final long commitTime) {
- return writeCheckpoint2().getCheckpointAddr();
+ return writeCheckpoint2().getCheckpointAddr();
}
@@ -1316,6 +1334,7 @@
* and dropping indices vs removing the entries in an individual
* {@link BTree}.
*/
+ @Override
final public void removeAll() {
assertNotReadOnly();
@@ -1892,6 +1911,7 @@
private NodeFactory() {
}
+ @Override
public Leaf allocLeaf(final AbstractBTree btree, final long addr,
final ILeafData data) {
@@ -1899,6 +1919,7 @@
}
+ @Override
public Node allocNode(final AbstractBTree btree, final long addr,
final INodeData data) {
@@ -1926,12 +1947,14 @@
}
+ @Override
public long get() {
return btree.counter.get();
}
+ @Override
public long incrementAndGet() {
final long counter = btree.counter.incrementAndGet();
@@ -2035,12 +2058,14 @@
}
+ @Override
public long get() {
return wrap( src.get() );
}
+ @Override
public long incrementAndGet() {
return wrap(src.incrementAndGet());
@@ -2098,6 +2123,7 @@
/**
* Returns ONE (1).
*/
+ @Override
final public int getSourceCount() {
return 1;
@@ -2107,24 +2133,28 @@
/**
* An array containing this {@link BTree}.
*/
+ @Override
final public AbstractBTree[] getSources() {
return new AbstractBTree[]{this};
}
+ @Override
final public BTree getMutableBTree() {
return this;
}
+ @Override
public LeafCursor newLeafCursor(final SeekEnum where) {
return new LeafCursor(where);
}
+ @Override
public LeafCursor newLeafCursor(final byte[] key) {
return new LeafCursor(key);
@@ -2400,18 +2430,21 @@
*/
private Leaf leaf;
+ @Override
public Leaf leaf() {
return leaf;
}
+ @Override
public BTree getBTree() {
return BTree.this;
}
+ @Override
public LeafCursor clone() {
return new LeafCursor(this);
@@ -2464,6 +2497,7 @@
}
+ @Override
public Leaf first() {
stack.clear();
@@ -2485,6 +2519,7 @@
}
+ @Override
public Leaf last() {
stack.clear();
@@ -2511,6 +2546,7 @@
* the leaf may not actually contain the key, in which case it is the
* leaf that contains the insertion point for the key.
*/
+ @Override
public Leaf seek(final byte[] key) {
stack.clear();
@@ -2533,6 +2569,7 @@
}
+ @Override
public Leaf seek(final ILeafCursor<Leaf> src) {
if (src == null)
@@ -2558,6 +2595,7 @@
}
+ @Override
public Leaf next() {
// make sure that the current leaf is valid.
@@ -2658,6 +2696,7 @@
* @return The prior leaf -or- <code>null</code> if there is no
* predecessor of this leaf.
*/
+ @Override
public Leaf prior() {
// make sure that the current leaf is valid.
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/Checkpoint.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/Checkpoint.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/Checkpoint.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -49,7 +49,6 @@
* you can start using the index.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public class Checkpoint implements ICheckpoint, Externalizable {
@@ -782,13 +781,14 @@
}
/**
- * Create a persistence capable data structure.
+ * Generic method to create a persistence capable data structure (GIST
+ * compatible, core implementation).
*
* @param store
* The backing store.
* @param metadata
* The metadata that describes the data structure to be created.
- *
+ *
* @return The persistence capable data structure.
*/
public static ICheckpointProtocol create(final IRawStore store,
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/DefaultEvictionListener.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/DefaultEvictionListener.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/DefaultEvictionListener.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -23,6 +23,7 @@
*/
/*
* Created on Nov 17, 2006
+ *
*/
package com.bigdata.btree;
@@ -33,11 +34,11 @@
* persistence store.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public class DefaultEvictionListener implements
IEvictionListener {
+ @Override
public void evicted(final IHardReferenceQueue<PO> cache, final PO ref) {
final AbstractNode<?> node = (AbstractNode<?>) ref;
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/IIndex.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/IIndex.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/IIndex.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -43,7 +43,6 @@
* </p>
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public interface IIndex extends ISimpleBTree, IAutoboxBTree, IRangeQuery,
IIndexLocalCounter, ICounterSetAccess {
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/ILocalBTreeView.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/ILocalBTreeView.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/ILocalBTreeView.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -36,7 +36,6 @@
* {@link AbstractBTree}s.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public interface ILocalBTreeView extends IIndex {
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/ReadCommittedView.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/ReadCommittedView.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/ReadCommittedView.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -76,7 +76,6 @@
* its public API.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public class ReadCommittedView implements ILocalBTreeView {
@@ -86,7 +85,6 @@
* (b) the lastCommitTime on the journal is changed.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
private static class Basis {
@@ -176,96 +174,112 @@
}
+ @Override
public ICounter getCounter() {
return getIndex().getCounter();
}
+ @Override
public CounterSet getCounters() {
return getIndex().getCounters();
}
+ @Override
public IndexMetadata getIndexMetadata() {
return getIndex().getIndexMetadata();
}
+ @Override
public IResourceMetadata[] getResourceMetadata() {
return getIndex().getResourceMetadata();
}
+ @Override
public boolean contains(byte[] key) {
return getIndex().contains(key);
}
+ @Override
public boolean contains(Object key) {
return getIndex().contains(key);
}
+ @Override
public byte[] lookup(byte[] key) {
return getIndex().lookup(key);
}
+ @Override
public Object lookup(Object key) {
return getIndex().lookup(key);
}
+ @Override
public byte[] remove(byte[] key) {
throw new UnsupportedOperationException();
}
+ @Override
public Object remove(Object key) {
throw new UnsupportedOperationException();
}
+ @Override
public byte[] insert(byte[] key, byte[] value) {
throw new UnsupportedOperationException();
}
+ @Override
public Object insert(Object key, Object value) {
throw new UnsupportedOperationException();
}
+ @Override
public long rangeCount() {
return getIndex().rangeCount();
}
+ @Override
public long rangeCount(byte[] fromKey, byte[] toKey) {
return getIndex().rangeCount(fromKey, toKey);
}
+ @Override
public long rangeCountExact(byte[] fromKey, byte[] toKey) {
return getIndex().rangeCountExact(fromKey, toKey);
}
+ @Override
public long rangeCountExactWithDeleted(byte[] fromKey, byte[] toKey) {
return getIndex().rangeCountExactWithDeleted(fromKey, toKey);
@@ -283,12 +297,14 @@
* created. In order for newly committed state to be visible you must
* request a new iterator.
*/
+ @Override
public ITupleIterator rangeIterator() {
return getIndex().rangeIterator();
}
+ @Override
public ITupleIterator rangeIterator(byte[] fromKey, byte[] toKey,
int capacity, int flags, IFilter filterCtor) {
@@ -297,6 +313,7 @@
}
+ @Override
public ITupleIterator rangeIterator(byte[] fromKey, byte[] toKey) {
return getIndex().rangeIterator(fromKey, toKey);
@@ -308,6 +325,7 @@
* read-only contract for the procedures processed by this class.
*/
+ @Override
public void submit(byte[] fromKey, byte[] toKey,
IKeyRangeIndexProcedure proc, IResultHandler handler) {
@@ -315,12 +333,14 @@
}
+ @Override
public Object submit(byte[] key, ISimpleIndexProcedure proc) {
return getIndex().submit(key, proc);
}
+ @Override
public void submit(int fromIndex, int toIndex, byte[][] keys,
byte[][] vals, AbstractKeyArrayIndexProcedureConstructor ctor,
IResultHandler resultHandler) {
@@ -329,30 +349,34 @@
}
- public final BTreeCounters getBTreeCounters() {
-
- return getIndex().getBtreeCounters();
-
- }
+// public final BTreeCounters getBTreeCounters() {
+//
+// return getIndex().getBtreeCounters();
+//
+// }
+ @Override
public IBloomFilter getBloomFilter() {
return getIndex().getBloomFilter();
}
+ @Override
public BTree getMutableBTree() {
return getIndex().getMutableBTree();
}
+ @Override
public int getSourceCount() {
return getIndex().getSourceCount();
}
+ @Override
public AbstractBTree[] getSources() {
return getIndex().getSources();
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/UnisolatedReadWriteIndex.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/UnisolatedReadWriteIndex.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/UnisolatedReadWriteIndex.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -23,6 +23,7 @@
*/
/*
* Created on Jan 10, 2008
+ *
*/
package com.bigdata.btree;
@@ -118,8 +119,6 @@
* computing the fix point of a rule set) is significantly lower.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id: UnisolatedReadWriteIndex.java 4054 2011-01-05 13:51:25Z
- * thompsonbry $
*/
public class UnisolatedReadWriteIndex implements IIndex, ILinearList {
@@ -230,7 +229,7 @@
*
* @return The acquired lock.
*/
- private Lock lock(final IIndexProcedure proc) {
+ private Lock lock(final IIndexProcedure<?> proc) {
if (proc == null)
throw new IllegalArgumentException();
@@ -274,7 +273,7 @@
* Canonicalizing mapping for the locks used to control access to the
* unisolated index.
*/
- static final private WeakHashMap<ICommitter, ReadWriteLock> locks = new WeakHashMap<ICommitter,ReadWriteLock>();
+ static final private WeakHashMap<ICommitter, ReentrantReadWriteLock> locks = new WeakHashMap<ICommitter,ReentrantReadWriteLock>();
/**
* The default capacity for iterator reads against the underlying index. The
@@ -364,14 +363,14 @@
* if the argument is <code>null</code>.
*/
// Note: Exposed to HTree, at least for now.
- public static ReadWriteLock getReadWriteLock(final ICommitter btree) {
+ public static ReentrantReadWriteLock getReadWriteLock(final ICommitter btree) {
if (btree == null)
throw new IllegalArgumentException();
synchronized (locks) {
- ReadWriteLock readWriteLock = locks.get(btree);
+ ReentrantReadWriteLock readWriteLock = locks.get(btree);
if (readWriteLock == null) {
@@ -386,24 +385,28 @@
}
+ @Override
public String toString() {
return getClass().getSimpleName() + "{" + ndx.toString() + "}";
}
+ @Override
public IndexMetadata getIndexMetadata() {
return ndx.getIndexMetadata();
}
+ @Override
public IResourceMetadata[] getResourceMetadata() {
return getIndexMetadata().getPartitionMetadata().getResources();
}
+ @Override
public CounterSet getCounters() {
return ndx.getCounters();
@@ -416,12 +419,14 @@
*
* @throws UnsupportedOperationException
*/
+ @Override
public ICounter getCounter() {
throw new UnsupportedOperationException();
}
+ @Override
public boolean contains(final Object key) {
final Lock lock = readLock();
@@ -438,6 +443,7 @@
}
+ @Override
public Object insert(final Object key, final Object value) {
final Lock lock = writeLock();
@@ -454,6 +460,7 @@
}
+ @Override
public Object lookup(final Object key) {
final Lock lock = readLock();
@@ -470,6 +477,7 @@
}
+ @Override
public Object remove(final Object key) {
final Lock lock = writeLock();
@@ -486,6 +494,7 @@
}
+ @Override
public boolean contains(final byte[] key) {
final Lock lock = readLock();
@@ -502,6 +511,7 @@
}
+ @Override
public byte[] lookup(final byte[] key) {
final Lock lock = readLock();
@@ -518,6 +528,7 @@
}
+ @Override
public byte[] insert(final byte[] key, final byte[] value) {
final Lock lock = writeLock();
@@ -534,6 +545,7 @@
}
+ @Override
public byte[] remove(final byte[] key) {
final Lock lock = writeLock();
@@ -550,6 +562,7 @@
}
+ @Override
public long rangeCount() {
final Lock lock = readLock();
@@ -566,6 +579,7 @@
}
+ @Override
public long rangeCount(final byte[] fromKey, final byte[] toKey) {
final Lock lock = readLock();
@@ -582,6 +596,7 @@
}
+ @Override
public long rangeCountExact(final byte[] fromKey, final byte[] toKey) {
final Lock lock = readLock();
@@ -598,6 +613,7 @@
}
+ @Override
public long rangeCountExactWithDeleted(final byte[] fromKey, final byte[] toKey) {
final Lock lock = readLock();
@@ -614,12 +630,16 @@
}
+ @Override
+ @SuppressWarnings("rawtypes")
final public ITupleIterator rangeIterator() {
return rangeIterator(null, null);
}
+ @Override
+ @SuppressWarnings("rawtypes")
public ITupleIterator rangeIterator(final byte[] fromKey, final byte[] toKey) {
return rangeIterator(fromKey, toKey, 0/* capacity */,
@@ -636,6 +656,8 @@
* from the underlying index. Likewise, the mutation methods on the iterator
* will acquire the exclusive write lock.
*/
+ @Override
+ @SuppressWarnings("rawtypes")
public ITupleIterator rangeIterator(final byte[] fromKey, final byte[] toKey,
int capacity, int flags, final IFilter filter) {
@@ -681,7 +703,6 @@
* for the {@link Lock}.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- *
*/
private class ChunkedIterator<E> extends ChunkedLocalRangeIterator<E> {
@@ -757,8 +778,9 @@
}
- }
+ } // ChunkedIterator
+ @Override
public Object submit(final byte[] key, final ISimpleIndexProcedure proc) {
final Lock lock = lock(proc);
@@ -780,6 +802,8 @@
}
+ @Override
+ @SuppressWarnings("rawtypes")
public void submit(final byte[] fromKey, final byte[] toKey,
final IKeyRangeIndexProcedure proc, final IResultHandler handler) {
@@ -802,7 +826,8 @@
}
- @SuppressWarnings("unchecked")
+ @Override
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public void submit(final int fromIndex, final int toIndex, final byte[][] keys,
final byte[][] vals, final AbstractKeyArrayIndexProcedureConstructor ctor,
final IResultHandler aggregator) {
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/data/IAbstractNodeData.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/data/IAbstractNodeData.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/data/IAbstractNodeData.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -34,7 +34,6 @@
* Interface for low-level data access.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public interface IAbstractNodeData extends IDataRecordAccess {
@@ -59,6 +58,7 @@
* @throws UnsupportedOperationException
* unless {@link #isCoded()} returns <code>true</code>.
*/
+ @Override
AbstractFixedByteArrayBuffer data();
/**
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/data/ILeafData.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/data/ILeafData.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/data/ILeafData.java 2014-09-02 16:01:51 UTC (rev 8636)
@@ -35,7 +35,6 @@
* Interface for low-level data access for the leaves of a B+-Tree.
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
*/
public interface ILeafData extends IAbstractNodeData, IKeysData {
@@ -124,6 +123,7 @@
/**
* Return <code>true</code> iff the leaf maintains version timestamps.
*/
+ @Override
public boolean hasVersionTimestamps();
/**
Modified: branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/isolation/IsolatedFusedView.java
===================================================================
--- branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/isolation/IsolatedFusedView.java 2014-09-02 15:01:44 UTC (rev 8635)
+++ branches/SESAME_2_7/bigdata/src/java/com/bigdata/btree/isolation/IsolatedFuse...
[truncated message content] |