Cannot delete temp branch, doc'd it.
Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/5a03ef61 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/5a03ef61 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/5a03ef61 Branch: refs/heads/RYA-INFRA-PUSH Commit: 5a03ef61abe6218997dbbcce870e57d8cef51bae Parents: b98b54e Author: Aaron Mihalik <[email protected]> Authored: Mon Dec 7 07:02:38 2015 -0500 Committer: Aaron Mihalik <[email protected]> Committed: Mon Dec 7 07:03:43 2015 -0500 ---------------------------------------------------------------------- LICENSE | 202 - NOTICE | 6 - README.md | 302 +- common/pom.xml | 39 - common/rya.api/.gitignore | 1 - common/rya.api/pom.xml | 76 - .../InvalidValueTypeMarkerRuntimeException.java | 55 - .../api/RdfCloudTripleStoreConfiguration.java | 507 -- .../rya/api/RdfCloudTripleStoreConstants.java | 151 - .../rya/api/RdfCloudTripleStoreStatement.java | 72 - .../mvm/rya/api/RdfCloudTripleStoreUtils.java | 420 -- .../rya/api/date/DateTimeTtlValueConverter.java | 80 - .../api/date/TimestampTtlStrValueConverter.java | 56 - .../api/date/TimestampTtlValueConverter.java | 56 - .../mvm/rya/api/date/TtlValueConverter.java | 41 - .../src/main/java/mvm/rya/api/domain/Node.java | 38 - .../main/java/mvm/rya/api/domain/RangeURI.java | 52 - .../java/mvm/rya/api/domain/RangeValue.java | 72 - .../main/java/mvm/rya/api/domain/RyaRange.java | 32 - .../main/java/mvm/rya/api/domain/RyaSchema.java | 43 - .../java/mvm/rya/api/domain/RyaStatement.java | 252 - .../main/java/mvm/rya/api/domain/RyaType.java | 111 - .../java/mvm/rya/api/domain/RyaTypePrefix.java | 59 - .../java/mvm/rya/api/domain/RyaTypeRange.java | 99 - .../main/java/mvm/rya/api/domain/RyaURI.java | 63 - .../java/mvm/rya/api/domain/RyaURIPrefix.java | 47 - .../java/mvm/rya/api/domain/RyaURIRange.java | 95 - .../api/domain/utils/RyaStatementWritable.java | 140 - .../mvm/rya/api/layout/TableLayoutStrategy.java | 40 - .../api/layout/TablePrefixLayoutStrategy.java | 85 - .../mvm/rya/api/persist/RdfDAOException.java | 44 - .../mvm/rya/api/persist/RdfEvalStatsDAO.java | 54 - .../java/mvm/rya/api/persist/RyaConfigured.java | 35 - .../main/java/mvm/rya/api/persist/RyaDAO.java | 126 - .../mvm/rya/api/persist/RyaDAOException.java | 43 - .../rya/api/persist/RyaNamespaceManager.java | 41 - .../api/persist/index/RyaSecondaryIndexer.java | 45 - .../persist/joinselect/SelectivityEvalDAO.java | 37 - .../rya/api/persist/query/BatchRyaQuery.java | 115 - .../mvm/rya/api/persist/query/RyaQuery.java | 97 - .../rya/api/persist/query/RyaQueryEngine.java | 96 - .../rya/api/persist/query/RyaQueryOptions.java | 246 - .../rya/api/persist/query/join/HashJoin.java | 158 - .../api/persist/query/join/IterativeJoin.java | 233 - .../mvm/rya/api/persist/query/join/Join.java | 44 - .../rya/api/persist/query/join/MergeJoin.java | 244 - .../mvm/rya/api/persist/utils/RyaDAOHelper.java | 176 - .../strategy/AbstractTriplePatternStrategy.java | 93 - .../mvm/rya/api/query/strategy/ByteRange.java | 45 - .../query/strategy/TriplePatternStrategy.java | 49 - .../HashedPoWholeRowTriplePatternStrategy.java | 135 - .../HashedSpoWholeRowTriplePatternStrategy.java | 138 - .../OspWholeRowTriplePatternStrategy.java | 113 - .../PoWholeRowTriplePatternStrategy.java | 128 - .../SpoWholeRowTriplePatternStrategy.java | 130 - .../resolver/CustomRyaTypeResolverMapping.java | 57 - .../rya/api/resolver/RdfToRyaConversions.java | 93 - .../java/mvm/rya/api/resolver/RyaContext.java | 192 - .../rya/api/resolver/RyaToRdfConversions.java | 75 - .../mvm/rya/api/resolver/RyaTripleContext.java | 123 - .../mvm/rya/api/resolver/RyaTypeResolver.java | 60 - .../api/resolver/RyaTypeResolverException.java | 43 - .../api/resolver/RyaTypeResolverMapping.java | 57 - .../resolver/impl/BooleanRyaTypeResolver.java | 61 - .../api/resolver/impl/ByteRyaTypeResolver.java | 63 - .../resolver/impl/CustomDatatypeResolver.java | 70 - .../resolver/impl/DateTimeRyaTypeResolver.java | 76 - .../resolver/impl/DoubleRyaTypeResolver.java | 68 - .../api/resolver/impl/FloatRyaTypeResolver.java | 64 - .../resolver/impl/IntegerRyaTypeResolver.java | 67 - .../api/resolver/impl/LongRyaTypeResolver.java | 68 - .../api/resolver/impl/RyaTypeResolverImpl.java | 124 - .../rya/api/resolver/impl/RyaURIResolver.java | 44 - .../ServiceBackedRyaTypeResolverMappings.java | 45 - .../api/resolver/impl/ShortRyaTypeResolver.java | 65 - .../mvm/rya/api/resolver/triple/TripleRow.java | 107 - .../rya/api/resolver/triple/TripleRowRegex.java | 84 - .../api/resolver/triple/TripleRowResolver.java | 43 - .../triple/TripleRowResolverException.java | 43 - .../impl/WholeRowHashedTripleResolver.java | 154 - .../triple/impl/WholeRowTripleResolver.java | 139 - .../mvm/rya/api/security/SecurityProvider.java | 28 - .../api/utils/CloseableIterableIteration.java | 76 - .../mvm/rya/api/utils/EnumerationWrapper.java | 58 - .../java/mvm/rya/api/utils/IteratorWrapper.java | 58 - .../rya/api/utils/NullableStatementImpl.java | 105 - .../api/utils/PeekingCloseableIteration.java | 74 - .../RyaStatementAddBindingSetFunction.java | 40 - ...ementRemoveBindingSetCloseableIteration.java | 61 - .../mvm/rya/api/domain/RyaURIPrefixTest.java | 37 - .../mvm/rya/api/persist/query/RyaQueryTest.java | 63 - .../AbstractTriplePatternStrategyTest.java | 192 - ...shedPoWholeRowTriplePatternStrategyTest.java | 175 - ...hedSpoWholeRowTriplePatternStrategyTest.java | 199 - .../wholerow/MockRdfCloudConfiguration.java | 32 - .../OspWholeRowTriplePatternStrategyTest.java | 135 - .../PoWholeRowTriplePatternStrategyTest.java | 159 - .../SpoWholeRowTriplePatternStrategyTest.java | 185 - .../mvm/rya/api/resolver/RyaContextTest.java | 86 - .../impl/CustomDatatypeResolverTest.java | 40 - .../impl/DateTimeRyaTypeResolverTest.java | 177 - .../impl/DoubleRyaTypeResolverTest.java | 46 - .../impl/IntegerRyaTypeResolverTest.java | 44 - .../resolver/impl/LongRyaTypeResolverTest.java | 49 - .../api/resolver/impl/RyaURIResolverTest.java | 40 - .../impl/HashedWholeRowTripleResolverTest.java | 124 - .../triple/impl/WholeRowTripleResolverTest.java | 127 - .../test/java/mvm/rya/api/utils/RdfIOTest.java | 67 - common/rya.provenance/pom.xml | 53 - .../provenance/LoggingProvenanceCollector.java | 41 - .../ProvenanceCollectionException.java | 39 - .../provenance/ProvenanceCollector.java | 34 - .../TriplestoreProvenanceCollector.java | 68 - .../provenance/rdf/BaseProvenanceModel.java | 68 - .../provenance/rdf/RDFProvenanceModel.java | 33 - .../TriplestoreProvenanceCollectorTest.java | 51 - .../provenance/rdf/BaseProvenanceModelTest.java | 38 - dao/accumulo.rya/pom.xml | 93 - .../AccumuloNamespaceTableIterator.java | 99 - .../rya/accumulo/AccumuloRdfConfiguration.java | 86 - .../mvm/rya/accumulo/AccumuloRdfConstants.java | 40 - .../rya/accumulo/AccumuloRdfEvalStatsDAO.java | 173 - .../rya/accumulo/AccumuloRdfQueryIterator.java | 297 -- .../java/mvm/rya/accumulo/AccumuloRdfUtils.java | 72 - .../java/mvm/rya/accumulo/AccumuloRyaDAO.java | 523 --- .../accumulo/DefineTripleQueryRangeFactory.java | 152 - .../mvm/rya/accumulo/RyaTableKeyValues.java | 115 - .../rya/accumulo/RyaTableMutationsFactory.java | 102 - .../experimental/AbstractAccumuloIndexer.java | 59 - .../accumulo/experimental/AccumuloIndexer.java | 33 - .../rya/accumulo/mr/AbstractAccumuloMRTool.java | 164 - .../accumulo/mr/eval/AccumuloRdfCountTool.java | 258 -- .../mr/fileinput/BulkNtripsInputTool.java | 369 -- .../mr/fileinput/RdfFileInputByLineTool.java | 251 - .../mr/fileinput/RdfFileInputFormat.java | 146 - .../accumulo/mr/fileinput/RdfFileInputTool.java | 175 - .../rya/accumulo/mr/upgrade/Upgrade322Tool.java | 240 - .../mr/utils/AccumuloHDFSFileInputFormat.java | 206 - .../rya/accumulo/mr/utils/AccumuloProps.java | 58 - .../java/mvm/rya/accumulo/mr/utils/MRUtils.java | 119 - .../accumulo/query/AccumuloRyaQueryEngine.java | 402 -- .../query/KeyValueToRyaStatementFunction.java | 72 - .../accumulo/query/RangeBindingSetEntries.java | 58 - .../RyaStatementBindingSetKeyValueIterator.java | 154 - .../query/RyaStatementKeyValueIterator.java | 107 - .../query/ScannerBaseCloseableIterable.java | 56 - .../mvm/rya/accumulo/utils/TimeRangeFilter.java | 87 - .../accumulo/AccumuloRdfConfigurationTest.java | 59 - .../mvm/rya/accumulo/AccumuloRyaDAOTest.java | 665 --- .../DefineTripleQueryRangeFactoryTest.java | 265 -- .../mr/eval/AccumuloRdfCountToolTest.java | 282 -- .../mr/fileinput/RdfFileInputToolTest.java | 146 - .../accumulo/mr/upgrade/Upgrade322ToolTest.java | 319 -- .../upgrade/UpgradeObjectSerializationTest.java | 119 - .../src/test/resources/namedgraphs.trig | 7 - .../src/test/resources/test.ntriples | 1 - dao/mongodb.rya/pom.xml | 48 - .../mvm/rya/mongodb/MongoDBQueryEngine.java | 207 - .../rya/mongodb/MongoDBRdfConfiguration.java | 121 - .../java/mvm/rya/mongodb/MongoDBRyaDAO.java | 222 - .../mongodb/dao/MongoDBNamespaceManager.java | 35 - .../rya/mongodb/dao/MongoDBStorageStrategy.java | 41 - .../dao/SimpleMongoDBNamespaceManager.java | 181 - .../dao/SimpleMongoDBStorageStrategy.java | 152 - .../NonCloseableRyaStatementCursorIterator.java | 57 - .../RyaStatementBindingSetCursorIterator.java | 108 - .../iter/RyaStatementCursorIterable.java | 67 - .../iter/RyaStatementCursorIterator.java | 104 - dao/pom.xml | 39 - extras/indexing/pom.xml | 128 - .../documentIndex/DocIndexIteratorUtil.java | 31 - .../DocumentIndexIntersectingIterator.java | 850 ---- .../rya/accumulo/documentIndex/TextColumn.java | 108 - .../rya/accumulo/mr/NullFreeTextIndexer.java | 70 - .../mvm/rya/accumulo/mr/NullGeoIndexer.java | 121 - .../rya/accumulo/mr/NullTemporalIndexer.java | 154 - .../mvm/rya/accumulo/mr/RyaOutputFormat.java | 329 -- .../mvm/rya/accumulo/mr/StatementWritable.java | 86 - .../fileinput/BulkNtripsInputToolIndexing.java | 227 - .../mr/fileinput/RyaBatchWriterInputTool.java | 243 - .../AccumuloPrecompQueryIndexer.java | 326 -- .../java/mvm/rya/indexing/DocIdIndexer.java | 47 - .../rya/indexing/FilterFunctionOptimizer.java | 358 -- .../java/mvm/rya/indexing/FreeTextIndexer.java | 62 - .../main/java/mvm/rya/indexing/GeoIndexer.java | 201 - .../ExternalIndexMatcher.java | 34 - .../GeneralizedExternalProcessor.java | 730 --- .../IndexPlanValidator/IndexListPruner.java | 35 - .../IndexPlanValidator/IndexPlanValidator.java | 210 - .../IndexPlanValidator/IndexTupleGenerator.java | 33 - .../IndexedExecutionPlanGenerator.java | 207 - .../IndexedQueryPlanSelector.java | 32 - .../ThreshholdPlanSelector.java | 240 - .../TupleExecutionPlanGenerator.java | 215 - .../IndexPlanValidator/TupleReArranger.java | 348 -- .../IndexPlanValidator/TupleValidator.java | 34 - .../ValidIndexCombinationGenerator.java | 671 --- .../VarConstantIndexListPruner.java | 171 - .../java/mvm/rya/indexing/IndexingExpr.java | 94 - .../rya/indexing/IndexingFunctionRegistry.java | 136 - .../java/mvm/rya/indexing/IteratorFactory.java | 159 - .../main/java/mvm/rya/indexing/KeyParts.java | 331 -- .../mvm/rya/indexing/PrecompQueryIndexer.java | 63 - .../java/mvm/rya/indexing/RyaSailFactory.java | 84 - .../java/mvm/rya/indexing/SearchFunction.java | 45 - .../mvm/rya/indexing/SearchFunctionFactory.java | 71 - .../mvm/rya/indexing/StatementContraints.java | 73 - .../java/mvm/rya/indexing/TemporalIndexer.java | 183 - .../java/mvm/rya/indexing/TemporalInstant.java | 83 - .../java/mvm/rya/indexing/TemporalInterval.java | 181 - .../mvm/rya/indexing/accumulo/ConfigUtils.java | 424 -- .../java/mvm/rya/indexing/accumulo/Md5Hash.java | 45 - .../indexing/accumulo/StatementSerializer.java | 227 - .../accumulo/entity/AccumuloDocIdIndexer.java | 450 -- .../accumulo/entity/EntityCentricIndex.java | 252 - .../entity/EntityLocalityGroupSetter.java | 171 - .../accumulo/entity/EntityOptimizer.java | 436 -- .../accumulo/entity/EntityTupleSet.java | 264 -- .../rya/indexing/accumulo/entity/StarQuery.java | 636 --- .../freetext/AccumuloFreeTextIndexer.java | 611 --- .../accumulo/freetext/ColumnPrefixes.java | 120 - .../accumulo/freetext/FreeTextTupleSet.java | 160 - .../accumulo/freetext/LuceneTokenizer.java | 57 - .../accumulo/freetext/SimpleTokenizer.java | 43 - .../indexing/accumulo/freetext/Tokenizer.java | 31 - .../freetext/iterators/AndingIterator.java | 563 --- .../freetext/iterators/BooleanTreeIterator.java | 322 -- .../accumulo/freetext/query/ASTExpression.java | 63 - .../accumulo/freetext/query/ASTNodeUtils.java | 210 - .../accumulo/freetext/query/ASTSimpleNode.java | 917 ---- .../accumulo/freetext/query/ASTTerm.java | 79 - .../freetext/query/JJTQueryParserState.java | 1024 ----- .../indexing/accumulo/freetext/query/Node.java | 937 ---- .../accumulo/freetext/query/ParseException.java | 1088 ----- .../accumulo/freetext/query/QueryParser.java | 1293 ------ .../accumulo/freetext/query/QueryParser.jj | 176 - .../accumulo/freetext/query/QueryParser.jjt | 90 - .../freetext/query/QueryParserConstants.java | 960 ---- .../freetext/query/QueryParserTokenManager.java | 1389 ------ .../query/QueryParserTreeConstants.java | 920 ---- .../freetext/query/SimpleCharStream.java | 1372 ------ .../accumulo/freetext/query/SimpleNode.java | 980 ---- .../indexing/accumulo/freetext/query/Token.java | 1032 ----- .../accumulo/freetext/query/TokenMgrError.java | 1048 ----- .../rya/indexing/accumulo/geo/GeoConstants.java | 45 - .../accumulo/geo/GeoMesaGeoIndexer.java | 447 -- .../indexing/accumulo/geo/GeoParseUtils.java | 46 - .../rya/indexing/accumulo/geo/GeoTupleSet.java | 364 -- .../temporal/AccumuloTemporalIndexer.java | 824 ---- .../temporal/TemporalInstantRfc3339.java | 218 - .../accumulo/temporal/TemporalTupleSet.java | 320 -- .../indexing/external/ExternalIndexMain.java | 219 - .../indexing/external/ExternalProcessor.java | 726 --- .../mvm/rya/indexing/external/ExternalSail.java | 86 - .../indexing/external/ExternalSailExample.java | 124 - .../indexing/external/PrecompJoinOptimizer.java | 773 ---- .../external/QueryVariableNormalizer.java | 1180 ----- .../external/tupleSet/AccumuloIndexSet.java | 626 --- .../external/tupleSet/ExternalTupleSet.java | 213 - .../tupleSet/SimpleExternalTupleSet.java | 88 - .../indexing/mongodb/AbstractMongoIndexer.java | 73 - .../mongodb/GeoMongoDBStorageStrategy.java | 185 - .../rya/indexing/mongodb/MongoGeoIndexer.java | 259 -- .../rya/indexing/mongodb/MongoGeoTupleSet.java | 361 -- .../ValidIndexCombinationGeneratorTest.java | 507 -- .../DocumentIndexIntersectingIteratorTest.java | 1903 -------- .../GeneralizedExternalProcessorTest.java | 325 -- .../IndexPlanValidatorTest.java | 1148 ----- .../IndexedExecutionPlanGeneratorTest.java | 423 -- .../ThreshholdPlanSelectorTest.java | 838 ---- .../TupleExecutionPlanGeneratorTest.java | 364 -- .../IndexPlanValidator/TupleReArrangerTest.java | 141 - .../ValidIndexCombinationGeneratorTest.java | 620 --- .../VarConstantIndexListPrunerTest.java | 329 -- .../accumulo/StatementSerializerTest.java | 106 - .../accumulo/entity/AccumuloDocIndexerTest.java | 2125 --------- .../accumulo/entity/EntityOptimizerTest.java | 1357 ------ .../indexing/accumulo/entity/StarQueryTest.java | 290 -- .../freetext/AccumuloFreeTextIndexerTest.java | 221 - .../freetext/query/QueryParserTest.java | 130 - .../indexing/accumulo/geo/GeoIndexerSfTest.java | 316 -- .../indexing/accumulo/geo/GeoIndexerTest.java | 370 -- .../temporal/AccumuloTemporalIndexerTest.java | 1040 ----- .../accumulo/temporal/TemporalInstantTest.java | 96 - .../accumulo/temporal/TemporalIntervalTest.java | 178 - .../external/AccumuloConstantIndexSetTest.java | 831 ---- .../indexing/external/AccumuloIndexSetTest.java | 4330 ------------------ .../external/AccumuloIndexSetTest2.java | 803 ---- .../PrecompJoinOptimizerIntegrationTest.java | 550 --- .../external/PrecompJoinOptimizerTest.java | 521 --- .../tupleSet/ExternalProcessorTest.java | 1654 ------- .../tupleSet/QueryVariableNormalizerTest.java | 965 ---- .../tupleSet/VarConstExternalProcessorTest.java | 490 -- .../VarConstQueryVariableNormalizerTest.java | 747 --- extras/indexingExample/pom.xml | 99 - .../src/main/assembly/assembly.xml | 70 - .../src/main/java/EntityDirectExample.java | 311 -- .../src/main/java/MongoRyaDirectExample.java | 307 -- .../src/main/java/RyaDirectExample.java | 700 --- .../src/main/scripts/RunRyaDirectExample.bat | 41 - extras/pom.xml | 43 - extras/rya.console/.gitignore | 8 - extras/rya.console/pom.xml | 100 - .../java/mvm/rya/console/RyaBannerProvider.java | 69 - .../mvm/rya/console/RyaConsoleCommands.java | 230 - .../rya/console/RyaHistoryFileNameProvider.java | 47 - .../java/mvm/rya/console/RyaPromptProvider.java | 47 - .../META-INF/spring/spring-shell-plugin.xml | 30 - extras/rya.manual/pom.xml | 53 - extras/rya.manual/src/site/markdown/_index.md | 44 - extras/rya.manual/src/site/markdown/alx.md | 82 - .../src/site/markdown/build-source.md | 36 - extras/rya.manual/src/site/markdown/eval.md | 79 - extras/rya.manual/src/site/markdown/index.md | 45 - extras/rya.manual/src/site/markdown/infer.md | 35 - .../src/site/markdown/loadPrecomputedJoin.md | 49 - extras/rya.manual/src/site/markdown/loaddata.md | 142 - extras/rya.manual/src/site/markdown/overview.md | 26 - .../rya.manual/src/site/markdown/querydata.md | 137 - .../rya.manual/src/site/markdown/quickstart.md | 62 - .../rya.manual/src/site/markdown/sm-addauth.md | 119 - .../src/site/markdown/sm-firststeps.md | 80 - extras/rya.manual/src/site/markdown/sm-infer.md | 353 -- .../src/site/markdown/sm-namedgraph.md | 157 - .../src/site/markdown/sm-simpleaqr.md | 75 - .../src/site/markdown/sm-sparqlquery.md | 79 - .../src/site/markdown/sm-updatedata.md | 83 - .../src/site/resources/js/fixmarkdownlinks.js | 25 - extras/rya.manual/src/site/site.xml | 65 - extras/rya.prospector/pom.xml | 109 - .../mvm/rya/prospector/domain/IndexEntry.groovy | 76 - .../domain/IntermediateProspect.groovy | 70 - .../rya/prospector/domain/TripleValueType.java | 26 - .../mvm/rya/prospector/mr/Prospector.groovy | 108 - .../rya/prospector/mr/ProspectorCombiner.groovy | 61 - .../rya/prospector/mr/ProspectorMapper.groovy | 75 - .../rya/prospector/mr/ProspectorReducer.groovy | 57 - .../rya/prospector/plans/IndexWorkPlan.groovy | 51 - .../plans/IndexWorkPlanManager.groovy | 29 - .../rya/prospector/plans/impl/CountPlan.groovy | 220 - .../ServicesBackedIndexWorkPlanManager.groovy | 38 - .../prospector/service/ProspectorService.groovy | 126 - .../ProspectorServiceEvalStatsDAO.groovy | 122 - .../mvm/rya/prospector/utils/CustomEntry.groovy | 52 - .../prospector/utils/ProspectorConstants.groovy | 41 - .../rya/prospector/utils/ProspectorUtils.groovy | 138 - .../joinselect/AccumuloSelectivityEvalDAO.java | 640 --- .../mvm/rya/joinselect/CardinalityCalcUtil.java | 267 -- .../mvm/rya/joinselect/mr/FullTableSize.java | 129 - .../rya/joinselect/mr/JoinSelectAggregate.java | 272 -- .../mvm/rya/joinselect/mr/JoinSelectDriver.java | 60 - .../joinselect/mr/JoinSelectProspectOutput.java | 124 - .../joinselect/mr/JoinSelectSpoTableOutput.java | 126 - .../joinselect/mr/JoinSelectStatisticsSum.java | 220 - .../mvm/rya/joinselect/mr/utils/CardList.java | 209 - .../joinselect/mr/utils/CardinalityType.java | 149 - .../rya/joinselect/mr/utils/CompositeType.java | 122 - .../mr/utils/JoinSelectConstants.java | 46 - .../mr/utils/JoinSelectStatsUtil.java | 183 - .../mvm/rya/joinselect/mr/utils/TripleCard.java | 145 - .../rya/joinselect/mr/utils/TripleEntry.java | 180 - .../mvm.rya.prospector.plans.IndexWorkPlan | 1 - .../mvm/rya/prospector/mr/ProspectorTest.groovy | 178 - .../ProspectorServiceEvalStatsDAOTest.groovy | 182 - .../AccumuloSelectivityEvalDAOTest.java | 592 --- .../mr/CardinalityIdentityReducerTest.java | 141 - .../joinselect/mr/CardinalityMapperTest.java | 76 - .../rya/joinselect/mr/FullTableSizeTest.java | 64 - .../mvm/rya/joinselect/mr/JoinReducerTest.java | 124 - .../rya/joinselect/mr/JoinSelectMapperTest.java | 94 - .../mr/JoinSelectProspectOutputTest.java | 89 - .../mr/JoinSelectStatisticsSumTest.java | 60 - .../joinselect/mr/JoinSelectStatisticsTest.java | 872 ---- .../src/test/resources/stats_cluster_config.xml | 97 - extras/tinkerpop.rya/pom.xml | 104 - .../config/RyaGraphConfiguration.groovy | 103 - .../mvm/rya/blueprints/sail/RyaSailEdge.groovy | 94 - .../blueprints/sail/RyaSailEdgeSequence.groovy | 110 - .../mvm/rya/blueprints/sail/RyaSailGraph.groovy | 131 - .../rya/blueprints/sail/RyaSailVertex.groovy | 89 - .../sail/RyaSailVertexSequence.groovy | 94 - .../mvm/rya/blueprints/sail/RyaSailEdge.java | 101 - .../mvm/rya/blueprints/sail/RyaSailVertex.java | 105 - .../mvm/rya/blueprints/TstGremlinRya.groovy | 111 - .../config/RyaGraphConfigurationTest.groovy | 129 - .../sail/RyaSailVertexSequenceTest.groovy | 100 - .../src/test/resources/log4j.properties | 19 - osgi/alx.rya.console/pom.xml | 61 - .../mvm/rya/alx/command/AbstractRyaCommand.java | 58 - .../alx/command/GetStatementsRyaCommand.java | 80 - .../mvm/rya/alx/command/InfoRyaCommand.java | 46 - .../blueprint/alx.rya.console-blueprint.xml | 34 - osgi/alx.rya/pom.xml | 86 - .../src/main/features/alx.rya-features.xml | 104 - .../mvm/rya/alx/util/ConfigurationFactory.java | 53 - .../META-INF/spring/alx.rya-spring-osgi.xml | 53 - .../META-INF/spring/alx.rya-spring.xml | 70 - .../src/main/resources/ROOT/crossdomain.xml | 25 - osgi/camel.rya/pom.xml | 70 - .../mvm/rya/camel/cbsail/CbSailComponent.java | 59 - .../mvm/rya/camel/cbsail/CbSailEndpoint.java | 119 - .../mvm/rya/camel/cbsail/CbSailProducer.java | 175 - .../services/org/apache/camel/component/cbsail | 1 - .../rya/camel/cbsail/CbSailIntegrationTest.java | 117 - .../mvm/rya/camel/cbsail/CbSailPojoMain.java | 45 - .../java/mvm/rya/camel/cbsail/CbSailTest.java | 205 - osgi/pom.xml | 91 - .../sesame-runtime-osgi/openrdf-sesame-osgi.bnd | 7 - osgi/sesame-runtime-osgi/pom.xml | 139 - pig/accumulo.pig/pom.xml | 84 - .../mvm/rya/accumulo/pig/AccumuloStorage.java | 383 -- .../mvm/rya/accumulo/pig/IndexWritingTool.java | 348 -- .../rya/accumulo/pig/SparqlQueryPigEngine.java | 268 -- .../pig/SparqlToPigTransformVisitor.java | 345 -- .../accumulo/pig/StatementPatternStorage.java | 304 -- .../pig/optimizer/SimilarVarJoinOptimizer.java | 210 - .../rya/accumulo/pig/AccumuloStorageTest.java | 284 -- .../rya/accumulo/pig/IndexWritingToolTest.java | 326 -- .../accumulo/pig/SparqlQueryPigEngineTest.java | 76 - .../pig/SparqlToPigTransformVisitorTest.java | 402 -- .../pig/StatementPatternStorageTest.java | 185 - .../src/test/resources/ResultsFile1.txt | 8 - .../src/test/resources/testQuery.txt | 7 - .../src/test/resources/testQuery2.txt | 4 - pig/pom.xml | 38 - sail/pom.xml | 98 - .../rya/rdftriplestore/RdfCloudTripleStore.java | 179 - .../RdfCloudTripleStoreConnection.java | 623 --- .../RdfCloudTripleStoreFactory.java | 56 - .../RdfCloudTripleStoreSailConfig.java | 133 - .../rya/rdftriplestore/RyaSailRepository.java | 53 - .../RyaSailRepositoryConnection.java | 109 - .../evaluation/ExternalBatchingIterator.java | 33 - .../ExternalMultipleBindingSetsIterator.java | 109 - .../evaluation/FilterRangeVisitor.java | 97 - .../evaluation/MultipleBindingSetsIterator.java | 108 - .../ParallelEvaluationStrategyImpl.java | 281 -- .../evaluation/ParallelJoinIterator.java | 139 - .../evaluation/PushJoinDownVisitor.java | 57 - .../evaluation/QueryJoinOptimizer.java | 284 -- .../evaluation/QueryJoinSelectOptimizer.java | 260 -- ...RdfCloudTripleStoreEvaluationStatistics.java | 281 -- ...pleStoreSelectivityEvaluationStatistics.java | 128 - .../evaluation/ReorderJoinVisitor.java | 70 - .../evaluation/SeparateFilterJoinsVisitor.java | 55 - .../inference/AbstractInferVisitor.java | 108 - .../rdftriplestore/inference/DoNotExpandSP.java | 51 - .../inference/InferConstants.java | 34 - .../rya/rdftriplestore/inference/InferJoin.java | 50 - .../rdftriplestore/inference/InferUnion.java | 48 - .../inference/InferenceEngine.java | 410 -- .../inference/InferenceEngineException.java | 43 - .../inference/InverseOfVisitor.java | 80 - .../rdftriplestore/inference/SameAsVisitor.java | 187 - .../inference/SubClassOfVisitor.java | 108 - .../inference/SubPropertyOfVisitor.java | 121 - .../inference/SymmetricPropertyVisitor.java | 78 - .../inference/TransitivePropertyVisitor.java | 69 - .../namespace/NamespaceManager.java | 167 - .../utils/CombineContextsRdfInserter.java | 165 - .../rdftriplestore/utils/DefaultStatistics.java | 58 - .../utils/FixedStatementPattern.java | 59 - .../utils/TransitivePropertySP.java | 52 - .../META-INF/org.openrdf.store.schemas | 1 - .../META-INF/schemas/cloudbasestore-schema.ttl | 20 - .../org.openrdf.sail.config.SailFactory | 1 - sail/src/main/resources/ehcache.xml | 46 - .../java/mvm/rya/ArbitraryLengthQueryTest.java | 500 -- sail/src/test/java/mvm/rya/HashJoinTest.java | 374 -- .../test/java/mvm/rya/IterativeJoinTest.java | 365 -- sail/src/test/java/mvm/rya/MergeJoinTest.java | 370 -- .../rya/RdfCloudTripleStoreConnectionTest.java | 1363 ------ .../java/mvm/rya/RdfCloudTripleStoreTest.java | 699 --- .../mvm/rya/RdfCloudTripleStoreUtilsTest.java | 86 - .../QueryJoinSelectOptimizerTest.java | 992 ---- ...toreSelectivityEvaluationStatisticsTest.java | 304 -- .../rya/triplestore/inference/SameAsTest.java | 115 - sail/src/test/resources/cdrdf.xml | 41 - sail/src/test/resources/namedgraphs.trig | 37 - sail/src/test/resources/ntriples.nt | 1 - sail/src/test/resources/reification.xml | 36 - sail/src/test/resources/univ-bench.owl | 466 -- src/license/apacheV2Header.ftl | 16 - temp.txt | 0 web/pom.xml | 38 - web/web.rya/pom.xml | 136 - web/web.rya/resources/environment.properties | 27 - .../cloudbase/sail/AbstractRDFWebServlet.java | 111 - .../web/cloudbase/sail/DeleteDataServlet.java | 66 - .../rdf/web/cloudbase/sail/LoadDataServlet.java | 76 - .../web/cloudbase/sail/QueryDataServlet.java | 185 - .../cloudbase/sail/QuerySerqlDataServlet.java | 136 - .../rdf/web/cloudbase/sail/RDFWebConstants.java | 35 - .../mvm/cloud/rdf/web/sail/RdfController.java | 344 -- .../mvm/cloud/rdf/web/sail/ResultFormat.java | 27 - .../rdf/web/sail/SecurityProviderImpl.java | 34 - .../webapp/WEB-INF/spring/spring-accumulo.xml | 51 - .../webapp/WEB-INF/spring/spring-cloudbase.xml | 50 - .../webapp/WEB-INF/spring/spring-mongodb.xml | 43 - .../WEB-INF/spring/spring-root-extensions.xml | 105 - .../main/webapp/WEB-INF/spring/spring-root.xml | 68 - .../webapp/WEB-INF/spring/spring-security.xml | 34 - web/web.rya/src/main/webapp/WEB-INF/web.xml | 166 - web/web.rya/src/main/webapp/crossdomain.xml | 25 - web/web.rya/src/main/webapp/sparqlQuery.jsp | 79 - .../cloudbase/sail/DeleteDataServletRun.java | 476 -- .../web/cloudbase/sail/LoadDataServletRun.java | 66 - .../web/cloudbase/sail/QueryDataServletRun.java | 467 -- .../web/sail/RdfControllerIntegrationTest.java | 86 - .../cloud/rdf/web/sail/RdfControllerTest.java | 160 - web/web.rya/src/test/resources/cdrdf.xml | 41 - .../controllerIntegrationTest-accumulo.xml | 50 - .../controllerIntegrationTest-root.xml | 62 - .../test/resources/controllerTest-context.xml | 40 - .../test/resources/dummyData/memorystore.data | Bin 290 -> 0 bytes web/web.rya/src/test/resources/namedgraphs.trig | 37 - web/web.rya/src/test/resources/test.nt | 3 - 517 files changed, 4 insertions(+), 107267 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/LICENSE ---------------------------------------------------------------------- diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d645695..0000000 --- a/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/NOTICE ---------------------------------------------------------------------- diff --git a/NOTICE b/NOTICE deleted file mode 100644 index 7148307..0000000 --- a/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -Apache Rya -Copyright 2015 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 7869bef..0376054 100644 --- a/README.md +++ b/README.md @@ -15,303 +15,9 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> -# RYA +# NOTICE -## Overview +This branch does not contain any source code. It exists for two reasons: -RYA is a scalable RDF Store that is built on top of a Columnar Index Store (such as Accumulo). It is implemented as an extension to OpenRdf to provide easy query mechanisms (SPARQL, SERQL, etc) and Rdf data storage (RDF/XML, NTriples, etc). - -RYA stands for RDF y(and) Accumulo. - -## Rya Manual - -A copy of the Rya Manual is located [here](extras/rya.manual/src/site/markdown/index.md). The material in the manual and below may be out of sync. - -## Upgrade Path - -Since the data encodings changed in the 3.2.2 release, you will need to run the Upgrade322Tool MapReduce job to perform the upgrade. - -1. Build the project with -Pmr to build the mapreduce artifacts -2. Make sure to clone the rya tables before doing the upgrade -3. Run - -``` -hadoop jar accumulo.rya-mr.jar mvm.rya.accumulo.mr.upgrade.Upgrade322Tool -Dac.instance={} -Dac.username={} -Dac.pwd={} -``` - -## Quick Start - -This tutorial will outline the steps needed to get quickly started with the Rya store using the web based endpoint. - -### Prerequisites - -* Columnar Store (either Accumulo) The tutorial will go forward using Accumulo -* Rya code (Git: git://git.apache.org/incubator-rya.git) -* Maven 3.0 + - -### Building from Source - -Using Git, pull down the latest code from the url above. - -Run the command to build the code `mvn clean install` - -If all goes well, the build should be successful and a war should be produced in `web/web.rya/target/web.rya.war` - -Note: To perform a build of the geomesa/lucene indexing, run the build with the profile 'indexing' `mvn clean install -P indexing` - -Note: If you are building on windows, you will need hadoop-common 2.6.0's `winutils.exe` and `hadoop.dll`. You can download it from [here](https://github.com/amihalik/hadoop-common-2.6.0-bin/archive/master.zip). This build requires the [Visual C++ Redistributable for Visual Studio 2015 (x64)](https://www.microsoft.com/en-us/download/details.aspx?id=48145). Also you will need to set your path and Hadoop home using the commands below: - -``` -set HADOOP_HOME=c:\hadoop-common-2.6.0-bin -set PATH=%PATH%;c:\hadoop-common-2.6.0-bin\bin -``` - -### Deployment Using Tomcat - -Unwar the above war into the webapps directory. - -To point the web.rya war to the appropriate Accumulo instance, make a properties file `environment.properties` and put it in the classpath. Here is an example: - -``` -instance.name=accumulo #Accumulo instance name -instance.zk=localhost:2181 #Accumulo Zookeepers -instance.username=root #Accumulo username -instance.password=secret #Accumulo pwd -rya.tableprefix=triplestore_ #Rya Table Prefix -rya.displayqueryplan=true #To display the query plan -``` - -Start the Tomcat server. `./bin/startup.sh` - -## Usage - -### Load Data - -#### Web REST endpoint - -The War sets up a Web REST endpoint at `http://server/web.rya/loadrdf` that allows POST data to get loaded into the Rdf Store. This short tutorial will use Java code to post data. - -First, you will need data to load and will need to figure out what format that data is in. - -For this sample, we will use the following N-Triples: - -``` -<http://mynamespace/ProductType1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://mynamespace/ProductType> . -<http://mynamespace/ProductType1> <http://www.w3.org/2000/01/rdf-schema#label> "Thing" . -<http://mynamespace/ProductType1> <http://purl.org/dc/elements/1.1/publisher> <http://mynamespace/Publisher1> . -``` - -Save this file somewhere $RDF_DATA - -Second, use the following Java code to load data to the REST endpoint: - -``` JAVA -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.net.URL; -import java.net.URLConnection; - -public class LoadDataServletRun { - - public static void main(String[] args) { - try { - final InputStream resourceAsStream = Thread.currentThread().getContextClassLoader() - .getResourceAsStream("$RDF_DATA"); - URL url = new URL("http://server/web.rya/loadrdf" + - "?format=N-Triples" + - ""); - URLConnection urlConnection = url.openConnection(); - urlConnection.setRequestProperty("Content-Type", "text/plain"); - urlConnection.setDoOutput(true); - - final OutputStream os = urlConnection.getOutputStream(); - - int read; - while((read = resourceAsStream.read()) >= 0) { - os.write(read); - } - resourceAsStream.close(); - os.flush(); - - BufferedReader rd = new BufferedReader(new InputStreamReader( - urlConnection.getInputStream())); - String line; - while ((line = rd.readLine()) != null) { - System.out.println(line); - } - rd.close(); - os.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } -} -``` - -Compile and run this code above, changing the references for $RDF_DATA and the url that your Rdf War is running at. - -The default "format" is RDF/XML, but these formats are supported : RDFXML, NTRIPLES, TURTLE, N3, TRIX, TRIG. - -#### Bulk Loading data - -Bulk loading data is done through Map Reduce jobs - -##### Bulk Load RDF data - - This Map Reduce job will read a full file into memory and parse it into statements. The statements are saved into the store. Here is an example for storing in Accumulo: - -``` -hadoop jar target/accumulo.rya-3.0.4-SNAPSHOT-shaded.jar mvm.rya.accumulo.mr.fileinput.BulkNtripsInputTool -Dac.zk=localhost:2181 -Dac.instance=accumulo -Dac.username=root -Dac.pwd=secret -Drdf.tablePrefix=triplestore_ -Dio.sort.mb=64 /tmp/temp.ntrips -``` - -Options: - -* rdf.tablePrefix : The tables (spo, po, osp) are prefixed with this qualifier. The tables become: (rdf.tablePrefix)spo,(rdf.tablePrefix)po,(rdf.tablePrefix)osp -* ac.* : Accumulo connection parameters -* rdf.format : See RDFFormat from openrdf, samples include (Trig, N-Triples, RDF/XML) -* io.sort.mb : Higher the value, the faster the job goes. Just remember that you will need this much ram at least per mapper - -The argument is the directory/file to load. This file needs to be loaded into HDFS before running. - -#### Direct OpenRDF API - -Here is some sample code to load data directly through the OpenRDF API. (Loading N-Triples data) -You will need at least accumulo.rya-<version>, rya.api, rya.sail.impl on the classpath and transitive dependencies. I find that Maven is the easiest way to get a project dependency tree set up. - -``` JAVA -final RdfCloudTripleStore store = new RdfCloudTripleStore(); -AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration(); -AccumuloRyaDAO dao = new AccumuloRdfDAO(); -Connector connector = new ZooKeeperInstance("instance", "zoo1,zoo2,zoo3").getConnector("user", "password"); -dao.setConnector(connector); -conf.setTablePrefix("rya_"); -dao.setConf(conf); -store.setRdfDao(dao); - -Repository myRepository = new RyaSailRepository(store); -myRepository.initialize(); -RepositoryConnection conn = myRepository.getConnection(); - -//load data from file -final File file = new File("ntriples.ntrips"); -conn.add(new FileInputStream(file), file.getName(), - RDFFormat.NTRIPLES, new Resource[]{}); - -conn.commit(); - -conn.close(); -myRepository.shutDown(); -``` - - -### Query Data - -#### Web JSP endpoint - -Open a url to `http://server/web.rya/sparqlQuery.jsp`. This simple form can run Sparql. - -### Web REST endpoint - -The War sets up a Web REST endpoint at `http://server/web.rya/queryrdf` that allows GET requests with queries. - -For this sample, we will assume you already loaded data from the [loaddata.html] tutorial - -Save this file somewhere $RDF_DATA - -Second, use the following Java code to load data to the REST endpoint: - -``` JAVA -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLEncoder; - -public class QueryDataServletRun { - - public static void main(String[] args) { - try { - String query = "select * where {\n" + - "<http://mynamespace/ProductType1> ?p ?o.\n" + - "}"; - - String queryenc = URLEncoder.encode(query, "UTF-8"); - - URL url = new URL("http://server/rdfTripleStore/queryrdf?query=" + queryenc); - URLConnection urlConnection = url.openConnection(); - urlConnection.setDoOutput(true); - - BufferedReader rd = new BufferedReader(new InputStreamReader( - urlConnection.getInputStream())); - String line; - while ((line = rd.readLine()) != null) { - System.out.println(line); - } - rd.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } -} -``` - -Compile and run this code above, changing the url that your Rdf War is running at. - -#### Direct Code - -Here is a code snippet for directly running against Accumulo with the code. You will need at least accumulo.rya.jar, rya.api, rya.sail.impl on the classpath and transitive dependencies. I find that Maven is the easiest way to get a project dependency tree set up. - -``` JAVA -Connector connector = new ZooKeeperInstance("instance", "zoo1,zoo2,zoo3").getConnector("user", "password"); - -final RdfCloudTripleStore store = new RdfCloudTripleStore(); -AccumuloRyaDAO crdfdao = new AccumuloRyaDAO(); -crdfdao.setConnector(connector); - -AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration(); -conf.setTablePrefix("rts_"); -conf.setDisplayQueryPlan(true); -crdfdao.setConf(conf); -store.setRdfDao(crdfdao); - -InferenceEngine inferenceEngine = new InferenceEngine(); -inferenceEngine.setRdfDao(crdfdao); -inferenceEngine.setConf(conf); -store.setInferenceEngine(inferenceEngine); - -Repository myRepository = new RyaSailRepository(store); -myRepository.initialize(); - -String query = "select * where {\n" + - "<http://mynamespace/ProductType1> ?p ?o.\n" + - "}"; -RepositoryConnection conn = myRepository.getConnection(); -System.out.println(query); -TupleQuery tupleQuery = conn.prepareTupleQuery( - QueryLanguage.SPARQL, query); -ValueFactory vf = ValueFactoryImpl.getInstance(); - -TupleQueryResultHandler writer = new SPARQLResultsXMLWriter(System.out); -tupleQuery.evaluate(new TupleQueryResultHandler() { - - int count = 0; - - @Override - public void startQueryResult(List<String> strings) throws TupleQueryResultHandlerException { - } - - @Override - public void endQueryResult() throws TupleQueryResultHandlerException { - } - - @Override - public void handleSolution(BindingSet bindingSet) throws TupleQueryResultHandlerException { - System.out.println(bindingSet); - } -}); - -conn.close(); -myRepository.shutDown(); -``` +1. We pushed a large change and this broke the process that pushes changes to github. We needed a small commit to wake up the process, so we created this branch and pushed a small change. +2. Apache currently prevents branch deletes \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/common/pom.xml ---------------------------------------------------------------------- diff --git a/common/pom.xml b/common/pom.xml deleted file mode 100644 index c14d712..0000000 --- a/common/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.rya</groupId> - <artifactId>rya-project</artifactId> - <version>3.2.10-SNAPSHOT</version> - </parent> - - <artifactId>rya.common</artifactId> - <name>Apache Rya Common Projects</name> - - <packaging>pom</packaging> - - <modules> - <module>rya.api</module> - <module>rya.provenance</module> - </modules> -</project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/common/rya.api/.gitignore ---------------------------------------------------------------------- diff --git a/common/rya.api/.gitignore b/common/rya.api/.gitignore deleted file mode 100644 index b83d222..0000000 --- a/common/rya.api/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/common/rya.api/pom.xml ---------------------------------------------------------------------- diff --git a/common/rya.api/pom.xml b/common/rya.api/pom.xml deleted file mode 100644 index 7c90521..0000000 --- a/common/rya.api/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.rya</groupId> - <artifactId>rya.common</artifactId> - <version>3.2.10-SNAPSHOT</version> - </parent> - - <artifactId>rya.api</artifactId> - <name>Apache Rya Common API</name> - - <dependencies> - <dependency> - <groupId>org.calrissian.mango</groupId> - <artifactId>mango-core</artifactId> - </dependency> - - <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-model</artifactId> - </dependency> - <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-query</artifactId> - </dependency> - <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-queryalgebra-model</artifactId> - </dependency> - <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-queryalgebra-evaluation</artifactId> - </dependency> - - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - </dependency> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-common</artifactId> - </dependency> - <dependency> - <groupId>joda-time</groupId> - <artifactId>joda-time</artifactId> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/common/rya.api/src/main/java/mvm/rya/api/InvalidValueTypeMarkerRuntimeException.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/mvm/rya/api/InvalidValueTypeMarkerRuntimeException.java b/common/rya.api/src/main/java/mvm/rya/api/InvalidValueTypeMarkerRuntimeException.java deleted file mode 100644 index eea50f4..0000000 --- a/common/rya.api/src/main/java/mvm/rya/api/InvalidValueTypeMarkerRuntimeException.java +++ /dev/null @@ -1,55 +0,0 @@ -package mvm.rya.api; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - - -/** - * Class InvalidValueTypeMarkerRuntimeException - * Date: Jan 7, 2011 - * Time: 12:58:27 PM - */ -public class InvalidValueTypeMarkerRuntimeException extends RuntimeException { - private int valueTypeMarker = -1; - - public InvalidValueTypeMarkerRuntimeException(int valueTypeMarker) { - super(); - this.valueTypeMarker = valueTypeMarker; - } - - public InvalidValueTypeMarkerRuntimeException(int valueTypeMarker, String s) { - super(s); - this.valueTypeMarker = valueTypeMarker; - } - - public InvalidValueTypeMarkerRuntimeException(int valueTypeMarker, String s, Throwable throwable) { - super(s, throwable); - this.valueTypeMarker = valueTypeMarker; - } - - public InvalidValueTypeMarkerRuntimeException(int valueTypeMarker, Throwable throwable) { - super(throwable); - this.valueTypeMarker = valueTypeMarker; - } - - public int getValueTypeMarker() { - return valueTypeMarker; - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/common/rya.api/src/main/java/mvm/rya/api/RdfCloudTripleStoreConfiguration.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/mvm/rya/api/RdfCloudTripleStoreConfiguration.java b/common/rya.api/src/main/java/mvm/rya/api/RdfCloudTripleStoreConfiguration.java deleted file mode 100644 index 1d0e165..0000000 --- a/common/rya.api/src/main/java/mvm/rya/api/RdfCloudTripleStoreConfiguration.java +++ /dev/null @@ -1,507 +0,0 @@ -package mvm.rya.api; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - - -import java.util.List; - -import mvm.rya.api.layout.TableLayoutStrategy; -import mvm.rya.api.layout.TablePrefixLayoutStrategy; -import mvm.rya.api.persist.RdfEvalStatsDAO; - -import org.apache.hadoop.conf.Configuration; -import org.openrdf.query.algebra.evaluation.QueryOptimizer; - -import com.google.common.base.Joiner; -import com.google.common.base.Preconditions; -import com.google.common.collect.Lists; - -/** - * Rdf triple store specific configuration - */ -public abstract class RdfCloudTripleStoreConfiguration extends Configuration { - - // public static final String CONF_ISQUERYTIMEBASED = "query.timebased"; - public static final String CONF_TTL = "query.ttl"; - public static final String CONF_STARTTIME = "query.startTime"; - // public static final String CONF_TIMEINDEXURIS = "query.timeindexuris"; - public static final String CONF_NUM_THREADS = "query.numthreads"; - public static final String CONF_PERFORMANT = "query.performant"; - public static final String CONF_INFER = "query.infer"; - public static final String CONF_USE_STATS = "query.usestats"; - public static final String CONF_USE_COMPOSITE = "query.usecompositecard"; - public static final String CONF_USE_SELECTIVITY = "query.useselectivity"; - public static final String CONF_TBL_PREFIX = "query.tblprefix"; - public static final String CONF_BATCH_SIZE = "query.batchsize"; - public static final String CONF_OFFSET = "query.offset"; - public static final String CONF_LIMIT = "query.limit"; - public static final String CONF_QUERYPLAN_FLAG = "query.printqueryplan"; - public static final String CONF_QUERY_AUTH = "query.auth"; - public static final String CONF_RESULT_FORMAT = "query.resultformat"; - public static final String CONF_CV = "conf.cv"; - public static final String CONF_TBL_SPO = "tbl.spo"; - public static final String CONF_TBL_PO = "tbl.po"; - public static final String CONF_TBL_OSP = "tbl.osp"; - public static final String CONF_TBL_NS = "tbl.ns"; - public static final String CONF_TBL_EVAL = "tbl.eval"; - public static final String CONF_PREFIX_ROW_WITH_HASH = "tbl.hashprefix"; - public static final String CONF_OPTIMIZERS = "query.optimizers"; - public static final String CONF_PCJ_OPTIMIZER = "pcj.query.optimizer"; - public static final String CONF_PCJ_TABLES = "pcj.index.tables"; - - - /** - * @deprecated use CONF_* - */ - public static final String BINDING_DISP_QUERYPLAN = CONF_QUERYPLAN_FLAG; - /** - * @deprecated use CONF_* - */ - public static final String BINDING_AUTH = CONF_QUERY_AUTH; - /** - * @deprecated use CONF_* - */ - public static final String BINDING_CV = CONF_CV; - /** - * @deprecated use CONF_* - */ - public static final String BINDING_TTL = CONF_TTL; - /** - * @deprecated use CONF_* - */ - public static final String BINDING_STARTTIME = CONF_STARTTIME; - /** - * @deprecated use CONF_* - */ - public static final String BINDING_PERFORMANT = CONF_PERFORMANT; - /** - * @deprecated use CONF_* - */ - public static final String BINDING_INFER = CONF_INFER; - /** - * @deprecated use CONF_* - */ - public static final String BINDING_USESTATS = CONF_USE_STATS; - /** - * @deprecated use CONF_* - */ - public static final String BINDING_OFFSET = CONF_OFFSET; - /** - * @deprecated use CONF_* - */ - public static final String BINDING_LIMIT = CONF_LIMIT; - - public static final String STATS_PUSH_EMPTY_RDFTYPE_DOWN = "conf.stats.rdftype.down"; - public static final String INFER_INCLUDE_INVERSEOF = "infer.include.inverseof"; - public static final String INFER_INCLUDE_SUBCLASSOF = "infer.include.subclassof"; - public static final String INFER_INCLUDE_SUBPROPOF = "infer.include.subpropof"; - public static final String INFER_INCLUDE_SYMMPROP = "infer.include.symmprop"; - public static final String INFER_INCLUDE_TRANSITIVEPROP = "infer.include.transprop"; - - public static final String RDF_DAO_CLASS = "class.rdf.dao"; - public static final String RDF_EVAL_STATS_DAO_CLASS = "class.rdf.evalstats"; - - public static final String REGEX_SUBJECT = "query.regex.subject"; - public static final String REGEX_PREDICATE = "query.regex.predicate"; - public static final String REGEX_OBJECT = "query.regex.object"; - private static final String[] EMPTY_STR_ARR = new String[0]; - - private TableLayoutStrategy tableLayoutStrategy = new TablePrefixLayoutStrategy(); - - public RdfCloudTripleStoreConfiguration() { - } - - public RdfCloudTripleStoreConfiguration(Configuration other) { - super(other); - if (other instanceof RdfCloudTripleStoreConfiguration) { - setTableLayoutStrategy(((RdfCloudTripleStoreConfiguration) other).getTableLayoutStrategy()); - } - } - - public abstract RdfCloudTripleStoreConfiguration clone(); - - public TableLayoutStrategy getTableLayoutStrategy() { - return tableLayoutStrategy; - } - - public void setTableLayoutStrategy(TableLayoutStrategy tableLayoutStrategy) { - if (tableLayoutStrategy != null) { - this.tableLayoutStrategy = tableLayoutStrategy; - } else { - this.tableLayoutStrategy = new TablePrefixLayoutStrategy(); //default - } - set(CONF_TBL_SPO, this.tableLayoutStrategy.getSpo()); - set(CONF_TBL_PO, this.tableLayoutStrategy.getPo()); - set(CONF_TBL_OSP, this.tableLayoutStrategy.getOsp()); - set(CONF_TBL_NS, this.tableLayoutStrategy.getNs()); - set(CONF_TBL_EVAL, this.tableLayoutStrategy.getEval()); - } - - public Long getTtl() { - String val = get(CONF_TTL); - if (val != null) { - return Long.valueOf(val); - } - return null; - } - - public void setTtl(Long ttl) { - Preconditions.checkNotNull(ttl); - Preconditions.checkArgument(ttl >= 0, "ttl must be non negative"); - set(CONF_TTL, ttl.toString()); - } - - public Long getStartTime() { - String val = get(CONF_STARTTIME); - if (val != null) { - return Long.valueOf(val); - } - return null; - } - - public void setStartTime(Long startTime) { - Preconditions.checkNotNull(startTime); - Preconditions.checkArgument(startTime >= 0, "startTime must be non negative"); - set(CONF_STARTTIME, startTime.toString()); - } - - public Integer getNumThreads() { - return getInt(CONF_NUM_THREADS, 2); - } - - public void setNumThreads(Integer numThreads) { - Preconditions.checkNotNull(numThreads); - Preconditions.checkArgument(numThreads > 0, "numThreads must be greater than 0"); - setInt(CONF_NUM_THREADS, numThreads); - } - - public Boolean isPerformant() { - return getBoolean(CONF_PERFORMANT, true); - } - - public void setPerformant(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(CONF_PERFORMANT, val); - } - - public Boolean isInfer() { - return getBoolean(CONF_INFER, true); - } - - public void setInfer(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(CONF_INFER, val); - } - - public Boolean isUseStats() { - return getBoolean(CONF_USE_STATS, false); - } - - public void setUseStats(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(CONF_USE_STATS, val); - } - - public Boolean isUseSelectivity() { - return getBoolean(CONF_USE_SELECTIVITY, false); - } - - public void setUseSelectivity(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(CONF_USE_SELECTIVITY, val); - } - - public Boolean isPrefixRowsWithHash() { - return getBoolean(CONF_PREFIX_ROW_WITH_HASH, false); - } - - public void setPrefixRowsWithHash(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(CONF_PREFIX_ROW_WITH_HASH, val); - } - - public String getTablePrefix() { - return get(CONF_TBL_PREFIX, RdfCloudTripleStoreConstants.TBL_PRFX_DEF); - } - - public void setTablePrefix(String tablePrefix) { - Preconditions.checkNotNull(tablePrefix); - set(CONF_TBL_PREFIX, tablePrefix); - setTableLayoutStrategy(new TablePrefixLayoutStrategy(tablePrefix)); //TODO: Should we change the layout strategy - } - - public Integer getBatchSize() { - String val = get(CONF_BATCH_SIZE); - if (val != null) { - return Integer.valueOf(val); - } - return null; - } - - public void setBatchSize(Long batchSize) { - Preconditions.checkNotNull(batchSize); - Preconditions.checkArgument(batchSize > 0, "Batch Size must be greater than 0"); - setLong(CONF_BATCH_SIZE, batchSize); - } - - public Long getOffset() { - String val = get(CONF_OFFSET); - if (val != null) { - return Long.valueOf(val); - } - return null; - } - - public void setOffset(Long offset) { - Preconditions.checkNotNull(offset); - Preconditions.checkArgument(offset >= 0, "offset must be positive"); - setLong(CONF_OFFSET, offset); - } - - public Long getLimit() { - String val = get(CONF_LIMIT); - if (val != null) { - return Long.valueOf(val); - } - return null; - } - - public void setLimit(Long limit) { - Preconditions.checkNotNull(limit); - Preconditions.checkArgument(limit >= 0, "limit must be positive"); - setLong(CONF_LIMIT, limit); - } - - - public Boolean isDisplayQueryPlan() { - return getBoolean(CONF_QUERYPLAN_FLAG, false); - } - - public void setDisplayQueryPlan(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(CONF_QUERYPLAN_FLAG, val); - } - - /** - * @return - * @deprecated - */ - public String getAuth() { - return Joiner.on(",").join(getAuths()); - } - - /** - * @param auth - * @deprecated - */ - public void setAuth(String auth) { - Preconditions.checkNotNull(auth); - setStrings(CONF_QUERY_AUTH, auth); - } - - public String[] getAuths() { - return getStrings(CONF_QUERY_AUTH, EMPTY_STR_ARR); - } - - public void setAuths(String... auths) { - setStrings(CONF_QUERY_AUTH, auths); - } - - public String getEmit() { - return get(CONF_RESULT_FORMAT); - } - - public void setEmit(String emit) { - Preconditions.checkNotNull(emit); - set(CONF_RESULT_FORMAT, emit); - } - - public String getCv() { - return get(CONF_CV); - } - - public void setCv(String cv) { - Preconditions.checkNotNull(cv); - set(CONF_CV, cv); - } - - - public Boolean isUseCompositeCardinality() { - return getBoolean(CONF_USE_COMPOSITE, true); - } - - public void setCompositeCardinality(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(CONF_USE_COMPOSITE, val); - } - - - public Boolean isStatsPushEmptyRdftypeDown() { - return getBoolean(STATS_PUSH_EMPTY_RDFTYPE_DOWN, true); - } - - public void setStatsPushEmptyRdftypeDown(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(STATS_PUSH_EMPTY_RDFTYPE_DOWN, val); - } - - public Boolean isInferInverseOf() { - return getBoolean(INFER_INCLUDE_INVERSEOF, true); - } - - public void setInferInverseOf(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(INFER_INCLUDE_INVERSEOF, val); - } - - public Boolean isInferSubClassOf() { - return getBoolean(INFER_INCLUDE_SUBCLASSOF, true); - } - - public void setInferSubClassOf(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(INFER_INCLUDE_SUBCLASSOF, val); - } - - public Boolean isInferSubPropertyOf() { - return getBoolean(INFER_INCLUDE_SUBPROPOF, true); - } - - public void setInferSubPropertyOf(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(INFER_INCLUDE_SUBPROPOF, val); - } - - public Boolean isInferSymmetricProperty() { - return getBoolean(INFER_INCLUDE_SYMMPROP, true); - } - - public void setInferSymmetricProperty(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(INFER_INCLUDE_SYMMPROP, val); - } - - public Boolean isInferTransitiveProperty() { - return getBoolean(INFER_INCLUDE_TRANSITIVEPROP, true); - } - - public void setInferTransitiveProperty(Boolean val) { - Preconditions.checkNotNull(val); - setBoolean(INFER_INCLUDE_TRANSITIVEPROP, val); - } - - public void setRdfEvalStatsDaoClass(Class<? extends RdfEvalStatsDAO> rdfEvalStatsDaoClass) { - Preconditions.checkNotNull(rdfEvalStatsDaoClass); - setClass(RDF_EVAL_STATS_DAO_CLASS, rdfEvalStatsDaoClass, RdfEvalStatsDAO.class); - } - - public Class<? extends RdfEvalStatsDAO> getRdfEvalStatsDaoClass() { - return getClass(RDF_EVAL_STATS_DAO_CLASS, null, RdfEvalStatsDAO.class); - } - - - public void setPcjTables(List<String> indexTables) { - Preconditions.checkNotNull(indexTables); - setStrings(CONF_PCJ_TABLES, indexTables.toArray(new String[]{})); - } - - - public List<String> getPcjTables() { - List<String> pcjTables = Lists.newArrayList(); - String[] tables = getStrings(CONF_PCJ_TABLES); - if(tables == null) { - return pcjTables; - } - for(String table: tables) { - Preconditions.checkNotNull(table); - pcjTables.add(table); - } - return pcjTables; - } - - - public void setPcjOptimizer(Class<? extends QueryOptimizer> optimizer) { - Preconditions.checkNotNull(optimizer); - setClass(CONF_PCJ_OPTIMIZER, optimizer, QueryOptimizer.class); - } - - public Class<QueryOptimizer> getPcjOptimizer() { - Class<? extends QueryOptimizer> opt = getClass(CONF_PCJ_OPTIMIZER, null, QueryOptimizer.class); - if (opt != null) { - Preconditions.checkArgument(QueryOptimizer.class.isAssignableFrom(opt)); - return (Class<QueryOptimizer>) opt; - } else { - return null; - } - - } - - - public void setOptimizers(List<Class<? extends QueryOptimizer>> optimizers) { - Preconditions.checkNotNull(optimizers); - List<String> strs = Lists.newArrayList(); - for (Class ai : optimizers){ - Preconditions.checkNotNull(ai); - strs.add(ai.getName()); - } - - setStrings(CONF_OPTIMIZERS, strs.toArray(new String[]{})); - } - - public List<Class<QueryOptimizer>> getOptimizers() { - List<Class<QueryOptimizer>> opts = Lists.newArrayList(); - for (Class<?> clazz : getClasses(CONF_OPTIMIZERS)){ - Preconditions.checkArgument(QueryOptimizer.class.isAssignableFrom(clazz)); - opts.add((Class<QueryOptimizer>) clazz); - } - - return opts; - } - - - - public String getRegexSubject() { - return get(REGEX_SUBJECT); - } - - public void setRegexSubject(String regexSubject) { - Preconditions.checkNotNull(regexSubject); - set(REGEX_SUBJECT, regexSubject); - } - - public String getRegexPredicate() { - return get(REGEX_PREDICATE); - } - - public void setRegexPredicate(String regex) { - Preconditions.checkNotNull(regex); - set(REGEX_PREDICATE, regex); - } - - public String getRegexObject() { - return get(REGEX_OBJECT); - } - - public void setRegexObject(String regex) { - Preconditions.checkNotNull(regex); - set(REGEX_OBJECT, regex); - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/common/rya.api/src/main/java/mvm/rya/api/RdfCloudTripleStoreConstants.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/mvm/rya/api/RdfCloudTripleStoreConstants.java b/common/rya.api/src/main/java/mvm/rya/api/RdfCloudTripleStoreConstants.java deleted file mode 100644 index 5311bd9..0000000 --- a/common/rya.api/src/main/java/mvm/rya/api/RdfCloudTripleStoreConstants.java +++ /dev/null @@ -1,151 +0,0 @@ -package mvm.rya.api; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - - -import mvm.rya.api.domain.RyaSchema; -import mvm.rya.api.domain.RyaType; -import mvm.rya.api.domain.RyaURI; -import org.apache.hadoop.io.Text; -import org.openrdf.model.Literal; -import org.openrdf.model.URI; -import org.openrdf.model.Value; -import org.openrdf.model.ValueFactory; -import org.openrdf.model.impl.ValueFactoryImpl; - -public class RdfCloudTripleStoreConstants { - - public static final String NAMESPACE = RyaSchema.NAMESPACE; - public static final String AUTH_NAMESPACE = RyaSchema.AUTH_NAMESPACE; - public static ValueFactory VALUE_FACTORY = ValueFactoryImpl.getInstance(); - public static URI RANGE = VALUE_FACTORY.createURI(NAMESPACE, "range"); - public static URI PARTITION_TIMERANGE = VALUE_FACTORY.createURI("urn:mvm.mmrts.partition.rdf/08/2011#", "timeRange"); - public static Literal EMPTY_LITERAL = VALUE_FACTORY.createLiteral(0); - public static final byte EMPTY_BYTES[] = new byte[0]; - public static final Text EMPTY_TEXT = new Text(); - - public static final Long MAX_MEMORY = 10000000l; - public static final Long MAX_TIME = 60000l; - public static final Integer NUM_THREADS = 4; - -// public static final String TS = "ts"; -// public static final Text TS_TXT = new Text(TS); - -// public static final String INFO = "info"; -// public static final Text INFO_TXT = new Text(INFO); - - public static final String SUBJECT_CF = "s"; - public static final Text SUBJECT_CF_TXT = new Text(SUBJECT_CF); - public static final String PRED_CF = "p"; - public static final Text PRED_CF_TXT = new Text(PRED_CF); - public static final String OBJ_CF = "o"; - public static final Text OBJ_CF_TXT = new Text(OBJ_CF); - public static final String SUBJECTOBJECT_CF = "so"; - public static final Text SUBJECTOBJECT_CF_TXT = new Text(SUBJECTOBJECT_CF); - public static final String SUBJECTPRED_CF = "sp"; - public static final Text SUBJECTPRED_CF_TXT = new Text(SUBJECTPRED_CF); - public static final String PREDOBJECT_CF = "po"; - public static final Text PREDOBJECT_CF_TXT = new Text(PREDOBJECT_CF); - - public static final String TBL_PRFX_DEF = "rya_"; - public static final String TBL_SPO_SUFFIX = "spo"; - public static final String TBL_PO_SUFFIX = "po"; - public static final String TBL_OSP_SUFFIX = "osp"; - public static final String TBL_EVAL_SUFFIX = "eval"; - public static final String TBL_STATS_SUFFIX = "prospects"; - public static final String TBL_SEL_SUFFIX = "selectivity"; - public static final String TBL_NS_SUFFIX = "ns"; - public static String TBL_SPO = TBL_PRFX_DEF + TBL_SPO_SUFFIX; - public static String TBL_PO = TBL_PRFX_DEF + TBL_PO_SUFFIX; - public static String TBL_OSP = TBL_PRFX_DEF + TBL_OSP_SUFFIX; - public static String TBL_EVAL = TBL_PRFX_DEF + TBL_EVAL_SUFFIX; - public static String TBL_STATS = TBL_PRFX_DEF + TBL_STATS_SUFFIX; - public static String TBL_SEL = TBL_PRFX_DEF + TBL_SEL_SUFFIX; - public static String TBL_NAMESPACE = TBL_PRFX_DEF + TBL_NS_SUFFIX; - - public static Text TBL_SPO_TXT = new Text(TBL_SPO); - public static Text TBL_PO_TXT = new Text(TBL_PO); - public static Text TBL_OSP_TXT = new Text(TBL_OSP); - public static Text TBL_EVAL_TXT = new Text(TBL_EVAL); - public static Text TBL_NAMESPACE_TXT = new Text(TBL_NAMESPACE); - - public static void prefixTables(String prefix) { - if (prefix == null) - prefix = TBL_PRFX_DEF; - TBL_SPO = prefix + TBL_SPO_SUFFIX; - TBL_PO = prefix + TBL_PO_SUFFIX; - TBL_OSP = prefix + TBL_OSP_SUFFIX; - TBL_EVAL = prefix + TBL_EVAL_SUFFIX; - TBL_NAMESPACE = prefix + TBL_NS_SUFFIX; - - TBL_SPO_TXT = new Text(TBL_SPO); - TBL_PO_TXT = new Text(TBL_PO); - TBL_OSP_TXT = new Text(TBL_OSP); - TBL_EVAL_TXT = new Text(TBL_EVAL); - TBL_NAMESPACE_TXT = new Text(TBL_NAMESPACE); - } - - public static final String INFO_NAMESPACE = "namespace"; - public static final Text INFO_NAMESPACE_TXT = new Text(INFO_NAMESPACE); - - public static final byte DELIM_BYTE = 0; - public static final byte TYPE_DELIM_BYTE = 1; - public static final byte LAST_BYTE = -1; //0xff - public static final byte[] LAST_BYTES = new byte[]{LAST_BYTE}; - public static final byte[] TYPE_DELIM_BYTES = new byte[]{TYPE_DELIM_BYTE}; - public static final String DELIM = "\u0000"; - public static final String DELIM_STOP = "\u0001"; - public static final String LAST = "\uFFDD"; - public static final String TYPE_DELIM = new String(TYPE_DELIM_BYTES); - public static final byte[] DELIM_BYTES = DELIM.getBytes(); - public static final byte[] DELIM_STOP_BYTES = DELIM_STOP.getBytes(); - - - /* RECORD TYPES */ - public static final int URI_MARKER = 7; - - public static final int BNODE_MARKER = 8; - - public static final int PLAIN_LITERAL_MARKER = 9; - - public static final int LANG_LITERAL_MARKER = 10; - - public static final int DATATYPE_LITERAL_MARKER = 11; - - public static final int EOF_MARKER = 127; - - // public static final Authorizations ALL_AUTHORIZATIONS = new Authorizations( - // "_"); - - public static enum TABLE_LAYOUT { - SPO, PO, OSP - } - - //TODO: This should be in a version file somewhere - public static URI RTS_SUBJECT = VALUE_FACTORY.createURI(NAMESPACE, "rts"); - public static RyaURI RTS_SUBJECT_RYA = new RyaURI(RTS_SUBJECT.stringValue()); - public static URI RTS_VERSION_PREDICATE = VALUE_FACTORY.createURI(NAMESPACE, "version"); - public static RyaURI RTS_VERSION_PREDICATE_RYA = new RyaURI(RTS_VERSION_PREDICATE.stringValue()); - public static final Value VERSION = VALUE_FACTORY.createLiteral("3.0.0"); - public static RyaType VERSION_RYA = new RyaType(VERSION.stringValue()); - - public static String RYA_CONFIG_AUTH = "RYACONFIG"; -}
