From: <tho...@us...> - 2013-01-25 19:04:44
|
Revision: 6858 http://bigdata.svn.sourceforge.net/bigdata/?rev=6858&view=rev Author: thompsonbry Date: 2013-01-25 19:04:24 +0000 (Fri, 25 Jan 2013) Log Message: ----------- Merging changes from the dev branch into the READ_CACHE branch. {{{ >From r6766 to HEAD (r6857) of /branches/BIGDATA_RELEASE_1_2_0 To /branches/READ_CACHE }}} SVN COMMAND: {{{ merge https://bigdata.svn.sourceforge.net/svnroot/bigdata/branches/BIGDATA_RELEASE_1_2_0 /Users/bryan/Documents/workspace/BIGDATA_READ_CACHE_HEAD }}} {{{ Merge complete. ===== File Statistics: ===== Deleted: 8 Added: 25 Updated: 139 ==== Property Statistics: ===== Updated: 50 ==== Conflict Statistics: ===== File conflicts: 3 C /Users/bryan/Documents/workspace/BIGDATA_READ_CACHE_HEAD/bigdata/src/test/com/bigdata/rwstore/sector/TestMemStore.java C /Users/bryan/Documents/workspace/BIGDATA_READ_CACHE_HEAD/bigdata/src/test/com/bigdata/journal/TestJournalShutdown.java C /Users/bryan/Documents/workspace/BIGDATA_READ_CACHE_HEAD/bigdata/src/java/com/bigdata/journal/WriteExecutorService.java }}} Accepted the incoming version for all three conflicts. These files had been modified in the same manner in the dev branch and the READ_CACHE branch. @see https://sourceforge.net/apps/trac/bigdata/ticket/621 (Coalesce write cache records and install reads in cache) Revision Links: -------------- http://bigdata.svn.sourceforge.net/bigdata/?rev=6766&view=rev http://bigdata.svn.sourceforge.net/bigdata/?rev=6857&view=rev Modified Paths: -------------- branches/READ_CACHE/.classpath branches/READ_CACHE/bigdata/src/java/com/bigdata/bfs/BigdataFileSystem.java branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/BOpUtility.java branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/Var.java branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/controller/ServiceCallJoin.java branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/fed/QueryEngineFactory.java branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java branches/READ_CACHE/bigdata/src/java/com/bigdata/btree/raba/codec/CanonicalHuffmanRabaCoder.java branches/READ_CACHE/bigdata/src/java/com/bigdata/btree/raba/codec/FrontCodedRabaCoder.java branches/READ_CACHE/bigdata/src/java/com/bigdata/btree/raba/codec/ICodedRaba.java branches/READ_CACHE/bigdata/src/java/com/bigdata/btree/raba/codec/IRabaCoder.java branches/READ_CACHE/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java branches/READ_CACHE/bigdata/src/java/com/bigdata/journal/CommitRecordIndex.java branches/READ_CACHE/bigdata/src/java/com/bigdata/journal/WriteExecutorService.java branches/READ_CACHE/bigdata/src/java/com/bigdata/relation/AbstractResource.java branches/READ_CACHE/bigdata/src/java/com/bigdata/search/FullTextIndex.java branches/READ_CACHE/bigdata/src/test/com/bigdata/bop/join/TestNestedLoopJoinOp.java branches/READ_CACHE/bigdata/src/test/com/bigdata/journal/TestJournalShutdown.java branches/READ_CACHE/bigdata/src/test/com/bigdata/rwstore/sector/TestMemStore.java branches/READ_CACHE/bigdata-gom/src/test/com/bigdata/gom/TestNumericBNodes.java branches/READ_CACHE/bigdata-jini/src/java/com/bigdata/jini/start/process/ProcessHelper.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/bop/rdf/update/ParseOp.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/ServiceProviderHook.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/BSBMExtensionFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/DefaultExtensionFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/IExtensionFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/ILexiconConfiguration.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/LexiconConfiguration.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/NoExtensionFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/AbstractIV.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/literal/NumericIV.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/lexicon/LexiconRelation.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/load/MappedRDFDataLoadMaster.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/properties/PropertiesFormat.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/nquads/NQuadsParser.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/nquads/NQuadsParserFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/ntriples/BigdataNTriplesParser.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/ntriples/BigdataNTriplesParserFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/rdfxml/Att.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/rdfxml/Atts.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/rdfxml/BigdataRDFXMLParser.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/rdfxml/BigdataRDFXMLParserFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/rdfxml/BigdataRDFXMLWriter.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/rdfxml/BigdataRDFXMLWriterFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/rdfxml/SAXFilter.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/turtle/BigdataTurtleParser.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/rio/turtle/BigdataTurtleParserFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/FunctionRegistry.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/HavingNode.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/QueryHints.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/StaticAnalysis.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/StaticAnalysisBase.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/VarNode.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/cache/CacheConnectionFactory.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/AST2BOpUpdate.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/AST2BOpUtility.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTSearchOptimizer.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTJoinOrderByTypeOptimizer.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTWildcardProjectionOptimizer.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/DefaultOptimizerList.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/service/RemoteSparql10QueryBuilder.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/service/RemoteSparql11QueryBuilder.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/service/ServiceCallUtility.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/spo/SPORelation.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/store/BD.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/store/LocalTripleStore.java branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/rdf/internal/HashCollisionUtility.java branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/rdf/internal/SampleExtensionFactory.java branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/rdf/lexicon/TestFullTextIndex.java branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/rdf/lexicon/TestSubjectCentricFullTextIndex.java branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/rdf/rio/nquads/TestNQuadsParser.java branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/rdf/rio/nquads/TestNQuadsParserFactory.java branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/rdf/rio/rdfxml/RDFXMLWriterTestCase.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/remote/BigdataSailRemoteRepository.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ASTVisitorBase.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/BaseDeclProcessor.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/BatchRDFValueResolver.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/Bigdata2ASTSPARQLParser.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/BigdataASTContext.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/BigdataASTVisitorBase.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/BigdataExprBuilder.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/BigdataParsedQuery.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/BigdataParsedUpdate.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/BlankNodeVarProcessor.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/DatasetDeclProcessor.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/GroupGraphPattern.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/GroupGraphPatternBuilder.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/NegatedPropertySet.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/PrefixDeclProcessor.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/PropertySetElem.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/SPARQLUtil.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/StringEscapesProcessor.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/TriplePatternExprBuilder.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/UpdateExprBuilder.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ValueExprBuilder.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/ASTOperationContainer.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/ASTQueryContainer.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/ASTSelect.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/ASTSelectQuery.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/ASTUpdateContainer.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/ASTUpdateSequence.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/SyntaxTreeBuilder.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/SyntaxTreeBuilderConstants.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/SyntaxTreeBuilderTokenManager.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/sparql.jj branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/sparql/ast/sparql.jjt branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFServlet.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFServletContextListener.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataServlet.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/ConnegUtil.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/DeleteServlet.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/InsertServlet.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/UpdateServlet.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/ConnectOptions.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/IRemoteRepository.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/RemoteRepository.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/RemoteRepositoryManager.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/TestAll.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithQuads.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/sparql/AbstractBigdataExprBuilderTestCase.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/sparql/Bigdata2ASTSPARQL11SyntaxTest.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/sparql/TestAll.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/sparql/TestAll_AST.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/sparql/TestBigdataExprBuilder.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataComplexSparqlQueryTest.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataConnectionTest.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSparqlTest.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/TestAll.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/TestBigdataSailRemoteRepository.java branches/READ_CACHE/bigdata-sails/src/test/org/openrdf/query/parser/sparql/ComplexSPARQLQueryTest.java branches/READ_CACHE/bigdata-sails/src/test/org/openrdf/query/parser/sparql/EarlReport.java branches/READ_CACHE/bigdata-sails/src/test/org/openrdf/query/parser/sparql/SPARQLASTQueryTest.java branches/READ_CACHE/bigdata-sails/src/test/org/openrdf/query/parser/sparql/SPARQLQueryTest.java branches/READ_CACHE/bigdata-sails/src/test/org/openrdf/query/parser/sparql/SPARQLUpdateTest.java branches/READ_CACHE/bigdata-sails/src/test/org/openrdf/sail/RDFStoreTest.java branches/READ_CACHE/bigdata-war/src/resources/WEB-INF/web.xml branches/READ_CACHE/build.properties branches/READ_CACHE/build.xml Added Paths: ----------- branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/paths/ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/paths/ArbitraryLengthPathOp.java branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/paths/ZeroLengthPathOp.java branches/READ_CACHE/bigdata-rdf/lib/openrdf-sesame-2.6.10-onejar.jar branches/READ_CACHE/bigdata-rdf/lib/sesame-rio-testsuite-2.6.10.jar branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/ArbitraryLengthPathNode.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/PathNode.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/PropertyPathNode.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/PropertyPathUnionNode.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/ZeroLengthPathNode.java branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTPropertyPathOptimizer.java branches/READ_CACHE/bigdata-sails/lib/sesame-sparql-testsuite-2.6.10.jar branches/READ_CACHE/bigdata-sails/lib/sesame-store-testsuite-2.6.10.jar branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/AST2SPARQLUtil.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/EncodeDecodeValue.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/IMimeTypes.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/MiniMime.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket632.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/sparql/BigdataSPARQL2ASTParserTest.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataArbitraryLengthPathTest.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSPARQLUpdateConformanceTest.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/client/ branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/client/TestAll.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/client/TestEncodeDecodeValue.java branches/READ_CACHE/bigdata-sails/src/test/org/openrdf/query/parser/sparql/SPARQL11SyntaxTest.java Removed Paths: ------------- branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/paths/ArbitraryLengthPathOp.java branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/paths/ZeroLengthPathOp.java branches/READ_CACHE/bigdata-rdf/lib/openrdf-sesame-2.6.3-onejar.jar branches/READ_CACHE/bigdata-rdf/lib/sesame-rio-testsuite-2.6.3.jar branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/AST2SPARQLUtil.java branches/READ_CACHE/bigdata-sails/lib/sesame-sparql-testsuite-2.6.3.jar branches/READ_CACHE/bigdata-sails/lib/sesame-store-testsuite-2.6.3.jar branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/EncodeDecodeValue.java branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/MiniMime.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/TestEncodeDecodeValue.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/client/TestAll.java branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/client/TestEncodeDecodeValue.java Property Changed: ---------------- branches/READ_CACHE/ branches/READ_CACHE/bigdata/lib/jetty/ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/aggregate/ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/joinGraph/ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/util/ branches/READ_CACHE/bigdata/src/java/com/bigdata/htree/raba/ branches/READ_CACHE/bigdata/src/java/com/bigdata/jsr166/ branches/READ_CACHE/bigdata/src/test/com/bigdata/bop/joinGraph/ branches/READ_CACHE/bigdata/src/test/com/bigdata/bop/util/ branches/READ_CACHE/bigdata/src/test/com/bigdata/jsr166/ branches/READ_CACHE/bigdata/src/test/com/bigdata/util/httpd/ branches/READ_CACHE/bigdata-compatibility/ branches/READ_CACHE/bigdata-jini/src/java/com/bigdata/attr/ branches/READ_CACHE/bigdata-jini/src/java/com/bigdata/disco/ branches/READ_CACHE/bigdata-jini/src/java/com/bigdata/util/config/ branches/READ_CACHE/bigdata-perf/ branches/READ_CACHE/bigdata-perf/btc/ branches/READ_CACHE/bigdata-perf/btc/src/resources/ branches/READ_CACHE/bigdata-perf/lubm/ branches/READ_CACHE/bigdata-perf/uniprot/ branches/READ_CACHE/bigdata-perf/uniprot/src/ branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate/ branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/changesets/ branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/error/ branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/internal/ branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/relation/ branches/READ_CACHE/bigdata-rdf/src/java/com/bigdata/rdf/util/ branches/READ_CACHE/bigdata-rdf/src/samples/ branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/bop/rdf/aggregate/ branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/rdf/internal/ branches/READ_CACHE/bigdata-rdf/src/test/com/bigdata/rdf/relation/ branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/bench/ branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/changesets/ branches/READ_CACHE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/ branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/bench/ branches/READ_CACHE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/ branches/READ_CACHE/dsi-utils/ branches/READ_CACHE/dsi-utils/LEGAL/ branches/READ_CACHE/dsi-utils/lib/ branches/READ_CACHE/dsi-utils/src/ branches/READ_CACHE/dsi-utils/src/java/ branches/READ_CACHE/dsi-utils/src/java/it/ branches/READ_CACHE/dsi-utils/src/java/it/unimi/ branches/READ_CACHE/dsi-utils/src/test/ branches/READ_CACHE/dsi-utils/src/test/it/unimi/ branches/READ_CACHE/dsi-utils/src/test/it/unimi/dsi/ branches/READ_CACHE/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom/ branches/READ_CACHE/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom/ branches/READ_CACHE/osgi/ branches/READ_CACHE/src/resources/bin/config/ Property changes on: branches/READ_CACHE ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH:2004-2045 /branches/DEV_BRANCH_27_OCT_2009:2270-2546,2548-2782 /branches/INT64_BRANCH:4486-4522 /branches/JOURNAL_HA_BRANCH:2596-4066 /branches/LARGE_LITERALS_REFACTOR:4175-4387 /branches/LEXICON_REFACTOR_BRANCH:2633-3304 /branches/QUADS_QUERY_BRANCH:4525-4531,4550-4584,4586-4609,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 /branches/RWSTORE_1_1_0_DEBUG:5896-5935 /branches/TIDS_PLUS_BLOBS_BRANCH:4814-4836 /branches/bugfix-btm:2594-3237 /branches/dev-btm:2574-2730 /branches/fko:3150-3194 /trunk:3392-3437,3656-4061 + /branches/BIGDATA_OPENRDF_2_6_9_UPDATE:6769-6785 /branches/BIGDATA_RELEASE_1_2_0:6766-6857 /branches/BTREE_BUFFER_BRANCH:2004-2045 /branches/DEV_BRANCH_27_OCT_2009:2270-2546,2548-2782 /branches/INT64_BRANCH:4486-4522 /branches/JOURNAL_HA_BRANCH:2596-4066 /branches/LARGE_LITERALS_REFACTOR:4175-4387 /branches/LEXICON_REFACTOR_BRANCH:2633-3304 /branches/QUADS_QUERY_BRANCH:4525-4531,4550-4584,4586-4609,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 /branches/RWSTORE_1_1_0_DEBUG:5896-5935 /branches/TIDS_PLUS_BLOBS_BRANCH:4814-4836 /branches/bugfix-btm:2594-3237 /branches/dev-btm:2574-2730 /branches/fko:3150-3194 /trunk:3392-3437,3656-4061 Modified: branches/READ_CACHE/.classpath =================================================================== --- branches/READ_CACHE/.classpath 2013-01-25 18:39:23 UTC (rev 6857) +++ branches/READ_CACHE/.classpath 2013-01-25 19:04:24 UTC (rev 6858) @@ -66,15 +66,11 @@ <classpathentry exported="true" kind="lib" path="bigdata/lib/unimi/fastutil-5.1.5.jar"/> <classpathentry exported="true" kind="lib" path="bigdata/lib/lucene/lucene-analyzers-3.0.0.jar"/> <classpathentry exported="true" kind="lib" path="bigdata/lib/lucene/lucene-core-3.0.0.jar"/> - <classpathentry kind="lib" path="bigdata-rdf/lib/sesame-rio-testsuite-2.6.3.jar" sourcepath="/org.openrdf.sesame-2.6.3"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry exported="true" kind="lib" path="bigdata/lib/high-scale-lib-v1.1.2.jar"/> <classpathentry exported="true" kind="lib" path="bigdata/lib/junit-ext-1.1-b3-dev.jar"/> <classpathentry exported="true" kind="lib" path="bigdata-rdf/lib/slf4j-api-1.6.1.jar"/> <classpathentry exported="true" kind="lib" path="bigdata-rdf/lib/slf4j-log4j12-1.6.1.jar"/> - <classpathentry kind="lib" path="bigdata-rdf/lib/openrdf-sesame-2.6.3-onejar.jar" sourcepath="/Users/bryan/Documents/workspace/org.openrdf.sesame-2.6.3"/> - <classpathentry kind="lib" path="bigdata-sails/lib/sesame-sparql-testsuite-2.6.3.jar" sourcepath="/org.openrdf.sesame-2.6.3"/> - <classpathentry kind="lib" path="bigdata-sails/lib/sesame-store-testsuite-2.6.3.jar"/> <classpathentry kind="lib" path="bigdata-sails/lib/httpcomponents/commons-codec-1.4.jar"/> <classpathentry kind="lib" path="bigdata-sails/lib/httpcomponents/commons-logging-1.1.1.jar"/> <classpathentry kind="lib" path="bigdata-sails/lib/httpcomponents/httpclient-4.1.3.jar"/> @@ -84,5 +80,9 @@ <classpathentry kind="lib" path="bigdata-sails/lib/httpcomponents/commons-fileupload-1.2.2.jar"/> <classpathentry kind="lib" path="bigdata-sails/lib/httpcomponents/commons-io-2.1.jar"/> <classpathentry kind="lib" path="bigdata/lib/apache/log4j-1.2.17.jar"/> + <classpathentry kind="lib" path="bigdata-rdf/lib/openrdf-sesame-2.6.10-onejar.jar"/> + <classpathentry kind="lib" path="bigdata-rdf/lib/sesame-rio-testsuite-2.6.10.jar"/> + <classpathentry kind="lib" path="bigdata-sails/lib/sesame-sparql-testsuite-2.6.10.jar"/> + <classpathentry kind="lib" path="bigdata-sails/lib/sesame-store-testsuite-2.6.10.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Property changes on: branches/READ_CACHE/bigdata/lib/jetty ___________________________________________________________________ Modified: svn:mergeinfo - /branches/INT64_BRANCH/bigdata/lib/jetty:4486-4522 /branches/QUADS_QUERY_BRANCH/bigdata/lib/jetty:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 /branches/RWSTORE_1_1_0_DEBUG/bigdata/lib/jetty:5896-5935 /branches/TIDS_PLUS_BLOBS_BRANCH/bigdata/lib/jetty:4814-4836 + /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/lib/jetty:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/lib/jetty:6766-6857 /branches/INT64_BRANCH/bigdata/lib/jetty:4486-4522 /branches/QUADS_QUERY_BRANCH/bigdata/lib/jetty:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 /branches/RWSTORE_1_1_0_DEBUG/bigdata/lib/jetty:5896-5935 /branches/TIDS_PLUS_BLOBS_BRANCH/bigdata/lib/jetty:4814-4836 Modified: branches/READ_CACHE/bigdata/src/java/com/bigdata/bfs/BigdataFileSystem.java =================================================================== --- branches/READ_CACHE/bigdata/src/java/com/bigdata/bfs/BigdataFileSystem.java 2013-01-25 18:39:23 UTC (rev 6857) +++ branches/READ_CACHE/bigdata/src/java/com/bigdata/bfs/BigdataFileSystem.java 2013-01-25 19:04:24 UTC (rev 6858) @@ -410,15 +410,15 @@ } - final protected void assertWritable() { - - if(isReadOnly()) { - - throw new IllegalStateException("READ_ONLY"); - - } - - } +// final protected void assertWritable() { +// +// if(isReadOnly()) { +// +// throw new IllegalStateException("READ_ONLY"); +// +// } +// +// } /** * Note: A commit is required in order for a read-committed view to have Modified: branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/BOpUtility.java =================================================================== --- branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/BOpUtility.java 2013-01-25 18:39:23 UTC (rev 6857) +++ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/BOpUtility.java 2013-01-25 19:04:24 UTC (rev 6858) @@ -1245,7 +1245,7 @@ // copy accepted binding sets to the default sink. sink.add(tmp); - nout += chunk.length; + nout += tmp.length; if (sink2 != null) { Modified: branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/Var.java =================================================================== --- branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/Var.java 2013-01-25 18:39:23 UTC (rev 6857) +++ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/Var.java 2013-01-25 19:04:24 UTC (rev 6858) @@ -37,6 +37,20 @@ private static final long serialVersionUID = -7100443208125002485L; + private boolean anonymous = false; + + public void setAnonymous(boolean anonymous) { + + this.anonymous = anonymous; + + } + + public boolean isAnonymous() { + + return anonymous; + + } + final private String name; final public boolean isVar() { Property changes on: branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/aggregate ___________________________________________________________________ Modified: svn:mergeinfo - /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4486-4522 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 /branches/RWSTORE_1_1_0_DEBUG/bigdata/src/java/com/bigdata/bop/aggregate:5896-5935 /branches/TIDS_PLUS_BLOBS_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4814-4836 + /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/java/com/bigdata/bop/aggregate:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/java/com/bigdata/bop/aggregate:6766-6857 /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4486-4522 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 /branches/RWSTORE_1_1_0_DEBUG/bigdata/src/java/com/bigdata/bop/aggregate:5896-5935 /branches/TIDS_PLUS_BLOBS_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4814-4836 Modified: branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/controller/ServiceCallJoin.java =================================================================== --- branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/controller/ServiceCallJoin.java 2013-01-25 18:39:23 UTC (rev 6857) +++ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/controller/ServiceCallJoin.java 2013-01-25 19:04:24 UTC (rev 6858) @@ -54,6 +54,7 @@ import com.bigdata.bop.join.JoinAnnotations; import com.bigdata.bop.join.JoinTypeEnum; import com.bigdata.htree.HTree; +import com.bigdata.rdf.lexicon.LexiconRelation; import com.bigdata.rdf.model.BigdataURI; import com.bigdata.rdf.sparql.ast.service.BigdataServiceCall; import com.bigdata.rdf.sparql.ast.service.ExternalServiceCall; @@ -774,8 +775,10 @@ final ServiceCall<BindingSet> serviceCall, final IBindingSet left[]) throws Exception { + final LexiconRelation lex = db.getLexiconRelation(); + // Convert IBindingSet[] to openrdf BindingSet[]. - final BindingSet[] left2 = ServiceCallUtility.convert( + final BindingSet[] left2 = ServiceCallUtility.convert(lex, projectedVars, left); /* Modified: branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/fed/QueryEngineFactory.java =================================================================== --- branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/fed/QueryEngineFactory.java 2013-01-25 18:39:23 UTC (rev 6857) +++ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/fed/QueryEngineFactory.java 2013-01-25 19:04:24 UTC (rev 6858) @@ -38,8 +38,10 @@ import com.bigdata.bop.engine.QueryEngine; import com.bigdata.cache.ConcurrentWeakValueCache; import com.bigdata.journal.BufferMode; +import com.bigdata.journal.IBTreeManager; import com.bigdata.journal.IIndexManager; import com.bigdata.journal.Journal; +import com.bigdata.journal.TemporaryStore; import com.bigdata.relation.locator.IResourceLocator; import com.bigdata.service.DataService; import com.bigdata.service.IBigdataClient; @@ -66,7 +68,7 @@ * to keep any {@link QueryEngine} objects wired into the cache unless the * application is holding a hard reference to the {@link QueryEngine}. */ - private static ConcurrentWeakValueCache<Journal, QueryEngine> standaloneQECache = new ConcurrentWeakValueCache<Journal, QueryEngine>( + private static ConcurrentWeakValueCache<IBTreeManager, QueryEngine> standaloneQECache = new ConcurrentWeakValueCache<IBTreeManager, QueryEngine>( 0/* queueCapacity */ ); @@ -95,16 +97,16 @@ * and its weak reference has not been cleared. */ static public QueryEngine getExistingQueryController( - final IIndexManager indexManager) { + final IBTreeManager indexManager) { if (indexManager instanceof IBigdataFederation<?>) { return federationQECache.get((IBigdataFederation<?>) indexManager); } + // Note: Also supports TemporaryStore. + return standaloneQECache.get(indexManager); - return standaloneQECache.get((Journal)indexManager); - } /** @@ -122,21 +124,22 @@ return getFederatedQueryController((IBigdataFederation<?>) indexManager); } + // Note: Also supports TemporaryStore. + return getStandaloneQueryController((IBTreeManager) indexManager); - return getStandaloneQueryController((Journal) indexManager); - } /** * Singleton factory for standalone. * * @param indexManager - * The journal. - * + * The index manager. Can be a {@link TemporaryStore} or + * {@link Journal}. + * * @return The query controller. */ static public QueryEngine getStandaloneQueryController( - final Journal indexManager) { + final IBTreeManager indexManager) { if (indexManager == null) throw new IllegalArgumentException(); @@ -172,7 +175,7 @@ * @return The new query engine. */ private static QueryEngine newStandaloneQueryEngine( - final Journal indexManager) { + final IBTreeManager indexManager) { if (log.isInfoEnabled()) log.info("Initiallizing query engine: " + indexManager); Modified: branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java =================================================================== --- branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java 2013-01-25 18:39:23 UTC (rev 6857) +++ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java 2013-01-25 19:04:24 UTC (rev 6858) @@ -64,6 +64,7 @@ import com.bigdata.relation.accesspath.ArrayAccessPath; import com.bigdata.relation.accesspath.BlockingBuffer; import com.bigdata.relation.accesspath.BufferClosedException; +import com.bigdata.relation.accesspath.EmptyAccessPath; import com.bigdata.relation.accesspath.IAccessPath; import com.bigdata.relation.accesspath.IAsynchronousIterator; import com.bigdata.relation.accesspath.IBindingSetAccessPath; @@ -1350,17 +1351,28 @@ */ final private IAccessPath<E> accessPath; - /** - * Return the <em>fromKey</em> for the {@link IAccessPath} generated - * from the {@link IBindingSet} for this task. - * - * @todo Layered access paths do not expose a fromKey, but the - * information we need is available - * {@link IKeyOrder#getFromKey(IKeyBuilder, IPredicate)}. - */ + /** + * Return the <em>fromKey</em> for the {@link IAccessPath} generated + * from the {@link IBindingSet} for this task. + * + * @todo Layered access paths do not expose a fromKey, but the + * information we need is available + * {@link IKeyOrder#getFromKey(IKeyBuilder, IPredicate)}. + * + * @see <a + * href="https://sourceforge.net/apps/trac/bigdata/ticket/631"> + * ClassCastException in SIDs mode query </a> + */ protected byte[] getFromKey() { - return ((AccessPath<E>) accessPath).getFromKey(); + if (accessPath instanceof EmptyAccessPath) { + + // EmptyAccessPath does not extend AccessPath. + return BytesUtil.EMPTY; + + } + + return ((AccessPath<E>) accessPath).getFromKey(); } Property changes on: branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/joinGraph ___________________________________________________________________ Modified: svn:mergeinfo - /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/bop/joinGraph:4486-4522 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/joinGraph:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 /branches/RWSTORE_1_1_0_DEBUG/bigdata/src/java/com/bigdata/bop/joinGraph:5896-5935 /branches/TIDS_PLUS_BLOBS_BRANCH/bigdata/src/java/com/bigdata/bop/joinGraph:4814-4836 + /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/java/com/bigdata/bop/joinGraph:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/java/com/bigdata/bop/joinGraph:6766-6857 /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/bop/joinGraph:4486-4522 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/joinGraph:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 /branches/RWSTORE_1_1_0_DEBUG/bigdata/src/java/com/bigdata/bop/joinGraph:5896-5935 /branches/TIDS_PLUS_BLOBS_BRANCH/bigdata/src/java/com/bigdata/bop/joinGraph:4814-4836 Deleted: branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/paths/ArbitraryLengthPathOp.java =================================================================== --- branches/BIGDATA_RELEASE_1_2_0/bigdata/src/java/com/bigdata/bop/paths/ArbitraryLengthPathOp.java 2013-01-25 18:39:23 UTC (rev 6857) +++ branches/READ_CACHE/bigdata/src/java/com/bigdata/bop/paths/ArbitraryLengthPathOp.java 2013-01-25 19:04:24 UTC (rev 6858) @@ -1,896 +0,0 @@ -/** - -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 Aug 18, 2010 - */ - -package com.bigdata.bop.paths; - -import java.util.Arrays; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.Callable; -import java.util.concurrent.FutureTask; - -import org.apache.log4j.Logger; - -import com.bigdata.bop.BOp; -import com.bigdata.bop.BOpContext; -import com.bigdata.bop.IBindingSet; -import com.bigdata.bop.IConstant; -import com.bigdata.bop.IVariable; -import com.bigdata.bop.IVariableOrConstant; -import com.bigdata.bop.NV; -import com.bigdata.bop.PipelineOp; -import com.bigdata.bop.bindingSet.EmptyBindingSet; -import com.bigdata.bop.engine.AbstractRunningQuery; -import com.bigdata.bop.engine.IRunningQuery; -import com.bigdata.bop.engine.QueryEngine; -import com.bigdata.striterator.ICloseableIterator; - -/** - * Pipeline join incoming bindings against a special kind of subquery that - * represents an arbitrary length path between a single input variable and a - * single output variable. Continue this in rounds, using the output of the - * previous round as the input of the next round. This has the effect of - * producing the transitive closure of the subquery operation. - * <p> - * The basic idea behind this operator is to run a series of rounds until the - * solutions produced by each round reach a fixed point. Regardless of the the - * actual schematics of the arbitrary length path (whether there are constants - * or variables on the left and right side), we use two transitivity variables - * to keep the operator moving. Depending on the schematics of the arbitrary - * length path, we can run on forward (left side is input) or reverse (right - * side is input). For each intermediate solution, the binding for the - * transitivity variable on the output side is re-mapped to input for the next - * round. - * <p> - * This operator does not use internal parallelism, but it is thread-safe and - * multiple instances of this operator may be run in parallel by the query - * engine for parallel evaluation of different binding set chunks flowing - * through the pipeline. However, there are much more efficient query plan - * patterns for most use cases. E.g., (a) creating a hash index with all source - * solutions, (b) flooding a sub-section of the query plan with the source - * solutions from the hash index; and (c) hash joining the solutions from the - * sub-section of the query plan back against the hash index to reunite the - * solutions from the subquery with those in the parent context. - * - * @author <a href="mailto:mpe...@us...">Mike Personick</a> - */ -public class ArbitraryLengthPathOp extends PipelineOp { - - private static final Logger log = Logger.getLogger(ArbitraryLengthPathOp.class); - - /** - * - */ - private static final long serialVersionUID = 1L; - - public interface Annotations extends com.bigdata.bop.PipelineOp.Annotations { - - /** - * The subquery representing the path between left and right. - */ - String SUBQUERY = Annotations.class.getName() + ".subquery"; - - /** - * The left term - can be a variable or a constant. - */ - String LEFT_TERM = Annotations.class.getName() + ".leftTerm"; - - /** - * The right term - can be a variable or a constant. - */ - String RIGHT_TERM = Annotations.class.getName() + ".rightTerm"; - - /** - * The left transitivity variable. - */ - String TRANSITIVITY_VAR_LEFT = Annotations.class.getName() + ".transitivityVarLeft"; - - /** - * The right transitivity variable. - */ - String TRANSITIVITY_VAR_RIGHT = Annotations.class.getName() + ".transitivityVarRight"; - - /** - * The lower bound on the number of rounds to run. Can be zero (0) or - * one (1). A lower bound of zero is a special kind of path - the - * Zero Length Path. A zero length path connects a vertex to itself - * (in graph parlance). In the context of arbitrary length paths it - * means we bind the input onto the output regardless of whether they - * are actually connected via the path or not. - */ - String LOWER_BOUND = Annotations.class.getName() + ".lowerBound"; - - /** - * The upper bound on the number of rounds to run. - */ - String UPPER_BOUND = Annotations.class.getName() + ".upperBound"; - - /** - * Variables to dop in between rounds. This should be set to the - * internal variables produced by the path subquery. Each run of the - * subquery should be run "fresh", that is without its produced bindings - * already set. - */ - String VARS_TO_DROP = Annotations.class.getName() + ".varsToDrop"; - - } - - /** - * Deep copy constructor. - */ - public ArbitraryLengthPathOp(final ArbitraryLengthPathOp op) { - super(op); - } - - /** - * Shallow copy constructor. - * - * @param args - * @param annotations - */ - public ArbitraryLengthPathOp(final BOp[] args, - final Map<String, Object> annotations) { - - super(args, annotations); - - getRequiredProperty(Annotations.SUBQUERY); - - getRequiredProperty(Annotations.LEFT_TERM); - - getRequiredProperty(Annotations.RIGHT_TERM); - - getRequiredProperty(Annotations.TRANSITIVITY_VAR_LEFT); - - getRequiredProperty(Annotations.TRANSITIVITY_VAR_RIGHT); - - getRequiredProperty(Annotations.LOWER_BOUND); - - getRequiredProperty(Annotations.UPPER_BOUND); - - getRequiredProperty(Annotations.VARS_TO_DROP); - - } - - public ArbitraryLengthPathOp(final BOp[] args, NV... annotations) { - - this(args, NV.asMap(annotations)); - - } - - public FutureTask<Void> eval(final BOpContext<IBindingSet> context) { - - return new FutureTask<Void>(new ArbitraryLengthPathTask(this, context)); - - } - - private static class ArbitraryLengthPathTask implements Callable<Void> { - - private final BOpContext<IBindingSet> context; - private final PipelineOp subquery; - private final Gearing forwardGearing, reverseGearing; - private final long lowerBound, upperBound; - private IVariable<?>[] varsToDrop; - - public ArbitraryLengthPathTask(final ArbitraryLengthPathOp controllerOp, - final BOpContext<IBindingSet> context) { - - if (controllerOp == null) - throw new IllegalArgumentException(); - - if (context == null) - throw new IllegalArgumentException(); - - this.context = context; - - this.subquery = (PipelineOp) controllerOp - .getRequiredProperty(Annotations.SUBQUERY); - - final IVariableOrConstant<?> leftTerm = (IVariableOrConstant<?>) controllerOp - .getProperty(Annotations.LEFT_TERM); - - final IVariable<?> leftVar = leftTerm.isVar() ? (IVariable<?>) leftTerm : null; - - final IConstant<?> leftConst = leftTerm.isConstant() ? (IConstant<?>) leftTerm : null; - - final IVariableOrConstant<?> rightTerm = (IVariableOrConstant<?>) controllerOp - .getProperty(Annotations.RIGHT_TERM); - - final IVariable<?> rightVar = rightTerm.isVar() ? (IVariable<?>) rightTerm : null; - - final IConstant<?> rightConst = rightTerm.isConstant() ? (IConstant<?>) rightTerm : null; - - final IVariable<?> tVarLeft = (IVariable<?>) controllerOp - .getProperty(Annotations.TRANSITIVITY_VAR_LEFT); - - final IVariable<?> tVarRight = (IVariable<?>) controllerOp - .getProperty(Annotations.TRANSITIVITY_VAR_RIGHT); - - this.forwardGearing = new Gearing( - leftVar, rightVar, leftConst, rightConst, tVarLeft, tVarRight); - - this.reverseGearing = forwardGearing.reverse(); - - this.lowerBound = (Long) controllerOp - .getProperty(Annotations.LOWER_BOUND); - - this.upperBound = (Long) controllerOp - .getProperty(Annotations.UPPER_BOUND); - - this.varsToDrop = (IVariable<?>[]) controllerOp - .getProperty(Annotations.VARS_TO_DROP); - - } - - public Void call() throws Exception { - - try { - - final ICloseableIterator<IBindingSet[]> sitr = context - .getSource(); - - if (!sitr.hasNext()) { - - processChunk(new IBindingSet[0]); - - } else { - - while (sitr.hasNext()) { - - final IBindingSet[] chunk = sitr.next(); - - processChunk(chunk); - - } - - } - - // Now that we know the subqueries ran Ok, flush the sink. - context.getSink().flush(); - - // Done. - return null; - - } finally { - - context.getSource().close(); - - context.getSink().close(); - - if (context.getSink2() != null) - context.getSink2().close(); - - } - - } - - @SuppressWarnings("unchecked") - private void processChunk(final IBindingSet[] chunkIn) throws Exception { - - final Map<SolutionKey, IBindingSet> solutionsOut = - new LinkedHashMap<SolutionKey, IBindingSet>(); - - final QueryEngine queryEngine = this.context - .getRunningQuery().getQueryEngine(); - - /* - * The input to each round of transitive chaining. - */ - final Set<IBindingSet> nextRoundInput = new LinkedHashSet<IBindingSet>(); - - /* - * Decide based on the schematics of the path and the - * incoming data whether to run in forward or reverse gear. - * - * TODO Break the incoming chunk into two chunks - one to be run - * in forward gear and one to be run in reverse. This is an - * extremely unlikely scenario. - */ - final Gearing gearing = chooseGearing(chunkIn); - - if (log.isDebugEnabled()) { - log.debug("gearing: " + gearing); - } - - for (IBindingSet parentSolutionIn : chunkIn) { - - if (log.isDebugEnabled()) - log.debug("parent solution in: " + parentSolutionIn); - - IBindingSet childSolutionIn = parentSolutionIn.clone(); - - /* - * The seed is either a constant on the input side of - * the property path or a bound value for the property - * path's input variable from the incoming binding set. - */ - final IConstant<?> seed = gearing.inConst != null ? - gearing.inConst : childSolutionIn.get(gearing.inVar); - - if (log.isDebugEnabled()) - log.debug("seed: " + seed); - - if (seed != null) { - - childSolutionIn.set(gearing.tVarIn, seed); - - /* - * Dirty hack for zero length paths. Add a zero length - * path from the seed to itself. By handling this here - * (instead of in a separate operator) we get the - * cardinality right. Except in the case on nested - * arbitrary length paths, we are getting too few solutions - * from that (over-filtering). See the todo below. Again, - * this seems to be a very esoteric problem stemming from - * an unlikely scenario. Not going to fix it for now. - * - * TODO Add a binding for the bop id for the - * subquery that generated this solution and use - * that as part of the solution key somehow? This - * would allow duplicates from nested paths to - * remain in the outbound solutions, which seems to - * be the problem with the TCK query: - * - * :a (:p*)* ?y - */ - if (lowerBound == 0 && gearing.outVar != null && - !childSolutionIn.isBound(gearing.outVar)) { - - final IBindingSet bs = parentSolutionIn.clone(); - - /* - * Setting the outVar seems to produce duplicates - * when we do chunk at a time. - */ -// bs.set(gearing.outVar, seed); - - bs.set(gearing.tVarIn, seed); - - bs.set(gearing.tVarOut, seed); - - solutionsOut.put(newSolutionKey(gearing, bs), bs); - - if (log.isDebugEnabled()) { - log.debug("added a zero length path: " + bs); - } - - } - - } - - nextRoundInput.add(childSolutionIn); - - } - - if (log.isDebugEnabled()) { - for (IBindingSet childSolutionIn : nextRoundInput) - log.debug("first round input: " + childSolutionIn); - } - - for (int i = 0; i < upperBound; i++) { - - long sizeBefore = solutionsOut.size(); - - // The subquery - IRunningQuery runningSubquery = null; - // The iterator draining the subquery - ICloseableIterator<IBindingSet[]> subquerySolutionItr = null; - - try { - - runningSubquery = queryEngine.eval(subquery, - nextRoundInput.toArray(new IBindingSet[nextRoundInput.size()])); - - long count = 0L; - try { - - // Declare the child query to the parent. - ((AbstractRunningQuery) context.getRunningQuery()) - .addChild(runningSubquery); - - // clear the input set to make room for the next round - nextRoundInput.clear(); - - // Iterator visiting the subquery solutions. - subquerySolutionItr = runningSubquery.iterator(); - - while (subquerySolutionItr.hasNext()) { - - final IBindingSet[] chunk = subquerySolutionItr.next(); - - for (IBindingSet bs : chunk) { - - count++; - - if (log.isDebugEnabled()) { - log.debug("round " + i + " solution: " + bs); - } - - if (gearing.inVar != null && !bs.isBound(gearing.inVar)) { - - /* - * Must be the first round. The first - * round when there are no incoming - * binding (from the parent or previous - * rounds) is the only time the inVar - * won't be set. - */ - bs.set(gearing.inVar, bs.get(gearing.tVarIn)); - - if (log.isDebugEnabled()) { - log.debug("adding binding for inVar: " + bs); - } - - } - - // drop the intermediate variables - dropVars(bs); - -// solutionsOut.add(solution); - solutionsOut.put(newSolutionKey(gearing, bs), bs); - - /* - * Remap the solution as input to the next round. - */ - final IBindingSet input = bs.clone(); - - input.set(gearing.tVarIn, bs.get(gearing.tVarOut)); - - input.clear(gearing.tVarOut); - - nextRoundInput.add(input); - - if (log.isDebugEnabled()) { - log.debug("remapped as input for next round: " + input); - } - - } - - } - - // finished with the iterator - subquerySolutionItr.close(); - - // wait for the subquery to halt / test for errors. - runningSubquery.get(); - - if (log.isDebugEnabled()) { - log.debug("done with round " + i + - ", count=" + count + - ", totalBefore=" + sizeBefore + - ", totalAfter=" + solutionsOut.size() + - ", totalNew=" + (solutionsOut.size() - sizeBefore)); - } - - // we've reached fixed point - if (solutionsOut.size() == sizeBefore) { - - break; - - } - - } catch (InterruptedException ex) { - - // this thread was interrupted, so cancel the subquery. - runningSubquery - .cancel(true/* mayInterruptIfRunning */); - - // rethrow the exception. - throw ex; - - } - - } catch (Throwable t) { - - if (runningSubquery == null - || runningSubquery.getCause() != null) { - /* - * If things fail before we start the subquery, or if a - * subquery fails (due to abnormal termination), then - * propagate the error to the parent and rethrow the - * first cause error out of the subquery. - * - * Note: IHaltable#getCause() considers exceptions - * triggered by an interrupt to be normal termination. - * Such exceptions are NOT propagated here and WILL NOT - * cause the parent query to terminate. - */ - throw new RuntimeException(ArbitraryLengthPathTask.this.context - .getRunningQuery().halt( - runningSubquery == null ? t - : runningSubquery.getCause())); - } - -// return runningSubquery; - - } finally { - - try { - - // ensure subquery is halted. - if (runningSubquery != null) - runningSubquery - .cancel(true/* mayInterruptIfRunning */); - - } finally { - - // ensure the subquery solution iterator is closed. - if (subquerySolutionItr != null) - subquerySolutionItr.close(); - - } - - } - - } // fixed point for loop - - /* - * Do some final filtering and then send the solutions - * down the pipeline. - */ - final Iterator<Map.Entry<SolutionKey, IBindingSet>> it = - solutionsOut.entrySet().iterator(); - - while (it.hasNext()) { - - final Map.Entry<SolutionKey, IBindingSet> entry = it.next(); - - final IBindingSet bs = entry.getValue(); - - if (log.isDebugEnabled()) { - log.debug("considering possible solution: " + bs); - } - - if (gearing.outConst != null) { - - /* - * Handle the case where there is a constant on the - * output side of the subquery. Make sure the - * solution's transitive output variable matches. - */ - if (!bs.get(gearing.tVarOut).equals(gearing.outConst)) { - - if (log.isDebugEnabled()) { - log.debug("transitive output does not match output const, dropping"); - } - - it.remove(); - - continue; - - } - - } else { // outVar != null - - /* - * Handle the case where the gearing.outVar was bound - * coming in. Again, make sure it matches the - * transitive output variable. - */ - if (bs.isBound(gearing.outVar)) { - - if (!bs.get(gearing.tVarOut).equals(bs.get(gearing.outVar))) { - - if (log.isDebugEnabled()) { - log.debug("transitive output does not match incoming binding for output var, dropping"); - } - - it.remove(); - - continue; - - } - - } else { - - /* - ... [truncated message content] |